Repository navigation
fix(mcp): detect changes from the repository default branch - #2496
Conversation
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Checkpoint and handover (2026-10-03 UTC) Published head: Issue #1357's default-branch fix is published. Historical evidence: 333 passed / 4 skipped; reverting produced 3 owned failures; restoration returned to 333 passed / 4 skipped, with lint passing. Confirm the current remote gate before merge consideration. Hosted snapshot at 2026-10-03 21:54:08 UTC: 1 queued, 4 skipped, 35 success. Confirm the required checks on this exact head before treating it as ready. No additional local build, test, lint, sanitizer, benchmark or CI runs were performed at this checkpoint, as requested. Earlier executed evidence remains historical; prepared tests and the newer source-reviewed changes must still be validated by the hosted gate. The campaign is paused at the maintainer’s request. Local monitoring has stopped; hosted jobs remain running. No merge was performed. Thanks for reviewing this change. |
detect_changescurrently assumesmainwhen the caller omitsbase_branch, so repositories usingtrunkormastercan fail revision resolution. Resolve the default fromorigin/HEAD, then localmain, localmaster, and the current branch's upstream. Explicitbase_branchandsincevalues retain their existing behavior, and resolution errors name the attempted ref.Carry the fix onto current main while preserving the Git worktree-prefix validation and subprocess cancellation handling. Four real Git repository fixtures cover origin/HEAD, master fallback, explicit override, and an unresolved default.
Validation: the canonical macOS MCP suite passes with the fix and after restoration (333 passed, 4 skipped). Reverting the production change reproduces three specific regression failures (330 passed, 3 failed, 4 skipped), while the explicit override and existing subdirectory translation cases continue to pass.
make -f Makefile.cbm lint-cipasses. Linux and Windows verification remain part of the final batch gate.Fixes #1357.