Repository navigation
fix(board): translate the shim's --backlog-file for promote - #1068
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reapplies #444 by @hieuphq onto current master (authorship kept), so it survives the history squash.
board promotetranslated nothing: consumer shims always append--backlog-file, which reachedadd-backlog's numeric parse, sopromote <n>andpromote reject <n>failed and the target board came from the current directory.cmd_promotenow translates the flag intoBACKLOG_STAGE_BACKLOGandBACKLOG_STAGE_STAGING. Fixes #443.Conflict resolution: kept master's legacy bridge note and usage, added
cmd_promote, routedpromoteto it; the changelog entry moved to the rootCHANGELOG.md.Proof:
docs/verification/board-promote-backlog-file.md(from the original PR);tests/test-board.sh62 pass, 1 skip.