Repository navigation
fix(ci): bound Telegram Mantis proof cleanup - #115253
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 11:30 AM ET / 15:30 UTC. ClawSweeper reviewWhat this changesThis PR makes the privileged Telegram Mantis cleanup wrapper enforce a 30-second process-group deadline and returns proof artifacts to the runner before manifest inspection and upload. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open for human merge review. The proposed timeout ownership and proof-directory handoff are narrowly scoped to the Telegram Mantis workflow, and the supplied focused tests plus CI checks support the patch, but the PR body provides only a pre-fix live failure and mock/test validation—not an after-fix real workflow run showing both bounded privileged cleanup and successful artifact upload. The Priority: P2 Review scores
Verification
How this fits togetherThe Telegram Mantis proof workflow runs a privileged container wrapper to create and tear down an isolated Telegram test environment, then inspects and uploads the captured proof. This PR changes the cleanup-to-artifact boundary so a hung teardown cannot indefinitely stall the workflow or leave upload artifacts unreadable. flowchart LR
A[Telegram proof workflow] --> B[Privileged cleanup wrapper]
B --> C[Timeout supervisor]
C --> D[Docker and network cleanup]
A --> E[Proof output directory]
E --> F[Runner ownership handoff]
F --> G[Manifest inspection and artifact upload]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +18, Config +9, Other +22. Total +49 across 3 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Run the Telegram Mantis workflow on the exact rebased head, intentionally exercise or capture the cleanup path, and attach redacted evidence that the timeout completes teardown and that manifest inspection plus artifact upload succeed. Do we have a high-confidence way to reproduce the issue? No high-confidence current-main reproduction was independently established in this review. The PR links a concrete prior workflow failure and adds focused coverage, but the available evidence does not show a fresh reproduction or after-fix live run on the current merge result. Is this the best way to solve the issue? Unclear. Moving the deadline to the privileged process-group owner and returning only the proof output after cleanup are the right apparent boundaries, but a real workflow run is still needed to confirm this is the best operational fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 58a3679c4923. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* test(mantis): bound Telegram proof cleanup * test(mantis): enforce cleanup deadline in wrapper * test(mantis): supervise cleanup through bash
What Problem This Solves
Fixes an issue where the Telegram Desktop Mantis workflow could hang during privileged SUT teardown and then fail to upload otherwise useful evidence when a root-owned session file remained in the proof directory. Run 30362895350 reproduced both failures: the stop wrapper ignored normal termination, and
actions/upload-artifactlater failed withEACCESonbaseline/session.json.Why This Change Was Made
The privileged wrapper now runs stop/destroy cleanup beneath its own 30-second
timeoutsupervisor. That supervisor owns the cleanup process group, so TERM/KILL escalation reaches Docker and network-cleanup descendants instead of killing only the unprivileged caller'ssudoprocess. Internal cleanup entry points reject direct execution outside that supervisor, and Bash re-executes the tracked wrapper regardless of its checkout file mode.After credential release and root-owned attestation validation finish, the workflow returns only the proof output directory to the runner before manifest inspection and upload. Immutable worktrees and SUT attestations remain root-owned.
User Impact
No product behavior changes. Maintainers get bounded Telegram proof cleanup and readable evidence artifacts even when a capture attempt fails, making live-proof failures diagnosable instead of losing the manifest to a second upload error.
Evidence
EACCESwhile zippingbaseline/session.json.node scripts/run-vitest.mjs test/scripts/telegram-user-crabbox-proof.test.ts test/scripts/mantis-telegram-desktop-proof-workflow.test.ts— 65 tests passed.bash -n,shellcheck,actionlint,node scripts/check-workflows.mjs, andgit diff --checkpassed.b8aacf2f488: clean, no accepted/actionable findings, 0.96 confidence. Earlier reviews correctly moved the deadline from the caller to the privileged owner and required Bash re-execution for the tracked non-executable script.AI-assisted: yes. I reviewed the privileged process-group cleanup, credential-release ordering, attestation boundary, artifact ownership, tests, workflow checks, and final autoreview.