Repository navigation
fix: serve demanded profiles first; bind grown Drive revisions - #5716
Conversation
… per tick A periodic profile tick ran the archive-wide startup audit, one domain slice at a time, before any demanded session work (#5570). Demanded profiles therefore waited for the whole sweep after every start, and an idle tick kept inspecting. Decision (polylogue-6remh): #5540's contract wins. Every tick runs the demand pass first. The startup/promotion audit advances only in bounded slices through converge_backlog after demand, and does not repeat once swept. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Phased Drive catch-up classifies revision lineage against an in-memory snapshot of the cohort. Since #5630 membership classification also reads source_item_raw_members, which the scratch lacked, so every grown Drive document was quarantined instead of bound as an asserted revision. The cohort's generation members are now snapshotted, and revalidated at publish like the other relations. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
The healthy collector fixture's frontier set only overall_status over unknown sub-checks, which is not a proof and refutes ok. The halted-units test now pins those healthy collectors, with a measured raw materialization and this archive's real raw-failure lifecycle, so its baseline is green before the halt. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d24905f6c8
ℹ️ 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".
- The demand-only sweep pages the demand keyspace from its own cursor. Sharing the archive cursor let a demand pass resume and finish the audit's partial position, so the next audit slice wrapped to its first key and a large archive never reached its tail. - The hot-session probe attaches the source tier through the read-only helper on a query-only reader. The profiled reader's authorizer denied the parameterized ATTACH, so the probe failed open and deferred no hot session (test_real_factory_defers_hot_target_without_losing_the_no_hint_cursor). - Status tests: the healthy raw-materialization fixture is a measured, fully materialized population, and the component metadata expectation names the completion fields the collector now reports. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01P8nGdByCWAzpk78ko2xza6
The added regression for polylogue-6remh used one fake key set for both the demand-only frame and the archive audit frame, so consuming a key through demand silently emptied the audit's pending set too -- the test passed even with a shared cursor, and failed once cursors were split apart because the demand pass legitimately finished the only key it was allowed to see. Give the fake distinct keyspaces per frame kind, as session_profile_demand and the archive scan actually are. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c029d54f9c
ℹ️ 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".
…e scratch The demand-only cursor now restarts when frame.source_revision changes, so a promoted index generation never resumes the previous generation's keyset position. The Drive preparation scratch carries source_item_raw_members as schema only: the Drive route classifies without a source generation, so no ownership row can match, and copying the cohort's rows let a raw retained across many generations exceed the row cap and go permanently stale. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Summary
Periodic profile ticks now serve demanded session work before the archive-wide audit, and never re-run the audit once it has swept (polylogue-6remh). Phased Drive catch-up binds a grown document as an asserted revision again instead of quarantining it. The halted-units status test gets a genuinely green baseline.
Problem
session_profile_demand: the firstcallback(None)returnedoutcomes=(), and no profile was published. On a large archive, demanded profiles waited for all three domains to sweep after every daemon start.test_two_accepted_revisions_survive_one_periodic_profile_passandtest_working_dir_demand_withholds_profile_readinesswere red on master.source_item_raw_members, and the scratch did not carry that table. Every grown Drive document was therefore quarantined instead of being bound to its predecessor (test_drive_phased_matches_ordinary_document_growth).overall_statusover unknown sub-checks. That is not a proof, and it refutesok, so the test's "green before the halt" baseline was not green.Solution
callback(None)runs only the demand pass. The startup/promotion audit advances in bounded slices throughComposedSessionProfiles.converge_backlogafter that demand pass, and it does not repeat once swept (only promotion resets it). Tests that encoded the per-tick audit now driveaudit_pass/converge_backlog. The insights race test now models the replacement at the record the route actually compares._prepare_ingest_unit_syncsnapshots the cohort'ssource_item_raw_membersinto the scratch alongside the other relations, and revalidates it at publish in the same way.devtools schema closure: both source files areout, so the derived identity does not move.Verification
devtools gate mypy:Success: no issues found in 3095 source filesdevtools teston session profile composition, the periodic-pass test, insights browser endpoint, convergence restart law, raw-materialization fair intake, Drive catch-up execution, status observations and status unmeasured: pending; this body is updated with the receipt when it reportsResiduals
🤖 Generated with Claude Code
https://claude.ai/code/session_01P8nGdByCWAzpk78ko2xza6