Skip to content

fix(ci): skip the capture's model run when the change touches no feature - #16295

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/16184-capture-skip-unmatched
Nov 15, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
fix/16184-capture-skip-unmatched

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Closes #16184

Summary

pr-verify-capture.yml started its key proxy, sandbox and model session before it knew whether the change touched any feature. In the issue's sample, 13 of 21 runs then ended not-applicable. The job now decides that first, from the changed path names, and a change that touches no feature starts no model session.

Fix

  • A match step runs after the agree step and before the credit gate. It reads the changed paths from the compare API (base...head, old and new names of a rename), commits them as empty files into a scratch repository, and runs main's affected_features.py with main's control skill, the script and hub the capture session itself uses.
  • With no feature matched it writes run-e2e's not-applicable summary and sets applicable=false. The credit read, the key call and the model resolution skip on that output, so every proxy, sandbox, probe and capture step behind them skips too, and the summary uploads as the capture artifact.
  • Nothing of the pull request is fetched or checked out before the reach probe; only path names reach the scratch repository. The existing test that forbids a fetch or any head reference before the head checkout still passes unchanged.
  • The step fails open: a failed read or script, a compare at the API's 300-file limit, a path that is also another path's folder, or an app with no project control skill on main leaves the output unset, and the capture session decides as before.
  • The match step makes plugins/app-control/scripts/affected_features.py a script a hold path runs, so plugins/app-control/scripts/** joins CARRY_REFUSES in both merge-hold lists: a push that touches it no longer carries an earlier approval to the new head. This is the rule test_merge_holds_sync.py enforces, which failed on this PR's first head.
  • docs/conventions/pr-pipeline/README.md describes the match step, and no longer names a capture-subscription job the workflow does not have.

Verification

  • node --test --test-concurrency=4 .github/scripts/pr-verify/workflow.test.mjs: 82 passed, 0 failed. Two new tests: one checks the step's place, conditions and what skips on applicable=false; the other runs the step's script against a stub gh for a change that matches no feature (summary written, applicable=false), one that matches (by new name, by the old name of a rename, and beside a path holding a newline: applicable=true, no summary), and each fail-open case.
  • For one open pull request, the compare API's file list equals the file list git diff base...head gave affected_features.py (6 files, same names), so the step and the session match on the same input.
  • test_merge_holds_sync.py: 21 passed, including the test that failed in CI; merge-holds.test.mjs: 72 of 72.
  • actionlint on the workflow reports only the cache-mode key it does not know, which main already has.
  • Left out: a live run. workflow_run runs this file from main, so the first run of the new step happens after merge; the first not-applicable run's key proxy notice is the check on the issue's first done-when item.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_015te8Csz4bqxpok4iu8Mcrd

kyle-sexton and others added 2 commits November 15, 2026 00:01
pr-verify-capture started its key proxy, sandbox and model session
before learning whether any feature matched; 13 of 21 sampled runs then
ended not-applicable.

A match step after the agree step now runs main's affected_features.py
over the changed path names the compare API lists, committed as empty
files into a scratch repository, so nothing of the pull request is
fetched before the reach probe. With no feature matched it writes
run-e2e's not-applicable summary, and the credit read, the key call and
every step behind them skip. A failed read or script, a compare at the
300-file limit, or a path that is also a folder leaves the decision to
the capture session.

The pipeline convention also said pr-verify-capture has a
capture-subscription job; it has one job.

Closes #16184

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_015te8Csz4bqxpok4iu8Mcrd
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 15, 2026 05:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T05:06:45.796374Z 3cd347a Draft marked ready
ℹ️ 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 Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed c271ce8287084caf123cc6d61e433ab88851ff9e: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #16295 (incremental, head c271ce8)

No security issues found in the change since 3cd347a. Because this lane already reviewed an earlier head, this was a blocking-only review: it reports CRITICAL and IMPORTANT findings only.

critical-findings: 0

What I checked

I read all three files in the incremental diff in full. Two of them match trusted paths (.github/scripts/pr-merge/merge-holds.mjs and plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py), so I checked them as a merge-hold control change.

  • merge-holds.mjs CARRY_REFUSES (L1077): adds one entry, plugins/app-control/scripts/**, and changes nothing else in the list. This list names the paths that stop an earlier approval from carrying to a new head. Adding an entry means fewer pushes can carry an approval, so the hold gets stricter, not weaker. Nothing new gets through.
  • babysit_merge_policy.py CARRY_REFUSES (L4099): adds the same entry, so the Python list still matches the JS list, as the sync test requires. This also makes the hold stricter.
  • Changelog fragment: text only. It deletes no instruction text and has no security surface.

The change is what the PR description says: affected_features.py is now a script a hold path runs, so it joins both refuse lists. No trusted-actor list, kill switch, token broker, plugin manifest or instruction-surface file changed in this increment.

The earlier summary comment from this lane (issuecomment-6889559756) reported 0 findings, so there is nothing to restate.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed c271ce8287084caf123cc6d61e433ab88851ff9e: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #16295, incremental since 3cd347a5

No findings. I read every hunk of all 3 files in the incremental diff. I posted blocking findings only, because this lane already reviewed an earlier head of this pull request.

What I checked

  • plugins/app-control/scripts/** added to both carry lists:
    • It is the last entry in CARRY_REFUSES in merge-holds.mjs and in the Python list in babysit_merge_policy.py.
    • The two lists still match, which is the sync rule test_merge_holds_sync.py enforces.
    • A search for the previous last entry (plugins/instruction-placement/scripts/**) finds only these two lists, so no third copy needs the new entry.
  • Why the entry is needed: in the earlier head, the new match step in pr-verify-capture.yml runs plugins/app-control/scripts/affected_features.py. That makes the directory a script a hold path runs. Adding it to the list narrows when an approval carries forward to a new head; it does not widen it.
  • Changelog fragment: bump: patch under source-control fits a list addition. Its wording follows the earlier instruction-placement entry in plugins/source-control/CHANGELOG.md.

The PR says test_merge_holds_sync.py (21 passed) and merge-holds.test.mjs (72 of 72) pass. That is the author's claim; I did not run the tests.

Verifier dropped 0 of 0 candidates.

pr-verify-capture.yml's new match step runs
plugins/app-control/scripts/affected_features.py, so
test_merge_holds_sync.py requires that directory in CARRY_REFUSES. Add it
to both copies of the list (babysit_merge_policy.py and merge-holds.mjs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015te8Csz4bqxpok4iu8Mcrd
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 2ed9f08 Nov 15, 2026
67 checks passed
@kyle-sexton
kyle-sexton deleted the fix/16184-capture-skip-unmatched branch November 15, 2026 06:11
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip the capture's model run when no feature matches the pull request's changed files

1 participant