Commit 92ae593
authored
perf(semantic-search): snapshot manifest partitions (#65)
## Summary
Hardens the per-run manifest snapshot layer so scans are pinned to the
manifest captured at index creation time. This protects the KV-only scan
path from accidentally falling back to a later live catalog read.
## Changes
- Add regression coverage for create-time manifest snapshot stability.
- Prove `scan` does not reread a changed live manifest after `create`.
- Assert the scanned job keeps the original snapshot fingerprint and
source revision.
## Call Stack
```text
ToolSearchIndex.create()
-> listToolManifests() once
-> partition manifests
-> write index-manifest/v1/{runId}/{partition} to executor.cache
ToolSearchIndex.scan()
-> read partition snapshot from executor.cache
-> never call executor.tools.manifest()
-> materialize jobs from the snapshot
```
## Tests
- `bun run --cwd packages/plugins/semantic-search test --
src/sdk/tool-search-index.test.ts`
- `bun run --cwd packages/plugins/semantic-search typecheck`
- `bunx oxfmt --check
packages/plugins/semantic-search/src/sdk/tool-search-index.test.ts`
- `bunx oxlint -c .oxlintrc.jsonc --deny-warnings
packages/plugins/semantic-search/src/sdk/tool-search-index.test.ts`
## Stack
Base: #64
<!-- stack:links:start -->
### [Stack](https://github.com/aryasaatvik/stack)
1. #63
2. #64
3. **#65** 👈 current
<!-- stack:links:end -->1 parent 40d5680 commit 92ae593
1 file changed
Lines changed: 39 additions & 0 deletions
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1035 | 1074 | | |
1036 | 1075 | | |
1037 | 1076 | | |
| |||
0 commit comments