Wiki: drop the unused lookup, search and section routes

Nothing in the page or the link scanner called /api/wiki/lookup,
/api/wiki/search or /api/wiki/section. Remove the routes and what
existed only for them: readTitles and the POST allowance,
WikiClient.search and SearchHit, TTL.search, snippet(), the mock's
search/page answer, WikiClient.section and Section. WikiClient.lookup
stays (the scanner uses it), as do suggest and article.

Tests of the removed code go; input validation and off mode are now
checked on remaining routes. The mock's Eukaryote fixture gets its own
page id instead of sharing Hostile article's. README and
docs/wikipedia.md list what exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-17 18:04:16 -05:00
1 parent 60d26908d6
commit 5c867b2eef
9 files changed
+24 -190

No files matched your search

+1 -4
View File
@@ -61,7 +61,7 @@ describe("mock Wikipedia", () => {
expect((await w.lookup(["No such page"]))[0]).toMatchObject({ status: "missing" });
});
it("suggests case-insensitively by title or word prefix, and searches with marked excerpts", async () => {
it("suggests case-insensitively by title or word prefix", async () => {
const w = client();
const s = await w.suggest("LAMB");
expect(s.ok && s.value.map((x) => x.title)).toEqual(["Lambda calculus"]);
@@ -70,9 +70,6 @@ describe("mock Wikipedia", () => {
const merc = await w.suggest("mercury");
expect(merc.ok && merc.value[0].title).toBe("Mercury");
expect(merc.ok && merc.value.map((x) => x.title)).toContain("Freddie Mercury");
const q = await w.search("nervous system");
expect(q.ok && q.value.map((x) => x.title)).toEqual(["Octopus", "Cephalopod"]);
expect(q.ok && q.value[0].snippetHtml).toMatch(/<mark>nervous<\/mark> <mark>system<\/mark>/);
});
it("misbehaves on purpose for the offline and rate-limited titles, without poisoning later calls", async () => {