Repository navigation
Add sanitized Claude Code fixtures and a privacy gate - #14
Merged
Merged
Conversation
Add real-shape Claude Code fixtures (Windows and WSL-style project folders, subagent files and meta files) built by scripts/sanitize-claude-transcript.js, which allowlists keys and values and hashes ids with a per-run salt. Add format tests that pin the verified Claude Code line shapes, a sanitizer test, and a privacy test that fails on owner names, home-path forms and epoch-millisecond numbers in any fixture file or folder name. Gitignore CLAUDE.local.md and .scratch/.
thymeed
force-pushed
the
feat/claude-code-fixtures
branch
from
November 13, 2026 06:07
75a9f20 to
e4562fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step toward reading Claude Code transcripts. This PR adds test fixtures and the tooling that keeps them safe; it does not change the bridge or the dashboard.
Change
scripts/sanitize-claude-transcript.js, a read-only tool that turns a real Claude Code session (parent file,subagents/files and theirmeta.json) into a fixture. Keys, values and ids are allowlisted or hashed, so no text, path or name survives. Ids are hashed with a random per-run salt, and numbers are zeroed outside known keys.test/fixtures/claude-code/real/: a Windows-style and a WSL-style project folder, two subagent transcripts with theirmeta.json, with neutral names.test/unit/claude-code-format.test.js, which pins the line shapes seen on disk:Agentdelegation,async_launchedresults, task notifications, repeatedmessage.idlines whose usage can grow, timestamps and usage on every conversation line. Synthetic cases (an over-8 KB line, a cut-off last line, a partial-usage line) are labelled as such.test/unit/fixture-privacy.test.js, which fails if any fixture file name or content holds owner names, home-path forms, JSON-escaped variants, or epoch-millisecond numbers, and checks that every key is allowlisted or hashed.test/unit/sanitize-claude-transcript.test.jsfor the sanitizer itself.CLAUDE.md(Prettier re-padded the table, so every row shows in the diff).Notes for review
CLAUDE.mdLimits still describes the Cursor format only ("no timestamp, no usage"). Claude Code lines do carry both; that wording is left for a later change.Verification
Run locally before pushing:
npm run lint,npm run format:checkandnpm testall pass (212 tests, 0 failures). No user-facing behavior changed, so there was no hand check.