@functional-systems/srcx 0.1.0-dev.4 → 0.1.0-dev.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +179 -0
  2. package/CONTRIBUTING.md +4 -0
  3. package/DESIGN.md +378 -58
  4. package/README.md +628 -35
  5. package/RELEASING.md +15 -3
  6. package/VALIDATION.md +1120 -16
  7. package/dist/artifact.d.ts +31 -0
  8. package/dist/artifact.js +237 -0
  9. package/dist/artifact.js.map +1 -0
  10. package/dist/build.d.ts +86 -3
  11. package/dist/build.js +233 -71
  12. package/dist/build.js.map +1 -1
  13. package/dist/chunk.d.ts +9 -3
  14. package/dist/chunk.js +341 -14
  15. package/dist/chunk.js.map +1 -1
  16. package/dist/cli.js +130 -21
  17. package/dist/cli.js.map +1 -1
  18. package/dist/file-policy.d.ts +20 -0
  19. package/dist/file-policy.js +103 -0
  20. package/dist/file-policy.js.map +1 -0
  21. package/dist/implementation.d.ts +11 -0
  22. package/dist/implementation.js +191 -0
  23. package/dist/implementation.js.map +1 -0
  24. package/dist/publish.d.ts +18 -0
  25. package/dist/publish.js +224 -46
  26. package/dist/publish.js.map +1 -1
  27. package/dist/releases.js +21 -3
  28. package/dist/releases.js.map +1 -1
  29. package/dist/remote.d.ts +1 -0
  30. package/dist/remote.js +50 -9
  31. package/dist/remote.js.map +1 -1
  32. package/dist/repository.d.ts +4 -1
  33. package/dist/repository.js +26 -11
  34. package/dist/repository.js.map +1 -1
  35. package/dist/rerank.d.ts +16 -0
  36. package/dist/rerank.js +87 -0
  37. package/dist/rerank.js.map +1 -0
  38. package/dist/search.d.ts +18 -3
  39. package/dist/search.js +143 -23
  40. package/dist/search.js.map +1 -1
  41. package/dist/skills.d.ts +24 -0
  42. package/dist/skills.js +155 -0
  43. package/dist/skills.js.map +1 -0
  44. package/package.json +17 -6
  45. package/runtime/grammars/README.md +50 -0
  46. package/runtime/grammars/tree-sitter-bash.LICENSE +21 -0
  47. package/runtime/grammars/tree-sitter-bash.wasm +0 -0
  48. package/runtime/grammars/tree-sitter-sql.LICENSE +21 -0
  49. package/runtime/grammars/tree-sitter-sql.wasm +0 -0
  50. package/runtime/grammars/tree-sitter-wasm.LICENSE +21 -0
  51. package/runtime/qwen.py +132 -0
  52. package/runtime/requirements.txt +34 -0
  53. package/skills/srcx-search/SKILL.md +103 -0
  54. package/src/artifact.ts +303 -0
  55. package/src/build.ts +313 -84
  56. package/src/chunk.ts +360 -12
  57. package/src/cli.ts +263 -23
  58. package/src/file-policy.ts +166 -0
  59. package/src/implementation.ts +253 -0
  60. package/src/publish.ts +321 -47
  61. package/src/releases.ts +36 -3
  62. package/src/remote.ts +70 -13
  63. package/src/repository.ts +40 -11
  64. package/src/rerank.ts +131 -0
  65. package/src/search.ts +229 -28
  66. package/src/skills.ts +205 -0
package/VALIDATION.md CHANGED
@@ -1,15 +1,825 @@
1
1
  # Validation record
2
2
 
