Repository navigation
test: Stop reading the retired session_events.summary column - #5465
Conversation
#5446 retired the column; #5458 fixed one writer. Three more files still named it: - tests/unit/pipeline/test_ingest_batch.py SELECTed it and asserted on it - tests/unit/storage/test_archive_tiers_archive.py SELECTed it twice - tests/unit/storage/test_archive_tiers_write.py SELECTed it and carried three stale "summary" keys in its expected rows All now read payload_json, which is what the retired column reproduced from in 7,403,923 of 7,403,923 live rows. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
|
Warning Review limit reachedNext included review available in 7 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…ases (#5467) ## Summary Produces per-case verdicts for the two writer cases polylogue-asp4b left unestablished. Test-only; schema closure not applicable. Produced by a `gpt-5.6-luna` worker. ## Why this exists `asp4b` AC1 asks that *"each **real remaining** named writer bug has a discriminating fixture."* Three of its five cases were already fixed at head. Two — **sibling-append** and **supersession** — were reported UNESTABLISHED by two separate workers: neither could locate a seam. "Nobody could find it" is absence of evidence, not evidence of absence, and closing on it is the closure-by-assertion pattern this campaign's own audit condemned. So the ask was a verdict per case: either a discriminating fixture that reproduces the defect, or an argument from the writer's construction that the case **cannot occur**. Both are now answered, in opposite directions. ## Sibling-append — cannot occur, by construction `thread_sessions` keys each membership by `(thread_id, session_id)`. An append therefore adds exactly one distinct child and preserves every prior membership; **there is no last-writer choice for a sibling to make**. Pinned by an assertion that the parent thread holds 3 rows / 3 distinct sessions after two appends, alongside the existing "no membership rebuild" check. ## Supersession — real, and now pinned A revised hook claim must leave **exactly one** authoritative parent per child. The fixture asserts that after revision. Anti-vacuity **executed**: removing the supersession demotion left **both** the old and revised parents authoritative. Production code restored. ## Verification ``` devtools verify --quick -> PASSED exit=0 devtools test test_archive_tiers_write.py test_topology_hook_authority_conflict.py -> 134 passed / 134 ``` The first run of that selection failed on `no such column: summary` — my own regression from #5446, unrelated to this branch. Rebasing onto master with #5465 merged cleared it. AC2-AC4 were already landed at head; the compound owner FK remains at `archive_tiers_specs.py:94,642`. No production change was needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Expanded automated coverage for session membership updates, verifying appended sessions remain distinct and existing memberships are preserved. * Added checks confirming revised hook claims are reflected in stored session links. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Three tests were red on master and the MCP session-timeline route raised at runtime. Found by a wave-2 worker whose own bead was unrelated. ## Problem `polylogue-kc8eq` retired `session_events.summary` — correctly: it was a write-time render of `payload_json["summary"] or payload_json["text"]`, derivable in 7,403,923 of 7,403,923 live rows, and 178.9 MB of index restating the payload. But the timeline UNION in `polylogue/operations/session_reads.py:245` still selected `e.summary`. Any session timeline read raised. The spec comment justifying the removal asserted the column was **"never selected by the read path."** That was false. The audit behind the retirement grepped writers. This is the third time this retirement has broken something: `#5458` fixed one fixture, `#5465` fixed three more, and this is the first that is a production route rather than a test fixture. ## Solution Move the render read-side with identical semantics — `COALESCE(json_extract(payload_json,'$.summary'), json_extract(payload_json,'$.text'), '')`. Timeline text for a session-event is byte-identical to what the stored column produced. The false comment is corrected in place, naming what actually happened, so the next column retirement doesn't repeat the writers-only audit. ## Verification ``` devtools test tests/unit/mcp/test_session_owner_operations.py \ tests/unit/mcp/test_server_surfaces.py \ tests/unit/archive/query/test_continuation_surface_parity.py -> PASSED exit=0 ``` Red before this change (32 passed / 3 failed), green after. ## Residual Worth stating plainly: master's quick-gate was **green** throughout, because `verify --quick` is static gates only. The affected-test lane that would have caught this had been sitting in a paused pueue group since a `verify_all` failure on 2026-09-22, so no pytest ran on master for over a day. The group is resumed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed an issue that could prevent the session timeline from loading. Session events now display text from their saved details, checking the summary first and falling back to the event text when needed. Existing timeline text remains unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Completes the cleanup of #5446 (retiring
session_events.summary). My first repair, #5458, fixed one file; three more were still referencing the dropped column.What was still broken on master
tests/unit/pipeline/test_ingest_batch.pySELECT event_type, summary+ two assertions onevent["summary"]tests/unit/storage/test_archive_tiers_archive.pySELECT event_type, summaryat two sites + two assertionstests/unit/storage/test_archive_tiers_write.pySELECT … summary …plus three stale"summary"keys in its expected rowsAll now read
payload_json— which is exactly what the retired column reproduced from, in 7,403,923 of 7,403,923 live rows.Verification
The write-path file needed three separate passes: each stale
"summary"key in the expected-row list surfaced only after the previous one was removed, because the assertion compares whole dicts and reports the first differing index.How this was found, and what it says about my own process
A
gpt-5.6-lunaworker on an unrelated bead (polylogue-3szyi) reported it as an inherited baseline failure. That is the second time today a worker with no stake in the file surfaced this regression — the first led to #5458.My #5458 fix was incomplete because I grepped for writers (
INSERT) and stopped. Retiring a column needs a search for every reference — reads, expected-row fixtures and assertions included.devtools verify --quickcannot catch this: none of these suites are in the quick set.🤖 Generated with Claude Code
https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy