Skip to content

fix(board): translate the shim's --backlog-file for promote - #1068

Merged
tieubao merged 2 commits into
masterfrom
fix/board-promote-flag
Oct 26, 2026
Merged

tieubao merged 2 commits into
masterfrom
fix/board-promote-flag

Conversation

@tieubao

@tieubao tieubao commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Reapplies #444 by @hieuphq onto current master (authorship kept), so it survives the history squash.

board promote translated nothing: consumer shims always append --backlog-file, which reached add-backlog's numeric parse, so promote <n> and promote reject <n> failed and the target board came from the current directory. cmd_promote now translates the flag into BACKLOG_STAGE_BACKLOG and BACKLOG_STAGE_STAGING. Fixes #443.

Conflict resolution: kept master's legacy bridge note and usage, added cmd_promote, routed promote to it; the changelog entry moved to the root CHANGELOG.md.

Proof: docs/verification/board-promote-backlog-file.md (from the original PR); tests/test-board.sh 62 pass, 1 skip.

hieuphq and others added 2 commits October 27, 2026 03:03
Consumer shims scaffolded by `board init` always append `--backlog-file`, and
`bin/add-backlog` understands no flags at all -- it resolves its targets from
BACKLOG_STAGE_BACKLOG / BACKLOG_STAGE_STAGING with a cwd-derived fallback.
`promote` forwarded argv verbatim, which broke twice over.

The flag reached the engine's int() selection parse, so every `promote <n>` and
`promote reject <n>` died with a usage message about candidate numbers. `list`
returns before that parse and `all` short-circuits past it, so those two kept
working -- the worst shape this failure could take, since the only surviving
path is the one that promotes everything, and promote is documented as the human
review gate.

Separately the operator's explicit target was discarded, so promote resolved its
write target from cwd. Running repoA's shim from inside repoB promoted repoB's
staged candidate into repoB's board while repoA's was untouched. In the
cross-repo cockpit this kit exists to provide, that is a silent write to the
wrong board.

cmd_sync already documents and handles this exact shim behaviour; promote now
gets the same translation. Defence in depth: add-backlog names an unrecognised
flag instead of feeding it to int() and reporting a selection error.

The fix is deliberately kit-side, so shims already scaffolded in consumer repos
are corrected without those repos regenerating anything.

Proof of done, including the negative control and an honest note on which two of
the five new assertions do not discriminate this defect:
docs/verification/board-promote-backlog-file.md

Fixes #443

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GnGEYYtrsV3iTY1VXc7tvW
@tieubao
tieubao merged commit bcf21ee into master Oct 26, 2026
@tieubao
tieubao deleted the fix/board-promote-flag branch October 26, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

board promote: consumer shim's --backlog-file breaks numeric selection and silently retargets the wrong repo

2 participants