Repository navigation
fix: retain runner cleanup ownership after registration cancellation - #3045
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR retains a verified runner cleanup receipt after cancellation while leaving the listener stopped and returning cancellation. Example: Registration creates runner 43 for repos/example-org/my-app, then the caller cancels during verification.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: current main can lose cleanup ownership after registration cancellation, and this focused fix preserves the existing ownership checks without an actionable introduced defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Go Actions CLI coordinates guest configuration over SSH, verifies the exact GitHub runner, and persists its identity in the locked local lease claim before listener activation. flowchart TD
A[Actions register] --> B[Locked lease claim]
B --> C[Guest configuration over SSH]
C --> D[Bounded identity settlement]
D --> E[GitHub runner verification]
E --> F[Durable cleanup receipt]
F --> G[Caller context listener activation]
F --> H[Exact runner unregister]
Technical reviewBest possible solution: Keep cancellation settlement in the existing locked registration owner, persist only the verified identity, and preserve caller-controlled listener activation. Do we have a high-confidence way to reproduce the issue? Current-main source shows recovery and GitHub verification using the canceled caller context before receipt persistence; the PR reports base-failing lifecycle cases, but no reproduction was executed during this read-only review. Is this the best way to solve the issue? The patch directly repairs lifecycle settlement using the existing lock, verifier, receipt, and rollback path, with no parallel owner or configuration expansion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2145d3457073. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 8:18 AM ET / 13:18 UTC. |
Reconciles the split-lock registration with the cancellation custody of openclaw#3045 and the portable cleanup receipt of openclaw#3046. After the unlocked guest install, the identity read, GitHub check and claim recheck run on a cancellation-independent budget. If the lease still owns the reservation, the runner receipt and any portable receipt are recorded even when the operation was canceled, and the listener starts only when it was not; `actions unregister` can then clean up, as on main. If the lease changed hands or started retiring during the install, the exact configured runner is deleted instead of recorded. The reuse path also writes the portable receipt before starting the listener. Hydration keeps a cause-carrying registration error intact so its cleanup detail is not replaced by the bare cancellation cause.
What Problem This Solves
Canceling Actions runner registration after the guest has configured itself can leave an offline GitHub runner without its matching local cleanup receipt.
User Impact
Crabbox retains the verified runner identity for
actions unregister, leaves its listener stopped, and returns cancellation to the caller.Why This Change Was Made
Recover the guest identity and verify the exact GitHub object with a bounded 30-second settlement context under the existing claim lock. Listener startup still uses the caller context. Existing exact-ID rollback remains in place if receipt persistence fails.
The change uses the existing receipt and cleanup owners; it adds no flags, credentials, storage schema, or provider policy.
Evidence
TestGitHubActionsRunner*andTestValidateActionsRunner*).go vet ./internal/cli, command documentation checks, internal documentation links, formatting, andgit diff --checkpass.This is local CLI/transport-fixture proof; live organization registration remains a separate migration qualification.