correlator/admin: capture per-scene incident_type + severity (#139) #152

Merged
logan merged 2 commits from fix/139-scene-incident-type into main 2026-09-14 00:14:53 -04:00
Owner

Closes #139.

_call_is_substanceless's "type" veto reads ctx["incident_type"] at decision time, but that value was never persisted per-scene -- only the last-scene-wins flat field, which #138's window-4 dump analysis couldn't tell apart from cross-scene contamination without re-guessing from a live dump. Adds incident_type/severity to _apply_and_log's per-scene write and to admin.py's _scene_summary allowlist (the debug-dump reader has its own separate field allowlist -- silently would not have surfaced otherwise).

Reviewed (drb-correlation-review), approved with 3 notes, all addressed: call_severity's routine-coercion is asymmetric with incident_type (documented in a code comment, not fixed -- it's a real property of the upstream data, not a bug here); the new test's docstring no longer overclaims ctx-linkage coverage it doesn't have (that's pinned by test_consensus_gate.py/test_incident_identity.py); the "no flat clobber" claim is now asserted, not just commented, and both scenes' severity is exercised distinctly.

Sandboxed pytest: 380 -> 381.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix

Closes #139. `_call_is_substanceless`'s "type" veto reads `ctx["incident_type"]` at decision time, but that value was never persisted per-scene -- only the last-scene-wins flat field, which #138's window-4 dump analysis couldn't tell apart from cross-scene contamination without re-guessing from a live dump. Adds `incident_type`/`severity` to `_apply_and_log`'s per-scene write and to `admin.py`'s `_scene_summary` allowlist (the debug-dump reader has its own separate field allowlist -- silently would not have surfaced otherwise). Reviewed (`drb-correlation-review`), approved with 3 notes, all addressed: `call_severity`'s routine-coercion is asymmetric with `incident_type` (documented in a code comment, not fixed -- it's a real property of the upstream data, not a bug here); the new test's docstring no longer overclaims ctx-linkage coverage it doesn't have (that's pinned by `test_consensus_gate.py`/`test_incident_identity.py`); the "no flat clobber" claim is now asserted, not just commented, and both scenes' severity is exercised distinctly. Sandboxed pytest: 380 -> 381. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix
logan added 2 commits 2026-09-14 00:14:48 -04:00
_call_is_substanceless's "type" veto reads ctx["incident_type"] at decision
time, but that value was never persisted per-scene — only the last-scene-wins
flat field, which #138's window-4 dump analysis couldn't tell apart from
cross-scene contamination without re-guessing from a live dump. Adds
incident_type/severity to _apply_and_log's per-scene write and to admin.py's
_scene_summary allowlist (the debug-dump reader has its own field allowlist,
separate from the write side — silently would not have surfaced otherwise).

Sandboxed pytest: 380 -> 381.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix
- Document call_severity's routine-coercion asymmetry with incident_type
  (extraction-said-routine vs extraction-said-nothing look identical).
- Test docstring no longer overclaims the ctx-linkage it doesn't cover;
  points to the tests that do (test_consensus_gate.py, test_incident_identity.py).
- scene1 now uses a distinct severity so the test actually exercises both
  fields symmetrically; the 'no flat top-level clobber' claim is now
  asserted, not just commented.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix
logan merged commit e27f8f6636 into main 2026-09-14 00:14:53 -04:00
logan deleted branch fix/139-scene-incident-type 2026-09-14 00:14:54 -04:00
Sign in to join this conversation.