Repository navigation
feat(search): add deterministic template search over the local store - #249
Conversation
Review —
|
|
P2 landed: #248 merged to This PR's base is still No conflict is expected: #249 changes |
|
Peer check for the retarget, so it does not cost the owner a discovery round: I rebased this branch locally in a throwaway worktree (no push; the branch is still yours to retarget) and the stack is clean.
The full 🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1 |
Add P3 of #236: filter by category, framework, tags (all/any), required features, and free text; return the latest version per id by default, with pinned/all-version options; page deterministically and report truncation and corrupt entries. Results are metadata only (file count, digest, licence, provenance), so an external AI can choose before fetching a package. Also add the package description to the stored metadata and share the test fixture between the store and search tests. Refs #236. Assisted-by: Claude Code (direction-lead)
6ae8020 to
fd073db
Compare
|
Rebased onto All applicable checks pass on this head: Source tests, Test shards, Static checks, Windows source gates, Documentation, Packaged CLI/MCP rehearsal, Build package, Portable tests, and the author declaration. The The review at Assisted-by: Claude Code (direction-lead) |
Re-review at
|
|
Owner approval. Approved at Reviewed in this comment. No blocking findings: the rebase left the P3 code byte-identical (I diffed At this head: Merging as a merge commit at the exact reviewed head. Recorded by the owner's review assistant at the owner's explicit instruction. |
Summary
Part of #236. P3, deterministic search over the local store. Rebased onto
mainafter #248 and #252 merged; the base is nowmainand the diff is only the P3 changes. Headfd073db.Adds
src/application/TemplateSearch.ts:all/any), required features, free text over id/name/description/framework/category/tags/features, and an exactversion;allVersionsreturns every version;matched_onso the caller can see why a result matched;limitdefault 20, max 100;offset) withtotalandtruncated;file_count; no file bytes and nofileslist;corrupt[], never as matches.It also adds the package
descriptiontoStoredTemplatePackage(needed for text search) and moves the package fixture totests/support/templatePackageFixture.tsso the store and search tests share one definition.No model call, network request, tool contract, export, or scan is added; those are P4/P5.
Contract and boundary impact
Evidence and regression coverage
src/application/TemplateSearch.test.ts— 9 cases covering latest/pinned/all versions, category/framework/tag/feature/text filters,matched_on, pagination/truncation, corrupt entries, empty store, and SemVer ordering.TemplateStore.test.tsstill passes after the shared fixture change (14 cases).main(ffa8350) atfd073db; all applicable CI checks pass (the two real-toolchain lanes are skipped by change classification). The earlier local evidence remains valid for the same P3 diff.npm run check:prwas not run as one command on the authoring tree because it was written and pushed through the GitHub API (no local git history); the checks above are what ran. CI runs the full gate.not_found/corrupt entry; it is reported, not retried into a stale answer.Author readiness
Left for the human owner. No declaration, approval, or review attestation is made here.
Human owner: @Antruly
Before merge
Retargeted to
mainand rebased ontoffa8350(the merge of #252); no longer stacked.type(scope): outcome.