Repository navigation
feat(qa): trigger Mantis proof from pull requests - #126658
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
There was nothing visible to test in this PR at all. |
|
Codex review: found issues before merge. Reviewed August 20, 2026, 9:39 AM ET / 13:39 UTC. ClawSweeper reviewWhat this changesAdds trusted PR-label and maintainer-comment triggers for Mantis Telegram Desktop proof, including a Codex preflight that skips desktop setup for non-visible changes. Merge readinessKeep open: the no-visible-result path can be blocked by any earlier commenter copying its public marker, so it may fail instead of posting Mantis’s outcome. The new secret-bearing preflight also needs the mandated direct upstream contract audit before merge. Priority: P2 Review scores
Verification
How this fits togetherMantis is OpenClaw’s QA automation for proving Telegram-visible PR behavior. A PR label or authorized comment enters a dispatcher, which invokes the proof workflow; that workflow either runs Telegram Desktop proof or posts a no-visible-change result. flowchart LR
A[PR label or maintainer comment] --> B[Unprivileged dispatcher]
B --> C[Permission and PR checks]
C --> D[Proof workflow]
D --> E[Codex visibility preflight]
E -->|visible or uncertain| F[Telegram Desktop proof]
E -->|non-visible| G[Mantis result comment]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The preflight’s secret-to-Codex boundary is directly relevant but could not be independently audited because the required upstream sources were unavailable. PR surfaceTests +79, Docs +35, Config +244. Total +358 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Only update a comment verified as Mantis-owned, fall back to a new comment on update failure, and add coverage for a forged earlier marker before completing the direct pinned-action and Codex sandbox audit. Do we have a high-confidence way to reproduce the issue? Yes for the review finding: place the public marker in a contributor comment before Mantis’s comment, then invoke the no-visible path; source shows it selects that comment and attempts an unauthorized update. Is this the best way to solve the issue? No: the new inline upsert omits the existing publisher’s failed-update fallback and does not establish comment ownership before selecting a target. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e71fc9420c87. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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
History |
|
QA/Mantis owner approval: I approve exact head |
Add trusted ClawSweeper-label and maintainer-comment dispatch for Mantis Telegram proof. Short-circuit non-visible PRs before desktop setup while preserving exact-head, fork, credential, and comment-ownership boundaries.
What Problem This Solves
Mantis Telegram Desktop proof could only be started from Actions. The ClawSweeper proof label did not trigger it, maintainers could not invoke it from a PR comment, and clearly non-visible PRs still paid minutes of desktop setup.
Why This Change Was Made
Accept the existing ClawSweeper label and an explicit maintainer comment (
@openclaw-mantis telegram desktop proof). Manual requests get a cheap, read-only Codex diff classification before desktop setup; uncertain or failed classification continues to the full free-form Mantis agent, while a definite non-visible diff upserts the canonical Mantis comment and stops.An unprivileged dispatcher owns label/comment admission and starts the existing secret-bearing workflow through
workflow_dispatch. Forks remain explicit-maintainer-only. ClawSweeper labels automatically run only same-repository PR heads.User Impact
Maintainers can invoke native Telegram proof from a PR. ClawSweeper-selected internal PRs start automatically. Non-visible manual requests report
There was nothing visible to test in this PR at all.without provisioning the desktop lane.Authorization
The QA/Mantis owner confirms that the final exact-head dispatcher at
24457f0may invoke the secret-bearing proof workflow for write/maintain/admin PR comments and same-repository labels applied byclawsweeper[bot]. Automatic fork-label execution remains disabled; forks require an explicit maintainer comment and exact-head approval.Evidence
Focused workflow regression: 27/27 passed.
pnpm tsgopassed.pnpm check:test-typespassed.actionlint and zizmor passed for the changed workflow.
Codex autoreview: patch correct, no accepted/actionable findings.
Measured prior successful Mantis run: 3m31s elapsed before the full Codex agent started; the new preflight runs before that setup.
Live exact-head result path: run 32380394846 passed at
24457f0in 1m11s; the pinned Codex0.148.0preflight selected the no-visible path, Mantis updated its own marker comment, and both desktop jobs skipped. No desktop, Docker, credential, or artifact setup ran.Spoof regression: run 32372054376 manually claimed
request_source=clawsweeper_label; trusted provenance rejected the claim and still ran preflight.Final-head real-user Telegram sanity: dedicated QA user sent
Please answer with OPENCLAW_E2E_OK only.in a DM; one SUT reply arrived withOPENCLAW_E2E_OK, two typing events, and one correlated Responses request.Label/comment ingress cannot execute this unmerged dispatcher revision: GitHub runs both
issue_commentandpull_request_targetfrom the default branch (event contract). Exact-head workflow dispatch proves the resolver, preflight, skip gate, Mantis App permission, and comment path. Focused tests cover label authorization, maintainer-comment authorization, unavailable/deleted fork metadata, and fork-label refusal.Credential boundary, checked directly at the pinned sources:
codex-action@52fe01egives the upstream key only to the proxy-start step, streams it over stdin while removingPROXY_API_KEYfrom the proxy environment, then drops and verifies sudo before the Codex step (action.yml lines 205-228, 303-368). The Codex child inherits only that later step's environment (runCodexExec.ts lines 175-197), which contains no upstream key. Codex0.148.0maps read-only to no writable roots and no tool network (protocol.rs lines 1129-1134). Untrusted PR text therefore reaches a keyless Codex child; only the isolated proxy owns the authorized upstream call.Exact-head ClawSweeper local review at
24457f0: passed; patch correct, zero findings, security cleared, no maintainer decision, zero Rank-up moves.Exact-head CI: green. The first attempt lost its shared Blacksmith runner across multiple jobs at the same ten-minute mark; failed-only attempt 2 completed successfully with no code change.
Codex dependency contract personally checked against sibling
openai/codex:codex-rs/exec/src/cli.rs,event_processor.rs, and both human/JSONL processors confirm--output-schemaplus--output-last-message; pinnedopenai/codex-actionsource confirms those inputs feed the action'sfinal-messageoutput.