Skip to content

SKaiNET site search on the docs site - #550

Merged
michalharakal merged 2 commits into
developfrom
site-search
Nov 23, 2026
Merged

michalharakal merged 2 commits into
developfrom
site-search

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Dogfoods SKaiNET-rag site search on our own docs: hybrid BM25 + vector search, fully client-side — the site ships _search/search.lrb (~718 KB for current content) plus a 415 KB wasm engine (~155 KB compressed) that lazy-loads on first focus of the search box. No search server.

What changes

  • docs/.docker/Dockerfile: node 20 → 22 (the indexer is Kotlin/Wasm, run in-process at build time; needs Node 22's default-on wasm GC) and installs @skainet/antora-site-search 0.1.1 from its release tarball — no npm registry involved.
  • docs/antora-playbook.yml: registers the extension; UI bundle → skainet-docs-ui v1.2.0 (ships the search UX: grouped results, highlighting, keyboard nav, dark mode).
  • .github/workflows/docs.yml: SOURCE_DATE_EPOCH pinned to the last commit + a determinism canary — the site is built twice and search.lrb byte-compared. Rehearsing exactly this canary locally caught a real bug (Antora's concurrent content aggregation varies page order run-to-run), fixed in extension 0.1.1.

Verified locally with this exact image: two containerized builds → search.lrb byte-identical; headless Chrome against the built site — engine lazy-loads on focus, 286 sections indexed, query "tool calling llama" returns anchored hits, ArrowDown+Enter navigates to tool-calling.html#_supported_chat_templates.

⚠️ Hold merge until skainet-docs-ui v1.2.0 is released (PR #3 merge + v1.2.0 tag) — the playbook's UI URL 404s until then, so this PR's docs build will stay red up to that point.

🤖 Generated with Claude Code

michalharakal and others added 2 commits November 23, 2026 16:58
Hybrid (BM25 + vector) client-side search for the docs site, powered by
@skainet/antora-site-search from SKaiNET-rag:

- Docker image: node 20 -> 22 (the indexer runs as Kotlin/Wasm in-process at
  build time and needs Node 22's default-on wasm GC); install the extension
  from its SKaiNET-rag release tarball (no npm registry).
- Playbook: register the extension; bump the UI bundle to skainet-docs-ui
  v1.2.0, which ships the search box UX. Queries run entirely in the
  visitor's browser against _search/search.lrb published with the site.
- CI: pin SOURCE_DATE_EPOCH to the last commit and add a determinism canary
  (build twice, byte-compare search.lrb) — it already caught a real page-order
  nondeterminism during rehearsal, fixed in extension 0.1.1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…less pages)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@michalharakal
michalharakal merged commit 14fba21 into develop Nov 23, 2026
4 checks passed
@michalharakal
michalharakal deleted the site-search branch November 23, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant