Fix raise-pr spec-kit pointer reset to compare repo-relative paths#229
Conversation
The /raise-pr step-4 bullet reset .specify/feature.json only when its feature_directory "points at <FEATURE_DIR>". That literal comparison never fires: FEATURE_DIR from check-prerequisites.sh --paths-only is absolute, but feature.json stores a repo-relative value (specs/NNN-…), so the pointer could be left dangling at a deleted folder — the exact stale-pointer case the bullet exists to prevent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@claude Review this pull request. Analyse the code changes and provide feedback covering:
|
|
Claude finished @FrankRay78's task in 3m 36s —— View job Review: Fix raise-pr spec-kit pointer reset to compare repo-relative paths
Summary: This is a correct, well-scoped, single-line fix to
So the mismatch is real: a raw string comparison of an absolute Findings:
Minor, non-blocking observation: Step 3 of the file only says to "keep |
Why
.claude/commands/raise-pr.mdstep 4 clears the spec-kit feature pointer (.specify/feature.json) when deleting a branch's spec folder, so it doesn't dangle at a folder that no longer exists onmain. The reset condition was unreliable: it fired only iffeature_directory"points at<FEATURE_DIR>", butFEATURE_DIR(fromcheck-prerequisites.sh --json --paths-only) is an absolute path while.specify/feature.jsonstores a repo-relative value (e.g.specs/004-…). A literal string comparison never matches, so the pointer can be left dangling — the exact stale-pointer case the bullet exists to prevent (it makescheck-prerequisites.shhard-fail and letssetup-plan.shsilently recreate the deleted folder).What changes
Tightened only that clause to compare as repo-relative paths, with an inline note that
FEATURE_DIRis absolute while the JSON is repo-relative. The rest of the bullet (hard-fail / recreate rationale) is unchanged.Related
Prompt-only change — no code or tests affected.