Repository navigation
Campaign wave 12: wide-scope lanes, and a durable-schema defect held back - #5488
Conversation
(cherry picked from commit dd634e59d4777e6e0b2ac7218f1037958525269c)
(cherry picked from commit ab7e5bf25c907c08944b2fd6b37d3671149c1385)
(cherry picked from commit d43e94e7d2954c7a6bf046732f81bb774a6c0575)
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. |
|
Warning Review limit reachedNext included review available in 14 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 (7)
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 |
…iter (#5489) ## Why this exists Wave 12's `L4` lane added a new table to the **user tier** — durable, irreplaceable, holding assertions, settings and annotation provenance — through `CREATE TABLE IF NOT EXISTS` in the fresh DDL, touching no migration and no census. I held that commit back from #5488 rather than land it. This completes it properly. Three independent controls objected. All three are now satisfied, and none by weakening the control. ## 1. The migration `user.db` is never rebuilt from source evidence. Fresh DDL alone gives the table to *new* archives and silently leaves every *existing* one without it — the "never strand existing durable archives with a schema shortcut" rule, and the operator's live archive is one of those. `migrations/user/003_session_marker_delivery.sql` is purely additive: one table, one index, no existing table touched, no rows read or rewritten, so the train declares no row-change allowance. Its `.train.json` carries `sql_sha256` computed over the file and a declared `backup_plan_ref`. `USER_TIER_VERSION` 2 → 3. ## 2. The writer The upsert sat in `polylogue/storage/derived/session/marker_domain.py` — a **derived** module mutating `user.db` directly. That is exactly what `devtools gate layering`'s writer-module census catches, and the census already carries a standing FINDING against another module for the same shape. It now lives with its tier's writer as `user_write.advance_session_marker_delivery`, declared in `layering.yaml`'s entrypoint inventory. **The writer-module census baseline was not grown.** Adding a derived module to the durable-writer baseline would have made the gate pass by widening a ratchet, which is the opposite of what the ratchet is for. ## 3. Monotonicity — so the classification is honest The upsert overwrote the position unconditionally. To declare it `lifecycle_transition` in the durable-write census, it has to actually *be* one: the conflict clause now carries its own prior state, ```sql WHERE excluded.applied_at_ms >= session_marker_delivery.applied_at_ms ``` so a late or replayed delivery cannot rewind a position that has already advanced. That is a real behaviour fix, not a label chosen to satisfy a gate — and it is the property the census reason now cites. ## Verification ``` devtools gate layering -> 0 violations devtools verify --quick -> PASSED exit=0 devtools test tests/unit/storage/test_session_profile_derivation.py \ tests/unit/daemon/test_session_profile_composition.py \ tests/unit/storage/test_durable_change_train.py \ tests/unit/storage/test_durable_tier_version_authority.py \ tests/unit/storage/test_archive_tiers_ddl.py -> PASSED exit=0 ``` 🤖 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 * **New Features** * Session marker delivery progress is now recorded per session alongside marker updates, helping preserve delivery state across recovery. * Older or repeated updates no longer move recorded progress backward. * Delivery state is also recorded when a replacement contains no markers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Four wide-scope lanes — the first wave designed against the structural limit waves 9–10 exposed, rather than into it. Three commits landed; one is deliberately held back.
refactor(continuity): reduce cold lane bloatz9gh.7.2AC1–AC7docs(ops): inventory historical tier tablespnxl6AC1–AC5test(cli): align read routes with daemon execution4p1AC1,vbsc0.1AC3Held back: a durable-schema defect
L4's commit (943e74b49, sink delivery position) is not in this PR. It adds a new tablesession_marker_deliveryto the user tier throughCREATE TABLE IF NOT EXISTSin the fresh DDL, touching no migration file.The user tier is durable and irreplaceable — it holds assertions, settings and annotation provenance.
USER_TIER_VERSION = 2, with exactly one numbered migration (002_assertions_status_not_null.sql). A fresh-DDL-only addition gives new archives the table and silently leaves every existinguser.dbwithout it. That is the "never strand existing durable archives with a schema shortcut" rule, and the operator's live archive is one of those.It needs
migrations/user/003with a correct.train.jsonsidecar (sql_sha256over the file, and a realbackup_plan_refifrequires_backup) before any of it lands. Recorded onpolylogue-bp12n.1.Two diagnoses of mine, corrected by the evidence
Wide scope was not the missing ingredient for
bp12n.1. I attributed its untouched criteria to narrow lane scoping and widened the scope specifically to fix that. With the wide scope, AC3–AC8 are still unattempted — the accepted-input batch stream, input fences and publication façade are genuinely large implementation work. The bead needs sustained implementation, not a wider lane.pnxl6AC6 got a second independent refusal (wave 10s4, now wave 12L3), both citing unresolved replacement-reader and audit-shape decisions. Rather than dispatch a third lane, I checked what changed: the audit tier reached v2 today (a7xr.27.3.2, #5484) and now has a numbered-migration route it never had, andaudit.py:12already declaresmachine_requests. So half of AC6 — "the MCP call log joins auditmachine_requests" — now has both a sink and a route. Split recorded: (a) move the call log over the v2 route, now dispatchable; (b) retire telemetry samples once their readers are named.Partial, stated as partial
z9gh.7.2reduced the cold lane by 125 LOC against a +1126 overrun, and added artifact provenance checks. AC8 still wants model-generated provenance where the artifact is author-recorded. Progress, not the target.Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy