Skip to content

fix(source-control): keep the PR monitor's check baseline when a check read fails - #8150

Merged
kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-7986-39105976324-1
Oct 18, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-7986-39105976324-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Refs: #7986

Hold: a human merges this

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The PR monitor poll now tracks whether its check read succeeded. A poll whose check read fails (any of the three calls) leaves the baseline unchanged and emits no check lines, and the baseline-only poll is the first one whose read succeeds. The poll contract in the monitor guidance says so.

Not verified

  • Did not run the new test against the pre-change script to confirm it fails there; the failed-first-read case is constructed to fail on the old logic but was not run against it.
  • monitor-poll.test.sh is mode 644, unlike sibling tests at 755; the available tools cannot chmod. It runs through run-test-file. Run chmod +x if a runner executes it directly.
  • check-skill was not run on the pull-request skill: only reference files changed, and the wrapper rejected the skill path I passed.
  • The issue says 'run with scripts/run-test-file.sh' and 'scripts/check-changelog-fragments.sh'; I ran the lane's wrapper equivalents. The changelog fragment was written by hand because the helper refuses a detached HEAD.

Fix

  • plugins/source-control/reference/providers/github/pull-request/monitor.md: poll script reads checks with per-call status, adds a baselined flag, and records or emits only on a successful read
  • plugins/source-control/skills/pull-request/reference/monitor.md: poll contract says the baseline is recorded on the first successful check read
  • plugins/source-control/scripts/monitor-poll.test.sh: new test that extracts the poll script from the doc and runs it against a stub gh
  • .changes/source-control/fix-monitor-check-baseline-on-failed-read-3b7e91c4.md: patch changelog fragment

Verification

The run reports:

Left out: the items under Not verified.

Related

#7986

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

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

Incremental security review of PR 8150 (a78eff1 → 494840c): no security issues found.

The only change in plugins/source-control/scripts/monitor-poll.test.sh is a file-mode change from 100644 to 100755 (the commit "mark shebang scripts executable"). The file content is identical, and nothing in the diff touches code, trust boundaries, tokens, or any instruction surface. Making a test script executable adds no exploitable path.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 494840c023fe209a811ca157c7cd71288fd8698b: 0 finding(s), 0 as inline comments.

Incremental review of plugins/source-control/scripts/monitor-poll.test.sh (a78eff1 → 494840c): no findings.

I ran git diff a78eff1 494840c. The only change is a file mode change, 100644 → 100755, with 0 insertions and 0 deletions. That resolves the PR's own "Not verified" note that the test was mode 644 while its sibling tests are 755. The file starts with #!/usr/bin/env bash, so making it executable is appropriate.

I did not re-review the other files in the PR, which are unchanged since a78eff1.

lint-repo's exec-bit gate refused these scripts at mode 100644.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 3085b95 Oct 18, 2026
25 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-7986-39105976324-1 branch October 18, 2026 16:56
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