Skip to content

build: keep live planning claims during cleanup - #5233

Merged
jakildev merged 2 commits into
masterfrom
claude/5231-planning-claim-liveness
Nov 26, 2026
Merged

jakildev merged 2 commits into
masterfrom
claude/5231-planning-claim-liveness

Conversation

@jakildev

Copy link
Copy Markdown
Owner

Summary

Planning claims now survive stale-label cleanup while their exact planning dispatch is live.
The shared liveness predicate recognizes planning labels but deliberately ignores heartbeats, markers, reservations, and abandon pins for them, so dead planning claims still age out normally.

Acceptance evidence

Criterion Check run Observed
Exact live dispatch keeps an aged planning claim bash scripts/fleet/tests/test_fleet_claim_planning_restamp.sh 50 passed, 0 failed; the keep diagnostic names arm: dispatch, target: plan:engine:90.
Missing or wrong dispatch still removes stale claims bash scripts/fleet/tests/test_fleet_claim_planning_restamp.sh Marker-only and wrong-target controls both reach remove-label; orphan-grace controls remain green.
Predicate covers planning parse, exact targets, and non-dispatch controls python3 scripts/fleet/tests/test_fleet_claim_liveness.py 31 tests ran, all passed, including engine/game targets and heartbeat rejection.
Focused planning regressions bash scripts/fleet/tests/run_all.sh --only fleet_claim_planning 3 suites passed, 0 failed, 0 skipped.
Focused liveness regressions bash scripts/fleet/tests/run_all.sh --only fleet_claim_liveness 2 suites passed, 0 failed, 0 skipped.
Positive control fires on the pre-fix tree fleet-positive-control scripts/fleet/tests/test_fleet_claim_planning_restamp.sh origin/master MEANINGFUL: 3 of 50 assertions fail on origin/master; all three are the live-dispatch keep proof.
Fleet test subject registry stays complete python3 scripts/fleet/fleet_test_subjects.py Scanned 315 suite sources and 11,148 tracked paths with no missing registration.
Comment-reference ratchet stays clean python3 scripts/lint_comment_refs.py 0 reference lines across 0 files; none above budget.
Reviewer notes

Notes for reviewer

Closes #5231

🤖 Authored with Codex (GPT-5).

Route planning labels through the shared dispatch-liveness predicate before stale cleanup removes them. Planning remains dispatch-only, so heartbeats and markers cannot extend dead claims.

Add exact-target predicate coverage and a hermetic cleanup fixture with positive and stale controls.
@jakildev jakildev added fleet:author-codex Implementation last authored by Codex; route review to Claude fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend labels Nov 23, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review — build: keep live planning claims during cleanup

Verdict: approve

The fourth pass of cleanup --gh now asks the shared predicate before removing an aged planning label, and the predicate vouches only on an exact plan:<ns>:<N> dispatch record, as the plan specified.

Nits (follow-up)

  • docs/agents/fleet-claim-liveness.md:6-7 — still describes the predicate as covering fleet:amending-* / fleet:claim-* only; fold planning (dispatch-only arm) into it on the next PR on this surface.

Acceptance (issue #5231)

6 of 6 met. Criteria 1–5 reproduced locally (below). Criterion 6 is covered by the green comment-refs check and the author's fleet_test_subjects.py run.

Checked

  • Read fleet_claim_liveness.verdict in full. For amending and claim labels the behavior is unchanged: the preclaim arm stays amending-only, and stamped for a claim label is now computed after the dispatch check from the same lock files, so the value is identical. A planning label returns CANNOT_VOUCH / no-dispatch right after the dispatch check and never reaches the abandon-pin, heartbeat, or reservation arms.
  • Read the planning pass in fleet-claim (cmd_cleanup_gh). The _claim_owner_live call sits after both skip gates (fresh-orphan grace, under-TTL) and before the gh issue edit --remove-label, so it covers both the orphan fast path and the TTL path. The || _planning_live_rc=$? form is set -e-safe. Cross-host labels still return CANNOT_VOUCH, so they keep the existing age rules.
  • Grepped the other _claim_owner_live call sites (amending sweep, _issue_has_unswept_claim, claim cleanup, force-sweep). None of them receive planning labels, so teaching the parser about planning changes nothing there.
  • test_fleet_claim_liveness.py: 31 tests pass. It includes engine and game targets, wrong-target controls, and a heartbeat-without-dispatch control.
  • test_fleet_claim_planning_restamp.sh: 50 passed, 0 failed. The suite now sets FLEET_STATE_DIR to its temp root, so it is hermetic. The T2 keep case names arm: dispatch, target: plan:engine:90. T3 (marker alone) and T4 (wrong-target dispatch) still reach remove-label.
  • test_fleet_claim_liveness_sweep.sh: 46 passed, 0 failed.
  • fleet-positive-control … origin/master: MEANINGFUL, 3 of 50 assertions fail pre-fix.
  • CI on head 693a67e: every check is green except fleet-tests, which was still IN_PROGRESS when I read it. That check is unread, not green; the three fleet suites above that cover this diff pass locally.

Opus recheck not required.

🤖 Reviewed by Claude Sonnet 5.5 (review-pr skill)

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge and removed fleet:reviewing-mac-pool-1 labels Nov 23, 2026
@evin-mac-claude-app evin-mac-claude-app Bot added the fleet:checks-red Info only: approved PR whose head has a failed check of its own; reconcile R12 adds and removes it label Nov 23, 2026
@jakildev
jakildev merged commit f6d489a into master Nov 26, 2026
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-codex Implementation last authored by Codex; route review to Claude fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:checks-red Info only: approved PR whose head has a failed check of its own; reconcile R12 adds and removes it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fleet-claim: the planning sweep removes a live planning claim once the pass outlasts its 60-minute TTL

1 participant