3
- Date: 2026-09-25 (Asia/Seoul).
3
+ ## Semantic value against adaptive keyword search
4
+
5
+ The [nine-session comparison](eval/SEMANTIC-VALUE-RESULTS.md) on cleaned, pinned
6
+ Click and Cobra corpora finds equal answer coverage across local, lexical-first
7
+ and semantic-first conditions. Semantic-first averages 35.4% more total input,
8
+ 36.2% more uncached input and 6.7% more time than local. All six indexed agents
9
+ perform one initial search and then investigate locally. Static full-question
10
+ range hits favor semantic (1/3 versus 0/3), but agent-selected first queries
11
+ favor lexical (3/3 versus 1/3). No unique semantic task benefit is established.
12
+
13
+ All 60 search previews/handles, 110 linked citation ranges, nine source pins,
14
+ 69 frozen inputs and four bracketing resolutions are verified. Two publications
15
+ consume 373,832 estimated document tokens; six query embeddings are used. No
16
+ product settings change, no paid retries occur, and the bounded test stops.
17
+
18
+ ## Agent choice across repositories and versions
19
+
20
+ The [six-session comparison](eval/VERSION-AGENT-RESULTS.md) offers the installed
21
+ srcx skill alongside identical local CLI/SDK source trees for three fresh
22
+ maintenance questions. All three srcx-condition agents read the skill but make
23
+ zero srcx calls. Both conditions meet 14 frozen facts and partially meet one;
24
+ no material answer errors were found under assistant source review. All 82 linked
25
+ citation ranges were opened and checked. Tests cited by agents were not executed.
26
+
27
+ Mean total input is 11.0% lower and time 8.1% lower with srcx offered, but uncached
28
+ input is 6.1% higher. With no retrieval calls, these are session differences, not
29
+ evidence of srcx search efficiency or cost savings. Stop tuning this prepared-local
30
+ workflow; any team pilot needs an actual recurring source-access need.
31
+
32
+ All six sessions finish within budget, all 18 source checkouts stay clean at their
33
+ pins, and all 31 frozen inputs match. Six before/after resolution checks confirm
34
+ unchanged commit/Tag/Snapshot identities. No imports, task searches, embeddings or
35
+ remote writes occur. The protocol, rubric and runtime hashes were committed before
36
+ execution; raw sessions and source evidence remain in the local evaluation archive.
37
+
38
+ ## Direct Collection lookup
39
+
40
+ Exact generated Collection selectors now fetch only the selected metadata and
41
+ repository descriptor; names/keys retain discovery and ambiguity checks. Only
42
+ HTTP 404 falls back to alias discovery. Tests cover schema/descriptor rejection,
43
+ missing Collection-shaped aliases, non-404 failure handling, sanitized errors,
44
+ and the actual CLI/SDK path. All 165 tests and seven installed-package checks pass
45
+ on Node 24.15.0, along with typecheck, version, formatting and diff checks.
46
+
47
+ The [controlled read-only replay](eval/DIRECT-LOOKUP-RESULTS.md) compares archived
48
+ baseline runtime with the optimization on the same three immutable versions.
49
+ All 38 calls complete; 16 reads and 50 previews/handles verify against source.
50
+ Read outputs and search rankings/scores/excerpts are identical, excluding local
51
+ result IDs. Before/after version identities and frozen input hashes match.
52
+ No imports, embeddings or remote mutations occur.
53
+
54
+ Each measured operation saves 22 HTTP requests. Known-range reads fall from
55
+ 34–36 to 12–14 requests and average 1.905 to 0.706 seconds; lexical searches fall
56
+ from 48–50 to 26–28 requests and average 2.399 to 1.203 seconds. These are
57
+ alternating-order single observations, not a general latency or agent-cost claim.
58
+
59
+ ## Cross-repository versioned source delivery
60
+
61
+ The [bounded workflow diagnostic](eval/VERSION-WORKFLOW-RESULTS.md) covers
62
+ LambdaDB CLI v0.1.0 and TypeScript SDK v0.4.3/v0.5.1. A fresh client with no local
63
+ source attachment verifies all eight requested source spans and 25 lexical
64
+ previews/handles. All three immutable Tag/Snapshot identities remain unchanged
65
+ before/after reads; all 23 frozen runtime/harness inputs match. All 31 reserved
66
+ CLI calls complete. Three dry-run corpora contain 3,425 file/chunk records and
67
+ 1,994,646 source bytes across snapshots, with zero embeddings.
68
+
69
+ Mean known-range read time is 16.3 ms for local Git and 2,107.0 ms for srcx.
70
+ Remote reads make 34–36 HTTP requests each, including 23 repository-descriptor
71
+ fetches. Equal source/identity envelopes intentionally yield equal stdout tokens;
72
+ this is not evidence of model-token savings or autonomous task accuracy. Setup
73
+ costs and source-test inspection are separate from task reads. The next measured
74
+ optimization target is exact-Collection selection without project-wide discovery;
75
+ the product runtime and retrieval defaults are unchanged in this evaluation.
76
+
77
+ ## Fresh adaptive agent navigation
78
+
79
+ [Eight fresh sessions](eval/FRESH-AGENT-NAVIGATION-RESULTS.md) compare local tools
80
+ against local tools plus srcx on four new Requests behavior questions. Both arms
81
+ support all frozen facts under assistant source review. Mean total input is 3.2%
82
+ lower with srcx, while mean wall time is 6.3% longer; one observation per condition
83
+ does not establish a general efficiency advantage. Three lexical searches and one
84
+ semantic search were followed by local reads; no srcx implementation read occurred.
85
+
86
+ All 18 previews/handles match pinned source and version metadata, eight checkouts
87
+ remain clean, and 31 frozen inputs match their pre-run hashes. Setup/audit resolution
88
+ confirms the same immutable Snapshot. Argument and exhausted-budget guard checks
89
+ passed before execution. Two recoverable local command errors remain in the data;
90
+ all sessions and service calls completed. No reindexing, document embeddings,
91
+ ranking changes or agent reruns were performed. Raw task workspaces were archived
92
+ with all 1,310 file hashes verified; historical evaluations remain unchanged.
93
+
94
+ ## Optional overload implementation reads
95
+
96
+ [Offline navigation results](eval/IMPLEMENTATION-READ-RESULTS.md) cover six fresh
97
+ Python/TypeScript/TSX fixtures and a separate replay of exposed Requests results.
98
+ All twelve synthetic declaration starts reach their expected bodies. Ten of 115
99
+ archived reads resolve to streaming implementations, improving required-span
100
+ coverage on four query/mode rows while total read-output tokens increase 9.7%.
101
+ No complete-task, agent-efficiency or semantic ranking advantage is established.
102
+
103
+ All 158 tests and seven installed-package tests pass on Node 24.15.0, along with
104
+ six installed-module navigation assertions, typecheck, version, formatting and
105
+ bundled skill validation. Source/Tag integrity, conservative refusal, source-token
106
+ limits, accurate citations and unchanged ordinary reads are covered. No service
107
+ writes, embeddings, new searches or agent sessions were performed.
108
+
109
+ The namespace-merge review follow-up passes all 162 tests. TypeScript namespace
110
+ augmentation no longer counts as a second function implementation; exported and
111
+ non-exported merges link to the exact body, while duplicate bodies and interrupted
112
+ overload groups still reject linking. The exported-merge regression fails on the
113
+ original PR head. The offline evaluation above retains its original runtime and
114
+ results; it was not rerun for this TypeScript-only fix.
115
+
116
+ ## File selection and embedding policy
117
+
118
+ Offline validation on Node 24.15.0 passed 128 tests and seven installed-package
119
+ checks, plus typecheck, version and formatting checks. Synthetic tracked files
120
+ verify credential/crypto/image exclusions, case-insensitive minified assets,
121
+ virtual environments, dependency/cache paths and logs. Lockfiles, generated code,
122
+ snapshots and data retain source and lexical chunks without managed inputs.
123
+ Ordinary source, tests, manifests, templates and configurable Sphinx documentation
124
+ remain eligible. Ordered path overrides, configuration identity, baseline rejection,
125
+ unchanged-file reuse, managed publication and CLI override rejection are covered.
126
+ The CLI evaluator's actual offline prepare test includes an in-tree answer fixture
127
+ and verifies it is absent from the prepared corpus.
128
+
129
+ Fresh offline inventories reused the audited source commits:
130
+
131
+ | Repository | Result |
132
+ | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133
+ | Requests `611c6162cbc4ac2020a2f91c7cfa4f3abf9bbb60` | Excludes 12 certificate/key payload files. Estimated managed input decreases from the image-only build's 179,548 to 159,849 tokens; legal/author files stay lexical-only and docs/conf.py stays eligible. |
134
+ | srcx `e83134b44a11d78a79c5941c0e1f907383f238b3` | Explicit `eval/**` exclusion removes 45 evaluation files: total chunk tokens decrease from 316,889 to 202,835. This is a corpus boundary, not a claim that earlier answers used leaked labels. |
135
+ | lambdadb-cli `513af6e4d262edd380013c86d51a20aad16274d7` | Retains all 38 files and 200 chunks; package-lock.json (22,076 chunk tokens), LICENSE and JSONL examples have no managed input. The retained baseline was lexical-only, so this is not a measured embedding-cost reduction. |
136
+
137
+ All excluded paths have zero file/chunk records and all lexical-only files have
138
+ zero embedding inputs in these rebuilt artifacts. No service writes, provider calls
139
+ or agent sessions were performed. Existing remote Collections and historical
140
+ results are unchanged. The pinned policy selects a new configuration; no legacy
141
+ preset compatibility or migration layer was added. Generated detection is limited
142
+ to explicit markers/suffixes, `.gitattributes` is not interpreted, and credential
143
+ rules are not a general secret scanner. Additional evaluation-label locations must
144
+ be added to the explicit evaluation policy before running a different suite.
145
+
146
+ ## Image exclusion
147
+
148
+ Image assets are excluded by case-insensitive extension before source records,
149
+ chunking or embedding, including SVG and text pixel maps. Source and installed
150
+ CLI checks cover image exclusion for lexical and managed presets; TSX containing
151
+ inline SVG still produces managed chunks. The regression fails against the
152
+ archived pre-fix runtime. All 125 tests, six installed-package checks, typecheck,
153
+ version and formatting checks passed on Node 24.15.0.
154
+
155
+ A credential-free rebuild of the same Requests commit used in the semantic pilot
156
+ excluded the logo SVG: managed input fell from 806,268 to 179,548 estimated tokens
157
+ (77.7%), and managed chunks from 1,864 to 1,081. No remote import, agent rerun or
158
+ retrieval improvement was measured. Previous results and their runtime are retained.
159
+
160
+ ## Semantic agent investigation
161
+
162
+ [The semantic follow-up](eval/SEMANTIC-AGENT-RESULTS.md) covers twelve fresh sessions
163
+ on four frozen Requests questions, with the same local checkout in all conditions.
164
+ All answers covered the required facts under assistant source review. Mean times
165
+ were 69.9 seconds for local tools, 68.6 for lexical-first and 68.0 for semantic-first;
166
+ these single-run differences do not establish an efficiency gain. Semantic used
167
+ more total model input than both other conditions. All srcx sessions used one
168
+ search followed by local reads.
169
+
170
+ All 35 task previews and five separate diagnostic previews matched pinned source
171
+ and immutable version metadata; twelve checkouts and 26 runtime/harness fingerprints
172
+ passed verification. Payload validation does not establish nearest-neighbor recall:
173
+ one unfiltered semantic query returned SVG chunks, while a Python-filtered query
174
+ returned relevant methods with higher scores. The report preserves this unresolved
175
+ retrieval discrepancy separately from the original agent comparison. No product
176
+ search policy, embedding model or ranking default changed.
177
+
178
+ ## Agent workflow diagnostic
179
+
180
+ [The agent workflow record](eval/AGENT-WORKFLOW-PILOT.md) covers eight fresh Codex
181
+ sessions on three frozen questions against pinned public srcx/lambdadb-cli source.
182
+ Optional srcx access was unused in all three paired development environments.
183
+ A separate explicit-invocation confirmation used three searches and seven reads
184
+ without cloning. Both it and the Git/local baseline answered correctly under
185
+ assistant source review; srcx took 94.2 seconds versus 65.8, with more total model
186
+ input but less uncached input. No token-cost, latency or accuracy win is claimed.
187
+ Six successful reads and ten search previews matched pinned source/version data.
188
+ The report separates preparation cost, guided invocation, evolving environment
189
+ conditions and the audited wrapper reservation defect from product correctness.
190
+
191
+ ## Bash grammar runtime compatibility
192
+
193
+ Preparing the agent workflow pilot exposed a real import failure in the public
194
+ `lambdadb-cli` repository at `513af6e4d262edd380013c86d51a20aad16274d7`:
195
+ `scripts/test-homebrew.sh` aborted local materialization with
196
+ `TypeError: resolved is not a function`. A minimal `[[ "$value" == 1 ]]`
197
+ comparison reproduces it with the previous Bash grammar/runtime combination.
198
+ The replacement grammar is bundled with its license and pinned checksum in
199
+ `CHUNKER.shellGrammar`; other language runtimes remain unchanged.
200
+
201
+ The regression fixture fails before the replacement and passes afterward,
202
+ preserving complete source-byte coverage and syntax spans. The same fixture is
203
+ included in installed-package import checks. On Node 24.15.0, all 124 tests,
204
+ six installed-package tests, formatting/version checks and typecheck passed.
205
+ The two public pilot corpora also passed local materialization after the fix:
206
+ 139 files/928 chunks for srcx and 38 files/200 chunks for lambdadb-cli, with no
207
+ embeddings. These checks establish indexing/packaging correctness, not an agent
208
+ accuracy or efficiency improvement.
209
+
210
+ ## Agent skill installation
211
+
212
+ The npm artifact includes `skills/srcx-search/SKILL.md`. The `skills` command
213
+ installs, reports, updates and removes the bundled copy for Codex or Claude Code
214
+ in user/project scope. No credentials or network access are needed for those
215
+ operations. A content-hash/package-version footer distinguishes unchanged managed
216
+ copies from custom files; modified/unowned content, extra files and symlinked
217
+ managed paths are preserved. Scope selection does not edit unrelated agent
218
+ settings or infer a project root.
219
+
220
+ On Node 24.15.0, formatting/version checks, typecheck, all 124 tests and six packed
221
+ CLI tests passed. Lifecycle tests cover both agents and scopes using isolated
222
+ roots, replacement of a previous managed bundle, custom-file preservation,
223
+ symlinks, active locks, invalid options and no-write status/absent removal. Absent
224
+ removal also covers existing read-only parent directories for both agents/scopes
225
+ and preserves a pre-existing lock without acquiring it. The permission regression
226
+ tests fail before the fix and pass afterward on the local non-root POSIX runtime;
227
+ those permission tests are skipped on Windows or when running as root. Packed
228
+ CLI tests exercise both project destinations without config, then the existing
229
+ loopback workflow covers skill installation, repository discovery, commit
230
+ resolution, search and exact source reads. This is deterministic integration
231
+ validation; a model does not choose the commands in those tests.
232
+
233
+ The skill-creator validator accepted the skill. Separately, a fresh npm consumer
234
+ installed the tarball and Codex CLI 0.157.1 `skills/list` discovered the installed
235
+ project skill as enabled. Removing it removed it from the actual runtime catalog;
236
+ reinstalling restored it with `forceReload`. This exercised the real discovery
237
+ path without model requests. Claude Code's documented destination and installed
238
+ file lifecycle are covered, but Claude runtime discovery and either agent's
239
+ autonomous skill selection have not been exercised. Default local paths are the
240
+ supported installer targets; custom config directories and cloud/account skill
241
+ sync are outside this installation flow.
242
+
243
+ There were no live LambdaDB changes, embedding requests, global CLI installation,
244
+ or changes to the developer's personal skill directories. Tests and discovery
245
+ used isolated directories. This validates packaging/discovery, not token savings,
246
+ latency improvements or ranking quality.
247
+
248
+ Date: 2026-09-26 (Asia/Seoul).
249
+
250
+ ## Query-language guidance
251
+
252
+ README and search help explain source-language query selection without rejecting
253
+ non-English input or adding automatic translation. Agent guidance preserves exact
254
+ identifiers and error text, checks the question's premise, reads source evidence
255
+ and answers in the user's language. `--language` help explicitly identifies the
256
+ programming-language filter.
257
+
258
+ Local Node 24.15.0 checks passed: formatting, version consistency, typecheck,
259
+ 113 tests and five installed-package checks. Rendered `search --help` was checked
260
+ for query-language guidance and the programming-language filter description.
261
+
262
+ A private 2026-09-26 diagnostic used ten new Korean/English question pairs against
263
+ one existing immutable corpus, with English+Korean analysis, lexical top-ten
264
+ retrieval and five zero-context reads. Both query forms were frozen before answer
265
+ implementation inspection; source labels were frozen before retrieval. English
266
+ translation improved labelled-file discovery from 0/10 to 7/10, but complete
267
+ labelled evidence only from 0/10 to 1/10. All labelled spans were present in the
268
+ corpus; all 100 explicit reads matched pinned source bytes and version metadata.
269
+ There were 20 searches, no reindexing, no query embeddings and no reranking.
270
+
271
+ The same assistant authored queries and labels with prior repository familiarity;
272
+ this is not a blind benchmark. Exact implementation-span coverage can undercount
273
+ other useful evidence. One false-premise question remained in the set. No queries
274
+ or labels were tuned after retrieval. The new set did not run semantic/hybrid or
275
+ measure generated-answer accuracy, automatic translation quality or follow-up
276
+ reads. These results support query-writing guidance, not a language restriction,
277
+ a universal ranking claim or a product-default change. Private source-bearing
278
+ artifacts are retained locally and are not included in this repository.
279
+
280
+ ## Configurable text analyzers
281
+
282
+ The pre-release preset defaults to standard and requires a canonical analyzer
283
+ list. All 15 nonempty combinations of LambdaDB's four supported analyzers are
284
+ validated across lexical, managed-small and managed-large presets (45 distinct
285
+ configuration/Collection identities). Registration/discovery tests cover canonical
286
+ reattachment and schema drift; build tests reject reuse of a different analyzer
287
+ baseline while preserving the source/chunk text.
288
+
289
+ On Node 24.15.0, typecheck, formatting/version checks, all 113 tests and the packed
290
+ npm consumer passed. Its five CLI checks include a managed-large English/Korean
291
+ preset, offline preview parity, and invalid/connected analyzer-override rejection.
292
+ Publication tests verify readiness without depending on analyzed text matches.
293
+
294
+ The chunking, CLI-mode and public-benchmark evaluators explicitly pin standard
295
+ analysis, including CLI preview/registration arguments and remote schema checks.
296
+ Regression checks simulate an English product default and verify that prepared
297
+ artifacts and benchmark Collection schemas still use standard. These checks run
298
+ offline and do not rerun the retained ranking experiments.
299
+
300
+ A bounded live run on 2026-09-26 used synthetic source, two Collections and three
301
+ imports, with no embeddings or reranker. At commit `10936fe` (before restoring the
302
+ standard default), the actual CLI verified the English preset, publication of a
303
+ stop-word-only file, `run` matching `Running`, exact
304
+ pinned source reads, sorted/deduplicated reattachment, the live four-analyzer
305
+ schema, and Korean/Japanese search/read results. This is integration validation,
306
+ not a ranking benchmark or evidence that English is universally optimal. The
307
+ restored standard default is covered by the local and packed CLI checks above;
308
+ this default-only change did not repeat live writes.
309
+
310
+ Date: 2026-09-26 (Asia/Seoul).
311
+
312
+ ## Additional language chunking
313
+
314
+ Python (`.py`, `.pyi`), Go and Rust (`.rs`) use the pinned Tree-sitter grammars. Fixtures
315
+ verify decorated/async Python functions, class methods and nested class scopes,
316
+ docstrings, Go generic/pointer/value receivers, grouped types, Rust generic
317
+ `impl`/`trait` and module scopes, attributes/doc comments, authored macros, and complete UTF-8
318
+ source coverage with BOM, CRLF and Unicode. Long functions keep their symbol/scope
319
+ through bounded splitting; invalid parses retain text fallback. Artifact checks
320
+ verify language and symbol metadata in lexical/small/large build payloads.
321
+
322
+ C/C++ fixtures verify pointer declarators, templates, namespace/class scopes,
323
+ qualified names and both preprocessor branches. Shell fixtures retain quoted
324
+ semicolons, heredocs and compound commands. SQL fixtures retain CREATE/INSERT,
325
+ CTEs and dollar-quoted function bodies as statements, with created object/schema
326
+ metadata. Each added language is checked for token bounds, parse-error fallback,
327
+ exact source coverage and lexical/small/large payloads.
328
+
329
+ Local validation passed 107 Node tests, typecheck, formatting and version checks.
330
+ Four installed-package CLI checks cover the existing lexical/small/large workflow
331
+ and Python/Go/Rust/C/C++/Shell/SQL grammar loading with exact source payloads from
332
+ the npm artifact. The artifact check also verifies the SQL binary checksum and
333
+ packaged license notices.
334
+ The connected CLI checks use the synthetic SDK/HTTP test store. There were no live
335
+ LambdaDB writes, paid embedding calls or new ranking measurements. Earlier
336
+ retrieval results remain evidence for their original corpus and configuration.
337
+
338
+ ## Qwen failure diagnostics
339
+
340
+ Known worker failures now produce distinct setup, cache, device and input-limit
341
+ messages; host launch and deadline failures have separate remediation. Unknown
342
+ failures remain generic, and raw worker output is not forwarded. Search defaults,
343
+ scores, source verification and the no-fallback policy are unchanged.
344
+
345
+ Local validation passed 97 Node tests, nine Python checks (six worker and three
346
+ local-reranker protocol checks), three installed-package CLI checks, typecheck,
347
+ formatting and version consistency. Reserved worker exits and unexpected exits
348
+ were exercised with real synthetic subprocesses. Deadline, permission and
349
+ unexpected-signal mapping used a mocked process callback; the test asserted the
350
+ unchanged 120-second/SIGKILL policy rather than waiting for a real timeout.
351
+
352
+ Six additional offline checks used the existing Python 3.12 environment and
353
+ cached pinned model: missing executable, missing Python imports, empty cache,
354
+ invalid device, unavailable CUDA, and successful MPS inference. All produced the
355
+ expected outcome; the successful two-candidate query returned finite scores and
356
+ ranked the sorting function above an unrelated reader. No LambdaDB calls, document
357
+ embeddings or model downloads were needed. This is an error-handling and inference
358
+ smoke check, not a retrieval-quality comparison.
359
+
360
+ The retained report is `.srcx/diagnostics/report.json` in the
361
+ `srcx-reranker-diagnostics` worktree, SHA-256
362
+ `7725a96f6c5bf5b4a6a4f01369e2dbea6a8ce16d70692f6e1039774f42564e67`.
363
+ The local runner and Node/package logs are retained alongside it.
364
+
365
+ ## Developer workflow pilot
366
+
367
+ The [workflow pilot](https://github.com/lambdadb/srcx/blob/develop/eval/DEVELOPER-WORKFLOW-PILOT.md)
368
+ used installed dev.17 against srcx `7521974a331471b264a695e6f9795bba3e4a7dfd`
369
+ for three assistant-selected maintenance investigations. Five searches and 16
370
+ source-verified reads produced change maps for Qwen diagnostics, Go chunking and
371
+ automatic Git sync. No feature implementation or comparative quality claim is
372
+ part of this record.
373
+
374
+ One import added 127 files / 699 chunks to the existing managed-small Collection,
375
+ with 283,104 estimated document embedding input tokens. Two query embedding
376
+ requests and one cached Qwen invocation stayed within predeclared bounds. All
377
+ live commands completed without replay. Two separate local failure probes
378
+ confirmed indistinguishable public errors for missing Python and an invalid
379
+ device; raw exceptions remained masked.
380
+
381
+ Evidence is retained in the workflow-pilot worktree under `.srcx/workflow-pilot/`:
382
+
383
+ - `plan.json`: SHA-256 `86d929c19ff69faaed6a264198e0b9c15bf32d3b721a31c503a08c4d2e12da39`.
384
+ - `run.json`: SHA-256 `f0ca1a5e6ac12d48e4929959b85b08e846fb239011125cb153aaa6d0babb1359`.
385
+ - `error-probes.json`: SHA-256 `a5fb5c44dc089466cee8a6bba1c4d374c46bba01f9eef24ac739cfeac72b8612`.
386
+
387
+ ## Installed dev package first use
388
+
389
+ On 2026-09-26, the public `@functional-systems/srcx@0.1.0-dev.17` tarball from
390
+ source `98be125d45128a9395544b0925df591c0da08b39` passed a fresh npm consumer
391
+ installation and **23 CLI commands** covering local setup and live LambdaDB. The corresponding
392
+ [develop CI and publication](https://github.com/lambdadb/srcx/actions/runs/36178586841)
393
+ completed successfully. The registry `dev` tag selected dev.17 at inspection;
394
+ `latest` still selected the bootstrap dev.1, not a stable release.
395
+
396
+ The downloaded tarball's SHA-512 matched npm metadata, and its installed package
397
+ version/`gitHead` matched the intended source. Both npm attestation subjects
398
+ matched those tarball bytes; the provenance statement identified the expected
399
+ repository, commit, workflow and run. The attestation signature was not
400
+ independently verified in this local check.
401
+
402
+ The consumer used `npm install --ignore-scripts` in a new prefix, an isolated
403
+ `SRCX_CONFIG`/`SRCX_STATE_DIR`, and the installed `.bin/srcx` rather than the
404
+ checkout build. The existing Python 3.12 environment and cached Qwen model were
405
+ reused explicitly; all 34 pinned Python package versions and their active
406
+ installed dependency constraints matched. This was not a clean Python/model
407
+ installation, CPU/CUDA validation, or a new ranking benchmark.
408
+
409
+ | Check | Observed result |
410
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
411
+ | Version/help, configure, doctor | Expected dev.17 version/options; fresh connection settings; authentication/read check passed |
412
+ | Preview, register, discover | New synthetic Git repository; lexical preview had two files, two chunks, 44 tokens; one isolated Collection created |
413
+ | Commit A import/search/read | Validated publication, matching lexical result and exact original file |
414
+ | Optional local Qwen | Real cached model, finite reranker score, matching source read; 4.56 s external CLI wall time |
415
+ | Git tag mapping | `v1` Alias resolved to commit A |
416
+ | Commit B import/search/read | Changed source visible; deleted-file query returned no hits; A result handle still read exact A source |
417
+ | Managed semantic/hybrid | One search/read per mode against an existing immutable Collection of public srcx source; selected source matched Git |
418
+
419
+ The two synthetic commits were A `0d3bdc318ad1079339a46bc67cd7037f0ebfc3cc`
420
+ and B `9d652332bf1d29545970ccda2d823b8d4d1f627f`. Import commands took 90.45 s
421
+ and 41.44 s, including index visibility and Tag validation. These are single
422
+ integration measurements; they are not import-throughput or latency guarantees.
423
+
424
+ Usage was **one new lexical Collection, two imports, six searches and two managed
425
+ query embeddings**, with no new document embeddings or model downloads. All
426
+ commands completed; no failed-command replay was needed. Synthetic remote
427
+ resources and local artifacts remain available for inspection.
428
+
429
+ Retained evidence lives under `.srcx/first-use/` in the first-use worktree:
430
+
431
+ - `run/report.json`: reservations, command timings, versions and checks;
432
+ SHA-256 `10652c0cbf485e39be576f37b196873e66b284b6f07d3f2c5a86ebf72a7ff7ea`.
433
+ - `package/functional-systems-srcx-0.1.0-dev.17.tgz`: exact tested registry artifact;
434
+ SHA-256 `ec75eedd8c9031d5de3cace38f90f84ccf46f9b9723b13cbfc2e73ae9c7edde7`.
435
+ - `registry.json`, `dist-tags.json`, `attestations.json`, `python-runtime.json`,
436
+ bounded `acceptance.mjs`, command outputs, fixture source and result handles.
437
+
438
+ The documentation follow-up changes no runtime code, search defaults, published
439
+ package versions or deployment configuration. Later docs-only dev builds are
440
+ separate artifacts; the above live evidence remains attached to dev.17.
441
+
442
+ ## Local reranker integration
443
+
444
+ The opt-in `search --rerank qwen` path was exercised with the cached
445
+ Qwen3-Reranker-0.6B revision `e61197ed45024b0ed8a2d74b80b4d909f1255473`,
446
+ Python 3.12, float32/MPS on the same Apple M5 Pro / 64 GB machine. A local model
447
+ check ranked a sorting function above an unrelated reader and assigned identical
448
+ scores to exact duplicate source. Offline snapshot loading initially rejected the
449
+ selectively downloaded cache; matching the download allowlist fixed this before
450
+ any live search. No model download was required.
451
+
452
+ Three existing repository questions were selected before running, with a fixed
453
+ 20-candidate pool and a first-five result/read limit. The six CLI searches used
454
+ existing immutable Tags for srcx `8c0d1656d4d66a6461a32e9072b2e5f7fda9cec1`
455
+ and lambdadb-cli `513af6e4d262edd380013c86d51a20aad16274d7`. Baselines retrieved
456
+ 20 results so candidate membership could be checked. All 28 selected-result
457
+ reads matched committed Git source, and every reranked result retained its
458
+ baseline candidate, retrieval score and Snapshot identity.
459
+
460
+ | Question / mode | Candidates | Baseline CLI | Qwen CLI | Qwen worker | First-five complete evidence, before → after |
461
+ | ------------------------------------------ | ---------: | -----------: | -------: | ----------: | -------------------------------------------- |
462
+ | `srcx-alias-name` / lexical | 4 | 2.04 s | 4.44 s | 2.46 s | yes → yes |
463
+ | `srcx-read-integrity` / semantic | 20 | 6.73 s | 9.75 s | 5.35 s | no → no |
464
+ | `lambdadb-cli-command-deadline` / semantic | 20 | 3.86 s | 8.58 s | 4.89 s | yes → yes |
465
+
466
+ CLI timings are external process wall times, excluding subsequent `read` checks;
467
+ worker timings include Python startup, fresh model loading and inference.
468
+ Network/cache/order effects are uncontrolled and these are single measurements,
469
+ not latency percentiles or proof of interactive suitability. The baseline prints
470
+ up to 20 hits while the reranked command prints up to five; both verify the same
471
+ candidate pool. Existing assistant-authored evidence labels were reused, with
472
+ no tuning or new independent relevance judgments. This is an integration smoke
473
+ check, not another ranking benchmark. It supports keeping reranking optional;
474
+ no defaults changed and Jev evaluation remains deferred.
475
+
476
+ There were six searches (four managed query embeddings), no new Collections,
477
+ document writes, document embeddings, retries or failed live commands. The
478
+ retained local report is `.srcx/reranker-smoke/live/report.json` in the integration
479
+ worktree (SHA-256 `0b1a406153a751def4106ce4e6dbeca4fd9f2439e02cefd04e5be111a4679568`).
480
+ Raw command outputs, the bounded runner and isolated result handles are retained
481
+ alongside it; credentials were not recorded.
482
+
483
+ Local validation passed 95 Node tests, 13 Python checks, typecheck, formatting,
484
+ version consistency and three installed-package CLI checks. Installed-package
485
+ checks include the bundled worker path and opt-in search/read protocol with a
486
+ synthetic worker; real model inference and LambdaDB searches were local checks,
487
+ not CI inference. See [setup and behavior](README.md#optional-local-qwen-reranker).
488
+
489
+ ## Fixed-candidate CosQA reranking
490
+
491
+ The [completed Qwen comparison](eval/COSQA-RERANK-RESULTS.md), run on September 26
492
+ (Asia/Seoul), improved exact-content hit@10 from 57.4% to 64.8% with roughly one
493
+ second of local model computation per query. All 500 original candidate pools
494
+ and duplicate-ID ordering were preserved. The report separates official-ID
495
+ metrics, content-equivalence diagnostics, regressions and local latency.
496
+
497
+ ## Independent CosQA BM25 cross-check
498
+
499
+ The [independent cross-check](eval/COSQA-BM25-RESULTS.md) reproduces lexical
500
+ quality after aligning score ties and documents duplicate-ID sensitivity in the
501
+ official task. Its supplemental content-equivalence metrics are distinct from
502
+ the unchanged official-label baseline.
503
+
504
+ ## Public code retrieval baseline
505
+
506
+ At frozen executable `03ac468`, the pinned CoIR CosQA and MTEB CodeSearchNet
507
+ Python/Go baseline validated all 22,604 documents and managed vectors in immutable
508
+ Tags and collected 7,473 successful searches. Nine Python inputs exceeded the
509
+ existing query limit; all 27 mode/query outcomes remained zero-scored in the
510
+ 2,500-query denominator for each mode. There were no API failures or retries.
511
+
512
+ Semantic nDCG@10 exceeded lexical and the current RRF hybrid on all three tasks.
513
+ This is an external-task retrieval baseline, not a full CoIR average, Git/CLI
514
+ integration validation or an agent coding-success benchmark. Product defaults
515
+ are unchanged. See [full metrics, usage and limitations](eval/PUBLIC-BENCHMARK-RESULTS.md)
516
+ and the [fixed protocol](eval/PUBLIC-BENCHMARK.md).
4
517
 
5
518
  ## Evidence boundary
6
519
 
7
- This implementation has passed local fixtures/fault injection/SDK transport checks,
520
+ The initial implementation passed local fixtures/fault injection/SDK transport checks,
8
521
  a live synthetic A/B acceptance run, and an exact-package self-index of the public
9
522
  srcx repository against the user-supplied LambdaDB connection. No private source
10
523
  or paid embeddings were used. These checks are not a throughput, general
11
524
  concurrency, or retrieval-quality benchmark. npm publication evidence is recorded
12
- separately below.
525
+ separately below. The persistent Git branch changes have a separate synthetic
526
+ live run recorded next; the earlier live runs do not validate this new path.
527
+
528
+ ## Local reranking diagnostic
529
+
530
+ At frozen executable `ba9fa0f8ad5c57cb54ec0483d05faead78acf2c1`, the local
531
+ Qwen3-Reranker-0.6B treatment scored all 455 retained pairs without failures or
532
+ retries. Offline complete source evidence among five selections changed from
533
+ lexical **7/16 to 8/16**, semantic **5/16 to 9/16**, hybrid **8/16 to 10/16**.
534
+ There were no complete-answer losses; partial evidence declined in two pools.
535
+ No new CLI reads were made and the original labels remain unreviewed.
536
+
537
+ The run used 391,713 Qwen input tokens and 84.59 seconds on local MPS, with zero
538
+ paid API usage. Completed replay preserved score bytes/timestamps without model
539
+ loading. Local validation passed 86 Node tests, three Python protocol checks and
540
+ three installed-package checks; frozen Node 22/24 CI passed. See [results and
541
+ limitations](eval/RERANK-RESULTS.md), [frozen protocol](eval/RERANK-RUN.md) and
542
+ [preflight](eval/rerank-qwen-preflight.json) for provenance and bounds.
543
+
544
+ ## Click/Cobra development diagnostic
545
+
546
+ At frozen harness `4f7c865055749c82641015a2302983b034877e23`, 48 actual CLI searches
547
+ completed sequentially on pinned public Click/Python and Cobra/Go sources with
548
+ managed small and existing text fallback. All **455 handles and 231 reads** passed
549
+ source/version checks. Complete first-five evidence was lexical **7/16**, semantic
550
+ **5/16**, hybrid **8/16**; natural-language tasks scored **2/6, 2/6, 4/6**. Top-ten
551
+ candidate availability was **8/16, 11/16, 10/16**. These are fixed assistant-authored
552
+ implementation labels without independent review or agent answer grading.
553
+
554
+ Both imports published validated immutable versions; no command failures or
555
+ resumes occurred. Usage reservations were 388,771 document input tokens, 32 query
556
+ embeddings, 350 query input tokens and 48 searches. Completed replays preserved
557
+ report bytes/timestamps without service calls. Local Node 24.15.0 passed **78 tests**,
558
+ typecheck, formatting and version checks; frozen-harness Node 22/24 CI and installed
559
+ package checks passed. [Results and limitations](eval/TRANSFER-RESULTS.md) include
560
+ report hashes, inspected cases and coverage/output costs; [protocol](eval/TRANSFER-RUN.md)
561
+ records fixed budgets. Earlier draft-preparation evidence below remains historical.
562
+
563
+ ## Evaluation diagnostics and transfer draft
564
+
565
+ Evaluation subprocess failures now append safe command diagnostics with process
566
+ or JSON-decode stage, exit/signal metadata and allowlisted stderr. Fixture checks
567
+ cover no automatic retry, preservation across multiple failures, secret/source
568
+ omission, private file permissions, malformed output, output overflow and log-write
569
+ failure. This cannot recover stderr from old live failures. Node 24.15.0 passed
570
+ **75 tests**, typecheck, formatting and version checks for this follow-up.
571
+ The read-side regression invokes the actual `readHandle` for seven failure paths
572
+ and verifies both safe-message retention and omission of contaminated stderr.
573
+
574
+ A separate offline preparation imported pinned Click 8.1.8 and Cobra v1.9.1 Git
575
+ sources into local managed-small build artifacts, without service calls or
576
+ embedding generation. All 16 draft questions' byte hashes, source line ranges and
577
+ inclusion were verified. The 207 files contain 544 eligible chunks with 388,771
578
+ estimated embedding input tokens. Python/Go use the current text fallback; no new
579
+ parser or search behavior was added. These labels are assistant-authored and not
580
+ independently reviewed. See [draft protocol and reproduction](eval/TRANSFER-EVAL.md)
581
+ and [diagnostic retention rules](eval/COMMAND-DIAGNOSTICS.md). No retrieval quality,
582
+ provider cost or live operational reliability is measured by this preparation.
583
+
584
+ ## Retrieval mode comparison
585
+
586
+ At application/harness commit `de5a23bbc2f0712d134066354b4313420d21fccd`, the
587
+ actual CLI completed 48 searches across the same two managed corpora and fixed
588
+ 16-question suite. All **456 results/handles** and **236 reads** matched pinned
589
+ source and version facts. Revised-label complete evidence was lexical **16/16**,
590
+ semantic **8/16**, and hybrid **13/16**; unchanged original labels scored 14/16,
591
+ 8/16, and 11/16. These are diagnostic coverage measurements, not human answer grades.
592
+
593
+ All three hybrid regressions contained the required evidence in search's top ten,
594
+ but outside the first five reads. Keep lexical as the default pending fresh-task
595
+ ranking evaluation. The run also exposed a query response omitting one managed
596
+ vector; same-Tag fetch hydration now preserves non-vector payload equality and
597
+ hit order/scores. The failed attempt remains separate from the complete fresh run.
598
+
599
+ Node 22/24 passed **67 tests**, typechecking and installed-package CLI checks after
600
+ the fix. The completed live report was revalidated without new service calls, and
601
+ its bytes/timestamp were unchanged. See [full results](eval/RETRIEVAL-MODE-RESULTS.md)
602
+ for per-mode metrics, inspected misses, input/usage accounting, source revisions,
603
+ report hashes and evidence limits; [protocol](eval/RETRIEVAL-MODES.md) documents
604
+ reproduction and effects.
605
+
606
+ ## Query-style supplement
607
+
608
+ At harness commit `65c8e7060366f4df846c9b2bc08270e7337f0df1`, 72 searches tested
609
+ eight new tasks with identifier, natural-language and mixed formulations using
610
+ the same managed small model and the same two immutable publications. All
611
+ **696 result handles and 356 reads** matched source/version facts. Complete
612
+ first-five evidence by lexical/semantic/hybrid was **7/8, 7/8, 7/8** for identifiers,
613
+ **0/8, 3/8, 1/8** for natural descriptions and **5/8, 7/8, 6/8** for mixed queries.
614
+ These are eight paired tasks, not 24 independent judgments. Semantic helped on
615
+ this diagnostic; the original keyword-heavy result must not be generalized.
616
+
617
+ The frozen protocol adds verified candidate coverage at ranks 1/3/5/10, the first
618
+ complete prefix, stdout tokens and offline token-budget prefixes. No model,
619
+ ranking, read-selection or product default changed. The original suite/results
620
+ and incomplete run remain intact. A completed rerun preserved report bytes and
621
+ timestamp without service calls. Node 22.14.0 and 24.15.0 passed **69 tests**;
622
+ typecheck, formatting and frozen-harness CI passed. See [results and cases](eval/QUERY-STYLE-RESULTS.md),
623
+ [protocol](eval/QUERY-STYLES.md), and [embedding model research](eval/EMBEDDING-MODELS.md).
624
+
625
+ ## Managed small versus large comparison
626
+
627
+ At frozen harness `6fa65b541dc50debdfa4f9a6297301b2cb3c2b53`, small (1536 dimensions)
628
+ and large (3072 dimensions) completed 240 searches over identical pinned source/chunk inputs.
629
+ All **2,304 result handles and 1,184 reads** passed source/version validation.
630
+ Style-suite complete top-five evidence was semantic **17/24 → 16/24** and hybrid
631
+ **14/24 → 16/24**; natural semantic improved **3/8 → 4/8**. The separate regression
632
+ set scored semantic **8/16 → 8/16** and hybrid **13/16 → 12/16**. All 40 lexical
633
+ candidate lists matched across models. Small coverage repeated the earlier runs.
634
+
635
+ An initial large attempt stopped twice with an unknown CLI search error; its
636
+ 19 partial rows and two successful diagnostic queries remain excluded. A fresh
637
+ isolated run reused the same publications and completed without changing the
638
+ frozen protocol. All four completed reports revalidated without service calls
639
+ and retained their bytes/timestamps. Keep small as the initial managed choice
640
+ and large opt-in; these familiar diagnostic tasks do not establish a model winner.
641
+
642
+ Node 22.14.0 and 24.15.0 passed **72 tests**, typecheck and installed-package CLI
643
+ checks covering lexical/small/large. Formatting/version checks and frozen-code
644
+ CI passed. [Full results](eval/MODEL-COMPARISON-RESULTS.md) record per-query changes,
645
+ report hashes, original-label scores, all five roots' reserved usage, and limits;
646
+ [protocol](eval/MODEL-COMPARISON.md) records the predeclared comparison.
647
+
648
+ Review follow-up: resume and completed replay now reject saved rows whose category
649
+ is missing or differs from the frozen question, even when the stored summary was
650
+ recomputed to match the corruption. The subprocess regression first reproduced
651
+ the acceptance bug, then passed with the guard; valid replay and rejected reports
652
+ both preserve their bytes. Node 24.15.0 passed **73 tests** after this change.
653
+ The four completed model reports have no category mismatches and remain unchanged.
654
+ Their frozen harness remains the revision recorded above; the new harness requires
655
+ fresh run roots rather than rewriting historical runtime fingerprints.
656
+
657
+ ## Managed OpenAI embedding acceptance
658
+
659
+ The opt-in managed preset passed a separate synthetic live run at application and
660
+ harness commit `177731386f76a13723a83aa8470d4e0715e29424` using Node 24.15.0 and
661
+ the user-supplied development connection. It completed at
662
+ `2026-09-24T20:46:46.305Z` in 111.706 seconds. Only synthetic source was uploaded.
663
+
664
+ - Both commits published validated immutable Tags, with six generated 1536-number
665
+ vectors in each corpus. Mixed file/manifest records correctly omitted vectors.
666
+ - Six filtered searches (lexical, semantic and hybrid for each version) returned
667
+ 14 result handles; every full-file read matched the pinned Git blob byte for byte.
668
+ - The second import skipped unchanged records, removed deleted content, and kept
669
+ the original version's handle readable. Fresh repository discovery preserved the
670
+ managed preset and schema.
671
+ - Ordinary upserts submitted ten eligible chunk inputs across both imports. The
672
+ preflight upper bound was 167 estimated document input tokens; four searches
673
+ requested query embeddings. These counts are not provider-reported billed usage.
674
+
675
+ The first run at `fb5b6d8` correctly remained unpublished: this deployment omitted
676
+ vectors from list responses despite `includeVectors=true`, while fetch/query on
677
+ that same Tag returned them. The transport now fetches those listed IDs from the
678
+ same immutable Tag and requires exact non-vector payload equality before vector
679
+ validation. Regression checks reject missing fetch records and changed payloads.
680
+ The failed run and retry journal remain under `.srcx/live-managed/`; they were not
681
+ relabelled as successful evidence. The successful run has a separate Collection
682
+ and evidence directory, `.srcx/live-managed-verified/`, in the validation worktree.
683
+ Both synthetic Collections are retained for inspection.
684
+
685
+ The successful report SHA-256 is
686
+ `6c96ac8af9b79c85e98c84f1f01851906f0b1b3e4d96b51d9417cb59380ac532`;
687
+ its runtime fingerprint is
688
+ `7d8a8006820ee523a88e80d6614327000ce305cffafe377d18fda5b50ba9c947`.
689
+ A same-runtime rerun made no service calls and preserved the original report bytes.
690
+ The harness rejects changed runtime/destination/Node inputs and incomplete runs
691
+ before new requests; recovery after uncertain writes remains explicit.
692
+
693
+ Node 22.14.0 and 24.15.0 each passed **61 tests**, typechecking, and installed-tarball
694
+ CLI checks for both presets. Formatting, version validation and diff checks passed.
695
+ Local tests cover generated-vector failures, exact payload validation, unchanged
696
+ record reuse, uncertain-write recovery, preset/schema drift, query serialization,
697
+ and credential-free managed previews. Live checks used the built application APIs;
698
+ installed-package CLI checks used the loopback fault-injection store.
699
+ These checks establish integration/source correctness, not semantic relevance gains
700
+ or performance on real repositories. The earlier lexical evaluations remain separate.
701
+
702
+ ## Default CLI search/read evaluation
703
+
704
+ The follow-up uses actual built CLI subprocesses with the unchanged default
705
+ syntax/path-scope-symbol preset across pinned public `srcx` and `lambdadb-cli`
706
+ commits. At harness commit `57b63e1cdbf7ec722b95bb0f40ac0ef5039af3e8`, both
707
+ publications validated and all **136 search results/handles** and **76 read
708
+ responses** matched their pinned source, version and citation. No embeddings
709
+ were used. The run completed at `2026-09-24T20:01:58.865Z`.
710
+
711
+ The frozen 16-question suite recovered complete labeled evidence for **14/16**.
712
+ The two remaining cases reflect a one-byte blank-line boundary and an omitted
713
+ alternative document/code answer, not demonstrated source-integrity failures.
714
+ Mean full CLI stdout was **7,383 tokens** per query. This fixed-five-read protocol
715
+ is distinct from the earlier full-chunk/token-budget comparison; neither measures
716
+ general task success. Labels remain assistant-authored without independent human
717
+ review. See [eval/CLI-RESULTS.md](https://github.com/lambdadb/srcx/blob/develop/eval/CLI-RESULTS.md)
718
+ for per-repository scores, inspected misses and evidence boundaries, and
719
+ [eval/CLI-WORKFLOW.md](https://github.com/lambdadb/srcx/blob/develop/eval/CLI-WORKFLOW.md)
720
+ for reproduction and normal Collection effects.
721
+
722
+ Local Node 24.15.0 passed **54 tests**, typechecking, formatting/version checks and
723
+ the installed-package CLI contract. Node 22/24 CI passed at the harness commit.
724
+ Live execution used built CLI subprocesses; package validation used a loopback
725
+ fixture. A completed rerun preserved the original report bytes and timestamp.
726
+ Raw evidence and recovery journals remain under `.srcx/cli-eval/` in the validation
727
+ worktree; the older pilot's original report remains unchanged.
728
+
729
+ ## Retrieval evaluation harness
730
+
731
+ The internal pilot adds five checks for unique source-range scoring, token-budget
732
+ prefix selection, source/hit integrity, equal path-only enrichment, and rejecting
733
+ stale runtime checkpoints before any connection. With these checks, Node.js
734
+ 24.15.0 passed **50 tests**, typechecking, version validation, and clean installed
735
+ package checks. The default CLI preset and config hash remain unchanged.
736
+
737
+ The suite fixes 16 queries, expected source byte ranges, and two full Git commits
738
+ before retrieval. Both chunkers materialize the same included files, use separate
739
+ config identities, and run through the existing immutable publication validation.
740
+ Live retrieval observations and limitations are in [eval/RESULTS.md](https://github.com/lambdadb/srcx/blob/develop/eval/RESULTS.md),
741
+ with reproduction instructions in [eval/README.md](https://github.com/lambdadb/srcx/blob/develop/eval/README.md). These diagnostic
742
+ labels were authored from source before querying and are not independently
743
+ human-reviewed judgments or a general retrieval-quality benchmark.
744
+
745
+ Post-review, `splitEvidence` now requires complete coverage of all required ranges
746
+ before classifying a result as split across chunks. The multi-range regression
747
+ brings the local suite to **51 passing tests**. Offline rescoring of all 32 retained
748
+ query/method pairs preserved every metric and category summary. The original live
749
+ report, runtime fingerprint, and completion timestamp were not changed.
750
+
751
+ ## Persistent Git branch tracking
752
+
753
+ Local regression coverage exercises one writer across consecutive commits,
754
+ branch-local deletion/diff baselines, separate branches sharing canonical Tags,
755
+ rewinds to already published commits, and imports from fresh local state. Fault
756
+ injection verifies last-published branch resolution during partial writes, pending
757
+ ownership protection when the local journal is missing, stale/corrupt candidate
758
+ rejection, and retries after uncertain control writes. Branch/tag ambiguity and
759
+ explicit full refs are covered.
760
+
761
+ The CLI fixture also imports and updates a tracked branch through the real SDK
762
+ transport and selects it for search, resolve, and read. The same fixture runs
763
+ against the installed tarball. These checks use a loopback fault-injection model,
764
+ not a live LambdaDB deployment.
765
+
766
+ A separate **live LambdaDB run passed all 12 checkpoints** on September 25 using
767
+ Node **24.15.0**, application source commit
768
+ `f42a9141cef3bfc0b604e1b14a00c79607c7dd98`, and the original checkout's `.env.local`
769
+ loaded explicitly through Node. The run took **414.195 seconds** and uploaded only
770
+ synthetic Git source with no paid embeddings. It verified:
771
+
772
+ - First-import timeout remains unpublished, followed by same-journal recovery.
773
+ - A -> B uses one fixed Collection Branch; pending B still resolves/searches A,
774
+ and a fresh local state cannot overwrite that pending branch.
775
+ - Added/modified/deleted code searches correctly after B; old A evidence still
776
+ reads the exact original source bytes.
777
+ - A second Git branch shares canonical A/B Tags while maintaining its own writer
778
+ baseline, including B -> A -> B movement and an unchanged repeated import.
779
+ - A SHA-only new commit uses a manual `work-*` writer.
780
+
781
+ A separate invocation of the actual CLI against that live Collection passed
782
+ branch `resolve`, branch-selected `search`, and a full-file `read` compared byte
783
+ for byte with the pinned Git blob. It used the built CLI, not a registry-installed
784
+ package. Local installed-package evidence remains separate above.
785
+
786
+ The reproducible harness is `scripts/live-branches.mjs` (`npm run
787
+ test:live:branches`). Its ignored evidence is `.srcx/live-branches/report.json`
788
+ and `.srcx/live-branches/cli-report.json` in the validation worktree. The report
789
+ records the exact source commit, harness SHA-256, per-check results, and resource
790
+ URL. One synthetic Collection is retained with two tracked writers, one manual
791
+ writer, the two control/checkpoint Branches, three canonical commit Tags, and seven
792
+ candidate Tags. No application fix was needed during this live run.
793
+
794
+ On Node **22.14.0** and **24.15.0**, typechecking, all **43 tests**, and installed
795
+ package checks passed. Formatting, release-version validation, and `git diff
796
+ --check` also passed locally. These results are not GitHub CI evidence.
797
+
798
+ ## Final branch review validation
799
+
800
+ The final pre-PR review reproduced a read-order race: a concurrent publication
801
+ could advance branch control beyond the version list already captured by the
802
+ reader. Resolution now pins the control record first. The review also found that
803
+ live reruns could skip saved checkpoints while replacing the reported source
804
+ revision; checkpoints now require matching runtime, harness, fixture, lockfile,
805
+ and Node fingerprints and preserve their original revision/completion time.
806
+ Regression tests cover both cases, including rejecting stale evidence before any
807
+ connection or report mutation.
808
+
809
+ After these fixes, Node **22.14.0** and **24.15.0** each passed typechecking,
810
+ all **45 tests**, and installed-package checks. Formatting, release-version
811
+ validation, and diff checks passed locally.
812
+
813
+ A fresh synthetic live run at application/harness commit
814
+ `2988c7e1826a44cfed48381681d0125b28ae9086` passed all **12 checkpoints** in
815
+ **432.836 seconds**. The built CLI also passed live branch resolution,
816
+ search, and exact source reads. Final reports are retained separately under
817
+ `.srcx/live-branches-review/report.json` and
818
+ `.srcx/live-branches-review/cli-report.json`; the previous run remains intact.
819
+ This final run retained one synthetic Collection with two tracked writers, one
820
+ manual writer, two control/checkpoint Branches, three canonical commit Tags,
821
+ and seven candidate Tags. CI evidence, once available on the PR, is separate
822
+ from these local and live results.
13
823
 
14
824
  ## Initial npm package and live self-index
15
825
 
@@ -54,6 +864,286 @@ work around propagation. Local evidence is retained in `registry-dev3.json`,
54
864
  `attestations-dev3.json`, and `provenance-dev3.json` under the release directory
55
865
  above. No stable release, GitHub Release, or Homebrew formula was created.
56
866
 
867
+ ## Incremental publication read reductions
868
+
869
+ Local comparison against `0e4de30` uses 120 fixed text files, one added path,
870
+ one modified path and one deleted path. Both versions contain 240 source records
871
+ plus an inventory part and root marker. The old revision was compiled separately
872
+ and exercised with the same fixture and fault-injection stores as the new code.
873
+ Managed vectors are synthetic 1536-dimensional fixture values; no provider or
874
+ LambdaDB calls are involved.
875
+
876
+ | Preset | Local baseline | Full list passes before / after | Listed documents before / after | Canonical document bytes before / after | Reduction |
877
+ | ------------- | -------------- | ------------------------------- | ------------------------------- | --------------------------------------- | --------- |
878
+ | Lexical | Available | 3 / 1 | 726 / 242 | 1,047,827 / 348,865 | 66.71% |
879
+ | Lexical | Missing state | 3 / 2 | 726 / 484 | 1,047,827 / 698,962 | 33.29% |
880
+ | Managed small | Available | 3 / 1 | 726 / 242 | 4,095,746 / 1,364,635 | 66.68% |
881
+ | Managed small | Missing state | 3 / 2 | 726 / 484 | 4,095,746 / 2,731,111 | 33.32% |
882
+
883
+ Bytes sum canonical JSON for documents yielded by `CollectionStore.list`, including
884
+ synthetic vectors. Passes are whole-corpus iterator invocations, not HTTP requests
885
+ or pages. These figures exclude control/marker fetches, query responses, Tag/Branch
886
+ metadata, transport overhead and server work. They are local fixture measurements,
887
+ not measured LambdaDB latency, operation charges, indexing or embedding performance.
888
+ The matched baseline shortcut trades a remote full-content read for full local
889
+ artifact validation; it does not remove that local CPU/I/O work.
890
+
891
+ Both implementations upsert six corpus documents for this update (68,089 lexical
892
+ bytes or 72,937 managed-input bytes), delete four obsolete source IDs and leave
893
+ unchanged records alone. The candidate still receives full validation. For a new
894
+ commit with identical source, the regression test also checks that only the root
895
+ marker is written, with the unchanged inventory part retained.
896
+
897
+ `test/incremental-import.test.mjs` covers matching, missing and mismatched local
898
+ baselines; missing local record files; corruption detection; missing unchanged
899
+ candidate chunks, unexpected IDs and stale markers; unknown delete/upsert results
900
+ and retries with or without prior local artifacts; publication-stage full
901
+ revalidation; replaced baseline/candidate Tags; unchanged managed-vector retention;
902
+ and operation/byte bounds. Existing CLI/package tests retain loopback coverage for
903
+ resumption and immutable source reads, including managed vector hydration.
904
+
905
+ Local checks on Node.js 24.15.0 and 22.23.4: all 182 Node tests passed on each
906
+ runtime, and typechecking and the exact installed-package suite passed on both
907
+ (seven package CLI tests each). `npm ci --ignore-scripts`, `npm run format:check`,
908
+ `npm run check:version` and `git diff --check` passed. The Python checks from CI
909
+ also passed: `local_rerank_test.py` (3), `qwen_worker_test.py` (6),
910
+ `benchmark_data_test.py` (2), `cosqa_bm25_test.py` (3) and `cosqa_rerank_test.py` (3).
911
+ The benchmark checks used an isolated environment with dependencies pinned in
912
+ `eval/bm25-requirements.txt`; no benchmark dataset or model was downloaded.
913
+
914
+ Remaining full-corpus work includes Git tree enumeration, local record copying
915
+ and validation, inventory construction, and one complete candidate comparison.
916
+ Missing local baselines add a remote baseline comparison. Retained-version
917
+ discovery also still reads version metadata. Further delta-only validation needs
918
+ a verified backend completeness/preservation/readiness contract; a marker or
919
+ changed-record sample is not a substitute. Dependency ingestion is outside scope.
920
+
921
+ ## Local build profiling and buffered artifact writes
922
+
923
+ A synthetic TypeScript corpus with 24 functions per file was profiled at 120,
924
+ 600 and 1,200 files. Each incremental build has one addition, one modification
925
+ and one deletion; only two files require chunking. Separate cold builds and
926
+ source-identical commits verify the same record hashes and expose the full-corpus
927
+ work that remains. These measurements cover local `materialize()` only, excluding
928
+ publication, source upload, database operations and embeddings.
929
+
930
+ An instrumented scratch copy of the builder at `605dc2f` times previous-artifact
931
+ validation, Git inventory/blob reads, changed-source chunking, canonicalization,
932
+ record hashing/writes and final validation. Native record streams and file-handle
933
+ writes are observed for logical bytes and call counts. Every instrumented build
934
+ is compared with an uninstrumented build for equal `recordsHash` and
935
+ `inventoryHash`. CPU profiles and raw reports remain local diagnostic evidence;
936
+ the maintained regression fixture is in `test/build-io.test.mjs`.
937
+
938
+ Before the change, the 1,200-file instrumented incremental build took a median
939
+ 1.918 seconds, with about 1.262 seconds (66%) in previous/final validation and
940
+ 0.470 seconds in record canonicalization, hashing and writes. A source-identical
941
+ commit still reads the old artifact twice and the new artifact once. The Git
942
+ inventory and actual changed-file chunking are a small fraction of this fixture's
943
+ total time; skipping unchanged Git blobs alone does not make local builds scale
944
+ with the changed-code size.
945
+
946
+ The following before/after times are medians of three **uninstrumented** builds
947
+ per size on the same local host and Node.js 24.15.0, with warm filesystem/parser
948
+ state (Apple M5 Pro, macOS arm64). After builds retain the same record/inventory
949
+ hashes as the baseline.
950
+
951
+ | Files | Chunks | Before (ms) | After (ms) | Time reduction | Record write calls before / after |
952
+ | ----- | ------ | ----------- | ---------- | -------------- | --------------------------------- |
953
+ | 120 | 2,880 | 228.4 | 201.8 | 11.7% | 3,000 / 46 |
954
+ | 600 | 14,400 | 959.9 | 781.7 | 18.6% | 15,000 / 227 |
955
+ | 1,200 | 28,800 | 1,898.6 | 1,537.4 | 19.0% | 30,000 / 454 |
956
+
957
+ For 1,200 files, both versions deliver 88,351,006 bytes across three full
958
+ `records.jsonl` read passes and write 29,450,206 artifact bytes. The reduction
959
+ is in `FileHandle.write` calls (98.5%) and duplicate serialization, not total bytes
960
+ or validation coverage. Logical stream bytes are not physical disk I/O; buffered
961
+ writes are not an fsync/durability guarantee. Host-specific timings are diagnostic
962
+ results, not a general performance promise or LambdaDB measurement.
963
+
964
+ The buffer remains bounded at 64 KiB; larger permitted records bypass it intact.
965
+ `test/build-io.test.mjs` checks small/large record boundaries, final flushes, exact
966
+ canonical JSONL and record hashes, unchanged managed inputs, fewer write calls,
967
+ and cleanup after intermediate/final write failures without changing prior
968
+ artifacts. Builtin filesystem mocks are isolated to a test-file process and
969
+ restored between tests.
970
+
971
+ Validation passed on Node.js 24.15.0 and 22.23.4: 186 full-suite tests and seven
972
+ installed-package CLI tests on each runtime, plus typechecking on both. Formatting,
973
+ version consistency, diff checks and the five CI Python suites (17 tests) also
974
+ passed. No database calls, source uploads, paid operations or package publication
975
+ were performed.
976
+
977
+ Further gains require reducing full artifact copying and validation, rather than
978
+ removing additional write calls. A segmented immutable-artifact design would need
979
+ explicit integrity, availability and recovery rules before reusing validation
980
+ across builds. No local or remote full-validation shortcut is introduced here.
981
+
982
+ ## Integrated experimental segmented builds
983
+
984
+ The opt-in runtime now implements `import --artifact-storage segments`; JSONL is
985
+ still the default. Production objects are streamed within the existing
986
+ document/64 KiB buffer bounds,
987
+ opened with native no-follow/nonblocking flags and checked as regular files, and
988
+ fully validated on every build/import. The threat boundary remains importer-owned
989
+ artifact directories and the existing single-host writer model. The directory
990
+ hierarchy is not protected against hostile concurrent replacement by the same
991
+ operating-system user. No object digest or local receipt replaces full source
992
+ checks or complete immutable-candidate verification.
993
+
994
+ An integrated local comparison runs the entire `materialize()` invocation on the
995
+ same fixed 120/600/1,200-file TypeScript corpora, with one addition/modification/
996
+ deletion and three warm repetitions per storage mode. Both modes use the same
997
+ current builder and retain identical record/inventory hashes. A separate compiled
998
+ `1e7fa47` JSONL control checks the original path too. Filesystem observers count
999
+ actual completed record-write bytes and descriptor writes, including `build.json`.
1000
+
1001
+ | Files | JSONL median (ms) | Segments median (ms) | JSONL total write bytes | Segments total write bytes | JSONL record bytes read | Segments record bytes read |
1002
+ | ----- | ----------------- | -------------------- | ----------------------- | -------------------------- | ----------------------- | -------------------------- |
1003
+ | 120 | 215.1 | 256.7 | 3,672,397 | 804,547 | 8,834,926 | 5,889,886 |
1004
+ | 600 | 857.8 | 1,083.0 | 18,340,719 | 3,805,029 | 44,175,406 | 29,450,206 |
1005
+ | 1,200 | 1,664.5 | 2,070.4 | 36,676,122 | 7,555,632 | 88,351,006 | 58,900,606 |
1006
+
1007
+ Host: Node.js 24.15.0, Apple M5 Pro/macOS arm64; warm filesystem/parser state,
1008
+ without fsync. At 1,200 files, record payload writes fall from 29,450,206 to 48,890
1009
+ bytes, while the format-2 descriptor still writes about 7.51 MB. Total application
1010
+ writes fall about 79.4%; wall time rises about 24.4%. The extra retained-record
1011
+ copy pass is eliminated, but previous/new build validation still reads every
1012
+ record. The merged JSONL control's 1,200-file median is 1,623.6 ms, with the same
1013
+ record-byte totals. Timings are host-specific diagnostics, not a general speedup
1014
+ claim or LambdaDB/embedding performance measurement.
1015
+
1016
+ For the 1,200-file update, the sum of `stat.blocks * 512` for newly introduced
1017
+ regular-file inodes falls from 36,679,680 to 7,557,120 bytes. Retained objects share
1018
+ existing inodes with the previous build. This excludes directory blocks and does
1019
+ not resolve filesystem compression, shared extents, snapshots or billed storage;
1020
+ it is an inode-allocation observation, not an exact physical-storage charge.
1021
+
1022
+ Initial conversion from format 1 writes all 29,450,206 record bytes again and
1023
+ retains the full copy pass. A source-identical format-2 build writes zero record
1024
+ bytes, but still writes a roughly 7.50 MB descriptor, links all 1,200 objects and
1025
+ performs both full validations. First-build and conversion measurements are
1026
+ retained with the warm-run evidence. Real cross-filesystem behavior is not tested;
1027
+ an injected `EXDEV` test verifies exclusive copy fallback, while injected `EIO`
1028
+ fails and cleans up. Metadata is still proportional to the corpus.
1029
+
1030
+ Focused regressions cover both conversion directions, relocation/deletion of the
1031
+ previous artifact, actual record/descriptor write counts on a fixed corpus,
1032
+ digest/record/source corruption, stale/duplicate/unsafe references, symlink
1033
+ rejection, large Unicode/CRLF records, early-reader closure, empty builds, unknown
1034
+ formats, argument validation, and partial-write/link cleanup. Managed small/large
1035
+ publication tests resume after old-artifact loss and retain immutable old reads.
1036
+ The installed-tarball suite also exercises segmented lexical/managed CLI retry,
1037
+ tracked imports, search and exact reads through a loopback SDK fixture.
1038
+
1039
+ Validation passed on Node.js 24.15.0 and 22.23.4: 201 full-suite tests, nine
1040
+ installed-tarball CLI tests and typechecking on each runtime. Formatting, version
1041
+ consistency, diff checks and all five CI Python suites (17 tests) also passed.
1042
+ No live backend calls, source uploads, paid operations or package publication
1043
+ were performed for this implementation. Linux/Windows and real
1044
+ cross-volume/power-loss checks have not been run locally; native no-follow support
1045
+ is required for the experimental mode. The default JSONL path is unchanged.
1046
+
1047
+ ## Cumulative segmented history and recovery
1048
+
1049
+ A follow-up at `77d871c` compares 50 successive commits in two fixed corpora:
1050
+ 120 and 1,200 TypeScript files, with 24 functions per file. Version
1051
+ 0 is the initial build; each of the next 49 commits modifies one file, deletes
1052
+ one original file and adds one new file, keeping the file count fixed. Each mode
1053
+ uses its own preceding artifact. JSONL/segments execution order alternates by
1054
+ commit. Both modes produce identical record/inventory hashes at every commit.
1055
+
1056
+ These are **single instrumented history runs**, not repeated timing medians.
1057
+ The complete `materialize()` invocation is timed; filesystem observers count
1058
+ completed record writes, descriptor writes and logical record stream bytes.
1059
+ Recovery, retention checks and Git fixture preparation are excluded from these
1060
+ build totals. Host: Node.js 24.15.0, Apple M5 Pro/macOS arm64, one process with
1061
+ filesystem caches left intact and no fsync. The first JSONL build includes parser
1062
+ initialization; later builds reuse that state. Source bodies differ from the
1063
+ preceding single-update fixture, so compare modes within this experiment.
1064
+
1065
+ | Files | JSONL cumulative writes (bytes) | Segments cumulative writes (bytes) | Write reduction | JSONL build total (s) | Segments build total (s) |
1066
+ | ----- | ------------------------------- | ---------------------------------- | --------------- | --------------------- | ------------------------ |
1067
+ | 120 | 178,788,089 | 42,963,597 | 76.0% | 9.65 | 11.80 |
1068
+ | 1,200 | 1,784,802,339 | 406,139,767 | 77.2% | 78.17 | 99.71 |
1069
+
1070
+ The totals include the initial full build and all 49 updates. At 1,200 files,
1071
+ record payload writes fall from 1,423,502,835 to 30,798,963 bytes, while descriptors
1072
+ write 361,299,504 and 375,340,804 bytes respectively. Segments make 1,298 record
1073
+ write calls versus 21,850 for JSONL, but add 58,702 hardlinks. Logical record reads
1074
+ fall from 4,213,565,967 to 2,818,534,401 bytes; every previous/new artifact is still
1075
+ fully validated. Cumulative wall time is 27.5% higher for segments (22.3% at 120
1076
+ files). This supports lower cumulative writes, not faster builds.
1077
+
1078
+ Retention observations sum `stat.blocks * 512` once per unique `(dev, ino)` over
1079
+ the retained regular files, including descriptors. Decimal MB below means
1080
+ 1,000,000 bytes. This is not `du`, logical artifact size, peak usage, an exact
1081
+ physical extent count or billed storage; directory metadata, compression,
1082
+ shared extents and filesystem snapshots are outside the observation.
1083
+
1084
+ | Files | Retention | JSONL inode allocation (MB) | Segments inode allocation (MB) | Segments reduction |
1085
+ | ----- | ------------------ | --------------------------- | ------------------------------ | ------------------ |
1086
+ | 120 | All 50 versions | 178.99 | 43.24 | 75.8% |
1087
+ | 120 | Latest 10 versions | 35.80 | 10.97 | 69.4% |
1088
+ | 1,200 | All 50 versions | 1,785.46 | 407.29 | 77.2% |
1089
+ | 1,200 | Latest 10 versions | 357.01 | 105.01 | 70.6% |
1090
+
1091
+ At 1,200 files, counting every artifact's logical references instead gives
1092
+ 1,784,802,339 bytes for JSONL and 1,798,843,639 for segments: the saving comes
1093
+ from shared retained objects, not smaller logical records. With all 50 versions,
1094
+ segments use 1,348 unique regular-file inodes, versus 100 for JSONL. Removing
1095
+ versions 0–39 reduces these counts to 1,228 and 20. An unchanged object's link
1096
+ count falls from 50 to 10. Every surviving build passes full validation and
1097
+ returns the exact historical source after ancestor deletion; no remote version
1098
+ is deleted by local cleanup. Retention remains manual, with pending artifacts
1099
+ and their original journals preserved.
1100
+
1101
+ Recovery uses a further commit, version 50, after deleting the latest segmented
1102
+ artifact (version 49). A cold segmented rebuild has no previous artifact; the
1103
+ checkpoint rebuild explicitly selects surviving version 48, two changes behind.
1104
+ There is no automatic checkpoint search.
1105
+
1106
+ | Files | Recovery | Total writes (bytes) | Record writes (bytes) | Retained links | Build time (ms) |
1107
+ | ----- | ------------------------------ | -------------------- | --------------------- | -------------- | --------------- |
1108
+ | 120 | Cold | 3,601,624 | 2,849,398 | 0 | 303.7 |
1109
+ | 120 | Explicit version-48 checkpoint | 829,178 | 71,338 | 117 | 228.5 |
1110
+ | 1,200 | Cold | 35,974,629 | 28,471,318 | 0 | 2,791.8 |
1111
+ | 1,200 | Explicit version-48 checkpoint | 7,580,263 | 71,338 | 1,197 | 1,976.6 |
1112
+
1113
+ Cold, checkpoint and independent cold JSONL controls have identical record and
1114
+ inventory hashes. The checkpoint path fully validates both artifacts and reads
1115
+ 56,942,538 record bytes at 1,200 files; cold recovery reads 28,471,318 bytes for
1116
+ the new artifact. A missing cache does not grant permission to discard a pending
1117
+ tracked-branch journal: retry ownership still requires the original journal.
1118
+
1119
+ `test/segmented-history.test.mjs` keeps maintained coverage small: seven versions
1120
+ of eight files, plus a separate non-adjacent-checkpoint recovery case. It verifies
1121
+ add/modify/delete inventories, ancestor removal, relocation of the pending
1122
+ artifact, immutable remote baseline fallback, refusal after journal loss, stale
1123
+ and incomplete candidates, full candidate revalidation on publication retry,
1124
+ waiting without replay, a lost publication ACK before branch bookkeeping,
1125
+ unchanged managed vectors without client-supplied vectors, and all historical
1126
+ exact reads. Each test owns its temporary directories and store; no process-wide
1127
+ filesystem mocks or private experiment paths enter the suite. The large histories
1128
+ and one-off observer remain local evidence, outside committed fixtures.
1129
+ Managed publication uses the existing synthetic-vector fault fixture, not a
1130
+ backend emulator or an embedding/retrieval quality model.
1131
+
1132
+ Validation passed on Node.js 24.15.0 and 22.23.4: 203 full-suite tests, nine
1133
+ installed-tarball CLI tests and typechecking on each runtime. Formatting, version
1134
+ consistency, diff checks and all five CI Python suites (17 tests) also passed.
1135
+ The two new history tests also passed together in isolation.
1136
+
1137
+ No runtime/default behavior changes in this follow-up. Git enumeration, full
1138
+ local integrity checks, descriptor construction/writes and complete candidate
1139
+ verification remain proportional to corpus size. Further local write reductions
1140
+ would need a separate descriptor/inventory design with equally explicit integrity
1141
+ and recovery rules. Reducing remote candidate validation still requires a verified
1142
+ backend completeness/preservation contract. This experiment measures neither
1143
+ LambdaDB latency/storage nor embedding performance and makes no source uploads
1144
+ or paid/live calls. Cross-volume fallback, power loss and hostile concurrent
1145
+ directory replacement were not exercised.
1146
+
57
1147
  ## Local checks
58
1148
 
59
1149
  Runtime used: Node.js 24.15.0, npm 11.12.1. Dependencies are pinned in
@@ -130,24 +1220,38 @@ Those temporary paths are run-specific and are not committed fixtures.
130
1220
 
131
1221
  ## Implementation choices and remaining scope
132
1222
 
133
- The initial connected preset is lexical (`embedding=none`). The internal embedding
134
- interface verifies eligibility/cache behavior only; production provider selection,
135
- semantic/hybrid querying, pricing, and evaluation remain open. Public imports
136
- reject a vector-enabled build to prevent fixture vectors from reaching LambdaDB.
1223
+ Implemented CLI behavior:
1224
+
1225
+ - Lexical search remains the default. Separate managed Collections support
1226
+ OpenAI `text-embedding-3-small` (1536 dimensions) and `text-embedding-3-large`
1227
+ (3072 dimensions), with explicit semantic and RRF hybrid search. The CLI rejects
1228
+ arbitrary fixture/custom vector presets, not the supported managed presets.
1229
+ - Optional local Qwen reranking uses a pinned model revision, bounded candidates,
1230
+ verified source and stable ties. It requires separate Python/model setup;
1231
+ startup and full-command latency are reported above. Jev comparison is deferred.
1232
+ - Git branch imports reuse a fixed `git-*` Branch with its last validated immutable
1233
+ baseline; SHA/tag imports retain frozen `work-*` writers. Explicit `--resume`
1234
+ reconciles the same pending import through its journal. Observed Git tags map
1235
+ to Aliases, including multiple names for one published commit.
1236
+ - Local diagnostics, public retrieval baselines and the fixed-candidate CoSQA
1237
+ reranking comparison are complete within their documented bounds. They do not
1238
+ establish universal relevance gains, production throughput or agent-task success.
137
1239
 
138
- Each import gets a fresh `work-*` Branch, with incremental reuse only from an exact
139
- validated previous writer snapshot. Existing writers are not mutated after
140
- publication. Persistent `git-*` tracking, automatic failed-workspace recovery,
141
- Alias pruning, and garbage collection are not yet implemented. Failed/candidate
142
- resources and build artifacts are retained. A single importing host is required;
143
- the local lock is not a distributed lease.
1240
+ Remaining operational scope: automatic Git observation, recovery of abandoned
1241
+ workspaces without their required journal, branch rename/deletion handling,
1242
+ authoritative Alias pruning, retention/garbage collection, and configuration
1243
+ migration. Failed/candidate resources and local build artifacts are retained.
1244
+ A single importing host is required: local locks and remote pending ownership
1245
+ are not a distributed compare-and-set or lease protocol. UI, MCP and hosted SaaS
1246
+ remain outside the first CLI scope. No stable/rc or Homebrew release is claimed.
144
1247
 
145
1248
  Parsing uses the pinned packaged grammars. Unsupported/new syntax can fall back
146
1249
  and is recorded; no claim of complete language-version coverage is made. There is
147
1250
  no optimal-chunking claim. The fixed-window baseline is implemented internally;
148
- the planned 10–20-query retrieval comparison has not been run. The in-memory test
149
- model does not approximate Lucene ranking, distributed indexing, retention, or
150
- compaction timing.
1251
+ the first 16-query live lexical comparison is recorded in [eval/RESULTS.md](https://github.com/lambdadb/srcx/blob/develop/eval/RESULTS.md).
1252
+ It is a single-repository diagnostic, not a general optimal-chunking result. The
1253
+ in-memory test model does not approximate Lucene ranking, distributed indexing,
1254
+ retention, or compaction timing.
151
1255
 
152
1256
  Canonical publication records exist on main; listings require both the remote
153
1257
  summary and the matching immutable Tag manifest. A candidate or a lone `ver-*`