fix(mcp): honor detect_changes 'since' parameter#464
Open
KerseyFabrications wants to merge 1 commit into
Open
Conversation
detect_changes advertised a `since` parameter in its inputSchema but the handler never read it — it always diffed against base_branch (default "main"), so detect_changes(since="HEAD~10") silently returned the wrong or empty result when HEAD was on the default branch. Fix: read `since` and, when present, route it through base_branch so the existing shell-arg validation (cbm_validate_shell_arg) and the `<base>...HEAD` diff apply unchanged; `since` takes precedence over base_branch. Also narrows the schema description — the prior "date" form (e.g. 2026-01-01) is not a revision and never worked through this path — and documents the inherited three-dot semantics. Adds regression tests tool_detect_changes_since and tool_detect_changes_since_precedence. Refs DeusData#371 Signed-off-by: Kris Kersey <kris@kerseyfabrications.com>
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.
detect_changes advertised a
sinceparameter in its inputSchema but thehandler never read it — it always diffed against base_branch (default
"main"), so detect_changes(since="HEAD~10") silently returned the wrong or
empty result when HEAD was on the default branch.
Fix: read
sinceand, when present, route it through base_branch so theexisting shell-arg validation (cbm_validate_shell_arg) and the
<base>...HEADdiff apply unchanged;sincetakes precedence overbase_branch. Also narrows the schema description — the prior "date" form
(e.g. 2026-01-01) is not a revision and never worked through this path — and
documents the inherited three-dot semantics. Adds regression tests
tool_detect_changes_since and tool_detect_changes_since_precedence.
Refs #371
Signed-off-by: Kris Kersey kris@kerseyfabrications.com