Skip to content

fix(pr-verify): allow the driver's type and wait-for verbs in the capture - #13877

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/13710-driver-type-verbs
Nov 7, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/13710-driver-type-verbs

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #13710

Summary

The first PR capture to run to the end, 42313414930 on test PR 13873 and after PR 13868, drove context-budget's hooks and mods features: route: drive, 5 captures, and no token-cap stop. But every entry point typed at the terminal session came back not driven (blocked: driver type command denied by the permission system).

The outer leg's allowlist has one rule per driver verb, and only for the verbs the control-claude-code hub writes as full node <skill-dir>/driver/driver.mjs <verb> commands (workflow.test.mjs:1733). The feature pages also drive the session with type and wait-for (driver.mjs:5-6). The hub names those only in prose (SKILL.md:23, :130), so they never got a rule.

Fix

  • .github/workflows/pr-verify-capture.yml: rules for main's driver type * and wait-for *, by absolute path like the other verbs. Both act on the driven session through the session holders under CCD_RUNTIME_DIR, as screenshot and record already do.
  • .github/scripts/pr-verify/workflow.test.mjs: the expected rule set adds the two verbs to the hub-derived list, so the test's exact-equality check requires them.

Verification

  • node --test .github/scripts/pr-verify/workflow.test.mjs: 80 passed.
  • The capture after the merge, on test PR 13873, grades the typed entry points.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMa441b9qec43NvaTyiY2Z

@kyle-sexton
kyle-sexton marked this pull request as ready for review November 6, 2026 23:54
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T23:54:32.617410Z
We couldn’t complete this review. Comment @codex review to try again.
e801c6f 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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #13877. No findings.

This change adds two lines to the capture leg's driver allowlist in .github/workflows/pr-verify-capture.yml, one for the driver's type verb and one for wait-for. It also updates the test in .github/scripts/pr-verify/workflow.test.mjs that checks the exact rule set. I read every hunk of both changed files.

What I checked

  • The two verbs are real driver commands. driver.mjs defines both: 'wait-for' and type handlers at driver.mjs#L828-L832, and the CLI dispatch and arity at L1387-L1417. Each takes one required text argument, so the <verb> * rule shape (a verb plus arguments) fits them.
  • The new rules match the existing ones. They use the same absolute .base path pattern as the other driver verbs (pr-verify-capture.yml#L1170-L1171).
  • The test still enforces the rule set. It still requires the verbs named in the hub (SKILL.md) to be exactly the seven expected ones. It then adds type and wait-for to the expected list, and the order-insensitive equality check at workflow.test.mjs#L1762 now requires both new rules. DRIVER_PATHS holds a single path (L1706), so no other path variant needs these rules.
  • Security is out of scope here. Whether the type * and wait-for * patterns widen the leg's permissions too far is a question for the security-review lane, so I don't judge it.

Unverified: the 80 passing tests and the next capture run on test PR 13873 are the author's claims. I had no shell and ran nothing.

PR context: the PR only refers to #13710 ("Refs") and closes no issue, so there are no acceptance criteria to check. The PR body contains no instructions aimed at this review.

Prior findings: this lane has not reviewed an earlier head of this PR, so this was a full review.

What it spends: more of the capture leg's driver commands can now run, which uses more of the prepaid lane run budget (tokens and turns). That is not a hold.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

Scope. I read every hunk of both changed files. .github/workflows/pr-verify-capture.yml matches a trusted path, so I read its whole change and what it gates: the Capture the change step's allowlist and the comments above it. .github/scripts/pr-verify/workflow.test.mjs is a test.

What changed. The driver leg (permission-mode: dontAsk) gets two more Bash allow rules. Both run main's driver by absolute path under .base, for the type * and wait-for * verbs (pr-verify-capture.yml#L1170-L1171).

What I checked and found:

  • The rules run only main's code. Each rule names ${{ github.workspace }}/.base/.../driver.mjs. A copy of the driver in the pull request's head matches neither rule. Writes to .base stay denied by Edit(/${{ github.workspace }}/.base/**) (L1209).
  • The verbs take no option that runs a program or writes a file. wait-for accepts one text argument and a timeout that must be digits only (/^\d+$/). type accepts one text argument and --key names (driver.mjs#L1387-L1395). Any extra argument is rejected (L1417-L1429). On the holder's side, type only sends keystrokes to the driven terminal, and wait-for only reads screen text and echoes back the driver's own text (L828-L836). --session is a parameter the screenshot, record and stop rules already allow.
  • Nothing new reaches a credential. Keystrokes go to the driven session in the sibling sandbox, which already runs the pull request's code. The driver could already send prompts there with the allowed log <prompt> verb. The driver leg holds only the key proxy's per-run client key (L1081-L1089, L1146). The step's permissions, tokens and secrets are unchanged, and no new untrusted text comes back to the driver beyond the screen text it already reads through screenshot and log.
  • No trust control is widened. The diff does not touch the trusted-trigger check, the lane token request, the kill switch, a merge hold or a plugin manifest.

Spend. The PR expects the typed entry points to run to the end now instead of being refused. That uses a little more prepaid API usage per capture run, under the existing driver token cap. It cannot cause a real charge, so it is not a hold.

No embedded instructions in the PR context. There are no prior findings, and this is the lane's first review of the pull request, so all severities applied.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 45ff9fb Nov 7, 2026
74 checks passed
@kyle-sexton
kyle-sexton deleted the fix/13710-driver-type-verbs branch November 7, 2026 00:07
kyle-sexton added a commit that referenced this pull request Nov 7, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMa441b9qec43NvaTyiY2Z
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