Skip to content

the --target refusal names neither its cause nor the form that works [✨#660] #1031

Description

@donjor-agent

🤖 claude/anthropic claude-opus-5 (high)

Part of RSI-Software/t3code-hyprws#660.

Observed behavior

node scripts/fork-auto-rebase.ts --dry-run --target <tag> refuses with a message that names neither the cause nor the way forward:

usage: --target must be inside the clean upstream first-parent window: v0.0.41-nightly.20260915.1735

The cause is buildAutoRebasePlan (scripts/fork-auto-rebase-plan.ts:106):

const position = positions.get(sha);
if (position === undefined || position > feasibility.ffBoundary.cleanCommitCount) {
  throw new UsageError(
    `--target must be inside the clean upstream first-parent window: ${targetOverride}`,
  );
}

Two different failures share that one sentence: a tag that is not on the upstream first-parent walk at all (position === undefined), and a tag that is on the walk but past the clean fast-forward boundary (position > cleanCommitCount). The message distinguishes neither, and prints neither the boundary it compared against nor the tag's position relative to it.

The second failure also has a trivial workaround the message does not mention: omit --target entirely. The walk then plans to the newest tag on its own, and in the case above that newest tag is v0.0.41-nightly.20260915.1735, the very tag --target had just refused. A caller who wants a census against the newest tag is refused for naming it and served for saying nothing.

Minimal reproduction

  1. node scripts/fork-auto-rebase.ts --dry-run --target <newest nightly tag>: the refusal above, exit 2.
  2. node scripts/fork-auto-rebase.ts --dry-run --issue-json .dump/tmp/census.json: succeeds, and its census targetTag is that same tag.

Expected behavior

The refusal separates the two causes and prints the numbers it decided on:

  • for a tag off the first-parent walk, say that, because no boundary is involved;
  • for a tag past the boundary, print the tag's position, the clean commit count, and the commit that ends the clean window;
  • where the caller's tag is the newest tag anyway, say that omitting --target reaches it.

Evidence

Refusal captured on 2026-09-15 at hyprws b22495c259 with --target v0.0.41-nightly.20260915.1735; the same run without --target produced a census whose targetTag is that tag. Source: scripts/fork-auto-rebase-plan.ts:106.

Close conditions

  • The two causes behind --target must be inside the clean upstream first-parent window produce distinguishable messages.
  • A boundary refusal prints the tag's position, the clean commit count, and the commit that ends the clean window.
  • A refusal for a tag the walk would reach on its own says that omitting --target reaches it.

Origin: measuring RSI-Software/t3code-hyprws#1024's before/after stop census; the first attempt pinned the target tag explicitly and was refused, costing a round trip before the working form was found by reading buildAutoRebasePlan.

Activity

  1. changed the title [-]the --target refusal names neither its cause nor the form that works [✨#656][/-] [+]the --target refusal names neither its cause nor the form that works [✨#660][/+] on Sep 16, 2026
  2. changed the title [-]the --target refusal names neither its cause nor the form that works [✨#656][/-] [+]the --target refusal names neither its cause nor the form that works [✨#660][/+] on Sep 16, 2026
  3. added 7 commits that reference this issue on Sep 16, 2026
    4a715d6
    6b1c30c
    50c7f03
    de37a01
    528c823
    280d0b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxdeveloper experience, CLIs, skills

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions