Repository navigation
feat(pr-pipeline): install lane skill dependencies on demand - #7786
Conversation
… demand setup-runner-isolation no longer removes sudo and docker access; it still installs bubblewrap and socat for a skill. Lanes keep both for now (owner decision 2026-10-17), to be re-evaluated in the lanes audit. scripts/setup-env.sh installs, idempotently, Python at .python-version in a venv with the hash-pinned wheels from .github/requirements-ci.txt, the locked root and runner-policy Node packages, and Playwright's Chromium only with --playwright or SETUP_ENV_PLAYWRIGHT=1. The read and write lane runners copy it from the base before the head checkout and run it before a skill activity: the read runner against the head checkout, the write runner against the base copies, since its skill runs no head code. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
The read runner ran setup-env.sh against the head checkout, so npm ci ran head install scripts outside the skill's sandbox, before the step holding the OAuth token, and put head-built bin dirs on GITHUB_PATH. Both runners now install from the base copies in $RUNNER_TEMP/setup-env; a read skill that needs the head's own packages runs npm ci in its sandboxed Bash. setup-env.sh runs Python with -I and passes the version through argv, and treats a venv whose interpreter no longer starts as stale. Tests cover a changed requirements file, SETUP_ENV_VENV and the uv fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3daf03a3d
ℹ️ 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".
The editorconfig gate in lint-repo rejected the tab indentation Biome's unconfigured default wrote into scripts/setup-env.test.mjs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
|
claude-security-review reviewed Security review: PR 7786 at head 321c2aeI found no security issues. I read the diff and the surrounding workflow context myself and ran no verifier subagents. The diff removes no standing instruction, so I did not consult the instruction exception register. Scope. The PR adds What I checked
Residual observations (not reported as findings; I found no concrete exploit path in this diff)
|
|
claude-review reviewed Summary: I reported one likely defect, as two inline comments (one per workflow file). I did not run the workflows. No live lane run exists, so this review is by reading the diff only. Finding (plausible, not confirmed): Both new "Set up Python for the skill" steps pass
Not flagged: |
Node resolves a package from the importing file's directory, so the base-built node_modules under $RUNNER_TEMP/setup-env were invisible to the checkout's tests (runner-policy's yaml and ajv). Both lane runners now copy the root and runner-policy trees into the checkout after the install. setup-env.sh resolves a relative --root to an absolute path before it changes directory, so the venv and the GITHUB_PATH entries no longer nest under the root twice. The step docs stop calling the skill's Bash sandboxed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
…r-sudo-setup-env The pr-pipeline CHANGELOG conflict keeps both entries: this branch's entry becomes 2.1.0 above main's 2.0.0, with `version` staying 2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
…r-sudo-setup-env The pr-pipeline CHANGELOG conflict keeps every entry: this branch's entry becomes 2.3.0 above main's new 2.2.0 and 2.1.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
Restore the "Remove sudo and docker access" step in setup-runner-isolation and the convention, ADR 0055 and eval-browser-dispatch text that describes it, as on main. The on-demand dependency install stays: the base copy now runs after the strip, and setup-python, the venv pip install and npm ci need no sudo. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43
No related issue: lets a lane skill run the repository's Python and Node tests by installing their dependencies on demand.
Summary
Lane runners installed no Python or test tooling before a skill ran, so a lane could not run the repository's Python and Node tests. One repo-owned script now installs those dependencies on demand. The "Remove sudo and docker access" step stays as on
main: the owner chose to keep the strip (thread), and every install below works without sudo.Fix
scripts/setup-env.sh: idempotent (records the lock-file hash per step, skips while it matches). Installs Python at.python-versionin a venv with the hash-pinned wheels from.github/requirements-ci.txt(--only-binary=:all: --require-hashes, aspr-require-checks.ymldoes), runsnpm ciat the root and in.github/standards/runner-policy, and installs Playwright's Chromium only with--playwrightorSETUP_ENV_PLAYWRIGHT=1(--with-depsonly when sudo works, per https://playwright.dev/docs/ci). Under Actions it adds the venv andnode_modules/.bintoGITHUB_PATH.pr-run-activity-read.ymlandpr-run-activity-write.yml, for a skill: after the runner isolation step (which still removes sudo and docker) and before the head checkout (which replaces.base), copy the base's script and the files it installs from to$RUNNER_TEMP/setup-env; then runsetup-pythonand the script before the model step. Both install from the base copies only, so no head code runs outside the skill's sandboxed Bash (ADR 0055 items 5 and 7,write-runner-never-rules.test.sh). A base without the script skips with a notice. The lanes never pass--playwright.setup-pythoninstalls into the runner-owned tool cache (its installer, nix-setup-template.sh, runs no sudo), pip installs into a venv under$RUNNER_TEMP, andnpm cialready runs after the strip ineval-browser-dispatch.yml.pr-run-activity.mdsteps 11 and 12 and the pr-pipeline CHANGELOG (2.3.0) describe the copy and install. Step 10, ADR 0055 and the runner-memory threat note are unchanged frommain.Verification
node --test scripts/setup-env.test.mjs: 12 pass (stubbed python/uv/npm/node/sudo; idempotent rerun, changed lock and requirements,SETUP_ENV_VENV, uv fallback, Playwright only on request,GITHUB_PATH, no-Python failure, usage error). A forced mutant (Playwright always on) failed 4 of them.scripts/setup-env.shin the worktree: venv on Python 3.14 with pytest, bothnpm cis; the second run skipped every step.scripts/check-affected.sh --tests: 7 passed, 2 skipped.scripts/affected-tests.sh --run: 11 shell suites pass, includingwrite-runner-never-rules.test.shandwrite-runner-revoke-step.test.sh;test_babysit_dependabot.py: 55 pass.actionlint,zizmor --persona=regular(no findings),markdownlint-cli2: clean.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01AfcE6qXwStK92XAx21MG43