Skip to content

feat(cli): pages and entities say when page bodies were evicted, storeIntegrity in the JSON - #1692

Closed
nc9 wants to merge 2 commits into
mainfrom
feat/store-integrity-1667
Closed

nc9 wants to merge 2 commits into
mainfrom
feat/store-integrity-1667

Conversation

@nc9

@nc9 nc9 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Closes #1667

What

Content-store eviction is global by size cap, so an audit's page bodies can be gone later. Only report, --resume and re-audits said so. Now every reader of a stored audit shares one census:

  • eviction-notice.ts gets StoreIntegrity (full, or evicted with counts), a pure deriveStoreIntegrity, readStoreIntegrity (a quiet census), warnStoreIntegrity and checkStoreIntegrity. warnEvictedPages is a wrapper, so report and resume behave as before.
  • A new notice kind, read, for readers whose data does not need the bodies. Its wording is truthful about that: the rows come from page data stored with the audit, but a re-run of the rules cannot see those pages.
  • squirrel pages and squirrel entities print the notice on stderr when bodies are gone (they printed nothing before).
  • JSON: meta.storeIntegrity in the report JSON (new optional field on AuditReport), and a top-level storeIntegrity in pages -f json and entities -f json. It is present only when bodies are gone, so absent means intact. Schema version 1.10 (the last commit, on its own).
  • Docs: storage.mdx (eviction section), pages.mdx, entities.mdx, output.mdx, which now also tells the two outcome fields apart (the top-level run outcome of squirrel audit and the rule outcome on skipped and not-checked entries).

Acceptance criteria

  • squirrel report, pages and entities output (and JSON) state how many page bodies were evicted, when any were.
  • Test: evicting bodies then running each command shows the notice: apps/cli/tests/cli/store-integrity-1667-e2e.test.ts audits a local site (temp HOME in the child's env, its own content store), checks that report, pages and entities print no notice and carry no storeIntegrity, deletes the content store, and checks all three print the notice and carry the field, with the same count everywhere and the notice count equal to the JSON count; the pages rows and entity nodes are still there.

Also: unit tests for the derivation, the read notice wording and the report and page-map JSON; existing evicted-bodies, page-map and pages e2e tests pass. tsgo in cli, report and core-contracts, root lint, format:check, make validate.

Limits: for entities, the store-reading show path prints the notice; --list, --diff and --input files do not. The squirrelscan agent skill needs no change.

nc9 added 2 commits November 11, 2026 11:23
…eIntegrity in the JSON of report, pages and entities #1667

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

All commits of this draft are on main (landed in the v0.0.175 bundle). Closing the draft.

@nc9 nc9 closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: commands that read evicted page bodies say nothing; report store integrity

1 participant