release: 0.5.13 — spec-completion-gate.sh 가 spec 없는 triage 직후 매 커밋마다 jq 에러를 찍던 것 - #15
Merged
Merged
Conversation
…jq 에러를 찍던 것
phase != idle 인데 spec_id/spec_dir 이 없는 구간(triage 직후, /spec 이전)에서 tasks-gate.sh 는
{"status":"skipped","result":{}} 를 돌려줘요. hook 의 가드 `jq -e '.result'` 는 {} 도 참으로 봐서
통과시키고, 다음 줄 `.result.ac_uncovered | join(", ")` 이 null 을 배열처럼 돌려서
`jq: error … Cannot iterate over null` 을 매 git commit 마다 stderr 에 찍었어요 (exit 0 이라 커밋은
안 막았어요).
- spec-completion-gate.sh: OUT 을 받은 직후 .status 를 봐요. ok·warning 만 아래로 내려가고
skipped·error(result 가 항상 {}) 는 조용히 통과해요 — 위반은 tasks-gate 가 "warning" 으로
내니까 이 가드가 위반 보고를 죽이지 않아요. ac_uncovered 읽기도 `// []` 로 굳혔어요
- smoke: phase=triaged·spec 없음 픽스처 1개 추가 (수정 전 hook 으로는 실패함을 먼저 확인).
592 통과 / 0 실패
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgYfK9moXVF9YCRPvfg8tH
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.
무엇이 잘못됐었나
phase != idle인데spec_id·spec_dir이 아직 없는 구간(triage직후,/spec이전)에서tasks-gate.sh --json은{"status":"skipped","result":{},…}를 돌려줘요 — "검사할 spec 이 없다" 는 정상 신호예요. 그런데spec-completion-gate.sh의 가드jq -e '.result'는{}도 참으로 봐서 통과시키고, 그 다음 줄UNCOV=$(printf '%s' "$OUT" | jq -r '.result.ac_uncovered | join(", ")')이
null을 배열처럼 돌려서jq: error (at <stdin>:0): Cannot iterate over null (null)을 매git commit마다 stderr 에 찍었어요. exit 0 이라 커밋은 안 막았지만, triage 만 하고 spec 을 아직 안 쪼갠 동안엔 커밋할 때마다 보였어요. commerce-monorepo 에서 0.5.12 를 쓰다 발견했어요.무엇이 바뀌었나
templates/default/.ax/hooks/pre-commit/spec-completion-gate.shOUT을 받은 직후.status를 봐요.ok·warning만 아래 보고 로직으로 내려가고,skipped·error(result가 항상{}—common.sh의json_skip/json_error) 는 조용히 통과해요.tasks-gate.sh가 자기next_step으로 사유를 이미 말해요."ok"가 아니라"warning"으로 내요 — 그래서 가드가ok|warning이에요.!= ok로 했으면 hook 의 본래 기능(위반 보고)이 통째로 꺼졌을 거예요. 위반 픽스처로 보고가 그대로 나오는 걸 확인했어요.ac_uncovered읽기도(.result.ac_uncovered // []) | join(", ")로 — 바로 아래dispatched_unreported·done_without_report와 같은 스타일. 이중 방어예요.tests/smoke.sh— 기존phase=idle픽스처 옆에phase=triaged·spec 없음 픽스처 1개. stdout+stderr 빈 문자열 + exit 0 을 단언해요. 수정 전 hook 으로는 이 검사가 실패함을 먼저 확인했어요.VERSION·plugin.json·marketplace.json×2) +changelog/0.5.13.md+ README 인덱스.검증
구현·검증은 별도 컨텍스트 두 개(executor → verifier)가 각각 픽스처를 새로 만들어 했어요.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XgYfK9moXVF9YCRPvfg8tH