Skip to content

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

Description

@kyle-sexton

What is wrong

pr-verify-capture.yml starts its model session before it knows whether any feature matches. In a sample of 21 runs that ran longer than 2 minutes (run ids 43542263411 to 43547727081, 2026-11-13 and 2026-11-14), 13 ended capture.status: not-applicable with the reason control skill present, N files unmatched (read from each run's pr-capture-* artifact, e2e-summary.json). Those runs still used about 650,000 to 850,000 tokens through the key proxy and reported 0.49 to 0.59 USD each (the key proxy loopback and pr-verify-capture completed notices in each run's log), for example run 43547634726: 696,893 tokens, not-applicable, 4 files unmatched.

The match is deterministic: plugins/app-control/scripts/affected_features.py decides it from the changed paths and the control skill's sources: globs, with no model.

Suggested fix

Run affected_features.py in a step before the model session. When it returns no feature, write the not-applicable summary from the workflow and skip the session and the proxy.

Done when

  • A pull request whose changed files match no feature produces the not-applicable summary with no model request (the key proxy loopback notice shows 0 tokens, or the proxy is not started).
  • A pull request that matches a feature is driven as before.
  • A test covers both paths.

Also seen in the same sample (not this item)

Of the other 8 runs, 5 ended blocked and the 3 that ran drove one entry point each; several entry points report Credit balance too low from the driven session. Reported to the owner separately.

Activity

  1. added
    needs-triage
    on Nov 14, 2026
  2. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: pr-verify-capture.yml starts its model session before checking whether any feature matches the changed files. About 13 of 21 sampled runs ended not-applicable while spending roughly 650k–850k tokens each. The proposal is to run affected_features.py first, write the not-applicable summary from the workflow when nothing matches, and skip the session and proxy. Matching PRs are driven as before, and a test covers both paths.

    The issue is exact enough to start. Nothing is missing.

    Related, but not a duplicate: #16116 changes which files the capture's sources: patterns match. I found no merged pull request that already fixes this.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 14, 2026
  4. melodic-automation-lanes commented on Nov 14, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"202761962b8bf15cceefba7737161de51dcd4a69f6fb16922e72b34fb24caf22","body_sha256":"265f9e65e2f87b69a48a03800c6436f8c8f9b40fa16eeb9ad072b6b75ae4b28a"}

  5. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor
    No description provided.
  6. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor
    No description provided.
  7. added
    host-run
    on Nov 14, 2026
  8. melodic-automation-lanes commented on Nov 14, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (patch-protected-path): the change needs a path the issue lane may not push, which a maintainer session builds by hand.
    It added host-run and set Work status to confirmed: an agent run on a host builds it, and it waits on no decision from a person.

    In the run's words:

    The run stopped early (patch-protected-path): its change needs a path the issue lane may not push, which a person changes instead. In the run's words: patch-protected-path: .github/workflows/pr-verify-capture.yml. The fix needs a new step that runs affected_features.py before the model session, plus if: conditions on 'Start the key proxy' and 'Capture the change' (line 1165) so both skip when no feature matches. Those steps and their conditions live only in this workflow file, and this lane cannot push changes under /.github/workflows/**.

    What the run says it did not do:

    • The workflow change, and the test the issue asks for, were not made: the target file is under the protected path /.github/workflows/**

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43616035966

    To hand it back to the lane, remove host-run and set Work status to agent-ready again.

  9. removed
    host-run
    on Nov 15, 2026
  10. kyle-sexton commented on Nov 15, 2026

    @kyle-sexton
    MemberAuthor

    Live check of the first done-when item, after #16295 merged.

    Capture run 43687467428, for a pull request whose changed files match no feature (#16308, head ed0808044ee0d70897cdb97035dc0811378fd53e):

    • Match the change to the control skill's features: success.
    • Read the key's credit history, Check the credential, Start the key proxy, Probe what head code can reach, Capture the change: all skipped, so the proxy was not started and no model request was made.
    • Scan the capture for credentials and Upload the capture: success; the artifact pr-capture-16308-ed0808044ee0d70897cdb97035dc0811378fd53e is 305 bytes.
    • The job ran 20 seconds, from 06:53:25Z to 06:53:45Z.

    Read from the run's job steps and artifact list; I did not download the artifact.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions