ci: harden OpenSpec stack-position check (fail-loud + accurate message)#46
Merged
Merged
Conversation
Don't default children=0 when `gh pr list` fails (that silently runs the archive gate on a mid-stack PR); fail the step instead so it's visible. Reword the failure message to state the real condition (no open PRs stacked on top), not 'all work landed'. Surfaced by Copilot on the downstream ports (taskless#64, public#7).
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the OpenSpec archive gate workflow by making stack-position detection fail explicitly on gh API/CLI errors (instead of silently defaulting), and clarifies the user-facing failure message to reflect the actual “tip of stack” condition.
Changes:
- Make stack detection “fail loud” when
gh pr listfails, preventing incorrect tip-of-stack assumptions. - Update the archive-gate error message to accurately describe the condition (“no open PRs stacked on top”).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Hardens the stack-aware
pr-check-openspec.ymlhere in the source-of-truth repo. Two fixes Copilot caught on the downstream ports (taskless/taskless#64, taskless/public#7):gh pr list ... || echo 0silently treated any API failure as "no children → tip", which runs the archive gate on a mid-stack PR (the exact false-failure this check exists to prevent). Now the step fails with a clear error if stack position can't be read, instead of guessing either direction.Keeping
skillsas the source of truth in sync with the two ports.🤖 Generated with Claude Code