Skip to content

Prove six-worker harness stall diagnosis - #3942

Merged
Sinity merged 3 commits into
masterfrom
feature/test/close-harness-stall
Aug 11, 2026
Merged

Sinity merged 3 commits into
masterfrom
feature/test/close-harness-stall

Conversation

@Sinity

@Sinity Sinity commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • complete the final controlled xdist-stall proof for the test-harness Bead
  • record the parent Bead closure against the exact current Beads snapshot

Problem

The resource harness had in-process worker identity support and typed all-worker stall logic, but lacked a controlled six-worker regression proving that post-exec worker identities are sufficient for the terminal diagnosis. The parent Bead was therefore kept open after exact-head review rather than being closed on the earlier implementation evidence.

Solution

Add a controlled six-worker sampler fixture with six session_started worker receipts and D-state process observations. The fixture proves complete worker observation, typed stall diagnosis only after the configured interval, and compatibility with the existing partial-observation fail-closed behavior. The Beads export closes the parent and its three named residual successors; this is harness implementation/verification scope only.

Verification

  • devtools test tests/unit/devtools/test_verify.py -k 'six_worker_d_state_fixture or resource_sampler_resolves_worker_identity' — 2 passed
  • devtools verify --quick — 25/25 steps passed
  • No green full-suite or production reindex is claimed.

Summary by CodeRabbit

  • Bug Fixes

    • Improved diagnostics for scenarios where multiple test workers become unresponsive, including clearer identification of SQLite or filesystem-related stalls.
    • Updated incident-tracking records to reflect completed recovery and fail-safe handling.
  • Tests

    • Added regression coverage for detecting six simultaneously stalled workers.
    • Refreshed test fixture verification data to keep incident-recovery checks accurate.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds regression coverage for six pytest-xdist workers in uninterruptible D state, updates a campaign snapshot hash, and records closure metadata for two completed issues.

Changes

xdist stall follow-up

Layer / File(s) Summary
Six-worker stall regression coverage
tests/unit/devtools/test_verify.py, tests/fixtures/reindex_incident_coverage/campaign_graph.json
The test simulates six D-state workers and verifies stalled-worker sampling and the typed 30-second diagnosis. The fixture uses a new source snapshot hash.
Issue closure records
.beads/issues.jsonl
The worker-discovery and fail-safe harness issues now include closed status, completion metadata, rationale, and evidence.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: proving six-worker harness stall diagnosis.
Description check ✅ Passed The description covers the required summary, problem, solution, verification, and bead disposition details; omitted changelog and risks sections are optional here.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test/close-harness-stall

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/fixtures/reindex_incident_coverage/campaign_graph.json`:
- Line 4: Update the source_snapshot_sha256 value in campaign_graph.json to
4952994decfd523ce773249e90c4e6e9f54b1597f462552e0292facc732190b1, preserving the
surrounding fixture content.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 90c6b0d2-9b49-45df-a73e-bf8450b34ef4

📥 Commits

Reviewing files that changed from the base of the PR and between 2518213 and ee93e8d.

📒 Files selected for processing (3)
  • .beads/issues.jsonl
  • tests/fixtures/reindex_incident_coverage/campaign_graph.json
  • tests/unit/devtools/test_verify.py

"schema_version": 1,
"source_commit": "12618c007a987b227e73cfc9e4f462dcaa669914",
"source_snapshot_sha256": "767d60ce405c65d6fa19a8302c6a6920f054ca8be6adbfaca1d0c88444b9b424",
"source_snapshot_sha256": "2ff286443fd3f2b4b08e16c22d39162b68ca601752bab3ce57290d4bc37abf99",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

graph='tests/fixtures/reindex_incident_coverage/campaign_graph.json'
commit="$(jq -r '.source_commit' "$graph")"
source_path="$(jq -r '.source_path' "$graph")"
expected="$(jq -r '.source_snapshot_sha256' "$graph")"
actual="$(git show "${commit}:${source_path}" | sha256sum | cut -d' ' -f1)"

printf 'expected=%s\nactual=%s\n' "$expected" "$actual"
test "$actual" = "$expected"

Repository: Sinity/polylogue

Length of output: 300


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

graph='tests/fixtures/reindex_incident_coverage/campaign_graph.json'
commit="$(jq -r '.source_commit' "$graph")"
source_path="$(jq -r '.source_path' "$graph")"
expected="$(jq -r '.source_snapshot_sha256' "$graph")"

printf 'commit=%s\nsource_path=%s\nexpected=%s\n' "$commit" "$source_path" "$expected"
git cat-file -e "${commit}^{commit}"
git cat-file -e "${commit}:${source_path}"

git show "${commit}:${source_path}" > /tmp/source_snapshot.bin
actual="$(sha256sum /tmp/source_snapshot.bin | cut -d' ' -f1)"
printf 'actual=%s\n' "$actual"

printf '\nCurrent fixture fields:\n'
sed -n '1,8p' "$graph"
printf '\nSource object metadata:\n'
git cat-file -s "${commit}:${source_path}"
file /tmp/source_snapshot.bin

test "$actual" = "$expected"

Repository: Sinity/polylogue

Length of output: 779


Update source_snapshot_sha256.

The exact bytes of .beads/issues.jsonl at source_commit hash to 4952994decfd523ce773249e90c4e6e9f54b1597f462552e0292facc732190b1, not the recorded value. Set line 4 to this hash.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/fixtures/reindex_incident_coverage/campaign_graph.json` at line 4,
Update the source_snapshot_sha256 value in campaign_graph.json to
4952994decfd523ce773249e90c4e6e9f54b1597f462552e0292facc732190b1, preserving the
surrounding fixture content.

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

ℹ️ 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 tests/unit/devtools/test_verify.py Resolved
Comment thread tests/unit/devtools/test_verify.py Resolved
Comment thread tests/unit/devtools/test_verify.py Resolved
@Sinity
Sinity merged commit 678c791 into master Aug 11, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the feature/test/close-harness-stall branch August 11, 2026 01:00
@Sinity

Sinity commented Sep 30, 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.

  • 78.F053 / P1: stale at the checked revision: The local supervisor and the global live-progress reader have been removed from the current verifier route. devtools/verify.py:847 binds reports to the active step, then lines 854-855 execute through the pytest slot and lines 867-870 consume its owned terminal outcome instead of the former ResourceSampler loop.
  • 78.F054 / P1: stale at the checked revision: The local supervisor and the partial-worker D-state classifier have been removed from the current verifier route. devtools/verify.py:847 binds reports to the active step, then lines 854-855 execute through the pytest slot and lines 867-870 consume its owned terminal outcome instead of the former ResourceSampler loop.

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

@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.

  • 79.F062 / P2: stale at the checked revision: The local supervisor and the pure D-state classifier test have been removed from the current verifier route. devtools/verify.py:847 binds reports to the active step, then lines 854-855 execute through the pytest slot and lines 867-870 consume its owned terminal outcome instead of the former ResourceSampler loop.

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