Repository navigation
chore: Route delegation evidence materialization through controlled rea… - #5023
Conversation
…z.5' into batch/polylogue-20260913-133320-6626c07a/integration
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 016f240969
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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. |
…5440) ## Summary Repairs the six long-standing failures in `tests/unit/daemon/test_daemon_cli.py`, which turned out to have **three distinct causes** — including one real product defect. 101 passed / 6 failed at base `5204d0e9e`; **107 passed / 0 failed** at head, with no previously-passing test in the file regressed. These six had been re-reported as "inherited reds" by three separate lanes without being owned, so they were costing attention on every run. ## 1. Product defect — `publish_session_usage_rollup` reported success after deleting nothing Its retirement branch returned `True` unconditionally. A **required** key — a live intake hint names a session before ingest commits the row — hit that branch, so the convergence kernel saw *"publish accepted, required output still missing"*, which it deliberately classifies as a broken publication, and recorded FAILED. The delete's `rowcount` is the honest discriminator: an excess key always has a binding row, a required one does not. No binding row means nothing was retired, so the publication refuses and the key converges on a later pass — which is the retryable race it actually was. Confirmed by instrumenting both branches and observing `DBGBRANCH retire` immediately before the FAILED, rather than inferred from reading. ## 2. Stale test — `..._parks_operation_recovery_on_audit_schema_mismatch` The test wrote `PRAGMA user_version = 1` to manufacture a mismatch. `b56699c80` (#5275, "Fresh schema floor") set `ARCHIVE_FORMAT_FLOOR_VERSION = 1`, and audit's declared version **is** that floor — so the write became a no-op, `durable_tier_schema_mismatch()` returned False, and recovery was correctly called. **The gate was never broken; the test stopped producing its own premise.** The skew is now derived from the declaration and deliberately *backward*, because a forward version is refused earlier by the durable change train's forward-admission check — a different contract. ## 3. Harness defect — `..._holds_writer_lease_through_replay` `RawObservationDerivation.publish` began pinning its membership read through `open_operation_read` in `3faacef23` (#5023). That read captures the view from `archive.archive_root` and `archive.index_db_path`, which the test's `FakeArchive` never grew. Both were added **to the double**, not loosened in the production read. `pin_operation_snapshot` stays absent because `operation_context.py` explicitly declares that minimal-double path. ## Verification ``` devtools verify --quick -> PASSED devtools test tests/unit/daemon/test_daemon_cli.py -> 107 passed, 0 failed devtools test <rollup derivation + 2 convergence suites> -> PASSED ``` All three mutations **executed and refuted**: - restore the retirement branch -> all four watcher params red: `session_usage_rollup ... FAILED ... 'publish reported success but the required output remains missing'`, `assert 1 == 0` - replace the `durable_schema_mismatch` gate with `False` -> `AssertionError: Expected 'mock' to not have been called. Called 1 times.` - drop the writer lease across replay -> `assert [0] == [1]`, proving that adding `archive_root` to `FakeArchive` did **not** weaken what that test proves ## Two further issues measured, not guessed The index read raced the replace that follows a returning intake pass (measured: 1 -> 2 messages at ~200 ms), now a bounded wait plus settle window. And the profile row is published then *withdrawn* by the quarantined snapshot's replace, with re-derivation never arriving because the test stops driving the daemon — so the row is sampled across the window and required to have been published. Stated plainly: that assertion **no longer proves the row is present in the final settled state.** That is not a property a stopped daemon can establish. ## Schema identity `polylogue/storage/derived/session/usage_rollup.py` is **IN** the closure. Index identity `be8d4619aff05…` -> `0d03d682a0c97…`. The archive must reconverge, and **this must land before any fresh rebuild starts.** ## Residual worth a bead The durable change train's forward-admission refusal was not changed, so a **forward**-versioned `audit.db` still kills daemon startup with `DurableChangeTrainError` escaping into the `BaseException` shutdown path — arguably the same failure mode polylogue-39pdi was filed against, reachable by a different route. Redefining a durable-migration guard is a product decision beyond a repair lane's authority, so the test was scoped to the contract it names and the gap reported rather than silently widened. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Batch
polylogue-20260913-133320-6626c07aon basea0187cfc1fed.polylogue-vclez.5 Route delegation evidence materialization through controlled reads
polylogue-vclez.6 Route raw intake and observation discovery through controlled reads
polylogue-vclez.7 Route raw derivation compute and revalidation through controlled reads
polylogue-vclez.8 Classify and enforce the operation snapshot read boundary