Repository navigation
fix(mantis): publish proof comments on auto-triggered runs - #127787
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
obviyus
marked this pull request as ready for review
August 22, 2026 05:34
Collaborator
Author
Pre-land review disposition (head 679e153)Local ClawSweeper (gpt-5.6-terra, high reasoning) on head
Additional pre-merge proof beyond the PR body:
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 23, 2026
…127787) ## What Problem This Solves Auto-triggered Mantis proof runs (label/`clawsweeper_label` and other non-comment request sources) end with no PR comment at all. The durable evidence publisher runs with `--create-missing false` and only edits an existing marker comment, but the inline status comment carrying that marker was only created when `request_source == 'issue_comment'`. Label-triggered runs therefore published nothing and logged the misleading "Skipped stale Mantis QA evidence comment because its status is no longer active" — observed on PR openclaw#127735. This is the silent-failure class: a Mantis run completes and the PR shows no visible outcome. ## Why This Change Was Made - `.github/workflows/mantis-telegram-desktop-proof.yml`: the status ack comment (👀 + active-job link + run-scoped marker) is now created for every request source that resolves to a PR (`pr_number != ''`), not only `issue_comment`. The 👀 *reaction* stays `issue_comment`-only (it lives in `mantis-resolve-request.yml`, untouched — there is no triggering comment to react to on label runs). - The start-failure fallback comment and the existing-artifact republish path now use the same run-scoped marker `<!-- mantis-telegram-desktop-proof:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT} -->` as the status comment and the main publisher, so every publisher edits the single run-owned comment (ack → progress → final proof; no comment spam). The republish path gets an explicit `--create-missing false` to match. The design invariant that makes `false` safe: the fallback status-comment step is not `continue-on-error`, so a run in which no marker comment could be created fails `resolve_request` and never reaches publish. - `scripts/mantis/publish-pr-evidence.mjs`: the two skip cases now log honestly — "no existing comment found" vs "could not update existing comment" — instead of one misleading stale-status message. ## User Impact Operators triggering Mantis via labels (ClawSweeper flows) now get the same single evolving PR comment as comment-triggered runs: an immediate 👀 ack with the running job link, edited in place into the final proof evidence. No more runs that finish invisibly. ## Evidence - Focused suite: `node scripts/run-vitest.mjs test/scripts/mantis-telegram-desktop-proof-workflow.test.ts` — 28/28, including new assertions that the status/failure comment gates use `pr_number != ''` (and not `request_source`) and that both publishers pass the run-scoped marker with `--create-missing false`. - `node scripts/check-changed.mjs -- <touched files>` green; `git diff --check` clean. - Marker alignment verified across all five sites in the workflow (status comment, prior-attempt cleanup regex, fallback comment, failure report, both publisher invocations): all use `mantis-telegram-desktop-proof:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}`. - Live-run proof of the label-triggered path requires a merged workflow (GitHub runs the workflow from the default branch for these triggers), so the first post-merge label-triggered Mantis run is the live verification; stated here as the known evidence gap. Production LOC delta: −4 (workflow/tooling); tests +13.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Auto-triggered Mantis proof runs (label/
clawsweeper_labeland other non-comment request sources) end with no PR comment at all. The durable evidence publisher runs with--create-missing falseand only edits an existing marker comment, but the inline status comment carrying that marker was only created whenrequest_source == 'issue_comment'. Label-triggered runs therefore published nothing and logged the misleading "Skipped stale Mantis QA evidence comment because its status is no longer active" — observed on PR #127735. This is the silent-failure class: a Mantis run completes and the PR shows no visible outcome.Why This Change Was Made
.github/workflows/mantis-telegram-desktop-proof.yml: the status ack comment (👀 + active-job link + run-scoped marker) is now created for every request source that resolves to a PR (pr_number != ''), not onlyissue_comment. The 👀 reaction staysissue_comment-only (it lives inmantis-resolve-request.yml, untouched — there is no triggering comment to react to on label runs).<!-- mantis-telegram-desktop-proof:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT} -->as the status comment and the main publisher, so every publisher edits the single run-owned comment (ack → progress → final proof; no comment spam). The republish path gets an explicit--create-missing falseto match. The design invariant that makesfalsesafe: the fallback status-comment step is notcontinue-on-error, so a run in which no marker comment could be created failsresolve_requestand never reaches publish.scripts/mantis/publish-pr-evidence.mjs: the two skip cases now log honestly — "no existing comment found" vs "could not update existing comment" — instead of one misleading stale-status message.User Impact
Operators triggering Mantis via labels (ClawSweeper flows) now get the same single evolving PR comment as comment-triggered runs: an immediate 👀 ack with the running job link, edited in place into the final proof evidence. No more runs that finish invisibly.
Evidence
node scripts/run-vitest.mjs test/scripts/mantis-telegram-desktop-proof-workflow.test.ts— 28/28, including new assertions that the status/failure comment gates usepr_number != ''(and notrequest_source) and that both publishers pass the run-scoped marker with--create-missing false.node scripts/check-changed.mjs -- <touched files>green;git diff --checkclean.mantis-telegram-desktop-proof:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}.Production LOC delta: −4 (workflow/tooling); tests +13.