Skip to content

fix(wire-agents): keep .claude/settings.json across a re-wire - #421

Merged
MendixMau merged 7 commits into
masterfrom
night/fix-419
Oct 16, 2026
Merged

MendixMau merged 7 commits into
masterfrom
night/fix-419

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Fixes #419

wire-agents.sh runs mxcli init, which overwrites .claude/settings.json. It now snapshots the file first and merges after init: the project's entries win and keep their order, entries only mxcli's new file has are appended. Merge, not PRESERVE: PRESERVE restores the old bytes and would also drop anything a newer mxcli adds. An invalid-JSON snapshot is restored byte for byte.

Impact

Row Answer
Process No new step or gate. A re-wire no longer loses the permission profile, user entries or the mxcli exec deny rule.
Dependencies bin/wire-agents.sh now sources bin/lib/portable.sh (require_py, python3 as install-claude-permissions.sh already does). Independent of #414.
Context cost none: no routed or always-loaded file touched
Behaviour n/a: scripts only
Runtime n/a: one small python call per re-wire

Test: tests/wave2/test-wire-agents-settings.sh (profile + user entry + deny rule + hook survive, new mxcli entry added, idempotent); 4 of 6 checks fail on master. Kiro test still passes. check-pr-discipline clean.

🤖 Generated with Claude Code

MendixMau and others added 2 commits October 16, 2026 11:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng Python

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MendixMau and others added 2 commits October 16, 2026 15:38
The merge ran as a bare command, so a non-zero exit ended the script before the
restore. Wrap it in if ! ... then cp; WARN; fi. Tests: fake python3 that fails the
merge, and one that truncates the target first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	CHANGELOG.md
MendixMau and others added 3 commits October 16, 2026 17:28
…s settings test

The warning text and the fake-interpreter test wrappers name python3 on purpose.
Mark them with portability-ok instead of weakening the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MendixMau
MendixMau merged commit 498b3ec into master Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] sync re-wire runs mxcli init, which overwrites .claude/settings.json and drops the mxcli exec deny rule

1 participant