fix(bin): allow collision-safe fast-forwards with local changes - #2236
Open
4mb1t10n wants to merge 3 commits into
Open
fix(bin): allow collision-safe fast-forwards with local changes#22364mb1t10n wants to merge 3 commits into
4mb1t10n wants to merge 3 commits into
Conversation
Author
Decisions
Recorded by Firstmate under delegated routine authority. |
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.
Intent
Implement #1041 against main exactly as specified in the issue. Reuse the established collision-precision behavior for every fm-ff-lib fast-forward consumer: refuse genuine collisions including incoming deletes over locally modified paths and incoming additions over untracked paths, fail closed on unclassifiable states, report the colliding paths, and preserve spaces and non-ASCII names through NUL-delimited parsing; allow unrelated modified and untracked paths to proceed safely. Keep the current local-material-only config push behavior and exclude unrelated sync redesign. Add executable behavioral regressions proving both refusal and safe progress in local-HEAD and origin modes. No database or browser stack and never run local Cypress. Fully close the issue in the PR body with a standalone Closes #1041 line. Complete No Mistakes plus exact-head CI and mergeability evidence, and never merge the PR. The broader secondmate-harness concurrency timeout was reproduced identically on unchanged origin/main b5d430d, so accept the green collision-specific suites and repository lint as equivalent relevant evidence and do not repeat that timed-out invocation.
What Changed
Closes #1041
Risk Assessment
✅ Low: The shared fast-forward boundary now rejects genuine and unclassifiable collisions while permitting unrelated dirt, with executable coverage for refusal and safe progress in both local-HEAD and origin modes.
Testing
Inspected the target diff, ran the focused local-HEAD and origin-mode behavioral suites, and manually exercised the shared fast-forward interface: it reported and refused an incoming delete over a locally modified spaced Unicode path while preserving HEAD and content, then safely advanced across unrelated untracked material without disturbing it. No browser evidence applies because this is shell CLI behavior.
Evidence: Collision refusal and safe-progress CLI transcript
demo: skipped: uncommitted paths collide with fast-forward: old file 雪.txt - uncommitted changes here, while the fast-forward removes it status=skipped head_unchanged=yes local_content=operator edit preserved demo: updated e0efbc1..8185340 status=updated head_reached_target=yes unrelated_content=unrelated local editEvidence: Local-HEAD collision suite
Evidence: Origin collision suite
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
Inspectedgit diff b5d430d6fdcd961ce9b681bf196f365c1825c284..9c5c32069273f86b64414040ab03a293372dcbc9and the affected executable test entry points.bash tests/fm-secondmate-sync.test.shbash tests/fm-update.test.sh/tmp/no-mistakes-evidence/01KZTA1YR99CG2SD2FG3ZKSEYT/collision-demo.sh "$PWD" /tmp/no-mistakes-evidence/01KZTA1YR99CG2SD2FG3ZKSEYTVerifiedgit status --shortwas empty after testing.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.