Skip to content

fix(cli): report failed status components as explicit unknown entries - #2959

Merged
Sinity merged 2 commits into
masterfrom
fix/status-degraded-components
Jul 16, 2026
Merged

Sinity merged 2 commits into
masterfrom
fix/status-degraded-components

Conversation

@Sinity

@Sinity Sinity commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Failed status-component computations now produce explicit state=unknown entries instead of silently vanishing from the payload. Ref polylogue-feqr (found by the xnws narration pilot).

Problem

Six except Exception: pass sites in _direct_component_readiness made a failed component indistinguishable from not-applicable — a direct loud-degradation violation on the status surface itself.

Solution

_component_computation_failure helper (reuses the existing ComponentReadiness/CapabilityReadinessState.UNKNOWN vocabulary — no new tokens); each block inserts it under its statically-known component name (archive_surfaces sentinel, raw_materialization, raw_frontier_integrity, embeddings, assertions, transforms). The _direct_status_ok claim guard already treats unknown correctly.

Verification

devtools test tests/unit/cli/test_status.py → 61 passed, including a new test forcing an embeddings failure through the real _show_direct_json route and asserting the unknown entry (reverting the fix → key absent → test fails). devtools verify --quick exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ

Problem: _direct_component_readiness wrapped every component readiness
block (archive surfaces, raw materialization, raw frontier integrity,
embeddings, assertions, transforms) in except-pass, so a component whose
computation failed silently vanished from the status payload —
indistinguishable from not-applicable, on the surface whose job is
reporting degradation (polylogue-feqr, found by the xnws narration pilot).

What changed: one _component_computation_failure helper builds an explicit
ComponentReadiness(state=UNKNOWN) entry carrying the exception class and
message; each block's handler now inserts it under the block's statically
known component name. The existing claim guard already treats unknown as
non-healthy for required components, so no guard changes needed.

Verification: devtools test tests/unit/cli/test_status.py — 61 passed,
including the new test that forces an embeddings computation failure
through the real _show_direct_json route and asserts the unknown entry
(reverting the fix makes the key absent, failing the test);
devtools verify --quick exit 0.

Ref polylogue-feqr.

Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 57be3e95-a554-4b3b-a856-28a3504a0e07

📥 Commits

Reviewing files that changed from the base of the PR and between a62d2f9 and f91d277.

📒 Files selected for processing (2)
  • polylogue/cli/commands/status.py
  • tests/unit/cli/test_status.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/status-degraded-components

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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: a7ffc39ce4

ℹ️ 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/cli/commands/status.py Resolved
Comment thread polylogue/cli/commands/status.py Resolved
… failures

CodeRabbit review follow-up on the degraded-entry fix: failure entries now
carry each component's canonical scope (semantic/user/session-analysis) and
a computation_failed metadata flag; _direct_status_ok treats a computation
failure on a required component as unhealthy instead of tolerated-unknown.

Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ
@Sinity

Sinity commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

Both review findings addressed in f91d277: failure entries carry canonical scopes (semantic/user/session-analysis) and a computation_failed metadata flag; _direct_status_ok now returns unhealthy when a required component's computation failed. 61/61 status tests + quick gate green.

@Sinity
Sinity merged commit 3556de6 into master Jul 16, 2026
1 of 2 checks passed
@Sinity
Sinity deleted the fix/status-degraded-components branch July 16, 2026 20:09
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 61.F062 / P2: fixed-already at the checked revision: The shared readiness adapters now own canonical scopes: embeddings use semantic, assertions use user, and transforms use session-analysis. The replacement status producer calls those adapters and its explicit missing-assertions branch also uses user at polylogue/operations/daemon_status.py:771; the old generic archive-scoped computation-failure entries are gone.
  • 61.F063 / P2: fixed-already at the checked revision: The overall readiness predicate now rejects unknown states for every required component, including assertions and transforms, at polylogue/operations/daemon_status.py:1096. A required computation that supplies unknown cannot produce an otherwise healthy verdict.

Only the rows listed above are dispositioned. Held findings remain open.

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