Skip to content

UAT train follow-ups: restart-safe promote guard, train-off evidence order, cleanup backoff #5995

Done

Description

@eltmon

Follow-ups from the independent re-review of #5992 (PAN-5966), comment #5992 (comment).

1. The promote guard must survive a restart (data integrity)

Gap. The promote-in-flight set is in-process only. If the dashboard restarts mid-promote, the set is lost. The reconciler ignores the per-repo promoted_at already written, so it can invalidate a half-landed batch and delete the remaining repos' uat/* branches, which blocks the retry.

Fix. Never invalidate, void or reap a ready generation that has any member repo with promoted_at set. Surface the generation as "partially promoted: resume promote" instead.

2. Train-off evidence order

Gap. With the train off, merged-ids evidence is checked before the ready set (uat-reconciler.ts:335). An old merged PR on a reused feature/<id> branch can invalidate a batch whose member is still ready, which the train-on path would keep.

Fix. Check the ready set first.

3. Cleanup backoff

A failed cleanup retries every tick with no backoff. Add an exponential backoff, capped at about 1 hour, recorded per generation.

4. Smaller items

  • The worktree "already gone" pattern is broad (uat-generation-deps.ts:47); tighten it to git's exact message.
  • Residue-sweep repo keys like ../uat-other could reach a sibling uat-* folder. Reject repo keys containing path separators or ...

Acceptance

Each item gets a test that fails when the fix is reverted.

Activity

  1. added
    substrate-improvement
    on Dec 4, 2026
  2. added
    merged
    verifying-on-main
    on Dec 4, 2026
  3. reopened this on Dec 4, 2026
  4. eltmon commented on Dec 4, 2026

    @eltmon
    OwnerAuthor

    Closed via close-out ceremony

    Definition of Done
    # Row Status Observed
    1 Review passed ✗ miss PR #6003 reviewDecision: none (accepted by conv-flywheel via --accept-review)
    2 Tests passed ✓ pass PR #6003 checks: all 24 check(s) green
    3 Verification green on the branch ✓ pass no verification artifact in the workspace; verification satisfied by green main CI after landing
    4 Merged to main ✓ pass Pull request #6003 merged at 2026-12-04T05:11:50Z; PR #6003 MERGED at 2026-12-04T05:11:50Z
    5 Post-merge lifecycle ran ✓ pass canonical state: verifying_on_main; no running work/planning agents
    6 Verified on main ✓ pass required checks concluded successfully on 2c4b905: test, lint, build (22), reject-planning-paths
    7 Version strings propagated – skip project declares no version_sync; ship step not applicable
    8 Deployed ✓ pass build commit 2c4b905 contains merge 2c4b905
    9 Close-out teardown verified ✓ pass workspace removed; feature branch kept (close_out.delete_feature_branch is off); No tmux sessions or Herdr panes found; No shadow state found; No legacy planning directory found; Stopped Docker containers; No orphaned processes found; No worker worktrees; Removed workspace directory after worktree removal failed; Pruned 2 agent directories (transcripts and state kept); No strike branch strike/pan-5995 found; Pruned 0 checkpoint ref(s) for agent-pan-5995, planning-pan-5995, strike-pan-5995; No specialist registry entries for PAN-5995

    Gate: passed — misses: review

  5. added
    closed-out
    and removed
    merged
    verifying-on-main
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-outsubstrate-improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions