Repository navigation
fix(live): skip degraded ingest before the source-selection gate - #5707
Conversation
|
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: 74ffec7a24
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bce8be1016
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea641307b2
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: beb6601efa
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b3e792d43
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15ea73f088
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9ee466046
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0f136894d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e1d8eb64e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71a9465e08
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e21652a888
ℹ️ 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".
A fully degraded daemon still ran the source-selection gate, which reads the archive's existence journals, on every event before returning the degraded skip. Under an event burst that is the per-file archive access the degraded short-circuit exists to prevent (#1003), and on an archive whose tiers are unreadable the gate raised instead of skipping. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
- fail the evidence-summary lineage read where the route imports archive_read_context now (#5550); - keep the structural-error preflight test's stub cursor outside the archive root, which the #5657 source-selection gate would block; - give the healthy raw-materialization fixture a denominator, since an empty archive is unmeasured, never ready (#5491); - expect the component metadata's completed_at and collection_duration_s fields. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
The production page route ran the source-selection gate and cursor initialization before reaching the batch's degraded check. The file intake adapter now returns every item retryable while the daemon is fully degraded, and the watcher skips the gate for a degraded batch. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Discovery read the cursor tier (due retries, pending fresh pages) on every event while the daemon was fully degraded, and degraded admissions were charged their estimated cost against the class deficit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
A degraded adapter reported pending discovery from retained page state, keeping the intake service on its 50 ms cadence while every discovery returned nothing. Degraded admission also ran after the page bookkeeping, so a page discovered just before degradation entered the failed-attempt cooldown although nothing was attempted. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Masking per-adapter pending signals left retry deadlines spinning the loop at 50 ms, and a quiescent empty pass could read as a drained backlog and settle a cold build over parked files. While fully degraded the service now runs no pass and no settlement, and waits at its idle cadence or for a wakeup. The adapter keeps its discovery and admission guards as defense; its pending signal is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
A class that degraded the daemon mid-pass left the later classes to open archive tiers before the service could park. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
…ence AdmissionResult gains unattempted, so the dispatcher counts a degraded skip toward no attempt budget or cooldown. A degraded local retry page restores its due deadlines. An admission batch that degraded the daemon runs no derived follow-up convergence. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Degradation or a time budget can leave a page unattempted after the adapter's entry check; those RETRYABLE results now carry unattempted so the dispatcher charges no attempt or cooldown. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
…cket A degraded skip of a page whose files are all zero bytes recorded no `daemon_degraded` entry in `refused_bytes_by_reason`, because that map only lists non-zero byte totals. Intake then treated the page as attempted: it charged an attempt, applied cooldown, and advanced the durable retry position. `LiveBatchMetrics.daemon_degraded_skip` now marks the skip directly and intake reads that flag. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01P8nGdByCWAzpk78ko2xza6
e21652a to
a335805
Compare
Summary
A degraded live batch now returns before it touches the archive, and five stale daemon test expectations match current contracts.
Problem
These failures are from a clean-master run of
tests/unit/daemon(base03c543dfe), outside the clusters that PR #5705 and the master-fix owner cover._ingest_filesranrequire_cursor_authority()before itsis_fully_degraded()short-circuit. That gate reads the archive's existence journals on every call. Under an event burst, a degraded daemon therefore did the per-file archive access the short-circuit exists to prevent (live.watcher: gate ingest loop on schema-version preflight to prevent IOPS storm on stale runtime #1003). On unreadable tiers it raisedCursorAuthorityBlockedErrorinstead of skipping (test_ingest_files_short_circuits_under_burst_after_degraded).http.archive_read_context, but the route (moved in feat: Complete bounded intake and daemon-owned surfaces #5550) imports it fromarchive.query.transactionat call time, so the injected lineage failure never fired.index.dbin the archive root without a source tier. The fix(storage): bound live frontier admission with journals #5657 source-selection gate correctly blocks that archive before the full parse the test drives.completed_atandcollection_duration_sfields.Solution
Verification
devtools test tests/unit/daemon/test_status_unmeasured.py tests/unit/daemon/test_status_observations.py tests/unit/daemon/test_schema_preflight.py tests/unit/daemon/test_daemon_http.py:64 passed, 1 failed(receipt20260928T002626Z-focused-test-923898-aafe19be). The one failure,test_daemon_status_names_every_halted_unit_and_is_not_ok, is left as it is on master; see Residuals.devtools schema closure polylogue/sources/live/batch.py: IN, so this must land before a rebuild.Residuals
Still red on master, and not addressed here:
test_daemon_status_names_every_halted_unit_and_is_not_ok: an initialized empty archive has never had a greenokbaseline since fix(readiness): keep archive readiness tied to the active generation #5491. Pinning collectors healthy was not enough, so this needs its own diagnosis.test_drive_phased_matches_ordinary_document_growth: no asserted-authority revision with a predecessor.test_daemon_watcher_hints_wake_fair_intake_and_canonical_derivation: intake discovers no source carrier.🤖 Generated with Claude Code
https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4