Skip to content

fix(pr-pipeline): name why an issue run never started in report-outcome - #10301

Merged
kyle-sexton merged 6 commits into
mainfrom
fix/report-outcome-real-reason
Oct 27, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix/report-outcome-real-reason

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

No related issue: report-outcome gave no reason for an issue run that never started; run 40208736808, on #6377, showed it.

Summary

Run 40208736808 failed at the write-issue step with "the issue title or body changed after agent-ready was added". Its lane.json was then never published. Because the sealer copy was skipped after that failure, cp -R $SEAL_DIR failed and the scan job refused the payload as payload-mismatch. report-outcome could only say "no readable outcome file", so a person got a stop with no reason.

Fix

  • write-issue sets refused=edited when the body changed after agent-ready.
  • The collect step writes lane.json class issue-edited for that refusal, and issue-file for any other write-issue failure.
  • The step that copies the base sealer and patch collector now runs always() && go, before the head checkout, so an earlier failure no longer breaks the payload. No scan-job rule is loosened.
  • readIssueStop names the reason when a run leaves no outcome file.

Verification

  • node --test .github/scripts/work-resolve-issue: 296 pass, 0 fail.
  • .github/actions/resolve-config/callers.test.mjs: 184 pass, 0 fail.
  • report-check-run: 35 pass. pr-verify workflow: 15 pass. actionlint clean.
  • Disabling the new decide branch turns 2 tests red.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits October 25, 2026 16:32
