Repository navigation
Description
🤖 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
node scripts/fork-auto-rebase.ts --dry-run --target <newest nightly tag>: the refusal above, exit 2.node scripts/fork-auto-rebase.ts --dry-run --issue-json .dump/tmp/census.json: succeeds, and its censustargetTagis 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
--targetreaches 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 windowproduce 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
--targetreaches 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
[-]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][/+][-]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][/+]fix(fork-sync): split the --target refusal into off-walk and past-bou…
fix(fork-sync): split the --target refusal into off-walk and past-bou…
fix(fork-sync): split the --target refusal into off-walk and past-bou…
fix(fork-sync): split the --target refusal into off-walk and past-bou…
fix(fork-sync): split the --target refusal into off-walk and past-bou…
fix(fork-sync): split the --target refusal into off-walk and past-bou…