Repository navigation
feat(pr-pipeline): add the applied-by contract and patch-rules registry - #8477
Conversation
A read skill leaf's applied-by names what it hands on (patch, feedback-replies, dependency-verdict, work-outcome) and the script activity that applies each. The schema limits it to skills with effect read and gating advisory; the config reader rejects invalid-applied-by targets (not a script, a patch target without prepare: apply-patch, outside the producer's lane, or a slot that does not need the producer). resolve-config emits the map and takes applied-by-supported, which the read runner passes as patch. A read skill with applied-by.patch gets the write tool set without commit tools, and changed-paths leaves out instruction surfaces for it. No live activity sets applied-by yet. patch-rules.json registers, per producer prepare mode plus default and issue, what apply-patch admits; checkPatchRules validates it against its schema, the universal refused set, two-parent commits and rows for every mode in use. broker-vendoring.test.mjs checks resolve.mjs's closure and the trust-root JSON against the broker's vendored lists, with the two registry files pending the azure-iac pin pull request. The funding map and the read-effect bans on web-access, self-checks and verify-scripts are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
resolve-config now reads patch-rules.json and its schema beside itself and runs checkPatchRules before every lane resolve, failing closed when either is missing or invalid, and fails an applying leaf whose applied-by sets a key applied-by-supported does not name. The check stays out of loadConfig and resolveGrant, so the lanes token broker, which passes only the trust-root files its binding lists, needs no new file on either the old or the new pin. broker-vendoring.test.mjs now copies the broker's TRUST_FILES and the exports it calls, and checks that every file loadConfig needs is one the broker reads from main's tip and serves its tests, that the patch rules are not among them, and that the broker's calls resolve this tree's config. collect-base-activity gains tests for a read skill that hands on a patch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…gistry does today A patch-rules row whose commit has the base as a parent must allow exactly [merge-result]; [any, merge-result] is now rejected, with a fixture. The docs and the prepare description now call patch-rules.json the registry the apply-patch script is to read, since no apply step reads it yet, and the resolve-config README says the registry is checked after the config loads. The read runner's applied-by-supported comment names its output-mode condition. broker-vendoring.test.mjs probes loadConfig's needed files from the full lane file set, so a key missing from the copied TRUST_FILES is named in the failure, with a self-test. callers.test.mjs's commit helper turns off commit signing so host signing config cannot fail it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ejection order The convention README and pr-run-activity.md now say the read runner collects a patch only when the caller passes output-mode: patch, that no activity sets applied-by today, and that fix-ci reaches apply-ci-fix through output-mode: patch. The resolve-config README places the patch rules check after loadConfig's rejections and before rejections 12 and 15. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
|
claude-security-review reviewed Security review: PR #8477 at 31550d0Findings: 0. I found no exploitable security issue in this diff, so I posted no inline comments. I read the config resolver and patch-rules validation, the tool-grant change in Trust boundaries checked:
Note: |
|
claude-review reviewed No findings. I read the full diff ( The PR adds the What I checked and found consistent:
Verification in the PR body (540/540 tests, the broker compatibility run, the two verifier passes) is author-claimed, and I did not rerun it. Not a finding: the PR body notes |
…ges no edit tools checks, self-checks, verify-scripts and web-access turned on now need an effect other than read, or applied-by.patch without prepare: ci-context. collect-base-activity stages them only for those skills, so elsewhere they were silently ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane-Activity: pr-unblock/resolve-conflicts
No related issue: Phase 3 of the lane-funding write-lane plan (owner-approved 2026-10-19)
Hold: a human merges this
Broker pin: melodic-software/azure-iac#57
Summary
This adds the config contract that later phases use to move write lanes' model steps onto ci-workflows
run-claude-cli, so each lane spends its role's API credits first. A model activity will hand its change on as a patch to a separate apply step. The newapplied-byfield names which script activity applies each artifact. The new trust-root registry,.github/actions/resolve-config/patch-rules.json, holds the rules each producer's patch is to be held to. No live activity setsapplied-byyet, so lane behavior does not change.Fix
pr-pipeline.schema.json:applied-by, a closed key set (patch,feedback-replies,dependency-verdict,work-outcome), allowed onskillleaves only, forcingeffect: readandgating: advisory;funding;checks,self-checks,verify-scriptsandweb-access(when on) only on a skill whose runner stages edit tools: an effect other thanread, orapplied-by.patchwithoutprepare: ci-context($defs/edit-runner). Before, they needed an effect other thanread, andcheckshad no rule.pr-pipeline.yaml: removes the unusedfunding:map.resolve.mjsrejects withinvalid-applied-bya target that:patchtarget withoutprepare: apply-patch;needsthe producer.patch-rules.jsonand its schema hold rowsci-context,review-threads,dependency-review,merge-base,defaultandissue..github/**,.claude/**, root.mcp.json,.gitmodules,**/settings*.json, symlinks, gitlinks, new exec bits, and renames into refused paths.baseas a commit parent must allow exactly[merge-result].resolve-config.mjschecks the patch rules on every lane run and fails closed. It also rejects anapplied-bykey the runner does not list in the newapplied-by-supportedinput.pr-run-activity-read.ymlpassesapplied-by-supported: patch.collect-base-activityand the changed-paths filter grant edit tools oneffect != readORapplied-by.patch. The effect half goes once the last skill leavespr-run-activity-write.yml.broker-vendoring.test.mjschecks the reader's import closure and the filesloadConfigneeds against the azure-iac broker's vendored lists andbinding.mjsTRUST_FILES. It fails naming the missing key, which guards against the kind of broker outage seen on 2026-10-19.pr-run-activity.mdand the resolve-config README describe the contract and say what is not yet in effect.A pull request that edits a
.github/workflowsfile runspr-refine / fix-docs, which is expected to go red here and is not a regression.Verification
node --testover.github/actions/resolve-config/*.test.mjsand.github/actions/collect-base-activity/*.test.mjs: 540/540 pass on 8e78e7c (530 before the review fix in cda5fd3).scripts/check-affected.sh --tests: no failures on 8e78e7c.pr-pipeline.schema.json, without error, and gives the same grant results as this tree's reader for all 13 live lane slots (0 differences). The pin PR changes onlyresolve-config.pin.any. Both were fixed, and the final pass found only wording, which was corrected.Related
🤖 Generated with Claude Code