bug(mcp): madt_orchestrate reconcile mode is unreachable — schema requires prs+verify which reconcile forbids, and the CLI fallback is steered back to the broken tool #18

Closed
opened 2026-07-11 21:39:40 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-11 21:39:40 +00:00 (Migrated from codeberg.org)

Problem

madt_orchestrate's input schema marks prs and verify as required, but reconcile mode (reconcile=<pr>) documents them as mutually exclusive with it. Result: the documented recovery rail cannot be invoked over MCP at all.

Live reproduction (2026-07-10, this repo, an earlier PR whose base moved under it):

  1. Merge fails; the error rail says: madt_orchestrate reconcile=<pr> (or: madtea orchestrate reconcile <pr>).
  2. madt_orchestrate(reconcile="<pr>")validating "arguments": validating root: required: missing properties: ["prs" "verify"] — rejected at the validation layer before the handler runs.
  3. Fallback to the rail's own CLI form madtea orchestrate reconcile <pr> → the PreToolUse hook steers it straight back: "Use madt_orchestrate instead of madtea orchestrate". A textbook guard cycle (#15): every path the rails offer bounces to another wall.
  4. An agent cannot "fix" step 2 by passing dummy prs/verify — with a merge-capable tool, guessing at mutually-exclusive params is exactly the kind of gamble the schema should make impossible, not force.

Working exit used instead (own-repo case): madt_fetch + local git merge origin/main on the PR head + madt_push + madt_prs action=merge. Fine for the session's own checkout; for a foreign repo even that path is fenced (see #14).

Ask

  1. Fix the schema: prs+verify required only when reconcile is absent (oneOf: batch-merge shape vs reconcile shape). reconcile_continue/reconcile_abort belong to the reconcile shape.
  2. Add a hermetic conformance test that every documented mode of every tool is invocable against its own schema (a reconcile-mode call validating green) — this class of bug (docs promise a mode the schema forbids) should be structurally impossible.
  3. Per #15: when the hook steers madtea orchestrate to madt_orchestrate, the steer text should carry the working parameter shape for the mode detected in the CLI args, so a mode-specific breakage is at least visible at the steer.

Acceptance

  • madt_orchestrate(reconcile="N") passes schema validation and runs.
  • Batch-merge mode still requires prs+verify.
  • Conformance test covering both shapes; regression-pinned.
## Problem `madt_orchestrate`'s input schema marks `prs` and `verify` as required, but reconcile mode (`reconcile=<pr>`) documents them as mutually exclusive with it. Result: the documented recovery rail cannot be invoked over MCP at all. Live reproduction (2026-07-10, this repo, an earlier PR whose base moved under it): 1. Merge fails; the error rail says: `madt_orchestrate reconcile=<pr> (or: madtea orchestrate reconcile <pr>)`. 2. `madt_orchestrate(reconcile="<pr>")` → `validating "arguments": validating root: required: missing properties: ["prs" "verify"]` — rejected at the validation layer before the handler runs. 3. Fallback to the rail's own CLI form `madtea orchestrate reconcile <pr>` → the PreToolUse hook steers it straight back: "Use madt_orchestrate instead of `madtea orchestrate`". A textbook guard cycle (#15): every path the rails offer bounces to another wall. 4. An agent cannot "fix" step 2 by passing dummy `prs`/`verify` — with a merge-capable tool, guessing at mutually-exclusive params is exactly the kind of gamble the schema should make impossible, not force. Working exit used instead (own-repo case): `madt_fetch` + local `git merge origin/main` on the PR head + `madt_push` + `madt_prs action=merge`. Fine for the session's own checkout; for a foreign repo even that path is fenced (see #14). ## Ask 1. Fix the schema: `prs`+`verify` required only when `reconcile` is absent (oneOf: batch-merge shape vs reconcile shape). `reconcile_continue`/`reconcile_abort` belong to the reconcile shape. 2. Add a hermetic conformance test that every documented mode of every tool is invocable against its own schema (a reconcile-mode call validating green) — this class of bug (docs promise a mode the schema forbids) should be structurally impossible. 3. Per #15: when the hook steers `madtea orchestrate` to `madt_orchestrate`, the steer text should carry the working parameter shape for the mode detected in the CLI args, so a mode-specific breakage is at least visible at the steer. ## Acceptance - `madt_orchestrate(reconcile="N")` passes schema validation and runs. - Batch-merge mode still requires `prs`+`verify`. - Conformance test covering both shapes; regression-pinned.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#18
No description provided.