Repository navigation
fix(pr-pipeline): relock the directory a Dependabot group left behind, with uv in a tokenless container - #17301
Conversation
Dependabot's pip updater cannot relock plugins/explainer-video (manimpango has no Linux wheel and its image has no pango), so the playwright group's pull request bumps lib/media-render alone and CI fails on the pin-equality check. review-dependency-select now finds a pip directory a group-by dependency-name group left behind, relocks it to the bumped pin with the uv .github/requirements-relock.txt pins (by the command the lock's own header names), and apply-dependency-pin pushes it as a [dependabot skip] commit under a new dependency-relock patch row held to dependency-version-change, the fix rule the pr-merge lane mirrors. A relock that fails goes to the model. The CI pin-equality check now reads the same dependabot.yml groups (dependency-relock.mjs check), and unifiedDiff handles edits that change the line count. The apply-dependency-pin job comment, which named the install-script-pin row alone, is removed; the pr-pipeline README describes both rows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
uv may build a package's metadata from source, which runs that package's code, so it no longer runs in review-dependency-select beside its token. Select uploads a relock request carrying the base's relock script and pinned uv; review-dependency-relock runs uv with no permissions, no secret and no checkout, and uploads only the relocked requirements.txt; review-dependency-relock-patch, base code with a read token, checks the request's SHA-256, the pin and the content rule, and writes the patch; apply-dependency-relock pushes it under the dependency-relock row, named as a literal. Any stop short of an uploaded patch, including a relock that adds a package, stops as dependency-pin-invalid. The relock job could take the patch artifact's name first; the patch job's upload then fails and nothing is pushed. apply-dependency-pin keeps the install-script-pin row as a literal again. The test-bash group check now fails when no pip group reads or a group directory's requirements.in cannot be read, and the explicit playwright comparison is back beside it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A job with permissions: {} still runs on a runner whose processes hold
ACTIONS_RUNTIME_TOKEN, and its user has sudo, so build code uv runs could
reach them. The relock now runs relock-requirements.sh in
python:3.12-slim pinned by digest, mounting only the work directory and
the read-only request; setup-python is gone from the job. The container
relock of explainer-video is byte-identical to the earlier result
(sha256 3fcf89d1). The README and changelog state that a failed or
refused relock stops as dependency-pin-invalid with needs-session.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ragment Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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. |
|
claude-review reviewed Code review (incremental, blocking only): no findingsThis lane already reviewed an earlier head (39d62c4), so this pass reports only blocking findings. I read every hunk of the 5 files changed since then. I also read the full relock step in What I checked:
Settled thread: the symlink-upload finding on Not checked: the author says the tests, actionlint, zizmor and shellcheck all pass. That is unverified, because this lane has no shell. Closing issue: none (the PR body says no issue tracks the defect). Loosened-check verdict: fail (the default, because the prompt has no Spend: unchanged from the previous review. A relock still adds short standard-runner jobs and no model turn. Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #17301, incremental (39d62c4 → 5d9b3bd)I read every hunk of all 5 files in the incremental scope. No security issues found in this increment. My earlier finding is fixedThe earlier finding said build code could plant a symlink at the uploaded lock and leak the runner's token. The new code closes that path.
Other changes, checked
critical-findings: 0 |
…he relock jobs Build code in the relock container could leave requirements.txt as a symlink, and upload-artifact follows symlinks, so its node process could upload a runner file such as /proc/self/environ. The step now refuses a symlink or non-regular file, copies the lock with cp --no-dereference into a fresh directory the container never mounted, checks the copy, and uploads only that copy. A test runs the step with a stub docker that leaves a regular file, a symlink to a runner file, and a directory. CI: artifact-retention.json gains the two relock artifact families and names apply-dependency-relock as a patch reader; refire-refused.mjs and workflow-gates.test.mjs know Apply Dependency Relock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: a defect found in Dependabot run 44280304984; no issue tracks it.
Summary
Dependabot's pip updater cannot relock
plugins/explainer-video. Its pip-compile exits 1 (manimpango ships no Linux wheel and the updater image has no pango), it reportsdependency_file_not_resolvable, and it still opens the playwright group pull request with onlylib/media-renderbumped. CI then fails, because both directories must pin the same Playwright. The owner wants Playwright to follow the latest release without manual steps, so these pull requests have to go green on their own.The pr-unblock lane now relocks the directory the group left behind, with no model turn. uv may build a package's metadata from source, which runs that package's code, so the relock is split across jobs and uv never runs beside a token:
review-dependency-selectuploads a relock request.review-dependency-relockruns uv inside a digest-pinnedpython:3.12-slimcontainer, in a job withpermissions: {}, no secret and no checkout.review-dependency-relock-patchuses base code and a read-only token. It checks the result and writes the patch.apply-dependency-relockpushes it as a[dependabot skip]commit.That commit passes the same fix rule the pr-merge lane's provenance check mirrors, so the pull request goes green and merges through the review tier.
Fix
.github/scripts/pr-unblock/dependency-relock.mjs(new):group-by: dependency-namegroup from.github/dependabot.yml. Nothing in it is hard-coded to Playwright.relockTarget: finds a pip directory the pull request left alone whoserequirements.inpins a group package at another version than the bumped directory.relockRequestruns in the select job. It moves that one pin and refuses a missing file or a lock whose header names another command thanCOMPILE_COMMAND. A refused request goes to the model.relockPatch(CLIpatch) runs in the patch job. It requires the relocked lock to pin the requested version and both files to passfixContentRefusal, then writes the patch.check, for test-bash: fails while a group's directories disagree, when no pip group reads, or when a group directory'srequirements.incannot be read.relock-requirements.sh(new):.github/requirements-relock.txtpins (uv 0.13.9, every wheel hash, on the/.githubDependabot pip surface) with--require-hashes --only-binary :all:.uv pip compilewith the lock header's own flags, plus--no-configand--custom-compile-command, so the output is byte-compatible with the committed locks.review-dependency.mjs select: after the install-script pin step and before round counting, it returns arelockdecision.mainwritesrequest.json, the movedrequirements.inand the head'srequirements.txttoRELOCK_DIR, and outputsrelock-stateandrelock-sha256. It no longer runs uv.pr-unblock.yml:dependency-relock-request-<attempt>. It no longer sets up Python.review-dependency-relockjob:permissions: {}and no checkout. A public-repo checkout under{}is unconfirmed, so the request carries the base script instead.python:3.12-slim@sha256:5e2bdb1b…, mounting only the work directory and the read-only request. Build code therefore cannot reach the runner's processes (ACTIONS_RUNTIME_TOKEN) or its sudo. There is no setup-python and no cache.requirements.txt. The file is staged first: the step refuses anything inrelock-workthat is a symlink or not a regular file, copies it withcp --no-dereferenceinto a freshrelock-outthat the container never mounted, and checks the copy is a regular file. The upload reads only that copy, so a symlink left by build code cannot point the upload's node process at a runner file such as/proc/self/environ..github/artifact-retention.json: rows fordependency-relock-request-*(scanned) anddependency-relock-result-*(no scan: it comes from a job that holds nothing, and the patch job scans the patch it builds). The patch family's readers now includeapply-dependency-relock.refire-refused.mjslistsApply Dependency Relockamong the write-runner callers.review-dependency-relock-patchjob:contents: read.dependency-relock.mjs patch, scans the patch and uploads it.dependency-pin-invalidon anything short of an uploaded patch, including a failed relock job or a relock that adds a package.escalation-routes.jsonroutes that reason to a failing status and theneeds-sessionlabel. It does not go to the model.apply-dependency-relockjob: usespatch-prepare: dependency-relockas a literal.apply-dependency-pinis back to its literalinstall-script-pin.report-stop-statusandreport-escalationread the two new jobs' reasons and the relock's pushed commit.pr-require-checks.yml: the explicitlib/media-renderagainstplugins/explainer-videoplaywright comparison is kept, anddependency-relock.mjs checkruns beside it.patch-rules.json(and its schema): newdependency-relockrow. It has the same refuse list,dependency-manifests,max-files: 2, no required verdict,content-rule: dependency-version-change, and it reuses thedependency-pin-*stop reasons. Their routes inescalation-routes.jsonnow name the relock.pr-run-activity-write.ymlaccepts that row's reasons.install-script-pin.mjs unifiedDiffnow diffs by longest common subsequence, so a relock that changes the number of hash lines makes a valid patch. A one-line pin move gives the same output as before..github/dependabot.yml: the comment no longer claims one pull request bumps both directories.pr-pipeline(minor) andsource-control(none, test only).apply-dependency-pinjob comment.Verification
actual: 'proceed', expected: 'relock'. The defect pull request went to the model with no relock.python:3.12-slimcontainer (no pango, no gcc, cold uv cache), uv 0.13.7 and 0.13.9 both relocked explainer-video to playwright 1.65.2 with the same sha256. The only change was the playwright pin and its hashes.docker runshape, the relock output is byte-identical to the earlier result (sha2563fcf89d1f69ff7ee6bc080bcba62634d25c7df03ba174c4a54cbc99b3a670b5e).relockRequest, then the copied script with the real pinned uv (3.2 s), thendependency-relock.mjs patch. The patch passesgit apply --checkand changes 2 files (11 insertions, 11 deletions).--no-buildcannot relock this lock:srt>=3.0.0 has no usable wheels. That hardening is not applied.dependency-relock.test.mjs(12):git apply--index-urlline, a missed pin and a new packagepatchCLIcheckon disagreement, on no readable group and on an unreadablerequirements.inreview-dependency.test.mjs: the relock request with no model turn, no relock when the directories agree, a fallback to the model on a foreign lock header, and themainrequest files and outputs.callers.test.mjs(new test):{}, no secret, no token, no checkout and no cache--privileged, docker socket,--pidor host networkdependency-relockrow and its inputs, none of them from the uv jobcallers.test.mjs(report jobs): both report jobs cover the new jobs.apply-patch.test.mjs,dependency-classify.test.mjs,test_babysit_dependabot.py: the row and the fix vector, unchanged.node --teston dependency-relock, review-dependency, dependency-classify, install-script-pin, apply-patch, callers, resolve and escalation-routes: 1006 tests, all pass.actionlint,zizmor --offline(no findings),shellcheckandshfmt: clean.dependency-relock.mjs checkon the repository:playwright: plugins/explainer-video and lib/media-render pin 1.65.1.Related
dependency_file_not_resolvablefailure.docs/conventions/pr-pipeline/README.md: the review-dependency and patch-rules sections this extends.plugins/source-control/skills/babysit-prs/scripts/babysit_dependabot.pyfix_refusal: the pr-merge provenance check the relock commit satisfies.🤖 Generated with Claude Code