Repository navigation
Conversation
There was a problem hiding this comment.
The change looks sound. I ran the PR's updated ranks integration policies… test against the base, where it fails: managed shell:rm* deny and shell:ls allow beat the Console document. With this branch it passes, and so does the disconnect fallback. The config tests (50 pass) and Console provider tests (47 pass) also pass. I couldn't run typecheck here because the sandbox has Bun 1.4.2, which lacks bun check.
Ordinary settings merge exactly as before, because managedPolicies holds only policy documents. Only policy authority changes, and it goes back to the order the docs described before #57703.
Public API: no code, schema, CLI or SDK changes. The only external change is the documented policies precedence: a connected Console now outranks macOS managed preferences and the system opencode.json, so an organization allow can lift an MDM or system deny. That's intended and documented in policies.mdx.
No blocking concerns.
Summary
This changes policy precedence. Ordinary settings continue to use their existing merge order.
Verification
bun run checkpasses with pinned Bun 1.4.4 (existing lint warnings).Before / after proof
Ran the same Config service integration request against base
115113931cin a separate checkout and this branch, using temporary configuration directories and the real config loader and policy evaluator.Managed system file: deny
shell:rm*, allowshell:ls, denyshell:git*.Console integration document: allow
shell:rm*, denyshell:ls.Then remove the integration document and evaluate again. These are policy evaluations; no shell commands are executed.
Before:
{ "connected": { "shell:rm -rf": "deny", "shell:ls": "allow", "shell:git push": "deny" }, "disconnected": { "shell:rm -rf": "deny" } }After:
{ "connected": { "shell:rm -rf": "allow", "shell:ls": "deny", "shell:git push": "deny" }, "disconnected": { "shell:rm -rf": "deny" } }Test locally
From this branch:
Expected:
1 pass,0 fail. The test uses temporary files and an injected Console document, so no MDM profile or Console account changes are needed.Visual
Real TUI recordings with the same prompt and policy conflict on both branches. A temporary managed-system config denies
shell:echo console-policy-wins; an injected Console integration document allows it. Both go through the production config loader, policy evaluator, permission hook, and shell tool. The demo uses the managed-system path shared with MDM policy ordering; it does not deploy an MDM profile or change workspace policies.Before — base
115113931c: managed policy wins and blocks the command.before.mp4
After —
10786f5624: Console wins and the command printsconsole-policy-wins.after.mp4
Final-state screenshots
Before: the shell tool reports “Blocked by configuration policy”.
After: the shell tool executes and shows its output.