Repository navigation
fix(harness-ops): refuse a lane that arms the stop gate under a profile without autonomy - #16586
Conversation
…le without autonomy A lane's profile wins on enabledPlugins in the merged session settings, so a lane arming the autonomy lane-stop gate under a profile that leaves autonomy off started without its gate. lane_claude_prefix, which both the launch and the restart preflight use, now refuses that lane with an error naming the lane, the profile and the fix. The restart preflight passes the lane's settings so its check sees the gate. plugin-profiles' launch --json reports the merged settings it writes (under --dry-run too), which is what the check reads. Closes #16562 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmbLtFcfditeagftLrv
|
Owner: the control-hub session "Plugin Presets" watches and merges this pull request; it waits on CI Status and the review lanes on head 9bfb5ec. Review findings go to it, and the build session (plugin-profiles-build-5) fixes them. |
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: PR #16586, incremental (9bfb5ec → d62fd5d)This review was blocking only: this lane already reviewed an earlier head, so it reports only CRITICAL and IMPORTANT findings. I found no security issues in this push. I read all six files listed in the incremental scope. What changed in this push. What I checked:
critical-findings: 0 |
|
claude-review reviewed Incremental code review:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bfb5ec9d5
ℹ️ 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".
…start launch --json now reports enabledPlugins as the session will start with them, through effective() over every loaded settings layer with the session file as the session layer, in place of the session file's own content. A profile writes no entry for a plugin the repository, managed or user settings enable, so the old check refused a gated lane whose session would start with autonomy on. The launcher also refuses, with its own error saying to update plugin-profiles, when profiles.mjs reports no enabledPlugins, instead of blaming the profile. Refs: #16562 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmbLtFcfditeagftLrv
Post-merge mutation testingKilled 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Surviving mutants
The run's summary has the full report. |
Closes #16562
Summary
Since #16523 a lane can name a plugin
profile, and the profile wins onenabledPluginsin the merged session settings. A lane that armed theautonomylane-stop gate under a profile leavingautonomyoff started without its gate, with no warning. The launcher now refuses that lane.Fix
plugins/harness-ops/skills/lanes/scripts/lane-launcher.sh,lane_claude_prefix: when the lane's settings arm the lane-stop gate, it reads theenabledPluginsthatprofiles.mjs launch --jsonreports and refuses the lane unless anautonomy(orautonomy@<marketplace>) entry there istrue. The error reads: "lane '': the lane arms the lane-stop gate but profile '' leaves autonomy off and no settings layer enables it for the session, so the lane is not launched; give the lane a profile that includes autonomy". Whenlaunch --jsonreports noenabledPlugins(a plugin-profiles older than this change), the lane is refused with "lane '': profiles.mjs launch reported no enabledPlugins to check the lane-stop gate's autonomy against, so the lane is not launched; update plugin-profiles". The launch (build_lane_flags) and the restart preflight both call this function; the preflight now passes the lane's settings so its check sees the gate, and a refused restart leaves the running lane up.plugins/plugin-profiles/scripts/profiles.mjs,launch: with a profile, the--jsonresult carriesenabledPlugins, each plugin any settings layer names as the session will start with it: the existingeffective()over the loaded managed, project, local and user layers with the session file as the session layer. A profile writes no entry for a plugin the repository's.claude/settings.jsonenables, a managed pin, or a plugin of a marketplace it does not govern, so the session file alone would miss those. Reported under--dry-runtoo (the restart preflight runs--dry-run, which writes no file).plugins/harness-ops/skills/lanes/context/config.md: thelanes[].profilerow states both refusals.patch(fix), plugin-profilesminor(newenabledPluginsfield inlaunch --json).Done-when, item by item:
autonomynot enabled there, is not launched; the error names the lane, the profile and the fix. Delivered: the check reads the session file as the session layer over every other settings layer, soautonomyenabled at project, managed or user level counts, and the error says the profile leaves it off only when no layer enables it.lane_claude_prefix, whichbuild_lane_flags(every launch path) and the restart preflight call. Delivered.lane_claude_prefixreturns before any check with no profile. Delivered; the existing no-profile and no-settings tests still pass.enabledPlugins(gated lane refused with the update error, ungated lane launches). Delivered.Verification
bash plugins/harness-ops/skills/lanes/scripts/lane-launcher.test.sh: PASS, 565 cases, including the new ones listed in item 4. The restart expectation shows the preflight's--with <settings> --dry-runcall.node --test --test-concurrency=4 plugins/plugin-profiles/scripts/profiles.test.mjs: 83 pass, 0 fail. The new case launchesbuildin a fixture whose project.claude/settings.jsonenablestoolchain: the session file has notoolchainentry,enabledPluginsreports ittrue, reports the profile's ownfalseforsongwritingover user settings'true, and matches under--dry-run.check-affectedpasses.start(notrestart) has already armed the gate and, in a real launch, written the session file before the check; neither is used, and the session file is removed by the 30-day sweep. A refused restart writes neither, since its preflight runs--dry-runbefore arming.Related
profile; pr-verify raised this as a note there.🤖 Generated with Claude Code
https://claude.ai/code/session_015XWwmbLtFcfditeagftLrv