Skip to content

fix(live): skip degraded ingest before the source-selection gate - #5707

Merged
Sinity merged 13 commits into
masterfrom
claude/master-fixes-3
Sep 28, 2026
Merged

Sinity merged 13 commits into
masterfrom
claude/master-fixes-3

Conversation

@Sinity

@Sinity Sinity commented Sep 28, 2026

Copy link
Copy Markdown
Owner

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 (base 03c543dfe), outside the clusters that PR #5705 and the master-fix owner cover.

Solution

  • The degraded check now runs first. The authority gate and refused-path filtering follow in their original order, so a non-degraded batch behaves as before.
  • Each stale test is realigned as described in the commit messages.

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 (receipt 20260928T002626Z-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 green ok baseline 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.
  • polylogue-6remh: periodic profile ticks starve demand.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T07:32:15.126844Z a335805 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/sources/live/batch.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved
Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved
Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved
Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved
Comment thread polylogue/operations/intake_adapters.py Resolved
Comment thread polylogue/daemon/intake.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved
Comment thread polylogue/operations/intake_adapters.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread polylogue/operations/intake_adapters.py Resolved
@Sinity
Sinity enabled auto-merge (squash) September 28, 2026 04:20
Sinity and others added 13 commits September 28, 2026 09:25
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
…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
…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
@Sinity
Sinity force-pushed the claude/master-fixes-3 branch from e21652a to a335805 Compare September 28, 2026 07:29
@Sinity
Sinity merged commit 9753991 into master Sep 28, 2026
3 checks passed
@Sinity
Sinity deleted the claude/master-fixes-3 branch September 28, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant