Repository navigation
fix(qa-lab): release Mantis credentials when cleanup fails - #128315
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 2:07 PM ET / 18:07 UTC. ClawSweeper reviewWhat this changesThe PR centralizes Mantis Crabbox artifact copying and restructures Slack and Telegram proof-run cleanup so credential leases and related resources release even after setup or artifact failures. Merge readiness✅ Ready for maintainer review Keep open. This protected maintainer PR repairs a current-main cleanup ordering defect; source and focused regression coverage support the patch, with no blocking finding identified. Priority: P2 Review scores
Verification
How this fits togetherMantis runs QA proof flows in leased Crabbox desktops, optionally obtains short-lived Slack or Telegram credentials, then copies artifacts and emits a report. The changed cleanup path releases the desktop lease, heartbeat, and credential lease after that flow exits. flowchart LR
A[Proof command] --> B[Lease desktop and credentials]
B --> C[Run Slack or Telegram proof]
C --> D[Copy proof artifacts]
D --> E[Write report]
E --> F[Stop heartbeat and release credentials]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -41, Tests +35. Total -6 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the shared artifact-copy helper and nested cleanup finalizers after exact-head CI completes, while retaining the browser flow’s intentional failed-VM diagnostic behavior. Do we have a high-confidence way to reproduce the issue? Yes—current main’s sequential finalizer order source-proves that a report-write or Crabbox-stop failure skips later credential release; the new focused tests model both failures. Is this the best way to solve the issue? Yes—the patch repairs the lifecycle owner with nested finalizers, rather than compensating at a caller, and consolidates duplicated artifact-copy behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 663a9d2f156c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where failed Mantis desktop proof runs could skip cleanup after setup or builder failures, leaving leased credentials, heartbeat work, or temporary browser resources active.
Why This Change Was Made
The lifecycle now gives cleanup and release work one canonical
finallyowner across Slack, Telegram, browser, and Crabbox proof paths. Failed-created browser VMs remain retained for diagnosis, while the existing copy exclusions, SSH behavior, and no-delete guarantees stay unchanged.AI-assisted maintainer fix. I reviewed the final code, proof, and exact landing diff.
User Impact
Operators can rerun failed Mantis proofs without leaking credentials or background cleanup state. Successful proof behavior and retained diagnostic resources are unchanged.
Evidence
+93/-134(net-41); tests:+266/-231(net+35); total net-6across exactly seven Mantis files.b977ccb21e2b4b8bff05729548ea1b1558a74a33; exact head:4007fd0c7d913cfb2a27f8f37b77ec730007671a.a7c15caa2c0f1a209f0352fbc407fabb50454076e501b0254d3d2b71b059538f.