fix: mark generated MCP swarms as read-only analysis#12
Closed
kbentonferguson wants to merge 1 commit into
Closed
Conversation
…ing handles dirty diff reviews safely. Comprehensive tests for read-only routing and swarm config.
df4ac14 to
2aa2836
Compare
Owner
|
Integrated into |
professorpalmer
added a commit
that referenced
this pull request
Jun 17, 2026
…rms, heartbeat throttle, compact status, cross-project dashboard) Five external contributions reviewed end-to-end, integrated with authorship preserved, and hardened with follow-up fixes/tests: - #10 (@kbentonferguson): explicit, secret-safe Codex MCP credential inheritance (--env/--inherit-env/--env-file/--map-env/--force-env), managed 0600 wrapper for secrets, $CODEX_HOME/auth.json billing, doctor --json. Follow-up: decoupled Codex availability from billing health so an OPENAI_API_KEY-only setup is never demoted (non-regressive + regression test). - #11/#12 (@kbentonferguson): generated MCP swarms carry read_only/sandbox so Codex-routed analysis reviews dirty diffs without tripping the clean-tree guard; edit/implement paths still require a clean tree. - #11 (@kbentonferguson): worker heartbeat throttled off the 0.1s poll loop (cap lease/3 keeps >=3 renewals/lease); inline workers scope PUPPETMASTER_STATE_DIR to the store root. - #13 (@kbentonferguson): status --compact + MCP compact arg replace prompt bodies with chars+sha256 refs (97.4% reduction measured); default unchanged. - #14 (@jwellman80): dashboard --all-projects aggregates every project state dir with traversal guard intact. Follow-ups: added the missing aggregation test and wired --all-projects through the MCP puppetmaster_dashboard tool. Full suite 702 green (+19 tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
read_only,sandbox: "read-only", anddangerously_bypass_approvals_and_sandbox: falseWhy
Generated MCP swarms are analysis workers: they are prompted to emit structured artifacts and not modify files. When auto-routing selects an edit-capable adapter like Codex, that analysis intent needs to survive in the task payload so the adapter uses its existing read-only path.
Without this, a review/audit swarm over an intentionally dirty diff can be treated like a full-edit run and blocked by the clean-tree guard, even though the dirty diff is the input being reviewed rather than an output Puppetmaster needs to attribute.
This keeps the boundary explicit: analysis swarms can review dirty diffs read-only, while implement/edit workers still require a clean tree unless explicitly allowed.
Tests
python3 -m pytest tests/test_puppetmaster.py -q -k 'generated_swarm_codex_read_only or mcp_swarm_config_writer or codex_read_only or dirty_worktree or swarm_mode'env -u CODEX_COMMAND -u CODEX_CI -u CODEX_HOME -u CODEX_PATH -u CODEX_THREAD_ID python3 -m pytest tests/test_puppetmaster.py -qgit diff --check