When write-issue refused because the issue's title or body changed after
agent-ready was added, no model ran and report-outcome said only that the
run wrote no readable outcome file (run 40208736808, issue #6377).
write-issue now sets refused=edited for that case, the collect step records
lane.json class issue-edited (issue-file for any other write-issue failure),
and report-outcome's hand-back names the reason when the run left no
outcome of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…al-reason

# Conflicts:
#	.github/workflows/pr-run-activity-read.yml
…ane class

Main added act-fallback as the last launcher leg, and the merge extends the
collect step's LANE_CLASS with it; the test now supplies that output and
checks a class from the fallback leg is carried.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T15:50:21.840159Z ba8c395 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 453bc3a24769e51247fb98fc0511cf066e7dd1f6: 0 finding(s), 0 as inline comments.

No security issues found. I read the whole diff (8 files) and the surrounding workflow and script code. The pull request context was read as data, and it contains no embedded directives.

critical-findings: 0

Trusted-path files in this change: report-outcome.mjs (work-resolve-issue) and pr-run-activity-read.yml's run job. The hold modules (merge-holds, enable-auto-merge, superseded, clear-escalations) were not changed. I found no weakening of any merge hold, and I did not edit or run anything.

  • always() on the sealer-copy step (.github/workflows/pr-run-activity-read.yml:1139): the PR description asks the lane to check this.
    • The step still copies only from .base/, the trusted base copy. It sits before Check out the PR head, so no head code can have run or altered .base when it executes.
    • The only new path is a failure or cancellation in a step before it. The steps after a failed step that don't use always() stay skipped, so the head checkout and the act steps still don't run on that path.
    • The seal step still uses ./.lane-seal, which is populated from the base copy. No scan-job rule is loosened.
  • LANE_CLASS / steps.write-issue.outputs.refused (pr-run-activity-read.yml:1879): the new values come from the step's own outcome and a fixed refused=edited output. Head code cannot write them, because write-issue runs before the isolation and head-checkout steps. Both go through jq --arg, so there is no injection into lane.json.
  • write-issue.mjs: refused is a fixed literal. It is written through the existing writeOutputs, which uses a random heredoc delimiter, so a crafted issue title or body cannot reach GITHUB_OUTPUT. Importing check-kill-switch.mjs has no side effect, because its main() runs only when it is the entry script. The kill-switch logic is untouched.
  • report-outcome.mjs readIssueStop / decide:
    • Forged record: the lane.json record is forgeable by code the run executed, as the file already says of its other records. Here the impact is limited. It only replaces the reason text of an already-unreadable outcome with one of two fixed strings, and it never reaches the patch-protected-path check at line 839.
    • Precedence: decide applies it only when outcome.unread, so a real outcome is never overridden. main skips it when a scan refusal exists (main sets issueStop = null when refusal is set).
    • Hand-back path: the action stays a hand-back with needs-human, so the human-gated label is still applied.
  • No plugin manifests are changed, so there are no manifest <field> lines.

Spend: none. The change adds no billable resource and no extra model runs.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 453bc3a24769e51247fb98fc0511cf066e7dd1f6: 0 finding(s), 0 as inline comments.

No findings. I read the full diff and the PR context, and checked the changed workflow steps and report-outcome code against the files at the head commit. I ran no tests, so the PR's own pass counts and the "disabling the new decide branch turns 2 tests red" claim are author-claimed and unverified.

What I checked

  • write-issue to lane.json to report-outcome path.
    • write-issue.mjs writes refused=edited to GITHUB_OUTPUT only for the edited-after-label refusal. The default write guards on env.GITHUB_OUTPUT.
    • check-kill-switch.mjs runs its main only behind an import.meta.url check, so importing writeOutputs has no side effects.
    • The Write the issue for the skill step now has id: write-issue, which the collect step's LANE_CLASS reads.
  • Collect step still runs after a write-issue failure. Its if starts with always(). The steps it tests, key-present and token-present, are skipped after the failure, so their outputs are empty and != 'false' holds.
  • LANE_CLASS precedence. The expression gives issue-edited, then issue-file, then the launcher classes. A skipped write-issue step has outcome skipped, so non-issue runs fall through unchanged. The act legs are skipped after a write-issue failure, so a launcher class never competes with the new classes.
  • always() on the sealer copy.
    • Only that one step was widened. It copies only from .base, and no head code has run when write-issue fails.
    • The carry step already had always() && go, and the checkout and isolate steps stay skipped after the failure. That matches the PR's statement that no scan-job rule is loosened.
  • Trust of the new record.
    • decide applies issueStop only when outcome.unread, so a run that wrote an outcome keeps its own reason (covered by the "never replaces an outcome the run reported" test).
    • main drops issueStop when a scan refusal marker exists, because a refusal means a model ran (also tested).
    • The record is built from step outputs, not from a file the model could write.
  • Tests, docs, changelog. The callers test covers the class expression, the step order and the always() guard, and decodes a sealed lane.json with class issue-edited. The write-issue test covers the positive case and the unlisted-restarter case that must not set the output. The fragment is bump: patch, which fits a bug fix. pr-run-activity.md describes the new classes.

Not a finding: this change does not spend anything beyond existing lane runs, and I set no hold.

Closing issues: none. The PR body says "No related issue", so there are no acceptance criteria to check.

Manifests: no plugin.json or marketplace.json is touched, so there are no manifest lines.

Security: this change touches report-outcome.mjs, a trusted path. I found no security issue in it.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 26, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped on this pull request and needs a person: the merge stages a change under .github/workflows/, which the lane does not push.

  • Reason: workflow-staged
  • Resume key: ba8c395b43dc3692cd0f66f8fe999c22b6fe34de (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=10301 and activity=resolve-conflicts:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=10301 -f activity=resolve-conflicts

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane escalated this pull request as workflow-staged, and that no longer holds at 453bc3a24769e51247fb98fc0511cf066e7dd1f6: main changes nothing under .github/workflows/ since its merge base with 453bc3a. pr-merge removed needs-human, so the lanes run on it again. To keep a person on it, add needs-human back: a label a person adds is never removed.

@melodic-automation-lanes melodic-automation-lanes Bot removed the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 27, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 67a8552 Oct 27, 2026
58 of 59 checks passed
@kyle-sexton
kyle-sexton deleted the fix/report-outcome-real-reason branch October 27, 2026 16:36
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 1, timeout 0, no coverage 0, invalid 0, not run 7.
Covered-code score 0%; mutation score 0%.

File Killed Survived Timeout No coverage Invalid Not run
.github/scripts/work-resolve-issue/report-outcome.mjs 0 0 0 0 0 4
.github/scripts/work-resolve-issue/write-issue.mjs 0 1 0 0 0 3

Surviving mutants

Location Operator Disposition Cause
.github/scripts/work-resolve-issue/write-issue.mjs:157 LCR productive input-gap

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant