Skip to content

fix(mcp): detect changes from the repository default branch - #2496

Merged
DeusData merged 1 commit into
mainfrom
fix/issue-1357-default-branch-v2
Oct 4, 2026
Merged

DeusData merged 1 commit into
mainfrom
fix/issue-1357-default-branch-v2

Conversation

@DeusData

@DeusData DeusData commented Oct 2, 2026

Copy link
Copy Markdown
Owner

detect_changes currently assumes main when the caller omits base_branch, so repositories using trunk or master can fail revision resolution. Resolve the default from origin/HEAD, then local main, local master, and the current branch's upstream. Explicit base_branch and since values 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-ci passes. Linux and Windows verification remain part of the final batch gate.

Fixes #1357.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData

DeusData commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

Checkpoint and handover (2026-10-03 UTC)

Published head: 72f206d18fea1f0dad15c23358b36fb3153230d1. The remote head was verified.

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.

@DeusData
DeusData merged commit 3a26acf into main Oct 4, 2026
41 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.

detect_changes silently defaults to base main on repos whose default branch isn't main, reporting changed_files: 0 with no warning

1 participant