worktrees: rebase requires onto= even though the advertised use is "onto fresh main" - default it to the remote default branch #175

Closed
opened 2026-07-16 23:19:48 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-16 23:19:48 +00:00 (Migrated from codeberg.org)

The other half of today's retry pair (see #174). First attempt at a worktree rebase failed with:

madt_worktrees action=rebase: missing required field "onto"

But the tool's own description sells the action as "rebase a worktree's branch onto an updated base / onto fresh main" - the overwhelmingly common case has exactly one right answer: the remote default branch. Making onto required means every agent pays a failed round-trip to learn a value the tool could have resolved itself (it already asks the forge for the true default branch elsewhere, e.g. finish does, instead of trusting a stale origin/HEAD).

Proposed:

  • onto becomes optional; omitted, it resolves to origin/<default branch> (forge-checked, same as finish's default-branch resolution).
  • Keep onto= for the explicit-base case (stacked branches, release branches).
  • The param description states the default so the schema teaches it up front (ADR 0005: proactive schema clarity - this was a textbook wasted round-trip a clearer schema/default would have prevented).

Acceptance:

  • action=rebase with no onto rebases onto the forge-resolved default branch
  • explicit onto= still honored
  • param description documents the default; a test pins the omitted-onto behavior
The other half of today's retry pair (see #174). First attempt at a worktree rebase failed with: ``` madt_worktrees action=rebase: missing required field "onto" ``` But the tool's own description sells the action as "rebase a worktree's branch onto an updated base / onto fresh main" - the overwhelmingly common case has exactly one right answer: the remote default branch. Making `onto` required means every agent pays a failed round-trip to learn a value the tool could have resolved itself (it already asks the forge for the true default branch elsewhere, e.g. finish does, instead of trusting a stale origin/HEAD). Proposed: - `onto` becomes optional; omitted, it resolves to `origin/<default branch>` (forge-checked, same as finish's default-branch resolution). - Keep `onto=` for the explicit-base case (stacked branches, release branches). - The param description states the default so the schema teaches it up front (ADR 0005: proactive schema clarity - this was a textbook wasted round-trip a clearer schema/default would have prevented). Acceptance: - [ ] `action=rebase` with no `onto` rebases onto the forge-resolved default branch - [ ] explicit `onto=` still honored - [ ] param description documents the default; a test pins the omitted-onto behavior
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#175
No description provided.