Calendar Day
Thursday, July 3, 2026 (PR 1 of 1)
Planned Effort
5 story points (Medium–High) — sprint item #5
Problem
The Claude Code JSONL format is append-only, version-dependent, and carries no published stability contract. When Anthropic ships a new Claude Code version that adds, renames, or restructures JSONL fields, this project has no mechanism to detect the change. The parser silently ignores unknown fields (safe) but also silently drops data from changed fields (not safe). Users may see incomplete or incorrectly rendered sessions without any indication that the upstream format has evolved.
Goal
One merged PR that fingerprints known JSONL field paths, warns on drift during parsing, surfaces a non-blocking UI banner, exposes a schema report endpoint/command, and commits a version-tracked schema_baseline.json with CI coverage.
Scope
Touch points
utils/jsonl_parser.py — _collect_field_paths(record: dict) -> set[str] via recursive key traversal
schema_baseline.json (new) — known (json_path, expected_type) pairs; committed to git
- Drift diff at parse completion — new paths →
logging.warning() on claude_code_chat_browser.schema_drift; missing required paths → structural warning
- UI — dismissible amber banner on session list page for schema drift
- CLI command or
GET /api/schema-report — returns {known_fields, new_fields, missing_fields}
tests/fixtures/jsonl/unknown_field.jsonl — synthetic record with FutureToolXYZ tool type
tests/ — CI test verifying warning is emitted for unknown field fixture
Out of scope
- Auto-updating
schema_baseline.json on every parse (baseline updates are deliberate)
- Blocking parse on drift (warnings only)
- Tool dispatch registry changes (Tuesday scope)
Acceptance Criteria
Verification
cd C:\Users\Jasen\CppAliance\claude-code-chat-browser
.\.venv\Scripts\Activate.ps1
pytest tests/ -k schema -q
pytest -q
mypy .
Manual: parse tests/fixtures/jsonl/unknown_field.jsonl — confirm warning logged and amber banner in UI.
Calendar Day
Thursday, July 3, 2026 (PR 1 of 1)
Planned Effort
5 story points (Medium–High) — sprint item #5
Problem
The Claude Code JSONL format is append-only, version-dependent, and carries no published stability contract. When Anthropic ships a new Claude Code version that adds, renames, or restructures JSONL fields, this project has no mechanism to detect the change. The parser silently ignores unknown fields (safe) but also silently drops data from changed fields (not safe). Users may see incomplete or incorrectly rendered sessions without any indication that the upstream format has evolved.
Goal
One merged PR that fingerprints known JSONL field paths, warns on drift during parsing, surfaces a non-blocking UI banner, exposes a schema report endpoint/command, and commits a version-tracked
schema_baseline.jsonwith CI coverage.Scope
Touch points
utils/jsonl_parser.py—_collect_field_paths(record: dict) -> set[str]via recursive key traversalschema_baseline.json(new) — known(json_path, expected_type)pairs; committed to gitlogging.warning()onclaude_code_chat_browser.schema_drift; missing required paths → structural warningGET /api/schema-report— returns{known_fields, new_fields, missing_fields}tests/fixtures/jsonl/unknown_field.jsonl— synthetic record withFutureToolXYZtool typetests/— CI test verifying warning is emitted for unknown field fixtureOut of scope
schema_baseline.jsonon every parse (baseline updates are deliberate)Acceptance Criteria
schema_baseline.jsonlists known field paths/types and is committedclaude_code_chat_browser.schema_driftloggerunknown_field.jsonlfixture verifies warning is emittedpytest,mypy --strict, andruffpassVerification
Manual: parse
tests/fixtures/jsonl/unknown_field.jsonl— confirm warning logged and amber banner in UI.