Skip to content

feat: audit/classify column helper; roadmap refresh (0.7.0) - #13

Open
mpointer wants to merge 1 commit into
mainfrom
feat/audit
Open

mpointer wants to merge 1 commit into
mainfrom
feat/audit

Conversation

@mpointer

Copy link
Copy Markdown
Owner

Summary

  • New audit(values, options) / classify(value, options) in both packages. audit counts a column's values by state: readable canonical tokens per key version (versions), unbound, plaintext, legacy, unknownVersion (Python unknown_version), invalid, empty. classify returns one value's state for finding the rows behind a count. Neither throws on bad data; both throw KeyNotConfiguredError for a dormant namespace.
  • Answers "is the rotation done" (versions holds only activeVersion), "is every row bound" (unbound == 0), and finds the token-shaped rows that would trip SystemicUnsealError (invalid). The README's pre-key audit advice now points at it instead of a hand-rolled isSealed scan.
  • README: new "Audit a column" section; rotation paragraph links to it. Python README mentions it.
  • ROADMAP: records what 0.4.0–0.6.1 shipped, checks off the key-audit item as v0.7, keeps Drizzle helpers and the backfill template as candidates, adds rollback/replay protection under "Later".
  • Version 0.7.0 in package.json, package-lock.json, python/pyproject.toml; CHANGELOG entry.

Test plan

  • npx vitest run --coverage: 79 passed, function coverage 100%; tsc --noEmit clean
  • pytest --cov: 88 passed, 94.7%
  • New tests in test/audit.test.ts and TestAudit cover every state (including short, undecodable, moved-column and wrong-key tokens, unknown versions, legacy pass/fail), the no-context case, a full column count, and the dormant refusal.

🤖 Generated with Claude Code

audit(values, options) counts a column by state: readable canonical
tokens per key version, unbound, plaintext, legacy, unknown version, and
invalid (token-shaped but not decryptable). classify(value, options)
returns one value's state. Neither throws on bad data; both refuse a
dormant namespace. TS and Python.

README gets an "Audit a column" section and points the rotation and
pre-key-audit advice at it. ROADMAP lists what 0.4.0-0.6.1 shipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant