Repository navigation
Conversation
Refuse missing or unrelated staged paths and stale indexed content without consuming the queue or resetting the index.
Check component prefixes in requested/index and outgoing trees, including retained commits and fetch/merge retries. Preserve historical aliases, local commits, index, and queue on refusal.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
capy-ai Bot
added a commit
that referenced
this pull request
Oct 17, 2026
…ad of reporting ok (#3220) (#3254) * fix(brain-sync): verify requested index entries after add Refuse missing or unrelated staged paths and stale indexed content without consuming the queue or resetting the index. * fix(brain-sync): refuse new casefold path collisions Check component prefixes in requested/index and outgoing trees, including retained commits and fetch/merge retries. Preserve historical aliases, local commits, index, and queue on refusal. * fix(brain-sync): hold case-colliding paths instead of halting the sync (#3220) Builds on Kkkkkuro's staged-index and casefold checks (#3245, from #3223). A queued path whose spelling differs only by letter case from another path in the index or the batch is held before staging: it stays queued, every other file keeps syncing, and the status is "collision" rather than "ok". An established spelling keeps syncing; only the new alias waits. Skill start prints one ARTIFACTS_SYNC attention line naming the colliding names and the repair anchor (docs/troubleshooting.md#artifact-case-collision); gstack-doctor warns the same way. The outgoing check is cached by HEAD so the empty-queue drain at every skill boundary stays near main's cost. gstack-slug and skill start's slug path are unchanged. Co-authored-by: Kkkkkuro <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(brain-sync): close review gaps in the case-collision hold - Windows: write the held-path list with LF and strip CR from helper output, so CRLF cannot let a held path through or blank case_names. - --publish-removals runs the outgoing case check before it pushes. - The cached outgoing verdict is keyed by every ref, not HEAD alone, so a moved remote baseline is re-checked. - The repair snippet folds only JSONL logs and lists snapshots and other files for a manual decision. Co-authored-by: Kkkkkuro <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(brain-sync): second review pass on the case-collision hold - The repair loop also folds the dropped spelling's untracked (held) files and says to check for leftovers before removing the folder on Linux. - The cached outgoing verdict also keys on HEAD's symbolic target. - The outgoing check no longer needs a temp file, so a failed mktemp can no longer skip it. Co-authored-by: Kkkkkuro <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(brain-sync): give the retry-merge fixture a git identity The retry merge commits with the ambient identity. CI and Ubicloud runners have none under the test HOME, so the merge failed before the outgoing case check ran and the drain reported push_failed instead of error. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): unreleased entry for the #3220 case-collision hold Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * v1.91.126.0 stamp Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: KuroChen <[email protected]> Co-authored-by: Kkkkkuro <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Contributor
|
Thank you, @Kkkkkuro. This narrow version is the basis of #3254 (v1.91.126.0, 4e4f295), which cherry-picks both of your commits with your authorship. It adds a hold (sync keeps going without colliding aliases), Windows CRLF and --publish-removals coverage, a skill-start warning and a repair doc. Closing as superseded by #3254. |
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.
Git can report a successful
addwithout staging the requested spelling or current bytes, so brain-sync can acknowledge a queued artifact that was never committed. A sync can also introduce casefold aliases at any directory component, including when a rejected push fetches and merges another writer's safe-looking tree.This is the narrow first step suggested in the triage comment on #3223, with two focused commits:
Only brain-sync, one read-only Python helper, and its existing integration test file change. The writer-lease system, artifact publishers, identity migration, production repair, and the original #3223 branch are outside this contribution. This is cooperative validation at sync boundaries, not a filesystem exclusion or migration guarantee.
Refs #3220. The broader #3223 remains open and unchanged.
Validation (macOS, Bun 1.4.2; exact final revision recorded below):
bun test test/brain-sync.test.ts test/brain-sync-windows-paths.test.ts test/transcript-scope-brain-sync.test.ts test/spawnsync-timeout-tripwire.test.ts: 92 pass, 0 fail, 562 assertions.bun run build,bun run typecheck, Bash/Python syntax,git diff --check, and the public-diff credential scan: passed (0 scanner findings).bun run typecheck:test: failed on two checkout-path-escaped TS2339 diagnostic identities. The same command on untouched based258bcffreproduces both; no type-debt baseline was widened.bun run test: incomplete, not passed. The full free runner was attempted (1,275 planned parallel files plus one exclusive file); this macOS sandbox rejects localhost listeners, process operations and Swift module-cache writes, and Swift reports an SDK/compiler mismatch. Other observed failures remain untriaged; they are not all attributed to infrastructure. Cancellation was denied by the sandbox, so this is not a completed full-suite result. No retry or machine-policy change was made.Final head:
61b7db90e594405e4a8f1df112f30dd547f7f509; base:d258bcffb0cb7bda5f133f3e957f932d816d282f.Draft for maintainer review; no full-suite, native-Windows, release, deployment, or production-repair acceptance is claimed.