Skip to content

Close completed test harness Bead - #3941

Merged
Sinity merged 9 commits into
masterfrom
feature/chore/close-harness-bead
Aug 11, 2026
Merged

Sinity merged 9 commits into
masterfrom
feature/chore/close-harness-bead

Conversation

@Sinity

@Sinity Sinity commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • record the verified portion of the test-harness resource-admission work
  • preserve the exact evidence, residual successors, and Beads snapshot in the authoritative JSONL

Problem

PR #3940 delivered the core fail-safe harness. Exact-head review then found residual scope in automatic pre-execution reroute and the controlled xdist stall fixture, so the parent Bead remains open with named successors.

Solution

Record a partial disposition for polylogue-9pf58: crash-left seeded-build recovery is complete and tested; automatic reroute and the six-worker xdist acceptance fixture remain on polylogue-enl3l and polylogue-7wytz. The related base-authority Bead remains open.

Verification

  • devtools lab policy bead-graph --json — zero unhandled findings; two explicitly deferred operator-action missing-AC records remain
  • Beads pre-push JSONL/dependency validation — passed

Summary by CodeRabbit

  • Chores
    • Updated project tracking records to document completed verification for resource handling, cleanup, recovery, run receipts, stall termination, release safeguards, and dependency pull request scope.
    • Clarified the relationship between automated dependency checks and the broader pull request scope validation work.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds a closed verification issue for managed test resources, recovery, typed receipts, termination attribution, baseline promotion, and dependency-PR scope validation. It links the dependency-PR subcase from the existing PR-scope validation issue.

Changes

Verification and scope tracking

Layer / File(s) Summary
Verification issue and scope linkage
.beads/issues.jsonl
Adds closed issue polylogue-9pf58 with verification requirements. Updates polylogue-inygw with the dependency-PR scope note and a relates-to relationship.

Estimated code review effort: 1 (Trivial) | ~5 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 primary change: closing the completed test-harness Bead.
Description check ✅ Passed The description covers the change, problem, solution, verification, disposition, evidence, and remaining work in a mostly complete format.
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feature/chore/close-harness-bead
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/chore/close-harness-bead

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 @.beads/issues.jsonl:
- Line 1: Correct the chronology in issue polylogue-9pf58 by removing or
revising the future-dated 2026-08-11 evidence in notes and the corresponding
acceptance-criteria wording. Use the actual observation date, or explicitly
label the content as planned, ensuring the authoritative snapshot contains no
observations dated after the 2026-08-10 closure.
🪄 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: 6be4c465-5c24-42ad-b159-ed34107aa926

📥 Commits

Reviewing files that changed from the base of the PR and between 12618c0 and de0d718.

📒 Files selected for processing (1)
  • .beads/issues.jsonl

