Public: anyone can read this; the crew can change it.

Every /next decision kind has a test that fails without its 60-second Undo, and the MCP names the same undo #16758

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The MCP's asksact now returns the same Done. Undo line as /next, plus the call that presses the Undo, and each decision kind has a test over it.

Notes

opened this

The MCP's asks_act now returns the same Done. Undo line as /next, plus the call that presses the Undo, and each decision kind has a test over it. The pushed branch passes test/asks-bulk.test.ts, asks-bulk-parity, mcp-size (ceilings untouched), mcp-doc-names-every-argument, llms-tools, bun x tsc --noEmit and scripts/gate.ts --fix. I did not run the full suite.

What changed

  • MCP reply: src/http/mcp/tools/asks_act.ts already returned line through applyAsksBulk: Done. Undo, or the sentence saying a landed merge has no Undo. It now also returns undo: { action: "undo", operation: <id> } when the decision can be taken back, and no undo when a merge has landed. The tool's doc string says so. This is an extra field on the existing tool, not a new tool.
  • Tests: new cases in test/asks-bulk.test.ts, each through the MCP:
    • Decline: the reply says Done. Undo, the card leaves the board, and following undo puts it back.
    • Say (close with a reason): the pull closes, and following undo reopens it.
    • Ship: the reply says DONE_NO_UNDO, carries no undo, the pull stays merged, and an explicit undo is refused.
    • Each test fails without the matching code: no undo field fails the first two, and no refusal fails the third.

Reused: doneWords, DONE_UNDO, DONE_NO_UNDO, undoAsksBulk and the existing test helpers (greenPull, items). I added no new function or dependency.

Left out

  • The /next page's Done line: I changed nothing there.
  • "Say" as a kind: I took it to mean close with a reason, since that is the only asks action that takes words. Say so if you meant something else.

Try it: call asks_act with {action: "decline", items: [...], dryRun: false}. The reply has line: "Done. Undo" and an undo object. Call asks_act with {action: "undo", operation: <id>, dryRun: false} to take it back.

The pre-push hook refused the first push for lacking a "how to try it" commit, so the branch ends with an empty Try: commit.

Closes #11893

commented

The MCP's asks_act now returns the same Done. Undo line as /next, plus the call that presses the Undo, and each decision kind has a test over it. The pushed branch passes test/asks-bulk.test.ts, asks-bulk-parity, mcp-size (ceilings untouched), mcp-doc-names-every-argument, llms-tools, bun x tsc --noEmit and scripts/gate.ts --fix. I did not run the full suite.

What changed

  • MCP reply: src/http/mcp/tools/asks_act.ts already returned line through applyAsksBulk: Done. Undo, or the sentence saying a landed merge has no Undo. It now also returns undo: { action: "undo", operation: <id> } when the decision can be taken back, and no undo when a merge has landed. The tool's doc string says so. This is an extra field on the existing tool, not a new tool.
  • Tests: new cases in test/asks-bulk.test.ts, each through the MCP:
    • Decline: the reply says Done. Undo, the card leaves the board, and following undo puts it back.
    • Say (close with a reason): the pull closes, and following undo reopens it.
    • Ship: the reply says DONE_NO_UNDO, carries no undo, the pull stays merged, and an explicit undo is refused.
    • Each test fails without the matching code: no undo field fails the first two, and no refusal fails the third.

Reused: doneWords, DONE_UNDO, DONE_NO_UNDO, undoAsksBulk and the existing test helpers (greenPull, items). I added no new function or dependency.

Left out

  • The /next page's Done line: I changed nothing there.
  • "Say" as a kind: I took it to mean close with a reason, since that is the only asks action that takes words. Say so if you meant something else.

Try it: call asks_act with {action: "decline", items: [...], dryRun: false}. The reply has line: "Done. Undo" and an undo object. Call asks_act with {action: "undo", operation: <id>, dryRun: false} to take it back.

The pre-push hook refused the first push for lacking a "how to try it" commit, so the branch ends with an empty Try: commit.

commented

The MCP's asks_act now returns the same Done. Undo line as /next and an undo call that reverses the decision; the "both doors" check should now pass. I didn't run the check or any tests here, so the new push is untested.

What changed: the failure was the "both doors" rule, because src/http/mcp/tools/asks_act.ts changed with nothing under src/tui/. The terminal's bulk screen (src/tui/screens/bulk.ts) already offers Done and Undo for the same decisions, so there is nothing new to add on that side. I pushed an empty commit with a No door: … line saying so, instead of making a change under src/tui/.

Not changed: the gate also printed test/asks-bulk.test.ts#call is 0.78 like test/business-plan.test.ts#call: one implementation?. It printed it before the "both doors" failure, so I took it as a hint rather than the failure and left it as is.

To try it: call asks_act with action: "decline", items, and dryRun: false. The reply has line and undo. Calling asks_act with that undo object, which is { action: "undo", operation: <id> }, reverses the decision. A landed merge that can't be taken back has no undo, and line says why.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs