Repository navigation
feat(sync-project): --only-bin installs just the named scripts (#390) - #396
Merged
Merged
Conversation
--upgrade-bin only lifts the overwrite refusal for a modified copy; the full sync still runs. A field run used it as "install just these scripts" and got 244 changed tracked files, a deletion, ~30 additions and reinstalled hooks. --only-bin X [--only-bin Y] copies only project-bin/X into <project>/bin/, decides everything before writing (unknown/path-like name or an unaccepted local modification exits 1, project untouched), backs up an overwritten copy (--upgrade-bin X or --force), prints every file written, and exits before any other sync section runs. Docs and remedy lines now say --upgrade-bin is a full sync and point scoped installs at --only-bin. Fixture tests/wave2/test-sync-only-bin.sh: 26/26 on single- and two-tree. test-bug12-sync.sh: 61/61. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Review fixes for #396: - an unedited older copy is not refreshed on top of a hand-edited bin/_common.sh (the full sync's hold, same message) unless --upgrade-bin names it / all, or --force - names are validated against MXTK_PROJECT_BIN; NOINSTALL files such as report-disposition-check.sh are refused - set -f around the --only-bin name and plan loops: '*' is never globbed - --only-bin '' (or a value with spaces) is a usage error - the dry-run line for an upgrade says a backup would be written Fixture test-sync-only-bin.sh: 40/40 (O6-O9 added, both layouts; the previous commit fails 12 of them). test-bug12-sync.sh: 61/61. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau
pushed a commit
that referenced
this pull request
Oct 15, 2026
Brings in #396 (sync-project.sh --only-bin). No conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau
pushed a commit
that referenced
this pull request
Oct 15, 2026
exec.sh and test-scratch.sh told users to run sync-project.sh with --upgrade-bin _common.sh alone, which runs a full sync. They now give --only-bin _common.sh --upgrade-bin _common.sh, matching test-scratch.sh's mxtest guard on master. app-restart.sh is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
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.
Direct lane
What changed and why (one paragraph):
bin/sync-project.sh <project> --upgrade-bin Xis not a scoped install, and nothing else was.--upgrade-binonly allows overwriting a locally modified copy of X; the full sync still runs. Field finding 1 in #390: an install step written assync-project.sh <project> --upgrade-bin exec.sh --upgrade-bin _common.sh --upgrade-bin test-scratch.shchanged 244 tracked files, deleted one file, added about 30 and reinstalled 3 git hooks. This PR adds--only-bin <script.sh>(repeatable). It copies only the namedproject-bin/scripts into<project-root>/bin/, the samebin/on single-tree and two-tree (app/) layouts, then exits before any other sync section runs. That means no skills, CLAUDE.md, hooks, tests/e2e, routing or deletions. It decides everything before it writes anything. An unknown name, a path-like name, or a locally modified copy that--upgrade-bin <name>/allor the new--forcedid not accept exits 1 and leaves the project untouched. It refreshes an unedited older toolkit copy, as the full sync does, unless--no-refreshis given. It backs up an overwritten copy first and prints every file it writes, backups included.--dry-runworks with it. Options that make no sense with it (--repair-intake,--adopt-routing,--pin-models,--diff-completed,--upgrade-lint-rules) are rejected. The header and--helpnow say plainly that--upgrade-binruns a full sync. The "install just this file" remedy lines inapp-restart.sh,test-scratch.sh,test-stack-up.sh,doctor.shandharvest-learnings.shnow name--only-bin X --upgrade-bin X. No.mddoc outside CHANGELOG described--upgrade-bin.copy_kind/TK_ROOTmoved up next topast-stock.shso the early-exit block can use them; the function is unchanged.Impact
--only-binfor installing or trying just a few scripts, for example from a branch. Nothing new blocks; the default sync and--upgrade-binbehave as before.bin/sync-project.sh(shared by every project sync), plus message-only edits inproject-bin/app-restart.sh,test-scratch.sh,test-stack-up.sh,bin/doctor.shandbin/harvest-learnings.sh(each keeps the--upgrade-bin <name>substring its fixtures grep for). No new tools, no new artifact reads. bash 3.2 safe (no mapfile, no associative arrays).bin/render-routing.sh --checkpasses unchanged on head).--only-binis a handful ofcp/cmpcalls plus one git-history lookup per differing copy, which is far cheaper than the full sync it replaces for this use.Field evidence: issue #390, finding 1. On a real Mendix 11.15 project (macOS, bash 3.2), the documented
--upgrade-bininstall of three scripts ran a full sync: 244 tracked files changed, 1 deleted, about 30 added, 3 git hooks reinstalled. The field tester had to revert and copy the three files by hand.--only-binis that hand copy, with the local-modification guard and a list of what was written. It has not yet been run on a field project; the next field step that installs branch scripts should use it.LEAKGUARD_ALLOW_NO_DENYLIST=1 bin/check-no-client-data.sh: clean)tests/wave2/test-sync-only-bin.sh bin/sync-project.shgives 40/40 across both layouts; against origin/master's script it gives 8/26 on the first-round cases, and against the first commit of this PR the review-round cases fail 12 of 14, so it discriminates.tests/wave2/test-bug12-sync.sh bin/sync-project.shgives 61/61. Fixtures that grep the changed remedy lines (test-property-sets,test-harvest-learnings,test-app-restart,test-test-scratch) were checked by inspection (T0): their substrings are still present..mprunderapp/). Platform: onlycp/cmp/chmod/date, no mac-only tools, andbin/check-portability.shis clean. There is no golden capture because no tool output is parsed.CHANGELOG.mdline added under Unreleased, credited "field run, issue Field runs 2026-10-15: #379 PASS, #384 PASS (sync --upgrade-bin not scoped; copy 87-134 s), #374 PASS (.bak in mprcontents) #390"bin/check-scripts.sh,bin/check-pr-discipline.sh origin/masterandbin/render-routing.sh --checkall cleanFixture coverage (
tests/wave2/test-sync-only-bin.sh, per layout):--only-bin restore-mpr.shchangesgit statusby exactly?? bin/restore-mpr.sh. The scratch project is committed, with two bin scripts missing and the hooks removed, so a full sync would have work to do..claude/skills,.ai-context/skills) are byte-identical, and so is every other file.--upgrade-bin restore-mpr.shsync of the same project installs other scripts and the hooks.--upgrade-bin <name>upgrades it and writes a backup, and only those two files change.--forceoverwrites too._common.shbut refused, with the full sync's message, on a hand-edited one.--dry-runof the upgrade names the backup and writes nothing, and--upgrade-bin exec.shlifts the hold.report-disposition-check.sh, NOINSTALL) is refused.--only-bin '*'run from a directory holdingrestore-mpr.sh/snapshot-mpr.shinstalls nothing.--only-bin ''is a usage error.🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code