@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/CHANGELOG.md CHANGED
@@ -1,5 +1,184 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ - Evaluate experimental segmented artifacts across 50 successive local versions,
6
+ including cumulative writes, retained inode allocation, ancestor cleanup and
7
+ cold/explicit-checkpoint recovery. Add bounded multi-generation managed
8
+ publication regressions for cache/journal loss, stale or incomplete candidates,
9
+ retries in each phase and immutable historical reads. Document manual local
10
+ retention; keep runtime behavior and the JSONL default unchanged.
11
+
12
+ - Add experimental `import --artifact-storage segments` for self-contained,
13
+ digest-verified local format-2 artifacts. Reuse unchanged per-file objects with
14
+ hardlinks and explicit copy fallback; retain format-1 reads and the JSONL default,
15
+ complete source/hash/vector validation, resumable publication and immutable reads.
16
+ Preview JSON adds `artifactFormat`; existing artifacts reject a storage override.
17
+ Measure complete build time, writes and additional inode allocation separately
18
+ from the earlier storage-only prototype; this is not a default promotion.
19
+
20
+ - Batch local artifact records in a bounded 64 KiB write buffer and hash their
21
+ existing canonical representation instead of serializing each record twice.
22
+ Preserve the artifact format, record order/hashes, document limits and full
23
+ validation; write larger records directly and remove partial output on failure.
24
+ Add write-count, canonical-byte and failure-cleanup regressions, and document
25
+ local build profiles separately from database performance.
26
+
27
+ - Reduce incremental publication reads by comparing against a fully validated,
28
+ identity-matched local baseline when available, with immutable remote fallback
29
+ after local file loss. Reuse complete candidate validation within one invocation
30
+ after checking its Tag/Snapshot identity, but revalidate on publication retries.
31
+ Skip unchanged inventory-part uploads; preserve full candidate/hash/vector
32
+ checks, resumability and immutable version reads. Document remaining full-corpus
33
+ work and cover small updates to a larger corpus with local operation/byte tests.
34
+
35
+ - Add `lookup --symbol` for exact indexed definition/declaration lookup with
36
+ verified source chunks and pinned citations in one call. Support path/language
37
+ filters and a bounded result limit, using existing indexes without embeddings
38
+ or reindexing; document the workflow in the bundled agent skill.
39
+
40
+ - Preserve Java source and test packages named `build`, `dist`, `target` or
41
+ `coverage` under `src/<source-set>/java/`, while still excluding output trees
42
+ above the source root and nested dependencies/caches. Advance the pinned source
43
+ policy to `source-v3`; new registrations/builds use a distinct configuration,
44
+ and presets from the earlier source policy are not accepted by this runtime.
45
+
46
+ - Document a frozen nine-session comparison of semantic retrieval against adaptive
47
+ local and lexical search, including cleaned corpora, equal answer coverage,
48
+ measured overhead and the absence of a demonstrated semantic task advantage.
49
+
50
+ - Look up explicit generated Collection names directly instead of discovering
51
+ every repository. Exact Collection names take precedence over aliases; only
52
+ missing Collections fall back to discovery. Preserve descriptor, schema and
53
+ immutable-version validation and ambiguity checks for repository names/keys.
54
+
55
+ - Add optional `read --implementation` for contiguous Python and TypeScript/TSX
56
+ overload groups. Return the pinned implementation with accurate citations;
57
+ preserve the selected span when linking is unsupported, ambiguous or too large.
58
+ Keep indexing and search defaults unchanged.
59
+
60
+ - Separate file selection from embedding eligibility. Exclude credential and
61
+ crypto payloads, virtual environments, caches and logs; keep lockfiles, generated
62
+ code, snapshots, tabular data and legal/author files available lexically without
63
+ embedding them. Fix case-sensitive minified-asset exclusions. Add pinned
64
+ `--file-policy` JSON rules for registration and local previews, explicit inventory
65
+ reasons and evaluation corpus exclusions for `eval/**`.
66
+
67
+ - Exclude image assets, including text SVG and portable pixel maps, before
68
+ indexing or embedding. Match image extensions case-insensitively, preserve
69
+ exclusion metadata, and keep inline SVG in source files searchable. Include
70
+ the source policy change in preset identity.
71
+
72
+ - Fix Shell indexing crashes on Bash comparisons such as `[[ "$value" == 1 ]]`
73
+ by bundling a runtime-compatible, checksum-pinned Bash grammar with its license.
74
+ Include the grammar in preset identity and installed-package validation.
75
+
76
+ - Bundle the srcx-search agent skill in npm and add `skills install`, `update`,
77
+ `remove` and `status` for Codex and Claude Code, with user/project scopes,
78
+ explicit setup and preservation of customized or unowned files. Removing an
79
+ absent skill stays read-only even when its parent directory already exists.
80
+
81
+ - Explain source-language query selection in README and search help, including
82
+ agent translation of query intent while preserving exact identifiers and
83
+ answering in the user's language. Keep multilingual input accepted without
84
+ adding automatic translation or changing retrieval defaults.
85
+
86
+ - Keep standard text analysis as the default and add `--analyzers` for any combination of
87
+ LambdaDB's English, Korean, Japanese and standard analyzers. Pin the canonical
88
+ selection in repository/build identity and verify it during discovery. This
89
+ pre-release preset requires an analyzer list; older presets are not accepted.
90
+ Make publication readiness independent of stop-word/tokenization behavior.
91
+ Pin existing evaluation harnesses to standard regardless of product defaults.
92
+
93
+ - Add Python/Go/Rust/C/C++/Shell/SQL syntax chunking with language-specific
94
+ declaration, function and statement boundaries, symbol/scope metadata and
95
+ bounded source-preserving splits. Bundle the pinned SQL grammar with licenses.
96
+
97
+ - Distinguish Qwen setup, cache, device, input-size and timeout failures with
98
+ actionable messages while keeping raw worker diagnostics private.
99
+
100
+ - Record three developer search/read investigations with concrete change maps,
101
+ bounded live usage and source verification, separate from ranking benchmarks.
102
+
103
+ - Refresh implemented/remaining scope and verify the published dev.17 package
104
+ through a fresh npm consumer and bounded live first-use workflow.
105
+
106
+ - Add opt-in local Qwen search reranking with bounded candidate pools, pinned
107
+ source evidence, separate scores and per-command timing.
108
+
109
+ - Evaluate fixed-candidate CosQA semantic reranking with local Qwen, shared
110
+ duplicate scores, stable ties and separate official-ID/content metrics.
111
+
112
+ - Cross-check the retained CosQA lexical baseline with an independent offline
113
+ BM25 ranker and the same StandardAnalyzer tokenization.
114
+
115
+ - Add pinned CoIR CoSQA and MTEB CodeSearchNet Python/Go retrieval baselines,
116
+ sharing srcx query construction and using trec_eval metrics on official labels.
117
+
118
+ - Add a bounded local Qwen reranking diagnostic with frozen inputs, durable
119
+ per-pair reservations and offline source-selection reporting.
120
+
121
+ - Prepare offline reranking inputs from verified retained Click/Cobra candidates,
122
+ with separate evaluator labels, original ranks and source provenance.
123
+
124
+ - Add a pending human review worksheet and fixed-candidate reranking experiment plan.
125
+
126
+ - Run bounded, explicitly unreviewed Click/Cobra retrieval diagnostics with managed small and unchanged source labels.
127
+
128
+ - Retain allowlisted CLI evaluation failure diagnostics without raw output or credentials.
129
+ - Prepare an offline, unreviewed Click/Cobra question set with pinned source evidence.
130
+ - Default CLI search/read evaluation across two pinned public repositories, with
131
+ alternative answer sets, exact source verification, and complete stdout accounting.
132
+ - Internal reproducible lexical chunking evaluation with pinned source labels,
133
+ equal path-only enrichment, isolated live indexes, and token-budget metrics.
134
+
135
+ ### Added
136
+
137
+ - Opt-in managed `text-embedding-3-large` (3072 dimensions) in separate pinned
138
+ Collections, with paired small/large evaluation and unchanged small identities.
139
+
140
+ - Paired identifier/natural-language/mixed-query diagnostics on eight new tasks,
141
+ with verified candidate-rank coverage and offline stdout-budget analysis.
142
+ - Bounded actual-CLI lexical/semantic/hybrid evaluation on identical managed
143
+ corpora, with reviewed and original labels, per-question regressions, stdout
144
+ token counts, command timings and durable request reservations.
145
+
146
+ - Opt-in LambdaDB managed OpenAI `text-embedding-3-small` Collections, offline
147
+ embedding input previews, and explicit semantic/RRF hybrid search modes.
148
+ - Candidate validation of generated vectors separately from exact source payloads,
149
+ unchanged-record reuse, and a bounded synthetic managed acceptance harness.
150
+
151
+ - Persistent one-to-one Git branch / Collection Branch mapping, branch-local
152
+ incremental updates, and branch-selected search, resolve, and read against the
153
+ last published commit Tag.
154
+ - Remote pending import ownership and resumable in-place branch updates, including
155
+ shared commit Tags across branches and non-fast-forward Git branch changes.
156
+ - `test:live:branches` for repeatable synthetic live acceptance with retained
157
+ checkpoint, retry, and resource evidence.
158
+
159
+ ### Changed
160
+
161
+ - Git branch imports update their fixed `git-*` writer; SHA/tag imports retain
162
+ manual workspaces. Existing publications and pending manual journals remain
163
+ usable. See README for migration and artifact behavior.
164
+ - Ambiguous indexed branch/Git tag names require explicit `refs/heads/...` or
165
+ `refs/tags/...` selectors.
166
+
167
+ ### Fixed
168
+
169
+ - Count failed and unsupported public-benchmark queries separately, retaining
170
+ both in the ranking metric denominators.
171
+
172
+ - Fetch omitted managed vectors from query responses through the same immutable
173
+ Tag, preserving hit order/scores and requiring exact non-vector payload equality.
174
+
175
+ - Reject an unprepared CLI evaluation run before creating its root/lock so a
176
+ subsequent offline preparation can use the same path.
177
+ - Pin branch control before enumerating versions so a concurrent publication
178
+ cannot advance the selector beyond the version list being read.
179
+ - Reject live checkpoint reuse across different code/harness inputs and preserve
180
+ the original validation revision and completion time on same-input reruns.
181
+
3
182
  ## [0.1.0-dev.1] - 2026-09-25
4
183
 
5
184
  ### Added
package/CONTRIBUTING.md CHANGED
@@ -36,6 +36,10 @@ version/help, Git import and WASM parsing, resumable publication against a
36
36
  loopback fixture, version-selected search, and exact reads. It does not call
37
37
  LambdaDB or publish npm packages.
38
38
 
39
+ The Node test runner has a two-minute timeout per test-file process. The CLI
40
+ contract file runs several sequential subprocess-based scenarios, so its combined
41
+ runtime on shared CI runners can exceed one minute even when each scenario passes.
42
+
39
43
  Keep package and lockfile versions synchronized; the executable reads the package
40
44
  version. Add changes to `CHANGELOG.md`. Document flag/JSON/exit-code migrations
41
45
  before shipping incompatible behavior. During 0.x, use a minor version for