Repository navigation
feat(spec): mint spec numbers against open PR heads too - #661
Merged
Merged
Conversation
Three parallel workers this week each got the same SPEC number because spec-next only scanned docs/specs/, local branches, and commit subjects; none of those surfaces show a number an unmerged open PR already holds, and none of the workers called reserve. Fold in a gh-backed scan of every open PR head's docs/specs/ listing via the contents API (no clone, no fetch). Falls back to the old local-only scan with a stderr note when gh is missing, unauthenticated, or any bootstrap call fails; skippable via SPEC_NEXT_NO_PR_SCAN=1 for hermetic tests.
4 tasks done
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.
Summary
spec-next.sh nextfolds every open PR'sdocs/specs/listing into the max-number scan (GitHub contents API on the PR head, no clone, no fetch), skippable viaSPEC_NEXT_NO_PR_SCAN=1, falling back to the original local-only scan with a stderr note whenghis missing/unauthenticated/fails.--errors <tool>flag, full lane, goal draft at.claude/goals/observe-tool-errors.md, not built here).Test plan
bash tests/test-spec-next-pr-scan.sh(new, 7/7 green)bash tests/test-spec-reserve.sh(unaffected, 41/41 green)bash tests/run-all.sh(all 152 suites green)lib/gate/negctl.sh(RED under mutation, GREEN after restore) — seedocs/verification/spec-next-open-pr-heads.md