Skip to content

feat(pr-pipeline): route issues a lane cannot finish to host-run at admission - #12628

Merged
kyle-sexton merged 8 commits into
mainfrom
feat/admission-unrunnable-rules
Nov 3, 2026
Merged

kyle-sexton merged 8 commits into
mainfrom
feat/admission-unrunnable-rules

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: hub-routed lane improvement (Issue Triage's host-run predictor study, approved by GitHub Support on four conditions).

Summary

Intake admission sends an issue the issue lane cannot finish to host-run, but its built-in unrunnable kinds catch few of them: in a sample of 154 host-run issues and 147 lane-delivered controls since 2026-10-27, they flag 18 (recall 0.12), and only 2 of 28 sampled host-only lane stops. Each one missed is a lane run that fails late. This adds six rows of externalized rules that catch 22 of those 28 stops at intake.

Fix

  • New .github/actions/resolve-config/unrunnable-rules.json: rows {kind, match, unless} for eval, tracker-output, measure-over-time, host-data, live-cc-probe and a narrowed named-host. Every row routes to host-run; no row adds an owner stop. The file carries its measured window and scores in a measured object.
  • admit.mjs: unrunnableRulesOf loads the file fail-closed like chargePattern (a missing, unparsable, empty or non-compiling file throws, so no issue is admitted on a guess); unrunnableCriteria tries the rows after the built-in kinds, so existing kind names and refine's exact-text comparison are unchanged. A billed item only the eval row flags is still a paid eval held for the owner. No routing code added.
  • The rows are the study's frozen classes, narrowed so every existing runnable vector in admit.test.mjs still holds (tuned against existing vectors only, never the hold-out).
  • unrunnable-rules.vectors.json + admit.test.mjs: every study hit and false positive is a vector (112: 91 route host-run, 16 known misses, 5 false positives with fix(planning): run a Must-test scope cut before recommending wayfind #11192 recorded as still flagged), plus four behavior tests including nine malformed-file cases.

One existing assertion changed outcome: "a valid measured pass on the subscription" now routes host-run rather than lane; model evals are host work (#10222 went host-run). It still asserts no charge reason and no hold.

Measurement (s9)

Set All (154/147) Hold-out (102/119)
Built-in kinds alone (before) 18/0, P 1.00, R 0.12 5/0, R 0.05
With the committed rows (after) 66/1, P 0.99, R 0.43 30/1, P 0.97, R 0.29

Baseline for the before/after comparison: today's check catches 2 of 28 sampled host-only lane stops; the committed rules catch 22 of 28. The live host-only stop rate is re-measured on next week's sample and posted here.

Rollout check: the agent-ready issues carrying a refine split record (#12517, #8283) score the same before and after (no task-list items flagged), so no split record is invalidated.

Verification

  • intake-triage admit, refine, apply-verdict, write-issue and resolve-pr tests: 1257/1257.
  • resolve-config tests: 876/876. label-unblocked, check-blockers, triage-sweep, reenter, check-wip-cap: 455/455.
  • scripts/check-affected.sh --base origin/main --no-fetch: 10 passed, 5 skipped.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE

kyle-sexton and others added 2 commits November 2, 2026 22:04
…dmission

Intake admission caught 2 of 28 sampled lane host-only stops (recall 0.12
over 154 host-run issues). Six done-when classes from the 2026-11-03
host-run predictor study now load from
.github/actions/resolve-config/unrunnable-rules.json as {kind, match,
unless} rows: eval, tracker-output, measure-over-time, host-data,
live-cc-probe and a narrowed named-host. unrunnableCriteria tries them
after the built-in kinds, so they route through the existing host-run
path, and an item only the eval row flags that names a billing account is
still a paid eval held for the owner.

The rows are narrowed from the study's frozen patterns so every existing
runnable vector stays with the lane. The loader fails closed like
pushRefusalsOf: a missing or malformed file, an empty rules list, or a bad
pattern throws out of admission.

Re-scored over the study sets with the committed code: rows alone 62/1
(P 0.98, R 0.40), every kind 66/1 (P 0.99, R 0.43), 22 of 28 host-only
stops; hold-out 30/1 (P 0.97, R 0.29) against 5/0 before. Every study
false positive and every hit that one item matches is a vector in
unrunnable-rules.vectors.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 3, 2026 03:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-11-03T03:34:15.953006Z 9fb9a75 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9fb9a7573b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12628 (incremental, 9fb9a75..46ed6c7)

I found no security issues in this push.

critical-findings: 0

Scope. This was an incremental review. I read every hunk of both files in .claude-lane/incremental.diff: .github/actions/resolve-config/unrunnable-rules.json and .github/scripts/intake-triage/admit.test.mjs. unrunnable-rules.json is on the trusted-path list, so I read its whole change and the admission code that loads it. That code is unrunnableRulesOf and unrunnableCriteria in admit.mjs, which this push does not change.

What I checked

  • Narrower eval row. The push removes the bare trigger runs and no loss matches and restricts VALID runs to the capitalised word. That lets fewer items through to the paid-eval owner hold. The hold's condition is BILLED && (EVAL_PATTERN || eval row) (admit.mjs#L661), and the built-in EVAL_PATTERN part (L457-L467) is unchanged. main has no eval row at all, since this PR adds the file. So the hold still covers everything it covers on main; the push only trims coverage this PR added. Admission also still requires a trusted spec, and the lane's Bash gets no provider credential (comment at L484). An item the narrower row no longer flags therefore gives the lane no way to start a billed run, so I found no route to a charge.
  • New unless on tracker-output. It clears items that are conditional, done by an automation, or about an automation's output. These match the built-in CONDITIONAL and BY_SCRIPT exemptions (L471-L472). The effect is that fewer items are refused as host-only. That widens no trusted actor, no token scope and no untrusted-text path: the criteria text still comes from trusted spec texts only.
  • Fail-closed loading. If a pattern does not compile, unrunnableRulesOf throws (L712-L731). That includes the new inline modifier group (?-i:VALID) on a Node version without regex modifiers. A throw refuses admission, so it fails closed.
  • Regex cost. The \S[-.]\S*['’]s branch in the new unless can backtrack quadratically on one very long token with no spaces. It only runs after match succeeds, on one task item of trusted spec text. The worst case is CPU time in the admission job, with no route to a leak, a compromise or a charge.
  • Test file. admit.test.mjs only adds pass-through test cases and carries no security surface.
  • PR context. I found no embedded text directing this lane.

Trust controls. The push doesn't touch the trusted-actor check, the lane token's scope, the kill switch or any merge hold. The admission gate's built-in refusals and the trusted-spec check are unchanged.

Spend (not a finding). Slightly fewer issues will go to the host-run queue, so slightly more will start lane runs on subscription or prepaid credit. The push adds no billable resource.

The prior-findings file lists only my earlier no-findings summary (0 rounds with findings, cap 3), so the round cap did not apply.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 9fb9a7573b2f5af4482d0dac4f80508b69a8d511; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 46ed6c7dfd666b71a5dc79d6eb81d8385a9c2c25: read 2 of 2 changed file(s); 1 finding(s), 1 as inline comments.

Code review (incremental, 9fb9a75 → 46ed6c7)

Scope. I read every hunk of both files on the incremental list: .github/actions/resolve-config/unrunnable-rules.json and .github/scripts/intake-triage/admit.test.mjs. I used the head admit.mjs for context: unrunnableRulesOf and the built-in comment and tracker-write kinds with their CONDITIONAL and BY_SCRIPT guards. I also checked the head .node-version, which is 24.21.0.

Prior finding. The eval row finding I posted earlier (thread) is addressed:

  • trigger (?:rate|score)s? now has \b at both ends and no longer covers runs.
  • VALID is now case-sensitive through (?-i:VALID). Inline modifiers compile on Node 24, which .node-version pins and pr-refine.yml sets.
  • no loss now needs eval within the same clause.
  • Each false-positive case I gave now has a test that checks it reaches the lane.
  • The measured figures were lowered to match (union 66→65, eval 30→29). Those figures are the author's; I did not re-score them.

New finding (1, advisory, inline): the new unless on the tracker-output row also clears items that end "on this issue" when they are conditional or mention a script. The built-in comment kind keeps those items away from the lane: see admit.mjs:535 and the tests at admit.test.mjs:2346-2351. So the new test comment's claim, "as the built-in comment kind leaves it", is not quite true.

Notes

  • No closing issue, so there were no acceptance criteria to check.
  • No plugin manifest changed.
  • Both files match the trusted-path glob .github/actions/resolve-config/** or sit beside a trusted script. I read both changes in full. They only narrow patterns and add tests, so nothing here calls for a hold.
  • Spend: routing changes only move issues between the lane and the host queue. That spends subscription or prepaid credit and starts no new charge.

kyle-sexton and others added 2 commits November 2, 2026 22:46
Review on #12628 found three over-matches.

- tracker-output now leaves with the lane the shapes the built-in comment
  kind exempts: a conditional item, an output a named script or automation
  posts, and an automation's own results.
- eval reads VALID runs only as the upper-case validity verdict, so
  "invalid runs" passes.
- eval counts a trigger rate or score, not any trigger run, and a "no loss"
  only near an eval.

The six review sentences are now runnable vectors. Every study vector
routes as before. Re-score: every kind 65/1 (P 0.98, R 0.42), hold-out
29/1 (P 0.97, R 0.28), 22 of 28 host-only stops. One hold-out hit, #11128,
is lost: its "no loss" is more than 60 characters past its "eval".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 46ed6c7dfd666b71a5dc79d6eb81d8385a9c2c25; the summary is in this lane's pull request comment.

claude-lane: claude-review

…ker-output row

The tracker-output row's `unless` cleared an item for a conditional or a
`by` anywhere in it. The built-in comment kind refuses a write that lands
on this issue before either exemption, and reads `by` only after the
write. So the row's conditional and by-script alternatives now skip an
item that writes on this issue. The by-script alternative also needs the
`by` in the write's own clause or after it. The automation-possessive
alternative is unchanged.

"Once the probe runs, its result is recorded on this issue." and "The
counts gathered by the audit script are recorded on this issue." now
route host-run. Every earlier vector routes as before, and the re-score
is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12628 (full diff at d6314c33)

I found no security issues in this pull request.

critical-findings: 0

Scope. I read every hunk of all 4 changed files in .claude-lane/pr.diff:

  • .github/actions/resolve-config/unrunnable-rules.json
  • .github/scripts/intake-triage/admit.mjs
  • .github/scripts/intake-triage/admit.test.mjs
  • .github/scripts/intake-triage/unrunnable-rules.vectors.json

Two of them are trusted paths: unrunnable-rules.json (under resolve-config/**) and admit.mjs. For both I read the whole change and the admission code it gates.

What I checked

  • The new file does not reach the token broker. A repository search for unrunnable-rules finds only the intake-triage files, so resolve.mjs and the rest of the signer's load path never read it. It can't change a token's scope, which lanes or activities get one, or what a session may invoke.

  • The paid-eval owner hold still covers everything it did on main. PAID_EVAL now comes first in kinds, with the condition BILLED && (EVAL_PATTERN || eval row) (admit.mjs#L660-L662). That covers everything the old EVAL_PATTERN && BILLED condition did, and decide still holds a paid eval for the owner (L1412-L1418).

    • Rule rows are tried after every built-in kind, so a row can only flag an item that had no kind before.
    • A flagged item becomes a host-run refusal, so the rows narrow what the lane admits and never widen it.
  • Loading fails closed. unrunnableRulesOf throws on any of these (L716-L739), and the throw stops decide:

    • a missing or unparsable file;
    • an empty rules list;
    • a row with no kind or no match;
    • a pattern that doesn't compile.

    The patterns come from the repository checkout, not from issue or PR text.

  • Admission still reads only trusted spec text. decide runs the rows over trustedSpecTexts and still requires trusted criteria (L1396-L1405).

    • noteUnrunnable reads the raw issue body. That predates this PR, and the rows only add kind names to the refusal text it posts.
    • Heavy regex backtracking on one very long task item would cost CPU time in the admission job, with no route to a leak, a compromise or a charge.
  • Split records fail safe. If the new rows change which items unrunnableCriteria flags, an existing split record stops matching (L1896). Those items then stay in the lane's text and are refused.

  • Tests and vectors. admit.test.mjs and unrunnable-rules.vectors.json are test data with no security surface.

Trust controls. The PR leaves these unchanged:

  • the trusted-trigger check and the trusted-actor list;
  • the lane token's scope and the broker's grants;
  • the kill switch;
  • every merge hold.

The admission gate's trusted-spec check and its built-in refusals are also unchanged.

PR context, settled threads and prior findings. None of the three contains text directing this lane. The settled threads are about matching precision (false positives), not security. This lane's earlier rounds posted no findings, so nothing carries over, and the round cap does not apply.

Spend (not a finding). More issues are routed to the host-run queue at intake, so fewer lane runs start and fail late. That slightly reduces subscription or prepaid-credit use. The PR adds no billable resource.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 55ad88e8db56fbc31787e3c7dd151f3b7579b251; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (full, head d6314c33)

Scope. I read every hunk of all 4 changed files:

  • .github/actions/resolve-config/unrunnable-rules.json
  • .github/scripts/intake-triage/admit.mjs
  • .github/scripts/intake-triage/admit.test.mjs
  • .github/scripts/intake-triage/unrunnable-rules.vectors.json

For context I also read parts of the head admit.mjs:

  • the built-in comment kind and its guards (CONDITIONAL, BY_SCRIPT, the possessive lookbehinds)
  • decide's paid-eval and host-run routing
  • personChecks

Callers of the new file. unrunnableCriteria now reads the new file by default, so I checked every caller of it:

  • refine.mjs
  • decide, also called by label-unblocked.mjs
  • personChecks, called by resolve-pr.mjs and write-issue.mjs
  • noteUnrunnable

The workflows that run these scripts check out main into .base. They either check out the whole tree or a sparse checkout that includes /.github/actions/resolve-config/ (intake-triage.yml, work-unblock.yml, the pr-verify.yml resolve steps). The sparse checkouts that list only log-api-budget do not run these scripts. So the rules file is there wherever it is read.

Round cap. The cap applied: the prior-findings file says past the cap: yes (3 of 3 rounds), so I report only blocking findings. I found none.

Earlier findings. None needs to be posted again:

  • The eval row's broad alternatives and the tracker-output unless are fixed (settled threads).
  • The host-data row's bare ~/\.claude match (thread) is no longer present at this head. The row now needs a read, write or call verb plus a preposition before the path (or ~/.claude/projects, or as never read). The two example items from that finding are now runnable vectors in unrunnable-rules.vectors.json (issue 12628, review-control).
  • The earlier summary-only note on the measure-over-time row (\d+ consecutive runs, wall-clock … timing) is advisory, so the cap drops it this round.

Behavior checks (by reading the code, not by running it):

  • The PAID_EVAL entry moved out of UNRUNNABLE into unrunnableCriteria. It is still tried first, so a billed eval on a named host still goes to the owner. An item that only the eval row flags now also counts as a paid eval when it names a billing account, and a test covers that case.
  • Rows are tried after the built-in kinds, so existing kind names stay the same.
  • unrunnableRulesOf fails closed when the file is missing, unparsable or empty, when a row lacks a kind or match, when unless is missing, or when a pattern does not compile. The regexes have no g flag, so .test keeps no state between calls.
  • One existing outcome changes on purpose: "a valid measured pass on the subscription" now goes to host-run. The updated test still asserts no hold and no charge reason.

Notes

kyle-sexton and others added 2 commits November 3, 2026 00:33
…ide reads

A bare `~/\.claude` flagged any done-when item that names the path, and plugin
code reads and writes it in ~500 files, so ordinary code and doc edits would
leave the lane for host-run. The row now matches only Write/read calls into or
from the path, a path named "as never read", and `~/.claude/projects`; both
study vectors (#4225, #12289) still route to the host queue, and the review's
two lane items are pinned as kept with the lane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojVgxFqBnrah9DwFLE
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit e7314c2 Nov 3, 2026
46 checks passed
@kyle-sexton
kyle-sexton deleted the feat/admission-unrunnable-rules branch November 3, 2026 06:26
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