Comment thread .beads/issues.jsonl Outdated
@@ -1,3 +1,4 @@
{"_type":"issue","id":"polylogue-9pf58","title":"Test harness: fail-safe resource admission and fresh-worktree recovery","description":"A 12-worker full verify was terminated near 69% after pytest basetemp usage exceeded the declared /dev/shm budget: 1512 MiB observed versus a 1376 MiB default. Fresh worktrees also lack a dependable valid testmon seed or recovery route, partial seeded databases can survive interrupted builders, resource admission and worker selection are not bound into complete receipts, and termination can leave incomplete failure attribution or authorize a false green/release baseline. Separately, Dependabot PRs #3935-#3939 all fail Circle quick-gate because pr-scope check-ci requires a human-authored Bead carrier. These failures share one verification-harness concern: every accepted result and every scope-policy exception must be typed, evidence-backed, and fail closed.","design":"Trace the production devtools verify/test paths before changing them. Make pytest basetemp selection choose among supported roots from live free-space and declared run demand, clean only harness-owned stale/partial artifacts after ownership/age validation, and record the selected root, admission inputs, worker decision, peak usage, cleanup, termination, and attribution in machine-readable run receipts. Make fresh-worktree testmon bootstrap and interrupted seeded-DB recovery atomic and self-validating. Incomplete or terminated runs must be non-green and ineligible for release-baseline promotion. Keep coverage unchanged and preserve one-shot operator overrides. Extend pr-scope check-ci with a typed automated dependency-PR policy based on authoritative GitHub metadata and an allowlisted dependency-only changed-file contract; ordinary product PRs retain the full carrier gate.","acceptance_criteria":"1. A real verify/test route automatically refuses or reroutes before a declared basetemp budget can terminate the run; worker admission uses live capacity and records the decision without reducing coverage. 2. Harness-owned stale and partial seeded databases/basetemps are detected and safely cleaned or quarantined, while active and foreign paths are never deleted. 3. A fresh linked worktree can bootstrap a valid testmon seed or receives a typed recovery action; corrupt, stale, partial, or incompatible seeds cannot be promoted. 4. Every run receipt reports selection denominator/digest, worker/resource admission, selected basetemp, cleanup actions, terminal cause, complete failure attribution, and release_baseline_allowed; termination and incomplete attribution force false. 5. Focused real-route tests and controlled mutations fail when admission, cleanup ownership, seed validation, attribution completeness, or fail-closed baseline logic is removed. 6. Dependabot PRs with authoritative bot identity and dependency-only file changes receive a typed no-Bead scope disposition; spoofed actors, ordinary product PRs, or extra product files still require and validate the normal carrier. 7. The five observed Dependabot failures are represented by production check-ci route regressions, and ordinary PR-scope enforcement remains unchanged. 8. Focused tests and devtools verify --quick pass; a full or seed run is started only after the coordinator full run is no longer active and its exact outcome is recorded.","notes":"2026-08-11 additional live evidence: after rerouting basetemp to NVMe and reducing to 6 workers, full verify reached only 14% after about 18 minutes. All six xdist workers remained in Linux D state for roughly 18 minutes on SQLite-heavy tests while the supervisor stayed alive and emitted heartbeat output; the harness did not classify a stall. The operator aborted the owned run. Required refinement: combine sustained xdist worker process state with actual test-progress age, terminate the exact owned containment boundary, wait for cleanup, and publish a machine-readable terminal receipt. Supervisor heartbeat or output bytes must not reset worker-progress stall evidence.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sinity","owner":"[email protected]","created_at":"2026-08-10T22:12:37Z","created_by":"Sinity","updated_at":"2026-08-10T23:41:42Z","started_at":"2026-08-10T22:13:12Z","closed_at":"2026-08-10T23:41:42Z","close_reason":"Satisfied by merged PR #3940 at 9d4fa12e8: managed basetemp admission and cleanup, typed xdist I/O-stall termination, fail-closed incomplete/resource-timeout receipts, fresh-worktree testmon seed/recovery handling, and authoritative Dependabot scope policy are implemented. Evidence: 60 focused harness/PR-scope tests, 27 PR-scope tests, 25-step devtools verify --quick, Circle quick-gate success on exact head; fresh seed attempt recorded 20,987 selected nodes and a typed tmpfs resource-timeout with release_baseline_allowed=false, followed by the bounded NVMe resume route.","labels":["area:devtools","area:test","area:verification"],"dependencies":[{"issue_id":"polylogue-9pf58","depends_on_id":"polylogue-817er","type":"discovered-from","created_at":"2026-08-10T22:12:59Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-9pf58","depends_on_id":"polylogue-93xe","type":"parent-child","created_at":"2026-08-10T22:13:08Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-9pf58","depends_on_id":"polylogue-inygw","type":"relates-to","created_at":"2026-08-10T22:53:35Z","created_by":"Sinity","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}

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

Correct the evidence chronology.

The current date is August 10, 2026. Line 1 records 2026-08-11 as additional live evidence, while polylogue-9pf58 is already closed at 2026-08-10T23:41:42Z. Line 19 also adds a 2026-08-11 note. Use the actual observation date, or label the text as planned. Do not keep future-dated observations in an authoritative snapshot.

Also applies to: 19-19

🤖 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 @.beads/issues.jsonl at line 1, Correct the chronology in issue
polylogue-9pf58 by removing or revising the future-dated 2026-08-11 evidence in
notes and the corresponding acceptance-criteria wording. Use the actual
observation date, or explicitly label the content as planned, ensuring the
authoritative snapshot contains no observations dated after the 2026-08-10
closure.

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

ℹ️ 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 .beads/issues.jsonl Resolved
@Sinity
Sinity force-pushed the feature/chore/close-harness-bead branch from 92ca0af to 5be8cfa Compare August 11, 2026 00:04

@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: 5be8cfa90c

ℹ️ 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 .beads/issues.jsonl Resolved
Comment thread .beads/issues.jsonl Resolved
Comment thread .beads/issues.jsonl 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: 60d19aa52a

ℹ️ 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 devtools/verify_runs.py Resolved
@Sinity
Sinity merged commit 2518213 into master Aug 11, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the feature/chore/close-harness-bead branch August 11, 2026 00:41

@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: 2dc7bf01ff

ℹ️ 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 .beads/issues.jsonl Resolved
Comment thread devtools/verify_runs.py Resolved
Comment thread .beads/issues.jsonl Resolved
Comment thread devtools/verify.py Resolved
Sinity added a commit that referenced this pull request Aug 11, 2026
## 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.

<!-- polylogue-pr-scope:v1
{
  "assigned_beads": [
    "polylogue-9pf58"
  ],
"beads_digest":
"6a8ac0723c40c7ff27aa3d0b815dd3e9afe3ebcdf9451b0a338b6c3621f08088",
  "dispositions": [
    {
      "bead_id": "polylogue-9pf58",
      "disposition": "satisfied",
      "evidence": [
        {
          "kind": "commit",
          "ref": "12618c007 (merged harness implementation)"
        },
        {
          "kind": "commit",
          "ref": "ee93e8d248555fd6cae645781604d171dc6f9247"
        },
        {
          "kind": "test",
"ref": "devtools test tests/unit/devtools/test_verify.py -k
six_worker_d_state_fixture: 2 passed"
        },
        {
          "kind": "test",
          "ref": "devtools verify --quick: 25/25 steps passed"
        },
        {
          "kind": "review",
"ref": "PR #3941 exact-head review residuals resolved by named successor
closure"
        }
      ],
      "successors": []
    }
  ],
  "head_sha": "072a80b00a8596e47ac4ddf6aed5daee9fda274f",
"scope_digest":
"0c22e25fa6f724cdbcec42da546071e496e866e6c12be156255a8caf2ea353e8",
  "version": 1
}
-->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

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

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@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.

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

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

  • 56.F046 / P1: stale at the checked revision: The event-receipt worker census no longer authorizes an all-D-state termination. The verifier invokes the managed slot runner at devtools/verify.py:855 and uses process-group memory telemetry at devtools/pytest_slot.py:1138; the subset-of-workers termination branch described in the review has been removed.

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.

  • 55.F108 / P2: fixed-already at the checked revision: Verification derives scope from the requested quick/selection mode before admission (devtools/verify.py:1384). The terminal result passes that same scope to finalization rather than hardcoding a narrow-terminal refusal scope (devtools/verify.py:1568).

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.

  • 57.F037 / P2: stale at the checked revision: The resource sampler's repeated whole-ledger xdist identity scan is absent. Its current telemetry path uses the incremental append-only progress reader documented at devtools/pytest_slot.py:867 and supplies that reader to the sampler at devtools/pytest_slot.py:1146, rather than decoding all historical worker events at every sample.

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.

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