fix(git-tools): reject unknown parameters in every git tool #42
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!42
Loading…
Reference in a new issue
No description provided.
Delete branch "39-git-tools-silently-ignore-unknown-parameters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The harness passes unknown root keys through to a tool's
execute, and every git tool ignored keys it didn't read — sogit_log {rev: "a..b"}silently returned HEAD's history. This adds a sharedassertKnownParamsguard invalidate.tsand calls it first in every git tool, with each tool's schema keys hoisted into ashapeobject so the key list lives in one place. An unknown key now fails with an error naming the valid parameters.Decisions
git_rebase, which landed onmainafter the plan was written (9 tools instead of the planned 8). (comment)Verification
bun test src/bridge/git-tools(apps/server): 156 pass, 0 fail, including the newassertKnownParamstests.bun run typecheck(apps/server): clean.validateToolArguments+buildLogTool(".").execute:{rev:"a..b",max_count:20}→isError: true,unknown parameter(s): rev. Valid parameters: ref, max_count, skip, author, grep, since, until, paths, first_parent, include_body;{ref:"HEAD~1",max_count:1}→ one commit, no error.Closes #39
A misnamed key (e.g. git_log {rev: "a..b"}) used to be dropped silently, so the tool answered a different question (HEAD's history) with no error. Each tool now keeps its schema keys in a `shape` object and calls assertKnownParams before doing anything else. Closes #39 Co-Authored-By: Claude Opus 5.5 via omp-deckplanned_label#248