Sprint Item
#8 of 8 — Medium severity — no blockers (Thursday PR 1 of 1)
Block Relations
|
|
| Blocked by |
— (independent of #6–#7 concurrency chain and cursor-browser #1–#5) |
| Blocks |
— |
| Repo/day |
Can start Thursday regardless of Wed status |
Calendar Day
Thursday, July 23, 2026 (PR 1 of 1)
Planned Effort
5 story points (Medium) — sprint item #8
Problem
Two gaps let defects pass silently today:
- Render parity is structural, not behavioral. Parity is asserted by checking dispatch keys are in sync (from the Week 3 scaffold work), but nothing feeds an actual adversarial payload through both renderers to confirm they behave identically. A tool whose Python md-exporter and JS renderer diverge on an XSS payload passes.
- Malformed-input fuzz only asserts "never raises unhandled." A truncated line, a broken
parentUuid chain, NUL bytes, or a tool_result with no matching tool_use can degrade to a silent empty without any test noticing the difference between "empty because degraded" and "empty because real."
(This closes the "extension surfaces multiply faster than contracts" and silent-degradation dynamics from the lib-review §5.1.)
Goal
One PR adding a golden-parity test (one adversarial tool_result escaped identically by the Python and JS paths) and oracle-bearing malformed-input tests (each producing a specific, distinguishable degraded result — not a silent empty).
Scope
Part A — golden-parity test
- Feed one adversarial
tool_result through the Python md-exporter (utils/tool_dispatch.py / md export path) and the JS renderer (static/js/render/).
- Assert both escape identically (same neutralization of the payload).
- Drive the real dispatch and JS registry paths, not reimplementations.
Part B — malformed-input oracle tests
Each of the following must produce a specific, distinguishable degraded result (asserted against a real oracle, not "does not throw"):
- truncated final line
- broken
parentUuid chain
- NUL bytes
tool_result with no matching tool_use
Part C — oracle discipline
- Assert the real observable outcome (test-review C3/C8/C9), never merely that parsing did not raise.
Out of scope
Acceptance Criteria
Verification
cd C:\Users\Jasen\CppAliance\claude-code-chat-browser
.\.venv\Scripts\Activate.ps1
pytest -q
npm test
- Negative control: make the two renderers diverge on the adversarial payload → the golden-parity test fails.
Sprint Item
#8 of 8 — Medium severity — no blockers (Thursday PR 1 of 1)
Block Relations
Calendar Day
Thursday, July 23, 2026 (PR 1 of 1)
Planned Effort
5 story points (Medium) — sprint item #8
Problem
Two gaps let defects pass silently today:
parentUuidchain, NUL bytes, or atool_resultwith no matchingtool_usecan degrade to a silent empty without any test noticing the difference between "empty because degraded" and "empty because real."(This closes the "extension surfaces multiply faster than contracts" and silent-degradation dynamics from the lib-review §5.1.)
Goal
One PR adding a golden-parity test (one adversarial
tool_resultescaped identically by the Python and JS paths) and oracle-bearing malformed-input tests (each producing a specific, distinguishable degraded result — not a silent empty).Scope
Part A — golden-parity test
tool_resultthrough the Python md-exporter (utils/tool_dispatch.py/ md export path) and the JS renderer (static/js/render/).Part B — malformed-input oracle tests
Each of the following must produce a specific, distinguishable degraded result (asserted against a real oracle, not "does not throw"):
parentUuidchaintool_resultwith no matchingtool_usePart C — oracle discipline
Out of scope
Acceptance Criteria
tool_resultthrough the Python md-exporter and the JS renderer and asserts both escape identically.parentUuidchain, NUL bytes,tool_resultwith no matchingtool_use) each produce a specific, distinguishable degraded result, not a silent empty.Verification