Repository navigation
fix(source-control)!: read the merge trust and cost settings from userConfig - #17473
Conversation
…Config The merge path trusted one organization's values fixed in the plugin: the owners it merges for unattended, the reusable review workflows and check names that count as AI review, the owner-decisions record whose rows clear a cost hold, the free runner labels, the model-leg actions and the App whose Work status values count like a person's. Each is now a source-control userConfig key that babysit_merge_settings.py reads only from user and managed settings (hook-config-delivery channel F), never from a checkout or the environment, so a pull request cannot widen one. Every key fails closed when unset. This repository's values live in .github/source-control-settings.json, on the hold floor; the babysit-prs suites run under them. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rol-trust-settings
… budget Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ged drop-in Every job that runs the babysit scripts writes .base's .github/source-control-settings.json into a root-owned /etc/claude-code/managed-settings.d/50-source-control.json right after its default-branch checkout, before runner isolation or any pull-request content, through ci-workflows' apply-claude-managed-settings. The reader already reads managed-settings.d; new tests prove it reads the drop-in and nothing in the checkout or the environment. The legacy FAILs file moves out of the plugin to .github/; the verdict reader reads only the file BABYSIT_VERIFY_LEGACY_FAILS names, which these workflows set to the .base copy. Both data files are trust rows on the floor. BREAKING CHANGE: unset, the settings name no owner, lane, check, record, extra free runner or App, and the verdict reader reads no legacy file. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rol-trust-settings # Conflicts: # .github/workflows/pr-require-checks.yml # plugins/source-control/README.md # plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_risk.py # plugins/source-control/skills/babysit-prs/scripts/tests/test_floor_paths.py # plugins/source-control/skills/babysit-prs/scripts/tests/test_merge_holds_sync.py
The drop-in steps in pr-review-main.yml move after each leg's "Record the main commit" step, which the workflow tests require right after the checkout; they still run before runner isolation and pull-request content. merge-job.test.mjs lists the new step in dispatch-post-merge-runs. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
…rol-trust-settings
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-security-review reviewed Security review: incremental, 73e8be8 → 3752916 (5 files)No security issues in this push. This lane already reviewed an earlier head, so the round reported blocking findings only. None turned up. What changedThe push restores
Matching an extra action name trusts no new actor or token. It only makes the cost and agent-surface checks hold more often. Notes
Manifest lines (1)
critical-findings: 0 |
|
claude-review reviewed Code review: incremental, blocking onlyThis lane already reviewed an earlier head, so this pass reports only blocking findings and manifest flag lines. I read every hunk of all 5 files that changed since Result: no blocking findings. The push fixes the loosened-check finding from the last round (thread, settled by the owner and resolved at this head):
Notes
Advisory and manifest lines (1)
Verifier dropped 0 of 0 candidates. |
ci-status's drop-in step read .base/.github/source-control-settings.json from main's tip, which has no such file until this change lands, so CI Status failed on ENOENT. The step now runs only when the file exists; until then the reader keeps its fail-closed defaults. - Add the source-control plugin.json to ci-status's sparse checkout, so resolve_install names the plugin and the drop-in's values match. - post-merge-demotion-alert test: allow exactly the pinned drop-in step, with only its two inputs, in the file-demotion-issue job, and drop the comment that said the job runs no action but checkout and log-api-budget. - AnchorUpload test: remove exactly one pinned drop-in step and keep the claude ban on the rest of the job, instead of deleting the action name. - ci-lanes-pr-hold test: put BABYSIT_VERIFY_LEGACY_FAILS outside the reader's directory, and check a file beside the reader alone is not FAIL index mode. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
…rol-trust-settings
|
The pr-verify verifier failed head What it wrote (36 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
…rge list merge.md's jq matches whole check names, so the settings-derived union lost `pr-review-no-bots / claude-review-status`, which babysit already covered through its bare-name segment match. Name it as a merge check so the merge.md lists match main again. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
…rol-trust-settings
With model_leg_actions unset, a workflow adding run-claude-cli no longer rated as a new model leg, so the cost check accepted more than before. Keep the name in the built-in pattern; the setting only adds names. Refs: #17208 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Refs: #17208
Summary
The source-control merge path trusted one organization's values, fixed in the plugin. Seven of them become source-control
userConfigkeys. Only the operator's user or managed settings (managed-settings.d drop-ins included) can set them, so a pull request's own head cannot widen any of them. Each key fails closed when unset. This repository's lanes now receive its values through a root-owned managed-settings drop-in written from the default branch.The owner approved these changes to these controls in session on 2026-11-19, in two decisions:
unattended_merge_ownersreference/providers/github/pull-request/merge.mdreview_lane_workflowsreview-venue.shreview_lane_checksbabysit_review_evidence.LANES,babysit_merge.AI_REVIEW_CHECKSand the merge.md listowner_decisions_recordbabysit_merge_policy.DECISION_ROWand thebabysit_riskhintfree_runner_labelsbabysit_risk._FREE_RUNNERmodel_leg_actionsbabysit_risk._MODEL_ACTION*run-claude-cliandclaude-code*names count; the setting can only addissue_status_app_loginbabysit_merge_policy.LANES_APP_LOGINThe legacy FAILs file (
verify-legacy-fails.json) moves out of the plugin to.github/. The verdict reader now reads only the fileBABYSIT_VERIFY_LEGACY_FAILSnames.Bump: major. A consumer loses behavior when the keys are unset: unattended merge, CI review-lane credit, cost-decision clears, the lanes App, the org's free runners, and the index mode that the legacy file beside the reader used to turn on.
Fix
skills/babysit-prs/scripts/babysit_merge_settings.pyreads settings the waylib/plugin-options.mjsdoes (hook-config-delivery channel F).pluginConfigs["<name>@<marketplace>"].optionsfrom the usersettings.jsonit locates from its own plugin-cache install path.managed-settings.jsonand themanaged-settings.d/*.jsondrop-ins, merged in name order. Managed settings win.*globs, escaped before any regex is built. A malformed entry drops the whole setting.review-venue.sh, and the merge.md merge script and conditions.babysit_ghskips a lane that is not configured..basedefault-branch checkout and before any runner isolation or pull-request content:apply-claude-managed-settings(ci-workflows v0.77.0,6229c347) withdrop-in-file: .base/.github/source-control-settings.json./etc/claude-code/managed-settings.d/50-source-control.json, root-owned with mode 644.pr-merge.yml(dispatch-post-merge-runs, merge, enable-auto-merge),pr-require-checks.ymlci-status,pr-review-main.yml(check-trigger, review, review-subscription, review-fallback),pr-dispatch-feedback.ymldispatch,pr-unblock-dispatch.ymldispatch, andpost-merge-file-demotion-issues.yml(file-demotion-issue, close-cleared).BABYSIT_VERIFY_LEGACY_FAILSto the.basecopy of the legacy file..github/source-control-settings.json. That file and the legacy file aretrustrows on the hold floor, and so is the reader module. Generated copies are refreshed, and the floor pins moved for the three new rows.source-controlfragmentbump: major;pr-pipelinefragmentbump: patchfor the legacy file's new home.plugin.jsonuserConfig, the README tables,config-resolution.md, both merge.md files,review-venue.md,safety.md,guard-contract.mdand the pr-pipeline README.Why a pull request's head cannot widen a value:
settings.json, and the fixed managed paths..basecheckout of the default-branch tip (ref: ${{ steps.tip.outputs.sha }},persist-credentials: false), insidepull_request_target,workflow_run, schedule and push workflows that run the default-branch workflow file.test_checkout_files_and_the_environment_are_not_sourcesandtest_the_ci_shape_ignores_the_environment_and_the_checkoutplant wider values in a project.claude/settings.json, a checkout.github/source-control-settings.json,CLAUDE_PLUGIN_OPTION_*,CLAUDE_CONFIG_DIRandHOME. Only the drop-in's values are read.test_drop_ins_are_read_in_name_order_after_the_base_filechecks how drop-ins merge.Verification
skills/babysit-prs/scriptsunderpython3 -m unittest discover: 4576 tests, OK (1 skipped).test_babysit_merge_settings.py: 19 tests, covering unset, configured, the CI drop-in shape, pull-request-head attempts, malformed sources and precedence.review-venue.test.sh: 104 PASS.scripts/ci-lanes-pr-hold.test.sh: 347 PASS, including FAIL index mode throughBABYSIT_VERIFY_LEGACY_FAILS.merge-holds.test.mjs: 76 pass.sync-hold-floor --checkand the plugin-options docs check are clean.actionlintis clean on the six edited workflows..github/source-control-settings.json), match main except the claude-review lane also accepts a check named exactlyclaude-review-status, whichbabysit_merge.pyalready accepted on main.babysit_merge.AI_REVIEW_CHECKSalso listspr-review-no-bots / claude-review-status, which its bareclaude-review-statusalready matched, so merge.md keeps that name.Remaining
What #17208 still needs after this PR:
plugins/*/skills,agents,referenceandhooks. That classification has not been done for the whole tree.observabilitySKILL.md and the work-itemsmorning-briefSKILL.md.scripts/check-skill-portability.shor another CI check.Related
block-lane-pr-disable-auto.shlanes App login (row R8), which reverts on its own.🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd