@functional-systems/srcx 0.1.0-dev.3 → 0.1.0-dev.31

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 (61) hide show
  1. package/CHANGELOG.md +137 -1
  2. package/DESIGN.md +193 -58
  3. package/README.md +553 -38
  4. package/RELEASING.md +30 -9
  5. package/VALIDATION.md +855 -25
  6. package/dist/build.d.ts +81 -1
  7. package/dist/build.js +187 -37
  8. package/dist/build.js.map +1 -1
  9. package/dist/chunk.d.ts +9 -3
  10. package/dist/chunk.js +341 -14
  11. package/dist/chunk.js.map +1 -1
  12. package/dist/cli.js +103 -19
  13. package/dist/cli.js.map +1 -1
  14. package/dist/file-policy.d.ts +20 -0
  15. package/dist/file-policy.js +96 -0
  16. package/dist/file-policy.js.map +1 -0
  17. package/dist/implementation.d.ts +11 -0
  18. package/dist/implementation.js +191 -0
  19. package/dist/implementation.js.map +1 -0
  20. package/dist/publish.d.ts +18 -0
  21. package/dist/publish.js +158 -34
  22. package/dist/publish.js.map +1 -1
  23. package/dist/releases.js +21 -3
  24. package/dist/releases.js.map +1 -1
  25. package/dist/remote.d.ts +1 -0
  26. package/dist/remote.js +50 -9
  27. package/dist/remote.js.map +1 -1
  28. package/dist/repository.d.ts +4 -1
  29. package/dist/repository.js +26 -11
  30. package/dist/repository.js.map +1 -1
  31. package/dist/rerank.d.ts +16 -0
  32. package/dist/rerank.js +87 -0
  33. package/dist/rerank.js.map +1 -0
  34. package/dist/search.d.ts +14 -4
  35. package/dist/search.js +119 -23
  36. package/dist/search.js.map +1 -1
  37. package/dist/skills.d.ts +24 -0
  38. package/dist/skills.js +155 -0
  39. package/dist/skills.js.map +1 -0
  40. package/package.json +16 -5
  41. package/runtime/grammars/README.md +50 -0
  42. package/runtime/grammars/tree-sitter-bash.LICENSE +21 -0
  43. package/runtime/grammars/tree-sitter-bash.wasm +0 -0
  44. package/runtime/grammars/tree-sitter-sql.LICENSE +21 -0
  45. package/runtime/grammars/tree-sitter-sql.wasm +0 -0
  46. package/runtime/grammars/tree-sitter-wasm.LICENSE +21 -0
  47. package/runtime/qwen.py +132 -0
  48. package/runtime/requirements.txt +34 -0
  49. package/skills/srcx-search/SKILL.md +85 -0
  50. package/src/build.ts +258 -47
  51. package/src/chunk.ts +360 -12
  52. package/src/cli.ts +212 -24
  53. package/src/file-policy.ts +157 -0
  54. package/src/implementation.ts +253 -0
  55. package/src/publish.ts +226 -34
  56. package/src/releases.ts +36 -3
  57. package/src/remote.ts +70 -13
  58. package/src/repository.ts +40 -11
  59. package/src/rerank.ts +131 -0
  60. package/src/search.ts +154 -28
  61. package/src/skills.ts +205 -0
package/VALIDATION.md CHANGED
@@ -1,15 +1,833 @@
1
1
  # Validation record
2
2
 
