Skip to content

ci: harden OpenSpec stack-position check (fail-loud + accurate message)#46

Merged
thecodedrift merged 1 commit into
mainfrom
jakob/openspec-check-fail-loud
Jun 23, 2026
Merged

ci: harden OpenSpec stack-position check (fail-loud + accurate message)#46
thecodedrift merged 1 commit into
mainfrom
jakob/openspec-check-fail-loud

Conversation

@thecodedrift

Copy link
Copy Markdown
Member

Hardens the stack-aware pr-check-openspec.yml here in the source-of-truth repo. Two fixes Copilot caught on the downstream ports (taskless/taskless#64, taskless/public#7):

  1. Fail-loud stack detection. gh pr list ... || echo 0 silently 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.
  2. Accurate failure message. Replaced "(all work landed)" with the real condition — "no open PRs stacked on top" — so the message doesn't imply the change already merged.

Keeping skills as the source of truth in sync with the two ports.

🤖 Generated with Claude Code

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).
Copilot AI review requested due to automatic review settings June 23, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 list fails, 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.

@thecodedrift thecodedrift merged commit f72d036 into main Jun 23, 2026
4 checks passed
@thecodedrift thecodedrift deleted the jakob/openspec-check-fail-loud branch June 23, 2026 19:59
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.

2 participants