Skip to content

fix(mcp): honor detect_changes 'since' parameter#464

Open
KerseyFabrications wants to merge 1 commit into
DeusData:mainfrom
KerseyFabrications:fix/detect-changes-since
Open

fix(mcp): honor detect_changes 'since' parameter#464
KerseyFabrications wants to merge 1 commit into
DeusData:mainfrom
KerseyFabrications:fix/detect-changes-since

Conversation

@KerseyFabrications

Copy link
Copy Markdown

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 #371

Signed-off-by: Kris Kersey kris@kerseyfabrications.com

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>
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.

1 participant