3
- Date: 2026-09-25 (Asia/Seoul).
3
+ ## Direct Collection lookup
4
+
5
+ Exact generated Collection selectors now fetch only the selected metadata and
6
+ repository descriptor; names/keys retain discovery and ambiguity checks. Only
7
+ HTTP 404 falls back to alias discovery. Tests cover schema/descriptor rejection,
8
+ missing Collection-shaped aliases, non-404 failure handling, sanitized errors,
9
+ and the actual CLI/SDK path. All 165 tests and seven installed-package checks pass
10
+ on Node 24.15.0, along with typecheck, version, formatting and diff checks.
11
+
12
+ The [controlled read-only replay](eval/DIRECT-LOOKUP-RESULTS.md) compares archived
13
+ baseline runtime with the optimization on the same three immutable versions.
14
+ All 38 calls complete; 16 reads and 50 previews/handles verify against source.
15
+ Read outputs and search rankings/scores/excerpts are identical, excluding local
16
+ result IDs. Before/after version identities and frozen input hashes match.
17
+ No imports, embeddings or remote mutations occur.
18
+
19
+ Each measured operation saves 22 HTTP requests. Known-range reads fall from
20
+ 34–36 to 12–14 requests and average 1.905 to 0.706 seconds; lexical searches fall
21
+ from 48–50 to 26–28 requests and average 2.399 to 1.203 seconds. These are
22
+ alternating-order single observations, not a general latency or agent-cost claim.
23
+
24
+ ## Cross-repository versioned source delivery
25
+
26
+ The [bounded workflow diagnostic](eval/VERSION-WORKFLOW-RESULTS.md) covers
27
+ LambdaDB CLI v0.1.0 and TypeScript SDK v0.4.3/v0.5.1. A fresh client with no local
28
+ source attachment verifies all eight requested source spans and 25 lexical
29
+ previews/handles. All three immutable Tag/Snapshot identities remain unchanged
30
+ before/after reads; all 23 frozen runtime/harness inputs match. All 31 reserved
31
+ CLI calls complete. Three dry-run corpora contain 3,425 file/chunk records and
32
+ 1,994,646 source bytes across snapshots, with zero embeddings.
33
+
34
+ Mean known-range read time is 16.3 ms for local Git and 2,107.0 ms for srcx.
35
+ Remote reads make 34–36 HTTP requests each, including 23 repository-descriptor
36
+ fetches. Equal source/identity envelopes intentionally yield equal stdout tokens;
37
+ this is not evidence of model-token savings or autonomous task accuracy. Setup
38
+ costs and source-test inspection are separate from task reads. The next measured
39
+ optimization target is exact-Collection selection without project-wide discovery;
40
+ the product runtime and retrieval defaults are unchanged in this evaluation.
41
+
42
+ ## Fresh adaptive agent navigation
43
+
44
+ [Eight fresh sessions](eval/FRESH-AGENT-NAVIGATION-RESULTS.md) compare local tools
45
+ against local tools plus srcx on four new Requests behavior questions. Both arms
46
+ support all frozen facts under assistant source review. Mean total input is 3.2%
47
+ lower with srcx, while mean wall time is 6.3% longer; one observation per condition
48
+ does not establish a general efficiency advantage. Three lexical searches and one
49
+ semantic search were followed by local reads; no srcx implementation read occurred.
50
+
51
+ All 18 previews/handles match pinned source and version metadata, eight checkouts
52
+ remain clean, and 31 frozen inputs match their pre-run hashes. Setup/audit resolution
53
+ confirms the same immutable Snapshot. Argument and exhausted-budget guard checks
54
+ passed before execution. Two recoverable local command errors remain in the data;
55
+ all sessions and service calls completed. No reindexing, document embeddings,
56
+ ranking changes or agent reruns were performed. Raw task workspaces were archived
57
+ with all 1,310 file hashes verified; historical evaluations remain unchanged.
58
+
59
+ ## Optional overload implementation reads
60
+
61
+ [Offline navigation results](eval/IMPLEMENTATION-READ-RESULTS.md) cover six fresh
62
+ Python/TypeScript/TSX fixtures and a separate replay of exposed Requests results.
63
+ All twelve synthetic declaration starts reach their expected bodies. Ten of 115
64
+ archived reads resolve to streaming implementations, improving required-span
65
+ coverage on four query/mode rows while total read-output tokens increase 9.7%.
66
+ No complete-task, agent-efficiency or semantic ranking advantage is established.
67
+
68
+ All 158 tests and seven installed-package tests pass on Node 24.15.0, along with
69
+ six installed-module navigation assertions, typecheck, version, formatting and
70
+ bundled skill validation. Source/Tag integrity, conservative refusal, source-token
71
+ limits, accurate citations and unchanged ordinary reads are covered. No service
72
+ writes, embeddings, new searches or agent sessions were performed.
73
+
74
+ The namespace-merge review follow-up passes all 162 tests. TypeScript namespace
75
+ augmentation no longer counts as a second function implementation; exported and
76
+ non-exported merges link to the exact body, while duplicate bodies and interrupted
77
+ overload groups still reject linking. The exported-merge regression fails on the
78
+ original PR head. The offline evaluation above retains its original runtime and
79
+ results; it was not rerun for this TypeScript-only fix.
80
+
81
+ ## File selection and embedding policy
82
+
83
+ Offline validation on Node 24.15.0 passed 128 tests and seven installed-package
84
+ checks, plus typecheck, version and formatting checks. Synthetic tracked files
85
+ verify credential/crypto/image exclusions, case-insensitive minified assets,
86
+ virtual environments, dependency/cache paths and logs. Lockfiles, generated code,
87
+ snapshots and data retain source and lexical chunks without managed inputs.
88
+ Ordinary source, tests, manifests, templates and configurable Sphinx documentation
89
+ remain eligible. Ordered path overrides, configuration identity, baseline rejection,
90
+ unchanged-file reuse, managed publication and CLI override rejection are covered.
91
+ The CLI evaluator's actual offline prepare test includes an in-tree answer fixture
92
+ and verifies it is absent from the prepared corpus.
93
+
94
+ Fresh offline inventories reused the audited source commits:
95
+
96
+ | Repository | Result |
97
+ | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
98
+ | 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. |
99
+ | 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. |
100
+ | 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. |
101
+
102
+ All excluded paths have zero file/chunk records and all lexical-only files have
103
+ zero embedding inputs in these rebuilt artifacts. No service writes, provider calls
104
+ or agent sessions were performed. Existing remote Collections and historical
105
+ results are unchanged. The pinned policy selects a new configuration; no legacy
106
+ preset compatibility or migration layer was added. Generated detection is limited
107
+ to explicit markers/suffixes, `.gitattributes` is not interpreted, and credential
108
+ rules are not a general secret scanner. Additional evaluation-label locations must
109
+ be added to the explicit evaluation policy before running a different suite.
110
+
111
+ ## Image exclusion
112
+
113
+ Image assets are excluded by case-insensitive extension before source records,
114
+ chunking or embedding, including SVG and text pixel maps. Source and installed
115
+ CLI checks cover image exclusion for lexical and managed presets; TSX containing
116
+ inline SVG still produces managed chunks. The regression fails against the
117
+ archived pre-fix runtime. All 125 tests, six installed-package checks, typecheck,
118
+ version and formatting checks passed on Node 24.15.0.
119
+
120
+ A credential-free rebuild of the same Requests commit used in the semantic pilot
121
+ excluded the logo SVG: managed input fell from 806,268 to 179,548 estimated tokens
122
+ (77.7%), and managed chunks from 1,864 to 1,081. No remote import, agent rerun or
123
+ retrieval improvement was measured. Previous results and their runtime are retained.
124
+
125
+ ## Semantic agent investigation
126
+
127
+ [The semantic follow-up](eval/SEMANTIC-AGENT-RESULTS.md) covers twelve fresh sessions
128
+ on four frozen Requests questions, with the same local checkout in all conditions.
129
+ All answers covered the required facts under assistant source review. Mean times
130
+ were 69.9 seconds for local tools, 68.6 for lexical-first and 68.0 for semantic-first;
131
+ these single-run differences do not establish an efficiency gain. Semantic used
132
+ more total model input than both other conditions. All srcx sessions used one
133
+ search followed by local reads.
134
+
135
+ All 35 task previews and five separate diagnostic previews matched pinned source
136
+ and immutable version metadata; twelve checkouts and 26 runtime/harness fingerprints
137
+ passed verification. Payload validation does not establish nearest-neighbor recall:
138
+ one unfiltered semantic query returned SVG chunks, while a Python-filtered query
139
+ returned relevant methods with higher scores. The report preserves this unresolved
140
+ retrieval discrepancy separately from the original agent comparison. No product
141
+ search policy, embedding model or ranking default changed.
142
+
143
+ ## Agent workflow diagnostic
144
+
145
+ [The agent workflow record](eval/AGENT-WORKFLOW-PILOT.md) covers eight fresh Codex
146
+ sessions on three frozen questions against pinned public srcx/lambdadb-cli source.
147
+ Optional srcx access was unused in all three paired development environments.
148
+ A separate explicit-invocation confirmation used three searches and seven reads
149
+ without cloning. Both it and the Git/local baseline answered correctly under
150
+ assistant source review; srcx took 94.2 seconds versus 65.8, with more total model
151
+ input but less uncached input. No token-cost, latency or accuracy win is claimed.
152
+ Six successful reads and ten search previews matched pinned source/version data.
153
+ The report separates preparation cost, guided invocation, evolving environment
154
+ conditions and the audited wrapper reservation defect from product correctness.
155
+
156
+ ## Bash grammar runtime compatibility
157
+
158
+ Preparing the agent workflow pilot exposed a real import failure in the public
159
+ `lambdadb-cli` repository at `513af6e4d262edd380013c86d51a20aad16274d7`:
160
+ `scripts/test-homebrew.sh` aborted local materialization with
161
+ `TypeError: resolved is not a function`. A minimal `[[ "$value" == 1 ]]`
162
+ comparison reproduces it with the previous Bash grammar/runtime combination.
163
+ The replacement grammar is bundled with its license and pinned checksum in
164
+ `CHUNKER.shellGrammar`; other language runtimes remain unchanged.
165
+
166
+ The regression fixture fails before the replacement and passes afterward,
167
+ preserving complete source-byte coverage and syntax spans. The same fixture is
168
+ included in installed-package import checks. On Node 24.15.0, all 124 tests,
169
+ six installed-package tests, formatting/version checks and typecheck passed.
170
+ The two public pilot corpora also passed local materialization after the fix:
171
+ 139 files/928 chunks for srcx and 38 files/200 chunks for lambdadb-cli, with no
172
+ embeddings. These checks establish indexing/packaging correctness, not an agent
173
+ accuracy or efficiency improvement.
174
+
175
+ ## Agent skill installation
176
+
177
+ The npm artifact includes `skills/srcx-search/SKILL.md`. The `skills` command
178
+ installs, reports, updates and removes the bundled copy for Codex or Claude Code
179
+ in user/project scope. No credentials or network access are needed for those
180
+ operations. A content-hash/package-version footer distinguishes unchanged managed
181
+ copies from custom files; modified/unowned content, extra files and symlinked
182
+ managed paths are preserved. Scope selection does not edit unrelated agent
183
+ settings or infer a project root.
184
+
185
+ On Node 24.15.0, formatting/version checks, typecheck, all 124 tests and six packed
186
+ CLI tests passed. Lifecycle tests cover both agents and scopes using isolated
187
+ roots, replacement of a previous managed bundle, custom-file preservation,
188
+ symlinks, active locks, invalid options and no-write status/absent removal. Absent
189
+ removal also covers existing read-only parent directories for both agents/scopes
190
+ and preserves a pre-existing lock without acquiring it. The permission regression
191
+ tests fail before the fix and pass afterward on the local non-root POSIX runtime;
192
+ those permission tests are skipped on Windows or when running as root. Packed
193
+ CLI tests exercise both project destinations without config, then the existing
194
+ loopback workflow covers skill installation, repository discovery, commit
195
+ resolution, search and exact source reads. This is deterministic integration
196
+ validation; a model does not choose the commands in those tests.
197
+
198
+ The skill-creator validator accepted the skill. Separately, a fresh npm consumer
199
+ installed the tarball and Codex CLI 0.157.1 `skills/list` discovered the installed
200
+ project skill as enabled. Removing it removed it from the actual runtime catalog;
201
+ reinstalling restored it with `forceReload`. This exercised the real discovery
202
+ path without model requests. Claude Code's documented destination and installed
203
+ file lifecycle are covered, but Claude runtime discovery and either agent's
204
+ autonomous skill selection have not been exercised. Default local paths are the
205
+ supported installer targets; custom config directories and cloud/account skill
206
+ sync are outside this installation flow.
207
+
208
+ There were no live LambdaDB changes, embedding requests, global CLI installation,
209
+ or changes to the developer's personal skill directories. Tests and discovery
210
+ used isolated directories. This validates packaging/discovery, not token savings,
211
+ latency improvements or ranking quality.
212
+
213
+ Date: 2026-09-26 (Asia/Seoul).
214
+
215
+ ## Query-language guidance
216
+
217
+ README and search help explain source-language query selection without rejecting
218
+ non-English input or adding automatic translation. Agent guidance preserves exact
219
+ identifiers and error text, checks the question's premise, reads source evidence
220
+ and answers in the user's language. `--language` help explicitly identifies the
221
+ programming-language filter.
222
+
223
+ Local Node 24.15.0 checks passed: formatting, version consistency, typecheck,
224
+ 113 tests and five installed-package checks. Rendered `search --help` was checked
225
+ for query-language guidance and the programming-language filter description.
226
+
227
+ A private 2026-09-26 diagnostic used ten new Korean/English question pairs against
228
+ one existing immutable corpus, with English+Korean analysis, lexical top-ten
229
+ retrieval and five zero-context reads. Both query forms were frozen before answer
230
+ implementation inspection; source labels were frozen before retrieval. English
231
+ translation improved labelled-file discovery from 0/10 to 7/10, but complete
232
+ labelled evidence only from 0/10 to 1/10. All labelled spans were present in the
233
+ corpus; all 100 explicit reads matched pinned source bytes and version metadata.
234
+ There were 20 searches, no reindexing, no query embeddings and no reranking.
235
+
236
+ The same assistant authored queries and labels with prior repository familiarity;
237
+ this is not a blind benchmark. Exact implementation-span coverage can undercount
238
+ other useful evidence. One false-premise question remained in the set. No queries
239
+ or labels were tuned after retrieval. The new set did not run semantic/hybrid or
240
+ measure generated-answer accuracy, automatic translation quality or follow-up
241
+ reads. These results support query-writing guidance, not a language restriction,
242
+ a universal ranking claim or a product-default change. Private source-bearing
243
+ artifacts are retained locally and are not included in this repository.
244
+
245
+ ## Configurable text analyzers
246
+
247
+ The pre-release preset defaults to standard and requires a canonical analyzer
248
+ list. All 15 nonempty combinations of LambdaDB's four supported analyzers are
249
+ validated across lexical, managed-small and managed-large presets (45 distinct
250
+ configuration/Collection identities). Registration/discovery tests cover canonical
251
+ reattachment and schema drift; build tests reject reuse of a different analyzer
252
+ baseline while preserving the source/chunk text.
253
+
254
+ On Node 24.15.0, typecheck, formatting/version checks, all 113 tests and the packed
255
+ npm consumer passed. Its five CLI checks include a managed-large English/Korean
256
+ preset, offline preview parity, and invalid/connected analyzer-override rejection.
257
+ Publication tests verify readiness without depending on analyzed text matches.
258
+
259
+ The chunking, CLI-mode and public-benchmark evaluators explicitly pin standard
260
+ analysis, including CLI preview/registration arguments and remote schema checks.
261
+ Regression checks simulate an English product default and verify that prepared
262
+ artifacts and benchmark Collection schemas still use standard. These checks run
263
+ offline and do not rerun the retained ranking experiments.
264
+
265
+ A bounded live run on 2026-09-26 used synthetic source, two Collections and three
266
+ imports, with no embeddings or reranker. At commit `10936fe` (before restoring the
267
+ standard default), the actual CLI verified the English preset, publication of a
268
+ stop-word-only file, `run` matching `Running`, exact
269
+ pinned source reads, sorted/deduplicated reattachment, the live four-analyzer
270
+ schema, and Korean/Japanese search/read results. This is integration validation,
271
+ not a ranking benchmark or evidence that English is universally optimal. The
272
+ restored standard default is covered by the local and packed CLI checks above;
273
+ this default-only change did not repeat live writes.
274
+
275
+ Date: 2026-09-26 (Asia/Seoul).
276
+
277
+ ## Additional language chunking
278
+
279
+ Python (`.py`, `.pyi`), Go and Rust (`.rs`) use the pinned Tree-sitter grammars. Fixtures
280
+ verify decorated/async Python functions, class methods and nested class scopes,
281
+ docstrings, Go generic/pointer/value receivers, grouped types, Rust generic
282
+ `impl`/`trait` and module scopes, attributes/doc comments, authored macros, and complete UTF-8
283
+ source coverage with BOM, CRLF and Unicode. Long functions keep their symbol/scope
284
+ through bounded splitting; invalid parses retain text fallback. Artifact checks
285
+ verify language and symbol metadata in lexical/small/large build payloads.
286
+
287
+ C/C++ fixtures verify pointer declarators, templates, namespace/class scopes,
288
+ qualified names and both preprocessor branches. Shell fixtures retain quoted
289
+ semicolons, heredocs and compound commands. SQL fixtures retain CREATE/INSERT,
290
+ CTEs and dollar-quoted function bodies as statements, with created object/schema
291
+ metadata. Each added language is checked for token bounds, parse-error fallback,
292
+ exact source coverage and lexical/small/large payloads.
293
+
294
+ Local validation passed 107 Node tests, typecheck, formatting and version checks.
295
+ Four installed-package CLI checks cover the existing lexical/small/large workflow
296
+ and Python/Go/Rust/C/C++/Shell/SQL grammar loading with exact source payloads from
297
+ the npm artifact. The artifact check also verifies the SQL binary checksum and
298
+ packaged license notices.
299
+ The connected CLI checks use the synthetic SDK/HTTP test store. There were no live
300
+ LambdaDB writes, paid embedding calls or new ranking measurements. Earlier
301
+ retrieval results remain evidence for their original corpus and configuration.
302
+
303
+ ## Qwen failure diagnostics
304
+
305
+ Known worker failures now produce distinct setup, cache, device and input-limit
306
+ messages; host launch and deadline failures have separate remediation. Unknown
307
+ failures remain generic, and raw worker output is not forwarded. Search defaults,
308
+ scores, source verification and the no-fallback policy are unchanged.
309
+
310
+ Local validation passed 97 Node tests, nine Python checks (six worker and three
311
+ local-reranker protocol checks), three installed-package CLI checks, typecheck,
312
+ formatting and version consistency. Reserved worker exits and unexpected exits
313
+ were exercised with real synthetic subprocesses. Deadline, permission and
314
+ unexpected-signal mapping used a mocked process callback; the test asserted the
315
+ unchanged 120-second/SIGKILL policy rather than waiting for a real timeout.
316
+
317
+ Six additional offline checks used the existing Python 3.12 environment and
318
+ cached pinned model: missing executable, missing Python imports, empty cache,
319
+ invalid device, unavailable CUDA, and successful MPS inference. All produced the
320
+ expected outcome; the successful two-candidate query returned finite scores and
321
+ ranked the sorting function above an unrelated reader. No LambdaDB calls, document
322
+ embeddings or model downloads were needed. This is an error-handling and inference
323
+ smoke check, not a retrieval-quality comparison.
324
+
325
+ The retained report is `.srcx/diagnostics/report.json` in the
326
+ `srcx-reranker-diagnostics` worktree, SHA-256
327
+ `7725a96f6c5bf5b4a6a4f01369e2dbea6a8ce16d70692f6e1039774f42564e67`.
328
+ The local runner and Node/package logs are retained alongside it.
329
+
330
+ ## Developer workflow pilot
331
+
332
+ The [workflow pilot](https://github.com/lambdadb/srcx/blob/develop/eval/DEVELOPER-WORKFLOW-PILOT.md)
333
+ used installed dev.17 against srcx `7521974a331471b264a695e6f9795bba3e4a7dfd`
334
+ for three assistant-selected maintenance investigations. Five searches and 16
335
+ source-verified reads produced change maps for Qwen diagnostics, Go chunking and
336
+ automatic Git sync. No feature implementation or comparative quality claim is
337
+ part of this record.
338
+
339
+ One import added 127 files / 699 chunks to the existing managed-small Collection,
340
+ with 283,104 estimated document embedding input tokens. Two query embedding
341
+ requests and one cached Qwen invocation stayed within predeclared bounds. All
342
+ live commands completed without replay. Two separate local failure probes
343
+ confirmed indistinguishable public errors for missing Python and an invalid
344
+ device; raw exceptions remained masked.
345
+
346
+ Evidence is retained in the workflow-pilot worktree under `.srcx/workflow-pilot/`:
347
+
348
+ - `plan.json`: SHA-256 `86d929c19ff69faaed6a264198e0b9c15bf32d3b721a31c503a08c4d2e12da39`.
349
+ - `run.json`: SHA-256 `f0ca1a5e6ac12d48e4929959b85b08e846fb239011125cb153aaa6d0babb1359`.
350
+ - `error-probes.json`: SHA-256 `a5fb5c44dc089466cee8a6bba1c4d374c46bba01f9eef24ac739cfeac72b8612`.
351
+
352
+ ## Installed dev package first use
353
+
354
+ On 2026-09-26, the public `@functional-systems/srcx@0.1.0-dev.17` tarball from
355
+ source `98be125d45128a9395544b0925df591c0da08b39` passed a fresh npm consumer
356
+ installation and **23 CLI commands** covering local setup and live LambdaDB. The corresponding
357
+ [develop CI and publication](https://github.com/lambdadb/srcx/actions/runs/36178586841)
358
+ completed successfully. The registry `dev` tag selected dev.17 at inspection;
359
+ `latest` still selected the bootstrap dev.1, not a stable release.
360
+
361
+ The downloaded tarball's SHA-512 matched npm metadata, and its installed package
362
+ version/`gitHead` matched the intended source. Both npm attestation subjects
363
+ matched those tarball bytes; the provenance statement identified the expected
364
+ repository, commit, workflow and run. The attestation signature was not
365
+ independently verified in this local check.
366
+
367
+ The consumer used `npm install --ignore-scripts` in a new prefix, an isolated
368
+ `SRCX_CONFIG`/`SRCX_STATE_DIR`, and the installed `.bin/srcx` rather than the
369
+ checkout build. The existing Python 3.12 environment and cached Qwen model were
370
+ reused explicitly; all 34 pinned Python package versions and their active
371
+ installed dependency constraints matched. This was not a clean Python/model
372
+ installation, CPU/CUDA validation, or a new ranking benchmark.
373
+
374
+ | Check | Observed result |
375
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
376
+ | Version/help, configure, doctor | Expected dev.17 version/options; fresh connection settings; authentication/read check passed |
377
+ | Preview, register, discover | New synthetic Git repository; lexical preview had two files, two chunks, 44 tokens; one isolated Collection created |
378
+ | Commit A import/search/read | Validated publication, matching lexical result and exact original file |
379
+ | Optional local Qwen | Real cached model, finite reranker score, matching source read; 4.56 s external CLI wall time |
380
+ | Git tag mapping | `v1` Alias resolved to commit A |
381
+ | Commit B import/search/read | Changed source visible; deleted-file query returned no hits; A result handle still read exact A source |
382
+ | Managed semantic/hybrid | One search/read per mode against an existing immutable Collection of public srcx source; selected source matched Git |
383
+
384
+ The two synthetic commits were A `0d3bdc318ad1079339a46bc67cd7037f0ebfc3cc`
385
+ and B `9d652332bf1d29545970ccda2d823b8d4d1f627f`. Import commands took 90.45 s
386
+ and 41.44 s, including index visibility and Tag validation. These are single
387
+ integration measurements; they are not import-throughput or latency guarantees.
388
+
389
+ Usage was **one new lexical Collection, two imports, six searches and two managed
390
+ query embeddings**, with no new document embeddings or model downloads. All
391
+ commands completed; no failed-command replay was needed. Synthetic remote
392
+ resources and local artifacts remain available for inspection.
393
+
394
+ Retained evidence lives under `.srcx/first-use/` in the first-use worktree:
395
+
396
+ - `run/report.json`: reservations, command timings, versions and checks;
397
+ SHA-256 `10652c0cbf485e39be576f37b196873e66b284b6f07d3f2c5a86ebf72a7ff7ea`.
398
+ - `package/functional-systems-srcx-0.1.0-dev.17.tgz`: exact tested registry artifact;
399
+ SHA-256 `ec75eedd8c9031d5de3cace38f90f84ccf46f9b9723b13cbfc2e73ae9c7edde7`.
400
+ - `registry.json`, `dist-tags.json`, `attestations.json`, `python-runtime.json`,
401
+ bounded `acceptance.mjs`, command outputs, fixture source and result handles.
402
+
403
+ The documentation follow-up changes no runtime code, search defaults, published
404
+ package versions or deployment configuration. Later docs-only dev builds are
405
+ separate artifacts; the above live evidence remains attached to dev.17.
406
+
407
+ ## Local reranker integration
408
+
409
+ The opt-in `search --rerank qwen` path was exercised with the cached
410
+ Qwen3-Reranker-0.6B revision `e61197ed45024b0ed8a2d74b80b4d909f1255473`,
411
+ Python 3.12, float32/MPS on the same Apple M5 Pro / 64 GB machine. A local model
412
+ check ranked a sorting function above an unrelated reader and assigned identical
413
+ scores to exact duplicate source. Offline snapshot loading initially rejected the
414
+ selectively downloaded cache; matching the download allowlist fixed this before
415
+ any live search. No model download was required.
416
+
417
+ Three existing repository questions were selected before running, with a fixed
418
+ 20-candidate pool and a first-five result/read limit. The six CLI searches used
419
+ existing immutable Tags for srcx `8c0d1656d4d66a6461a32e9072b2e5f7fda9cec1`
420
+ and lambdadb-cli `513af6e4d262edd380013c86d51a20aad16274d7`. Baselines retrieved
421
+ 20 results so candidate membership could be checked. All 28 selected-result
422
+ reads matched committed Git source, and every reranked result retained its
423
+ baseline candidate, retrieval score and Snapshot identity.
424
+
425
+ | Question / mode | Candidates | Baseline CLI | Qwen CLI | Qwen worker | First-five complete evidence, before → after |
426
+ | ------------------------------------------ | ---------: | -----------: | -------: | ----------: | -------------------------------------------- |
427
+ | `srcx-alias-name` / lexical | 4 | 2.04 s | 4.44 s | 2.46 s | yes → yes |
428
+ | `srcx-read-integrity` / semantic | 20 | 6.73 s | 9.75 s | 5.35 s | no → no |
429
+ | `lambdadb-cli-command-deadline` / semantic | 20 | 3.86 s | 8.58 s | 4.89 s | yes → yes |
430
+
431
+ CLI timings are external process wall times, excluding subsequent `read` checks;
432
+ worker timings include Python startup, fresh model loading and inference.
433
+ Network/cache/order effects are uncontrolled and these are single measurements,
434
+ not latency percentiles or proof of interactive suitability. The baseline prints
435
+ up to 20 hits while the reranked command prints up to five; both verify the same
436
+ candidate pool. Existing assistant-authored evidence labels were reused, with
437
+ no tuning or new independent relevance judgments. This is an integration smoke
438
+ check, not another ranking benchmark. It supports keeping reranking optional;
439
+ no defaults changed and Jev evaluation remains deferred.
440
+
441
+ There were six searches (four managed query embeddings), no new Collections,
442
+ document writes, document embeddings, retries or failed live commands. The
443
+ retained local report is `.srcx/reranker-smoke/live/report.json` in the integration
444
+ worktree (SHA-256 `0b1a406153a751def4106ce4e6dbeca4fd9f2439e02cefd04e5be111a4679568`).
445
+ Raw command outputs, the bounded runner and isolated result handles are retained
446
+ alongside it; credentials were not recorded.
447
+
448
+ Local validation passed 95 Node tests, 13 Python checks, typecheck, formatting,
449
+ version consistency and three installed-package CLI checks. Installed-package
450
+ checks include the bundled worker path and opt-in search/read protocol with a
451
+ synthetic worker; real model inference and LambdaDB searches were local checks,
452
+ not CI inference. See [setup and behavior](README.md#optional-local-qwen-reranker).
453
+
454
+ ## Fixed-candidate CosQA reranking
455
+
456
+ The [completed Qwen comparison](eval/COSQA-RERANK-RESULTS.md), run on September 26
457
+ (Asia/Seoul), improved exact-content hit@10 from 57.4% to 64.8% with roughly one
458
+ second of local model computation per query. All 500 original candidate pools
459
+ and duplicate-ID ordering were preserved. The report separates official-ID
460
+ metrics, content-equivalence diagnostics, regressions and local latency.
461
+
462
+ ## Independent CosQA BM25 cross-check
463
+
464
+ The [independent cross-check](eval/COSQA-BM25-RESULTS.md) reproduces lexical
465
+ quality after aligning score ties and documents duplicate-ID sensitivity in the
466
+ official task. Its supplemental content-equivalence metrics are distinct from
467
+ the unchanged official-label baseline.
468
+
469
+ ## Public code retrieval baseline
470
+
471
+ At frozen executable `03ac468`, the pinned CoIR CosQA and MTEB CodeSearchNet
472
+ Python/Go baseline validated all 22,604 documents and managed vectors in immutable
473
+ Tags and collected 7,473 successful searches. Nine Python inputs exceeded the
474
+ existing query limit; all 27 mode/query outcomes remained zero-scored in the
475
+ 2,500-query denominator for each mode. There were no API failures or retries.
476
+
477
+ Semantic nDCG@10 exceeded lexical and the current RRF hybrid on all three tasks.
478
+ This is an external-task retrieval baseline, not a full CoIR average, Git/CLI
479
+ integration validation or an agent coding-success benchmark. Product defaults
480
+ are unchanged. See [full metrics, usage and limitations](eval/PUBLIC-BENCHMARK-RESULTS.md)
481
+ and the [fixed protocol](eval/PUBLIC-BENCHMARK.md).
4
482
 
5
483
  ## Evidence boundary
6
484
 
7
- This implementation has passed local fixtures/fault injection/SDK transport checks
8
- and a live synthetic A/B acceptance run against the user-supplied LambdaDB
9
- connection. Only generated test source was uploaded. No production repository
10
- source or paid embeddings were used, and no Git repository/npm package was
11
- published. Live evidence below is limited to this small fixture; it is not a
12
- throughput, general concurrency, or retrieval-quality benchmark.
485
+ The initial implementation passed local fixtures/fault injection/SDK transport checks,
486
+ a live synthetic A/B acceptance run, and an exact-package self-index of the public
487
+ srcx repository against the user-supplied LambdaDB connection. No private source
488
+ or paid embeddings were used. These checks are not a throughput, general
489
+ concurrency, or retrieval-quality benchmark. npm publication evidence is recorded
490
+ separately below. The persistent Git branch changes have a separate synthetic
491
+ live run recorded next; the earlier live runs do not validate this new path.
492
+
493
+ ## Local reranking diagnostic
494
+
495
+ At frozen executable `ba9fa0f8ad5c57cb54ec0483d05faead78acf2c1`, the local
496
+ Qwen3-Reranker-0.6B treatment scored all 455 retained pairs without failures or
497
+ retries. Offline complete source evidence among five selections changed from
498
+ lexical **7/16 to 8/16**, semantic **5/16 to 9/16**, hybrid **8/16 to 10/16**.
499
+ There were no complete-answer losses; partial evidence declined in two pools.
500
+ No new CLI reads were made and the original labels remain unreviewed.
501
+
502
+ The run used 391,713 Qwen input tokens and 84.59 seconds on local MPS, with zero
503
+ paid API usage. Completed replay preserved score bytes/timestamps without model
504
+ loading. Local validation passed 86 Node tests, three Python protocol checks and
505
+ three installed-package checks; frozen Node 22/24 CI passed. See [results and
506
+ limitations](eval/RERANK-RESULTS.md), [frozen protocol](eval/RERANK-RUN.md) and
507
+ [preflight](eval/rerank-qwen-preflight.json) for provenance and bounds.
508
+
509
+ ## Click/Cobra development diagnostic
510
+
511
+ At frozen harness `4f7c865055749c82641015a2302983b034877e23`, 48 actual CLI searches
512
+ completed sequentially on pinned public Click/Python and Cobra/Go sources with
513
+ managed small and existing text fallback. All **455 handles and 231 reads** passed
514
+ source/version checks. Complete first-five evidence was lexical **7/16**, semantic
515
+ **5/16**, hybrid **8/16**; natural-language tasks scored **2/6, 2/6, 4/6**. Top-ten
516
+ candidate availability was **8/16, 11/16, 10/16**. These are fixed assistant-authored
517
+ implementation labels without independent review or agent answer grading.
518
+
519
+ Both imports published validated immutable versions; no command failures or
520
+ resumes occurred. Usage reservations were 388,771 document input tokens, 32 query
521
+ embeddings, 350 query input tokens and 48 searches. Completed replays preserved
522
+ report bytes/timestamps without service calls. Local Node 24.15.0 passed **78 tests**,
523
+ typecheck, formatting and version checks; frozen-harness Node 22/24 CI and installed
524
+ package checks passed. [Results and limitations](eval/TRANSFER-RESULTS.md) include
525
+ report hashes, inspected cases and coverage/output costs; [protocol](eval/TRANSFER-RUN.md)
526
+ records fixed budgets. Earlier draft-preparation evidence below remains historical.
527
+
528
+ ## Evaluation diagnostics and transfer draft
529
+
530
+ Evaluation subprocess failures now append safe command diagnostics with process
531
+ or JSON-decode stage, exit/signal metadata and allowlisted stderr. Fixture checks
532
+ cover no automatic retry, preservation across multiple failures, secret/source
533
+ omission, private file permissions, malformed output, output overflow and log-write
534
+ failure. This cannot recover stderr from old live failures. Node 24.15.0 passed
535
+ **75 tests**, typecheck, formatting and version checks for this follow-up.
536
+ The read-side regression invokes the actual `readHandle` for seven failure paths
537
+ and verifies both safe-message retention and omission of contaminated stderr.
538
+
539
+ A separate offline preparation imported pinned Click 8.1.8 and Cobra v1.9.1 Git
540
+ sources into local managed-small build artifacts, without service calls or
541
+ embedding generation. All 16 draft questions' byte hashes, source line ranges and
542
+ inclusion were verified. The 207 files contain 544 eligible chunks with 388,771
543
+ estimated embedding input tokens. Python/Go use the current text fallback; no new
544
+ parser or search behavior was added. These labels are assistant-authored and not
545
+ independently reviewed. See [draft protocol and reproduction](eval/TRANSFER-EVAL.md)
546
+ and [diagnostic retention rules](eval/COMMAND-DIAGNOSTICS.md). No retrieval quality,
547
+ provider cost or live operational reliability is measured by this preparation.
548
+
549
+ ## Retrieval mode comparison
550
+
551
+ At application/harness commit `de5a23bbc2f0712d134066354b4313420d21fccd`, the
552
+ actual CLI completed 48 searches across the same two managed corpora and fixed
553
+ 16-question suite. All **456 results/handles** and **236 reads** matched pinned
554
+ source and version facts. Revised-label complete evidence was lexical **16/16**,
555
+ semantic **8/16**, and hybrid **13/16**; unchanged original labels scored 14/16,
556
+ 8/16, and 11/16. These are diagnostic coverage measurements, not human answer grades.
557
+
558
+ All three hybrid regressions contained the required evidence in search's top ten,
559
+ but outside the first five reads. Keep lexical as the default pending fresh-task
560
+ ranking evaluation. The run also exposed a query response omitting one managed
561
+ vector; same-Tag fetch hydration now preserves non-vector payload equality and
562
+ hit order/scores. The failed attempt remains separate from the complete fresh run.
563
+
564
+ Node 22/24 passed **67 tests**, typechecking and installed-package CLI checks after
565
+ the fix. The completed live report was revalidated without new service calls, and
566
+ its bytes/timestamp were unchanged. See [full results](eval/RETRIEVAL-MODE-RESULTS.md)
567
+ for per-mode metrics, inspected misses, input/usage accounting, source revisions,
568
+ report hashes and evidence limits; [protocol](eval/RETRIEVAL-MODES.md) documents
569
+ reproduction and effects.
570
+
571
+ ## Query-style supplement
572
+
573
+ At harness commit `65c8e7060366f4df846c9b2bc08270e7337f0df1`, 72 searches tested
574
+ eight new tasks with identifier, natural-language and mixed formulations using
575
+ the same managed small model and the same two immutable publications. All
576
+ **696 result handles and 356 reads** matched source/version facts. Complete
577
+ first-five evidence by lexical/semantic/hybrid was **7/8, 7/8, 7/8** for identifiers,
578
+ **0/8, 3/8, 1/8** for natural descriptions and **5/8, 7/8, 6/8** for mixed queries.
579
+ These are eight paired tasks, not 24 independent judgments. Semantic helped on
580
+ this diagnostic; the original keyword-heavy result must not be generalized.
581
+
582
+ The frozen protocol adds verified candidate coverage at ranks 1/3/5/10, the first
583
+ complete prefix, stdout tokens and offline token-budget prefixes. No model,
584
+ ranking, read-selection or product default changed. The original suite/results
585
+ and incomplete run remain intact. A completed rerun preserved report bytes and
586
+ timestamp without service calls. Node 22.14.0 and 24.15.0 passed **69 tests**;
587
+ typecheck, formatting and frozen-harness CI passed. See [results and cases](eval/QUERY-STYLE-RESULTS.md),
588
+ [protocol](eval/QUERY-STYLES.md), and [embedding model research](eval/EMBEDDING-MODELS.md).
589
+
590
+ ## Managed small versus large comparison
591
+
592
+ At frozen harness `6fa65b541dc50debdfa4f9a6297301b2cb3c2b53`, small (1536 dimensions)
593
+ and large (3072 dimensions) completed 240 searches over identical pinned source/chunk inputs.
594
+ All **2,304 result handles and 1,184 reads** passed source/version validation.
595
+ Style-suite complete top-five evidence was semantic **17/24 → 16/24** and hybrid
596
+ **14/24 → 16/24**; natural semantic improved **3/8 → 4/8**. The separate regression
597
+ set scored semantic **8/16 → 8/16** and hybrid **13/16 → 12/16**. All 40 lexical
598
+ candidate lists matched across models. Small coverage repeated the earlier runs.
599
+
600
+ An initial large attempt stopped twice with an unknown CLI search error; its
601
+ 19 partial rows and two successful diagnostic queries remain excluded. A fresh
602
+ isolated run reused the same publications and completed without changing the
603
+ frozen protocol. All four completed reports revalidated without service calls
604
+ and retained their bytes/timestamps. Keep small as the initial managed choice
605
+ and large opt-in; these familiar diagnostic tasks do not establish a model winner.
606
+
607
+ Node 22.14.0 and 24.15.0 passed **72 tests**, typecheck and installed-package CLI
608
+ checks covering lexical/small/large. Formatting/version checks and frozen-code
609
+ CI passed. [Full results](eval/MODEL-COMPARISON-RESULTS.md) record per-query changes,
610
+ report hashes, original-label scores, all five roots' reserved usage, and limits;
611
+ [protocol](eval/MODEL-COMPARISON.md) records the predeclared comparison.
612
+
613
+ Review follow-up: resume and completed replay now reject saved rows whose category
614
+ is missing or differs from the frozen question, even when the stored summary was
615
+ recomputed to match the corruption. The subprocess regression first reproduced
616
+ the acceptance bug, then passed with the guard; valid replay and rejected reports
617
+ both preserve their bytes. Node 24.15.0 passed **73 tests** after this change.
618
+ The four completed model reports have no category mismatches and remain unchanged.
619
+ Their frozen harness remains the revision recorded above; the new harness requires
620
+ fresh run roots rather than rewriting historical runtime fingerprints.
621
+
622
+ ## Managed OpenAI embedding acceptance
623
+
624
+ The opt-in managed preset passed a separate synthetic live run at application and
625
+ harness commit `177731386f76a13723a83aa8470d4e0715e29424` using Node 24.15.0 and
626
+ the user-supplied development connection. It completed at
627
+ `2026-09-24T20:46:46.305Z` in 111.706 seconds. Only synthetic source was uploaded.
628
+
629
+ - Both commits published validated immutable Tags, with six generated 1536-number
630
+ vectors in each corpus. Mixed file/manifest records correctly omitted vectors.
631
+ - Six filtered searches (lexical, semantic and hybrid for each version) returned
632
+ 14 result handles; every full-file read matched the pinned Git blob byte for byte.
633
+ - The second import skipped unchanged records, removed deleted content, and kept
634
+ the original version's handle readable. Fresh repository discovery preserved the
635
+ managed preset and schema.
636
+ - Ordinary upserts submitted ten eligible chunk inputs across both imports. The
637
+ preflight upper bound was 167 estimated document input tokens; four searches
638
+ requested query embeddings. These counts are not provider-reported billed usage.
639
+
640
+ The first run at `fb5b6d8` correctly remained unpublished: this deployment omitted
641
+ vectors from list responses despite `includeVectors=true`, while fetch/query on
642
+ that same Tag returned them. The transport now fetches those listed IDs from the
643
+ same immutable Tag and requires exact non-vector payload equality before vector
644
+ validation. Regression checks reject missing fetch records and changed payloads.
645
+ The failed run and retry journal remain under `.srcx/live-managed/`; they were not
646
+ relabelled as successful evidence. The successful run has a separate Collection
647
+ and evidence directory, `.srcx/live-managed-verified/`, in the validation worktree.
648
+ Both synthetic Collections are retained for inspection.
649
+
650
+ The successful report SHA-256 is
651
+ `6c96ac8af9b79c85e98c84f1f01851906f0b1b3e4d96b51d9417cb59380ac532`;
652
+ its runtime fingerprint is
653
+ `7d8a8006820ee523a88e80d6614327000ce305cffafe377d18fda5b50ba9c947`.
654
+ A same-runtime rerun made no service calls and preserved the original report bytes.
655
+ The harness rejects changed runtime/destination/Node inputs and incomplete runs
656
+ before new requests; recovery after uncertain writes remains explicit.
657
+
658
+ Node 22.14.0 and 24.15.0 each passed **61 tests**, typechecking, and installed-tarball
659
+ CLI checks for both presets. Formatting, version validation and diff checks passed.
660
+ Local tests cover generated-vector failures, exact payload validation, unchanged
661
+ record reuse, uncertain-write recovery, preset/schema drift, query serialization,
662
+ and credential-free managed previews. Live checks used the built application APIs;
663
+ installed-package CLI checks used the loopback fault-injection store.
664
+ These checks establish integration/source correctness, not semantic relevance gains
665
+ or performance on real repositories. The earlier lexical evaluations remain separate.
666
+
667
+ ## Default CLI search/read evaluation
668
+
669
+ The follow-up uses actual built CLI subprocesses with the unchanged default
670
+ syntax/path-scope-symbol preset across pinned public `srcx` and `lambdadb-cli`
671
+ commits. At harness commit `57b63e1cdbf7ec722b95bb0f40ac0ef5039af3e8`, both
672
+ publications validated and all **136 search results/handles** and **76 read
673
+ responses** matched their pinned source, version and citation. No embeddings
674
+ were used. The run completed at `2026-09-24T20:01:58.865Z`.
675
+
676
+ The frozen 16-question suite recovered complete labeled evidence for **14/16**.
677
+ The two remaining cases reflect a one-byte blank-line boundary and an omitted
678
+ alternative document/code answer, not demonstrated source-integrity failures.
679
+ Mean full CLI stdout was **7,383 tokens** per query. This fixed-five-read protocol
680
+ is distinct from the earlier full-chunk/token-budget comparison; neither measures
681
+ general task success. Labels remain assistant-authored without independent human
682
+ review. See [eval/CLI-RESULTS.md](https://github.com/lambdadb/srcx/blob/develop/eval/CLI-RESULTS.md)
683
+ for per-repository scores, inspected misses and evidence boundaries, and
684
+ [eval/CLI-WORKFLOW.md](https://github.com/lambdadb/srcx/blob/develop/eval/CLI-WORKFLOW.md)
685
+ for reproduction and normal Collection effects.
686
+
687
+ Local Node 24.15.0 passed **54 tests**, typechecking, formatting/version checks and
688
+ the installed-package CLI contract. Node 22/24 CI passed at the harness commit.
689
+ Live execution used built CLI subprocesses; package validation used a loopback
690
+ fixture. A completed rerun preserved the original report bytes and timestamp.
691
+ Raw evidence and recovery journals remain under `.srcx/cli-eval/` in the validation
692
+ worktree; the older pilot's original report remains unchanged.
693
+
694
+ ## Retrieval evaluation harness
695
+
696
+ The internal pilot adds five checks for unique source-range scoring, token-budget
697
+ prefix selection, source/hit integrity, equal path-only enrichment, and rejecting
698
+ stale runtime checkpoints before any connection. With these checks, Node.js
699
+ 24.15.0 passed **50 tests**, typechecking, version validation, and clean installed
700
+ package checks. The default CLI preset and config hash remain unchanged.
701
+
702
+ The suite fixes 16 queries, expected source byte ranges, and two full Git commits
703
+ before retrieval. Both chunkers materialize the same included files, use separate
704
+ config identities, and run through the existing immutable publication validation.
705
+ Live retrieval observations and limitations are in [eval/RESULTS.md](https://github.com/lambdadb/srcx/blob/develop/eval/RESULTS.md),
706
+ with reproduction instructions in [eval/README.md](https://github.com/lambdadb/srcx/blob/develop/eval/README.md). These diagnostic
707
+ labels were authored from source before querying and are not independently
708
+ human-reviewed judgments or a general retrieval-quality benchmark.
709
+
710
+ Post-review, `splitEvidence` now requires complete coverage of all required ranges
711
+ before classifying a result as split across chunks. The multi-range regression
712
+ brings the local suite to **51 passing tests**. Offline rescoring of all 32 retained
713
+ query/method pairs preserved every metric and category summary. The original live
714
+ report, runtime fingerprint, and completion timestamp were not changed.
715
+
716
+ ## Persistent Git branch tracking
717
+
718
+ Local regression coverage exercises one writer across consecutive commits,
719
+ branch-local deletion/diff baselines, separate branches sharing canonical Tags,
720
+ rewinds to already published commits, and imports from fresh local state. Fault
721
+ injection verifies last-published branch resolution during partial writes, pending
722
+ ownership protection when the local journal is missing, stale/corrupt candidate
723
+ rejection, and retries after uncertain control writes. Branch/tag ambiguity and
724
+ explicit full refs are covered.
725
+
726
+ The CLI fixture also imports and updates a tracked branch through the real SDK
727
+ transport and selects it for search, resolve, and read. The same fixture runs
728
+ against the installed tarball. These checks use a loopback fault-injection model,
729
+ not a live LambdaDB deployment.
730
+
731
+ A separate **live LambdaDB run passed all 12 checkpoints** on September 25 using
732
+ Node **24.15.0**, application source commit
733
+ `f42a9141cef3bfc0b604e1b14a00c79607c7dd98`, and the original checkout's `.env.local`
734
+ loaded explicitly through Node. The run took **414.195 seconds** and uploaded only
735
+ synthetic Git source with no paid embeddings. It verified:
736
+
737
+ - First-import timeout remains unpublished, followed by same-journal recovery.
738
+ - A -> B uses one fixed Collection Branch; pending B still resolves/searches A,
739
+ and a fresh local state cannot overwrite that pending branch.
740
+ - Added/modified/deleted code searches correctly after B; old A evidence still
741
+ reads the exact original source bytes.
742
+ - A second Git branch shares canonical A/B Tags while maintaining its own writer
743
+ baseline, including B -> A -> B movement and an unchanged repeated import.
744
+ - A SHA-only new commit uses a manual `work-*` writer.
745
+
746
+ A separate invocation of the actual CLI against that live Collection passed
747
+ branch `resolve`, branch-selected `search`, and a full-file `read` compared byte
748
+ for byte with the pinned Git blob. It used the built CLI, not a registry-installed
749
+ package. Local installed-package evidence remains separate above.
750
+
751
+ The reproducible harness is `scripts/live-branches.mjs` (`npm run
752
+ test:live:branches`). Its ignored evidence is `.srcx/live-branches/report.json`
753
+ and `.srcx/live-branches/cli-report.json` in the validation worktree. The report
754
+ records the exact source commit, harness SHA-256, per-check results, and resource
755
+ URL. One synthetic Collection is retained with two tracked writers, one manual
756
+ writer, the two control/checkpoint Branches, three canonical commit Tags, and seven
757
+ candidate Tags. No application fix was needed during this live run.
758
+
759
+ On Node **22.14.0** and **24.15.0**, typechecking, all **43 tests**, and installed
760
+ package checks passed. Formatting, release-version validation, and `git diff
761
+ --check` also passed locally. These results are not GitHub CI evidence.
762
+
763
+ ## Final branch review validation
764
+
765
+ The final pre-PR review reproduced a read-order race: a concurrent publication
766
+ could advance branch control beyond the version list already captured by the
767
+ reader. Resolution now pins the control record first. The review also found that
768
+ live reruns could skip saved checkpoints while replacing the reported source
769
+ revision; checkpoints now require matching runtime, harness, fixture, lockfile,
770
+ and Node fingerprints and preserve their original revision/completion time.
771
+ Regression tests cover both cases, including rejecting stale evidence before any
772
+ connection or report mutation.
773
+
774
+ After these fixes, Node **22.14.0** and **24.15.0** each passed typechecking,
775
+ all **45 tests**, and installed-package checks. Formatting, release-version
776
+ validation, and diff checks passed locally.
777
+
778
+ A fresh synthetic live run at application/harness commit
779
+ `2988c7e1826a44cfed48381681d0125b28ae9086` passed all **12 checkpoints** in
780
+ **432.836 seconds**. The built CLI also passed live branch resolution,
781
+ search, and exact source reads. Final reports are retained separately under
782
+ `.srcx/live-branches-review/report.json` and
783
+ `.srcx/live-branches-review/cli-report.json`; the previous run remains intact.
784
+ This final run retained one synthetic Collection with two tracked writers, one
785
+ manual writer, two control/checkpoint Branches, three canonical commit Tags,
786
+ and seven candidate Tags. CI evidence, once available on the PR, is separate
787
+ from these local and live results.
788
+
789
+ ## Initial npm package and live self-index
790
+
791
+ The exact `0.1.0-dev.1` tarball from merged commit
792
+ `f94f947bf593b2f8498c07e130933b0ab444f868` passed clean installation, CLI execution,
793
+ WASM parsing, and the loopback import/search/read contract. Its installed CLI then
794
+ imported that same Git commit into LambdaDB: **37 files, 260 chunks**, with
795
+ inventory, content, and query validation passing. A `validateBuild` query returned
796
+ three results from `src/build.ts`; the full-file read matched the pinned Git blob
797
+ byte for byte. This was a lexical-only import (`embedding=none`).
798
+
799
+ The first npm publication used this tested tarball with the `dev` dist-tag. The
800
+ registry tarball's SHA-512 matched the candidate, and a clean installation of the
801
+ downloaded registry tarball passed the same CLI contract. Registry signatures are
802
+ present. The local bootstrap has no GitHub Actions provenance. npm also created
803
+ `latest=0.1.0-dev.1`; that tag does not represent a stable release.
804
+
805
+ Local evidence is retained under `.srcx/releases/0.1.0-dev.1-f94f947/` (ignored),
806
+ including `candidate.json`, `live-publication.json`, `live-verification.json`,
807
+ `registry-version.json`, and the exact candidate and downloaded tarballs.
808
+ The source commit's [Node 22/24 CI](https://github.com/lambdadb/srcx/actions/runs/36035063463)
809
+ also passed. Current distribution and automation status is in
810
+ [RELEASING.md](RELEASING.md).
811
+
812
+ ## First automatic development publication
813
+
814
+ [CI attempt 3](https://github.com/lambdadb/srcx/actions/runs/36035063463/attempts/3)
815
+ published `0.1.0-dev.3` using npm Trusted Publishing from the same reviewed commit.
816
+ The version suffix is the first-parent commit count. The registry's `gitHead`
817
+ and SLSA provenance both identify `f94f947bf593b2f8498c07e130933b0ab444f868`;
818
+ provenance also identifies `lambdadb/srcx`, `.github/workflows/publish.yaml`, and
819
+ the GitHub-hosted workflow run. The downloaded tarball's SHA-512 matches registry
820
+ metadata. A clean install by package name/version passed CLI execution and the
821
+ loopback import/search/read contract. `npm audit signatures` verified all eight
822
+ installed registry signatures and three attestations, including srcx provenance.
823
+ `dev=0.1.0-dev.3`; `latest=0.1.0-dev.1` remains the bootstrap prerelease.
824
+
825
+ The initial automatic attempt stopped during the pre-write metadata lookup while
826
+ npm's full package listing still returned 404. After the listing became visible,
827
+ only the failed publishing job was rerun. No publication write was retried to
828
+ work around propagation. Local evidence is retained in `registry-dev3.json`,
829
+ `attestations-dev3.json`, and `provenance-dev3.json` under the release directory
830
+ above. No stable release, GitHub Release, or Homebrew formula was created.
13
831
 
14
832
  ## Local checks
15
833
 
@@ -76,11 +894,9 @@ The test suite covers:
76
894
  reruns. Simulated registry delays/failures verify bounded post-write reads and
77
895
  no automatic publication retry; no test writes to npm.
78
896
 
79
- Release infrastructure is prepared in `.github/workflows/publish.yaml` for Node
80
- 22/24. Local validation does not establish GitHub Actions or npm publication
81
- success. Initial npm registration, package-specific Trusted Publisher setup, and
82
- enabling `NPM_DEV_PUBLISH_ENABLED` remain separate release steps. See
83
- [RELEASING.md](RELEASING.md); no npm or Homebrew release was performed in this setup.
897
+ Release infrastructure is in `.github/workflows/publish.yaml` for Node 22/24.
898
+ The local checks above are distinct from the CI, npm, and live-service evidence
899
+ recorded separately. No stable/rc or Homebrew release has been performed.
84
900
 
85
901
  The demo writes [.srcx/demo-report.json](.srcx/demo-report.json). That generated
86
902
  report identifies the retained synthetic repository, A/B build artifacts, counts,
@@ -89,24 +905,38 @@ Those temporary paths are run-specific and are not committed fixtures.
89
905
 
90
906
  ## Implementation choices and remaining scope
91
907
 
92
- The initial connected preset is lexical (`embedding=none`). The internal embedding
93
- interface verifies eligibility/cache behavior only; production provider selection,
94
- semantic/hybrid querying, pricing, and evaluation remain open. Public imports
95
- reject a vector-enabled build to prevent fixture vectors from reaching LambdaDB.
908
+ Implemented CLI behavior:
909
+
910
+ - Lexical search remains the default. Separate managed Collections support
911
+ OpenAI `text-embedding-3-small` (1536 dimensions) and `text-embedding-3-large`
912
+ (3072 dimensions), with explicit semantic and RRF hybrid search. The CLI rejects
913
+ arbitrary fixture/custom vector presets, not the supported managed presets.
914
+ - Optional local Qwen reranking uses a pinned model revision, bounded candidates,
915
+ verified source and stable ties. It requires separate Python/model setup;
916
+ startup and full-command latency are reported above. Jev comparison is deferred.
917
+ - Git branch imports reuse a fixed `git-*` Branch with its last validated immutable
918
+ baseline; SHA/tag imports retain frozen `work-*` writers. Explicit `--resume`
919
+ reconciles the same pending import through its journal. Observed Git tags map
920
+ to Aliases, including multiple names for one published commit.
921
+ - Local diagnostics, public retrieval baselines and the fixed-candidate CoSQA
922
+ reranking comparison are complete within their documented bounds. They do not
923
+ establish universal relevance gains, production throughput or agent-task success.
96
924
 
97
- Each import gets a fresh `work-*` Branch, with incremental reuse only from an exact
98
- validated previous writer snapshot. Existing writers are not mutated after
99
- publication. Persistent `git-*` tracking, automatic failed-workspace recovery,
100
- Alias pruning, and garbage collection are not yet implemented. Failed/candidate
101
- resources and build artifacts are retained. A single importing host is required;
102
- the local lock is not a distributed lease.
925
+ Remaining operational scope: automatic Git observation, recovery of abandoned
926
+ workspaces without their required journal, branch rename/deletion handling,
927
+ authoritative Alias pruning, retention/garbage collection, and configuration
928
+ migration. Failed/candidate resources and local build artifacts are retained.
929
+ A single importing host is required: local locks and remote pending ownership
930
+ are not a distributed compare-and-set or lease protocol. UI, MCP and hosted SaaS
931
+ remain outside the first CLI scope. No stable/rc or Homebrew release is claimed.
103
932
 
104
933
  Parsing uses the pinned packaged grammars. Unsupported/new syntax can fall back
105
934
  and is recorded; no claim of complete language-version coverage is made. There is
106
935
  no optimal-chunking claim. The fixed-window baseline is implemented internally;
107
- the planned 10–20-query retrieval comparison has not been run. The in-memory test
108
- model does not approximate Lucene ranking, distributed indexing, retention, or
109
- compaction timing.
936
+ the first 16-query live lexical comparison is recorded in [eval/RESULTS.md](https://github.com/lambdadb/srcx/blob/develop/eval/RESULTS.md).
937
+ It is a single-repository diagnostic, not a general optimal-chunking result. The
938
+ in-memory test model does not approximate Lucene ranking, distributed indexing,
939
+ retention, or compaction timing.
110
940
 
111
941
  Canonical publication records exist on main; listings require both the remote
112
942
  summary and the matching immutable Tag manifest. A candidate or a lone `ver-*`