codebase-snapshot 0.19.0 → 0.20.2
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.
- package/CHANGELOG.md +78 -0
- package/README.md +1 -1
- package/SECURITY.md +2 -2
- package/dist/bin.js +646 -12
- package/dist/{chunk-RTWSGQ3U.js → chunk-DUDF3CR5.js} +634 -11
- package/dist/{chunk-TQXTKDFD.js → chunk-YL4VRORI.js} +1 -1
- package/dist/cli.cjs +646 -12
- package/dist/cli.d.cts +5 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.js +15 -4
- package/dist/index.cjs +635 -11
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +632 -9
- package/dist/mcp.js +2 -2
- package/docs/cli.md +12 -7
- package/docs/deploy.md +2 -2
- package/docs/health.md +78 -32
- package/docs/mcp.md +5 -5
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,84 @@ deprecated with an explanatory message instead. `latest` has pointed at 0.9.0 si
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## 0.20.2
|
|
34
|
+
|
|
35
|
+
**The release gate now proves the snapshot against the repository, and the JSON pack stops carrying
|
|
36
|
+
CRLF.**
|
|
37
|
+
|
|
38
|
+
The canary fixture added here found the one artifact that disagreed with the parts about line
|
|
39
|
+
endings: `full-codebase.json` was built from the raw redacted body, while the parts, the XML pack
|
|
40
|
+
and the markdown pack all normalise to LF. The same file therefore had two byte shapes depending
|
|
41
|
+
on which pack a reader opened, and the manifest's `includedBytes` counted the LF body. The JSON
|
|
42
|
+
pack now normalises like the others, and the canary asserts it.
|
|
43
|
+
|
|
44
|
+
- `npm run verify:deep` is the release gate for generation changes: it writes a snapshot into a
|
|
45
|
+
temporary directory, runs `health --deep` (every full body replayed from source), runs
|
|
46
|
+
`validate`, checks differential coverage, and generates twice to prove determinism.
|
|
47
|
+
- `scripts/coverage-diff.mjs` compares the snapshot against `git ls-files` (tracked plus
|
|
48
|
+
untracked, ignored excluded) — an oracle that does not share the generator's walker. Every path
|
|
49
|
+
must be in `files[]` or `skipped[]`; any other is a silent omission. `--from <file-list>` runs
|
|
50
|
+
the same comparison against repomix, gitingest or another tool's list. Masked skip paths are
|
|
51
|
+
matched with their redaction spans wildcarded rather than dropped.
|
|
52
|
+
- `scripts/reproducible.mjs` generates the same tree twice and compares the fingerprint, every
|
|
53
|
+
`files[]` record, `skipped[]`, the counts and totals, and every part's bytes. `generatedAt`
|
|
54
|
+
and the reports that quote it are the only intended differences.
|
|
55
|
+
- `tests/mcp-dogfood.test.js` calls all 26 MCP tools against one generated snapshot and requires
|
|
56
|
+
a non-empty, non-error answer from each (except the workspace tool's documented "no index").
|
|
57
|
+
- `tests/canary-pipeline.test.js` is the end-to-end fixture the audit history asked for: a
|
|
58
|
+
sensitive `.env`, a source credential, CRLF, a BOM, a binary, an ignored file and a preview over
|
|
59
|
+
the large-file budget must generate, redact, skip, validate and pass the deep audit together.
|
|
60
|
+
- `tests/fuzz-invariants.test.js` is seeded-random: source containing headings, runs of backticks
|
|
61
|
+
and CRLF must round-trip through the part writer and reader; feeding the redactor its own output
|
|
62
|
+
must change nothing and find nothing across generated credential shapes.
|
|
63
|
+
- `tests/coverage-diff.test.js`, `tests/reproducible.test.js` and `tests/verify-deep.test.js`
|
|
64
|
+
pin the new gates themselves, including the failure case where a path disappears from
|
|
65
|
+
`files[]`.
|
|
66
|
+
- The 0.20 line is patched in place: `PUBLISHED` moves to this version, the docs pins follow it,
|
|
67
|
+
and the `sync-docs` guard accepts a published patch on 0.20 while still refusing patches on any
|
|
68
|
+
other line. This release is published, not only tagged.
|
|
69
|
+
- Verified with `npm run verify` (1,398 tests, 1,390 pass, 0 fail, 8 host skips; 30 site pages,
|
|
70
|
+
docs and tarball clean) and `npm run verify:deep` (health 95/100 with only the repository's known
|
|
71
|
+
host-path warning; coverage and reproducibility clean).
|
|
72
|
+
|
|
73
|
+
## 0.20.1
|
|
74
|
+
|
|
75
|
+
**The audit now checks the snapshot's claims, not only its hashes.**
|
|
76
|
+
|
|
77
|
+
Every check in `health` compared the snapshot with its own manifest: a part could hash correctly and
|
|
78
|
+
still hold a body the manifest did not describe, a summary could name a symbol the parts did not
|
|
79
|
+
contain, and `README.md` could quote a different run while its digest still passed.
|
|
80
|
+
|
|
81
|
+
- Six document-level checks, each with its own id and fixture test:
|
|
82
|
+
`summary.truth` (every import, export, function, class, interface, type, enum, variable,
|
|
83
|
+
component, hook, route path, JSON key and markdown heading a summary names must appear in the
|
|
84
|
+
part that carries the file), `report.truth` (the figures in `README.md` and `PROMPT.md` equal the
|
|
85
|
+
manifest), `indexes.consistent` (every route, component, handler, import edge, central file and
|
|
86
|
+
directive names an included path in the recorded part), `markdown.structure` (section order,
|
|
87
|
+
headings, inclusion modes, counts and part headers match `manifest.parts[]`), `packs.bodies`
|
|
88
|
+
(every full body in a JSON, XML or markdown pack is the body the part carries) and `tokens.fit`
|
|
89
|
+
(how many parts fit a 32k, 128k or 200k window, and the largest single file).
|
|
90
|
+
- `health --deep` closes the one gap a manifest cannot: it re-reads each full file, applies the
|
|
91
|
+
emitted-body normalisation, and compares it with the part. Redaction is the only allowed
|
|
92
|
+
difference; a private-key block's separate marker is recognised. Files that moved on disk are
|
|
93
|
+
left to `validate`, and the check is opt-in because it costs a full read.
|
|
94
|
+
- `snapshot_health` accepts `deep: true`, and the contract, `--help` and the CLI page list
|
|
95
|
+
`--deep` as a health-only option.
|
|
96
|
+
- The first run of the deep check on this repository's own snapshot found five bodies it could not
|
|
97
|
+
replay: two because the private-key marker is a different string, three because a block-level PEM
|
|
98
|
+
redaction replaces several lines at once. Both are now in the replay's allowed vocabulary, and a
|
|
99
|
+
test pins that a PEM block is a redaction rather than a fidelity failure.
|
|
100
|
+
|
|
101
|
+
## 0.20.0
|
|
102
|
+
|
|
103
|
+
**`snapshot update` did not bypass the cache, which is the one thing it promises.**
|
|
104
|
+
|
|
105
|
+
- The command forces a check, but `resolveLatest` let the cache-age branch overwrite the `force`
|
|
106
|
+
decision. While the registry's edge still served the previous document, a cached `0.18.0` made
|
|
107
|
+
`snapshot update` print "the registry publishes 0.18.0" for up to an hour after 0.19.0 was live.
|
|
108
|
+
- `force` now wins: the cache is read only as a **fallback** for a failed request, never as the
|
|
109
|
+
answer, and the age intervals are skipped entirely. A test with an injected cache and fetch pins
|
|
110
|
+
both halves — the forced answer, and the cached fallback when the request fails.
|
|
33
111
|
## 0.19.0
|
|
34
112
|
|
|
35
113
|
**The audit now agrees with the generator about what a secret is.**
|
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ Everything an agent needs is available as data, and the tool can install its own
|
|
|
211
211
|
```bash
|
|
212
212
|
npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
|
|
213
213
|
npx codebase-snapshot skill --install # into .claude/skills + .cursor/rules
|
|
214
|
-
npx -y codebase-snapshot@0.
|
|
214
|
+
npx -y codebase-snapshot@0.20.2 mcp # or serve it over MCP
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered
|
package/SECURITY.md
CHANGED
|
@@ -6,11 +6,11 @@ Only the latest published release receives security fixes.
|
|
|
6
6
|
|
|
7
7
|
| Version | Supported |
|
|
8
8
|
| :--- | :--- |
|
|
9
|
-
| <!--@majorMinor-->0.
|
|
9
|
+
| <!--@majorMinor-->0.20<!--/@majorMinor-->.x | ✅ |
|
|
10
10
|
| anything older | ❌ |
|
|
11
11
|
|
|
12
12
|
The number line restarted at 0.9.0 when the package moved to the unscoped `codebase-snapshot` name,
|
|
13
|
-
so <!--@majorMinor-->0.
|
|
13
|
+
so <!--@majorMinor-->0.20<!--/@majorMinor-->.x is newer than 4.4.1, not older. That is explained in full in the
|
|
14
14
|
[changelog](CHANGELOG.md#a-note-on-version-numbers).
|
|
15
15
|
|
|
16
16
|
## Reporting a vulnerability
|