Repository navigation
chore(memory): normalize frontmatter schema drift - #968
Conversation
Verification —
|
| # | Claim | Result |
|---|---|---|
| 1 | hookKeywords: block form 은 memory-hint 훅에서 실제로 힌트를 죽인다 — 정규화 전 형태는 매칭 커맨드에 침묵한다 (측정 시점 cf48a71, 이후 hooks/ 무변경) |
PASS(live) |
| 2 | 같은 파일을 bracket form 으로 바꾸면 동일 훅·동일 커맨드에서 힌트가 발화한다 (측정 시점 cf48a71) |
PASS(live) |
| 3 | merge_ask_ci_comments_precheck.md 도 동일 결함·동일 해소 패턴 (측정 시점 cf48a71) |
PASS(live) |
| 4 | 정규화 완료된 실제 메모리 디렉터리에 두 트리거 커맨드를 흘리면 두 파일 모두 힌트가 발화한다 (측정 시점 cf48a71) |
PASS(live) |
| 5 | lint 가 드리프트 3종(top-level 배치 / 중복 / block-form)을 각각 별도로 검출한다 | PASS(live) |
| 6 | 같은 픽스처를 정규화하면 lint 가 clean 을 반환한다 | PASS(live) |
| 7 | 메모리 디렉터리 부재 시 N/A — 비-strict exit 0 / strict exit 1, SKIPPED 아님 |
PASS(live) |
| 8 | 실제 메모리 디렉터리(48 entries) 대상으로 lint 가 clean 을 반환한다 | PASS(live) |
| 9 | tests/test_check_memory_frontmatter.py 통과 (12 → 17 케이스, F1/F2 회귀 추가분 포함) |
PASS(live) |
| 10 | run-tests.sh step 5 로 lint 가 편입돼 있고, ci.yml 독립 스텝은 같은 커맨드의 중복이라 제거했다 |
PASS(live) |
| 11 | 드리프트 픽스처를 run-tests.sh 가 실제로 쓰는 호출 형태(env -u PRAXIS_TESTS_STRICT)로 돌리면 exit 1 — FAIL 경로가 작동한다 |
PASS(live) |
| 12 | 이 커밋의 CI test job 에서 step 5 가 N/A 를 찍고 FAILED 로 집계되지 않으며 job 은 통과한다 |
PASS(live) |
| 13 | F1 — hookable: true 인데 hookKeywords 가 아예 없는 형태를 lint 가 검출한다 (이전 리비전은 통과시켰다) |
PASS(live) |
| 14 | F2 — 런타임 비대칭이 실재한다: 위 항목은 힌트 인덱스에서 드롭되고, hookEvents: [] 항목은 [Bash] 기본값으로 여전히 인덱싱된다 |
PASS(live) |
| 15 | F3 — retrospect 문서의 "CI 가 다음 드리프트를 잡는다" 는 서술이 관측과 반대여서 정정됐다 | PASS(live) |
Unverified — (a) 재검증 경로는 여전히 opt-in 이다: 메모리 디렉터리가 CI 에 구조적으로 부재해 push 마다 강제되지 않는다 (b) 행 1–4 는 cf48a71 시점 측정이며 이번 리비전에서 다시 재지 않았다
(a) 이것이 이 PR 의 핵심 미해소 항목이다. lint 는 존재하지만 CI 에서는 항상 N/A 로 빠지므로(행 12), 실제로 드리프트를 막는 것은 기여자가 로컬에서 run-tests.sh 를 돌리거나 스크립트를 직접 실행할 때뿐이다. 구조적 강제로 올리려면 메모리 코퍼스의 대표 픽스처를 레포 안에 두고 CI 가 그것을 린트하게 하는 별도 설계가 필요하다 — 이 PR 범위 밖이다.
(b) 행 1–4 는 memory-hint 훅과 실제 메모리 파일에 관한 것이고, cf48a71..d1a5e03 의 변경은 scripts/check-memory-frontmatter.py, tests/test_check_memory_frontmatter.py, skills/retrospect/references/stage4-execution.md 세 파일뿐이라 검증 경로가 겹치지 않는다. 그래서 재측정 대신 시점을 표기했다.
Evidence 5 — 드리프트 3종을 재현한 픽스처 디렉터리에 lint 를 돌려, 종류마다 별도 FAIL: 블록이 나오는지 확인
정규화 전 실제 형태(top-level 배치, top-level+metadata 중복, hookKeywords block-form)를 그대로 재현했다. 같은 실행이 행 13·14 의 근거도 함께 담고 있다 — feedback_dirty_no_keywords.md 는 검출되고 feedback_clean_empty_events.md 는 검출되지 않는다.
$ PRAXIS_MEMORY_DIR=/var/folders/51/tp81lncx65q562x6dj5vrx4m0000gn/T/tmp.I566cpnJq9 python3 scripts/check-memory-frontmatter.py
FAIL: feedback_dirty_blockform.md
- `hookKeywords:` has no inline value (multi-line YAML-block `- item` form) — the memory-hint parser rejects this shape and silently drops the entire memory from the hint index; use single-line `[a, b]` form
FAIL: feedback_dirty_dup.md
- `type` appears 2 times — must appear exactly once, nested under `metadata:`
- `type` is at the top level — must nest under `metadata:`
FAIL: feedback_dirty_no_keywords.md
- `hookable: true` but `hookKeywords` is missing — the memory-hint parser requires it and silently drops the entire memory from the hint index when absent (issue #942 F1)
FAIL: feedback_dirty_top_level.md
- `type` is at the top level — must nest under `metadata:`
- `originSessionId` is at the top level — must nest under `metadata:`
6 frontmatter schema violation(s) across 5 memory entries in /var/folders/51/tp81lncx65q562x6dj5vrx4m0000gn/T/tmp.I566cpnJq9
EXIT=1
Evidence 6 — 같은 디렉터리의 파일들을 정규화한 뒤 재실행해 clean 이 되는지 확인(음성 대조)
Evidence 5 와 같은 경로, 같은 명령이다. 파일 내용만 이 PR 이 실제 메모리에 적용한 것과 동일한 방식으로 고쳤다 — 필드를 metadata: 아래로 이동, 중복 제거, block-form 을 bracket-form 으로 교체, 누락된 hookKeywords 추가.
$ PRAXIS_MEMORY_DIR=/var/folders/51/tp81lncx65q562x6dj5vrx4m0000gn/T/tmp.I566cpnJq9 python3 scripts/check-memory-frontmatter.py
OK: 5 memory entries in /var/folders/51/tp81lncx65q562x6dj5vrx4m0000gn/T/tmp.I566cpnJq9 — frontmatter schema clean
EXIT=0
Evidence 7 — 디렉터리 부재 경로를 비-strict / strict 두 조건으로 실행해 라벨과 종료코드를 확인
이 레포는 SKIPPED 를 "고칠 수 있는 갭" 전용 어휘로 쓴다(#917). 이 조건은 CI 에 구조적으로 항상 부재해 절대 해소되지 않으므로 같은 라벨을 쓰면 상시 노이즈가 된다 — 그래서 N/A: 로 분리했고, strict 하에서의 exit 1 시맨틱은 유지했다.
$ PRAXIS_MEMORY_DIR=/nonexistent-dir-942-check python3 scripts/check-memory-frontmatter.py
N/A: memory-frontmatter-lint (memory directory not found — expected in CI / a fresh checkout, not a fixable gap, see issue #942)
EXIT=0
$ PRAXIS_MEMORY_DIR=/nonexistent-dir-942-check PRAXIS_TESTS_STRICT=1 python3 scripts/check-memory-frontmatter.py
N/A: memory-frontmatter-lint (memory directory not found — expected in CI / a fresh checkout, not a fixable gap, see issue #942)
EXIT=1
Evidence 8 — 합성 픽스처가 아닌 실제 메모리 저장소 전체를 대상으로 최종 확인
이 PR 이 정규화한 대상 그 자체다. 환경변수 없이 돌리면 resolve_memory_dir() 가 실제 경로를 잡는다.
$ python3 scripts/check-memory-frontmatter.py
OK: 48 memory entries in /Users/nathan.song/.claude/projects/-Users-nathan-song-projects-praxis/memory — frontmatter schema clean
exit=0
Evidence 9 — lint 스크립트 자체의 회귀 테스트를 이 커밋에서 실행
rev 2 시점 12 케이스에서 F1(hookKeywords 부재·빈 리스트)과 F2(hookEvents 문구 구분) 회귀가 더해져 17 케이스가 됐다.
$ python3 -m pytest tests/test_check_memory_frontmatter.py -q 2>&1 | tail -3
................. [100%]
17 passed in 0.03s
Evidence 10 — run-tests.sh 안의 실제 호출 지점을 인용
편입 여부는 주석이 아니라 실행되는 줄로 확인한다. 157 행이 그 호출이고, env -u PRAXIS_TESTS_STRICT 로 감싸 strict 모드에서도 부재가 스위트를 죽이지 않게 한다.
$ grep -n "check-memory-frontmatter" scripts/run-tests.sh
9:# 5. memory-frontmatter — scripts/check-memory-frontmatter.py
157:if ! env -u PRAXIS_TESTS_STRICT python3 ./scripts/check-memory-frontmatter.py; then
Evidence 11 — 드리프트가 있는 상태를 run-tests.sh 와 동일한 호출 형태로 돌려 FAIL 경로가 실제로 작동하는지 확인
행 7 이 보인 대로 env -u PRAXIS_TESTS_STRICT 는 부재 를 통과시킨다. 그것이 위반 까지 통과시키면 편입은 무의미하므로, 위반이 있는 디렉터리에 같은 래핑으로 돌려 exit 1 을 확인했다.
$ PRAXIS_MEMORY_DIR=/var/folders/51/tp81lncx65q562x6dj5vrx4m0000gn/T/tmp.I566cpnJq9 env -u PRAXIS_TESTS_STRICT python3 scripts/check-memory-frontmatter.py >/dev/null 2>&1; echo "EXIT=$?"
EXIT=1
Evidence 12 — 이 커밋의 CI test job 로그에서 step 5 의 출력과 최종 판정을 인용 (rev 4 에서 rebase HEAD 의 job 으로 재측정)
로컬 실행이 아니라 CI 실물이 오라클이다. N/A 줄이 나오고도 스위트가 ALL TESTS PASSED
로 끝나는 것이 "집계되지 않는다" 의 근거다 — 그리고 이것이 동시에 행 15 의 근거이기도 하다.
$ gh run view 31603129056 --repo devseunggwan/praxis --log --job 94135218845 2>/dev/null | grep -nE "memory-frontmatter|ALL TESTS|INCOMPLETE" | head -4
4942:test Run bash scripts/run-tests.sh 2026-08-12T13:53:02.6598945Z N/A: memory-frontmatter-lint (memory directory not found — expected in CI / a fresh checkout, not a fixable gap, see issue #942)
5741:test Run bash scripts/run-tests.sh 2026-08-12T13:53:24.8064717Z ALL TESTS PASSED
ALL TESTS PASSED 에 (N skipped: ...) 접미가 없다는 것이 스킵 0 이라는 뜻이다.
Evidence 13 — F1 검출은 Evidence 5 의 feedback_dirty_no_keywords.md 블록이 그대로 근거다
같은 실행 안에 들어 있으므로 별도 재실행을 하지 않았다. 검출 문구는 hookable: true but hookKeywords is missing … (issue #942 F1) 이며, 이전 리비전의 lint 는 존재하는 필드만 검사해서 이 형태를 통과시켰다.
Evidence 14 — memory-hint 훅을 같은 픽스처 디렉터리에 직접 실행해 드롭/폴백 비대칭을 확인
lint 가 한쪽만 검출하는 것이 옳으려면 런타임이 실제로 비대칭이어야 한다. hookable: true + hookKeywords 부재 파일(feedback_dirty_no_keywords.md, 본문에 kubectl 포함)은 출력에 없고, hookEvents: [] 파일은 Bash 이벤트에서 그대로 발화한다.
$ cat /tmp/mh968.json
{"session_id":"probe968","hook_event_name":"PreToolUse","tool_name":"Bash","tool_input":{"command":"kubectl get pods"}}
$ PRAXIS_MEMORY_DIR=/var/folders/51/tp81lncx65q562x6dj5vrx4m0000gn/T/tmp.I566cpnJq9 python3 hooks/advisory-nudge/memory-hint/impl.py < /tmp/mh968.json
[memory:hookable] feedback_clean_empty_events.md — d
EXIT=0
feedback_dirty_no_keywords.md 의 부재가 이 프로브의 음성 결과이고, 같은 실행에서 다른 파일이 발화한 것이 그 부재가 프로브 실패가 아님을 보이는 대조군이다.
Evidence 15 — retrospect 문서가 정정된 내용을 diff 로 인용
정정 전 문장은 "CI 가 다음 드리프트를 잡는다" 였고, Evidence 12 의 CI 로그가 그 반대를 보인다. 문서 주장과 관측이 어긋난 상태를 남기지 않기 위해 서술을 관측에 맞췄다.
$ git diff cf48a71..d1a5e03 -- skills/retrospect/references/stage4-execution.md
- in CI is the structural fix, so the *next* drift of this family fails a
- build instead of aging quietly in cursor state.
+ is the structural fix, but only on a contributor's own machine: the
+ memory directory it lints is a local, gitignored, per-user store that is
+ structurally absent in CI, so `scripts/run-tests.sh`'s call to it always
+ prints `N/A` and exits 0 there (verified — F3, issue #942 codex-review
+ pass). **CI cannot catch the next drift of this family; only a local
+ `run-tests.sh` run, or a contributor running the script directly,
+ catches it.** That re-verification path is therefore still incomplete —
+ it exists, but is opt-in rather than structurally enforced on every push.
History
rev 5 — #966 머지로 origin/main 이 3efa1ed 로 다시 이동해 한 번 더 rebase 했다
(1b70b3c → e3aac9d). 이 PR 자신의 변경 파일 4개는 이번에도 rebase 전후 바이트 동일
이라 행 12 만 새 HEAD 의 CI job 으로 교체했다.
rev 4 — #969 머지로 origin/main 이 이동해 rebase 했다(d1a5e03 → 1b70b3c).
이 PR 자신의 변경 파일 4개는 rebase 전후 바이트 동일이라 행 5–11·13–15 는 재측정하지
않았고, 행 12 만 새 HEAD 에 대해 실제로 돌아간 CI job 으로 교체했다. Unverified (a) 를
#975 로 이월했다.
rev 3 — codex-review 3건(F1 hookKeywords 부재 미검출 / F2 hookEvents 오류 문구가 잘못된 결과를 주장 / F3 retrospect 문서의 CI 주장) 반영으로 HEAD 가 cf48a71 → d1a5e03 로 이동. lint 스크립트와 테스트가 바뀌어 행 5–12 를 새 SHA 에서 전부 다시 쟀고, 행 13–15 를 신규 추가했다. 행 1–4 는 검증 경로가 변경 파일과 겹치지 않아 cf48a71 시점 측정을 시점 표기와 함께 유지했다. rev 2 의 Evidence 5·6 은 픽스처 경로를 <dirty fixture dir> 로 축약해 두어 그대로 실행되지 않는 형태였다 — 이번 리비전에서 실제 경로로 전사했다.
rev 2 — run-tests.sh 편입(행 11)·FAIL 경로 실측(행 12), SKIPPED → N/A 라벨 분리.
rev 1 — 최초 앵커.
|
Warning Review limit reached
Next review available in: 42 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Verification updated — |
|
Verification updated — |
d1a5e03 to
1b70b3c
Compare
|
Verification updated — |
이슈 #942: 세션 메모리 frontmatter의 taxonomy 필드(node_type, type, originSessionId, hookable, hookKeywords, hookEvents, modified) 정규 위치를 stage4-execution.md의 기존 SoT 절에 명시. metadata: 중첩은 memory-hint 훅 파서(hooks/advisory-nudge/memory-hint/impl.py)의 정규식이 위치와 무관하게 매치하므로 런타임 오작동과 무관하며, 유일한 근거는 엔트리 간 일관성임을 문서에 그대로 기록. momentum: 필드는 별도 훅(momentum-rule-retrieval-gate)이 소비하는 독립 opt-in 메커니즘이라 taxonomy 블록 밖(top-level)에 유지하기로 확정 — 기존 3개 엔트리 전부 top-level인 자체 컨벤션과도 일치. cycle 17의 발견이 이슈 없이 cycle 18로 이월된 경위(.omc/state/ retrospect-hygiene-cursor.json 확인: gh issue create 미실행, cursor cycle_note로만 존재)도 같은 절에 기록. Confidence: high Not-tested: markdownlint-cli2 not installed locally — relies on CI advisory step; content correctness verified by re-reading rendered section
이슈 #942. check-memory-frontmatter.py는 hooks/_lib/_memory_dir.py의 resolve_memory_dir()을 재사용해 memory-hint 훅과 동일한 경로 해석 순서(PRAXIS_MEMORY_DIR → CLAUDE_CONFIG_DIR → linked-worktree fallback)를 따른다. 검출 대상: taxonomy 필드의 top-level 배치, 필드 중복, 그리고 hookKeywords/hookEvents의 multi-line block form(memory-hint 파서가 묵살하고 해당 메모리 전체를 hint 인덱스에서 제외시키는 기능 결함). 메모리 디렉터리가 없으면(CI 등) SKIPPED을 출력하고 exit 0 — 단 PRAXIS_TESTS_STRICT=1일 때는 exit 1로 전환해 run-tests.sh의 기존 skip-is-not-pass 컨벤션(#917)을 그대로 따른다. tests/test_check_memory_frontmatter.py 11개 케이스: 정규화된 엔트리 clean, top-level 배치 검출, 중복 필드 검출, hookKeywords block/scalar form 검출, momentum 필드는 taxonomy 대상에서 제외됨을 확인, 그리고 디렉터리 부재 시 skip(strict 포함) 동작. Confidence: high Not-tested: markdownlint on the new files (tool not installed locally); ruff check ran clean
이슈 #942 작업목록의 'CI 연결'. scripts/run-tests.sh는 병렬 진행 중인 다른 PR들과의 공유 파일이라 수정하지 않고(팀 합의), test job에 독립 스텝으로 python3 scripts/check-memory-frontmatter.py를 추가했다. 메모리 디렉터리는 로컬·per-user·gitignored 저장소라 CI 러너에는 존재하지 않는다 — 이 스텝은 CI에서 항상 SKIPPED을 출력하고 exit 0으로 통과한다. 체커 자체의 회귀 커버리지는 pytest tests/(run-tests.sh 1단계, 이 CI job에서 이미 실행됨)가 담당한다. run-tests.sh로의 편입은 후속 작업으로 남긴다. Confidence: high Not-tested: this ci.yml step always SKIPs on this runner (memory dir absent in CI by design) — actual CI green/red for this step has not been observed on a real GitHub Actions run yet, only reasoned from resolve_memory_dir()'s contract and local reproduction
이슈 #942 리뷰 지적: SoT 문서는 node_type을 '거의 모든 엔트리에 존재'로 서술해 사실상 필수처럼 읽혔지만, lint 스크립트는 부재를 드리프트로 잡지 않아 문서와 도구가 서로 다른 스키마를 말하고 있었다. grep -rn node_type로 이 레포의 모든 훅·스크립트를 확인한 결과 이 필드를 읽는 소비자가 전혀 없다 — type/hookable/hookKeywords/hookEvents와 달리 런타임에서 아무 의미가 없다. 따라서 (B) 선택: node_type을 선택 필드로 명시하고, 있으면 유지하되 없는 엔트리에 채워 넣지 않는다. lint 스크립트 docstring에도 동일하게 명시하고, 부재가 플래그되지 않음을 확인하는 테스트를 추가했다. Confidence: high Not-tested: markdownlint on the updated doc section (tool availability confirmed only after CI run)
이슈 #942의 근본 원인(재검증 경로 부재)을 해소한다. check-plugin-manifests.py / check-hook-token-invariants.py 두 sibling(repo-internal custom invariant script)이 모두 run-tests.sh 전용이고 독립 ci.yml job이 없다는 컨벤션을 확인 후 같은 패턴을 따른다. - run-tests.sh: step 5로 삽입, ruff/shellcheck/markdownlint를 6-8로 재번호 - PRAXIS_TESTS_STRICT는 이 호출에만 전달하지 않는다: 메모리 디렉터리는 CI/신규 체크아웃에 구조적으로 항상 부재하므로, strict 모드를 그대로 흘려보내면 CI가 영구적으로 실패한다. 실제 드리프트 탐지(exit 1)만 FAILED로 집계한다 - ci.yml test job의 독립 실행 스텝(python3 scripts/check-memory-frontmatter.py) 제거 — run-tests.sh 내부 호출과 중복 실행이었다 - 스코프 노트 (5-7)→(6-8) 오기 정정 Confidence: high Not-tested: GitHub Actions에서 이 변경이 실제로 그린인지는 push 후 CI 결과로만 확인 가능 (로컬은 shellcheck+bash -n+pytest로 검증)
…e skip team-lead 리뷰: CI에서 이 스텝은 매 런 SKIPPED를 출력하는데, 메모리 디렉터리는 CI에 구조적으로 항상 부재하므로 이 SKIPPED는 절대 해소되지 않는다. run-tests.sh 자신이 #917에서 지키려는 신호(SKIPPED = 고칠 수 있는 갭)를 이 상시 SKIPPED가 갉는다 — 이슈 #942 자체가 고발하는 '신호가 노이즈에 묻혀 안 읽힌다' 실패와 같은 계열. - check-memory-frontmatter.py: 두 skip 지점(디렉터리 부재/빈 디렉터리) 출력을 'SKIPPED:' → 'N/A:'로 변경. exit-code 시맨틱(strict 시 1, 아니면 0)은 유지 — 라벨만 분리, 동작은 불변 - 관련 docstring · run-tests.sh 헤더 코멘트 3곳 · step 5 인라인 코멘트 · 하단 scope note를 N/A 어휘로 정합화 (헤더 코멘트가 실제 env -u 구현과 모순되던 부분도 함께 정정) - tests/test_check_memory_frontmatter.py: 3개 assertion을 'N/A' 매칭으로 갱신 실측: PRAXIS_MEMORY_DIR=/nonexistent → 'N/A: ... EXIT=0'. 실제 디렉터리(48건) → 'OK: 48 memory entries ... clean EXIT=0'. Confidence: high Not-tested: none — 라벨 변경만이라 로컬 pytest(585 passed)·shellcheck·bash -n·실측 2-시나리오로 전부 커버됨
codex-review-wrap F1 (praxis:codex-review-wrap 비대화형 검증, team-lead 적용 승인). lint이 존재하는 이유 자체의 구멍이었다 — hookKeywords가 이 lint에 '존재하는 필드로서' 잘못된 형태(block/scalar)일 때만 검출됐고, 필드 자체가 아예 없거나 빈 리스트(hookKeywords: [])인 경우는 통과했다. 하지만 memory-hint 런타임 (hooks/advisory-nudge/memory-hint/impl.py:117-139)은 이 두 경우 모두 keywords_match 부재 또는 inner 빈 문자열에서 즉시 None을 반환해 메모리 전체를 hint 인덱스에서 조용히 제외한다 — lint가 막으려던 가장 직접적인 silent-dark 형태를 놓치고 있었다. - HOOKABLE_TRUTHY_VALUES 상수 추가 — memory-hint/impl.py:60의 TRUTHY_VALUES를 그대로 미러링(같은 정규화: strip/lower/quote-strip) - hookable truthy + hookKeywords 필드 자체 부재 → 신규 위반 추가 - hookKeywords: [] (빈 bracket) → 신규 위반 추가 (hookEvents는 폴백이라 대상 아님) - docstring check 4 추가, 회귀 테스트 4건(양성 2 + 경계 2: hookable false는 미대상, hookEvents 빈 리스트는 미대상) 회귀 오라클: git archive cf48a71로 픽스 이전 트리를 추출해 신규 테스트 파일만 얹어 재실행 — 신규 케이스만 정확히 깨지고 기존 케이스는 전부 그린임을 확인. Confidence: high Premise-Verified: hooks/advisory-nudge/memory-hint/impl.py:117-139 직접 판독 — keywords_match 없으면 line 119 return None, inner 빈 문자열이면 line 132 return None. 둘 다 memory 전체 드롭 확인 Not-tested: 실제 memory-hint 훅에 이 두 형태(누락/빈 리스트)를 실전 발화시켜 재확인하지 않음 — 코드 판독+회귀 테스트만
codex-review-wrap F2 (praxis:codex-review-wrap 비대화형 검증, team-lead 적용 승인).
hookKeywords/hookEvents block-form·scalar-form 오류 메시지가 하나의 공유
문자열('전체 메모리가 hint 인덱스에서 제외된다')을 썼는데, hookKeywords에는
참이지만 hookEvents에는 거짓이다. 런타임(memory-hint/impl.py:150-169)은
hookEvents가 malformed일 때 메모리를 드롭하지 않고 기본 이벤트([Bash])로
폴백할 뿐이다 — 실패 모드가 다른데 메시지가 같았다.
- 필드별 consequence 분기 추가 (hookKeywords: 전체 드롭 / hookEvents: Bash
폴백, 의도한 non-Bash 이벤트만 소실)
- docstring에 hookEvents 폴백 동작 근거 명시
- 회귀 테스트 1건 — hookEvents block-form 메시지가 'falls back to the
default'를 담고 'drops the entire memory'를 담지 않는지 확인
회귀 오라클: F1 커밋과 동일하게 이 커밋 이전 트리(F1까지만 적용된 상태) 대상
새 테스트만 실행하면 이 케이스만 깨지는 것을 별도로 확인.
Confidence: high
Premise-Verified: hooks/advisory-nudge/memory-hint/impl.py:150-169 직접 판독 — events_raw가 '['로 시작 안 하거나 inner가 비면 if 블록을 건너뛰어 events는 DEFAULT_EVENTS(Bash)로 남음, return None 없음. hookKeywords의 return None과 다른 경로임을 확인
Not-tested: 실제 memory-hint 훅에 non-Bash hookEvents block-form을 흘려 stderr에 Bash로 매칭되는지까지는 재현하지 않음 — 코드 판독+메시지 텍스트 회귀 테스트만
codex-review-wrap F3 (praxis:codex-review-wrap 비대화형 검증, team-lead 적용 승인). 이 PR이 이번 rev 이전에 스스로 써넣은 문장이 거짓이었다: scripts/check-memory-frontmatter.py in CI is the structural fix, so the next drift of this family fails a build instead of aging quietly in cursor state. 메모리 디렉터리는 gitignored per-user 저장소라 CI에 구조적으로 부재하고, run-tests.sh의 env -u PRAXIS_TESTS_STRICT 호출은 이 조건에서 항상 N/A/exit 0을 반환한다 — build를 실패시킬 수 있는 경로가 없다. 이 세션에서 직접 설계한 env -u 처리와 정확히 모순되는 문장이었다. 문장을 CI가 이 lint로 무엇을 할 수 있는지 정확히 서술하도록 교체했다 — '구조적 수정'이 아니라 '로컬 run-tests.sh 실행 또는 직접 실행 시에만 잡힌다, CI에서는 구조적으로 N/A'. 재검증 경로가 완전하지 않다는 한계를 명시했다. 문서 전용 수정이라 회귀 테스트 대상 아님(team-lead 확인). Confidence: high Premise-Verified: gh run view --repo devseunggwan/praxis --job 94063407506 --log (commit cf48a71, 이 세션에서 이미 수집) — step 5가 'N/A: memory-frontmatter-lint ...' 출력 후 FAILED 미집계, ALL TESTS PASSED로 종료. CI가 이 스텝으로 드리프트를 build 실패시킬 수 없음을 실제 CI 런 로그로 확인 Not-tested: none — 문서 서술의 정정 대상 자체가 이미 이 세션의 CI 로그 오라클로 검증된 사실
1b70b3c to
e3aac9d
Compare
|
Verification updated — |
배경
세션 메모리(
~/.claude/projects/-Users-nathan-song-projects-praxis/memory/)의 frontmatter taxonomy 필드가 top-level /metadata:중첩 두 갈래로 갈려 있었고, cycle 17이 flag한 항목이 이슈 없이 cycle 18로 이월되며 범위가 늘었습니다. 이 이슈의 진짜 주제는 frontmatter 정규화 자체가 아니라 "이전 retrospect가 만든 액션 아이템이 종결되지 않는다" — 재검증 경로 부재입니다.Closes #942
Pre-commit verified:
./scripts/run-tests.sh전체 실행 — pytest/shell/manifest/hook-token-invariant/ruff/shellcheck 통과, markdownlint 는 advisory (기존 MD001 1건, 이 PR 변경 줄 아님)Caller chain verified:
scripts/check-memory-frontmatter.py는 신규 스크립트로.github/workflows/ci.yml(신규 호출부)과tests/test_check_memory_frontmatter.py(신규 테스트)만 참조 — 기존 caller 없음헤드라인 — 드리프트 3건은 "형식"이 아니라 "기능 결함"이었다
이슈 본문은 전제를 이렇게 적었습니다: "memory-hint 파서 자체는 들여쓰기 무관이라 런타임 오작동은 관측되지 않았습니다 — 즉 이것은 기능 결함이 아니라 규약 드리프트입니다." 47개 전체 스캔은 이 전제를 부분적으로 반증했습니다.
hookKeywords:가 multi-line YAML block form(hookKeywords:\n - item)으로 저작된 엔트리 3건을 새로 발견했습니다.hooks/advisory-nudge/memory-hint/impl.py의KEYWORDS_RE는hookKeywords:뒤에[로 시작하는 한 줄짜리 값만 파싱하고, block form은 빈 값으로 읽혀 해당 메모리 전체가 hint 인덱스에서 조용히 탈락합니다. 그중 2건은hookable: true로 "켜져 있다"고 읽혔지만 저작 시점부터 지금까지 단 한 번도 발화한 적이 없습니다:feedback_hook_flag_file_heredoc_timing.mdtruefeedback_merge_ask_ci_comments_precheck.mdtruefeedback_config_dir_probe_before_assume.mdfalse코드 판독이 아니라 실행으로 증명했습니다 — 동일한 memory-hint 훅에 동일한 트리거 커맨드를 흘려서, block form은 침묵하고 bracket form은 hint를 낸다는 것을 stderr 출력으로 직접 확인했습니다(검증 앵커 Evidence 참고). 나머지 13건(아래 표)은 이슈 본문의 전제 그대로 — 파서가 위치 무관이라 런타임에 영향 없는 규약 드리프트입니다.
정규 스키마 확정
skills/retrospect/references/stage4-execution.md에 이미 있던 SoT 절을 확장했습니다.taxonomy 필드(
type,originSessionId,hookable,hookKeywords,hookEvents,modified) —metadata:아래 중첩.hooks/advisory-nudge/memory-hint/impl.py의 정규식은 위치와 무관하게 매치하므로 런타임 오작동은 없습니다 — 중첩을 강제하는 유일한 근거는 일관성(엔트리마다 필드 위치를 두 번 확인하지 않도록)이라는 점을 문서에 그대로 명시했습니다.momentum:은 의도적으로 top-level 유지, taxonomy 대상 아님. 별도 훅(momentum-rule-retrieval-gate)이 소비하는 독립 opt-in 메커니즘이라 "이 메모리가 무슨 종류인가"를 답하는 taxonomy 블록과 개념이 다르고, 기존 엔트리 3/3(force_history_rewrite_mutation / pre_commit_staged_file_enumeration / pre_merge_briefing_compound_imperative)이 전부 top-level이라 여기 넣으면 드리프트 수정이 아니라 100% 일관된 자체 컨벤션을 깨는 것입니다.node_type: memory는 선택 필드, 필수 아님.grep -rn node_type을 이 레포 전체(hooks/, scripts/, tests/)에 돌려 실측했고, 이 필드를 읽는 소비자가 전혀 없습니다. type/hookable/hookKeywords/hookEvents와 달리 런타임에서 아무 의미가 없습니다. 초안 리뷰에서 "문서는 필수처럼 쓰고 lint는 부재를 안 잡는" 모순이 지적돼, 문서·lint·테스트 세 곳을 (B) 선택 필드로 통일했습니다(test_missing_node_type_is_not_flagged).feedback_praxis_hook_canary_verification.md/feedback_question_to_approval_escalation.md2건은 node_type이 없는 채로 그대로 둡니다.47개(정확히는 48개) 전체 스캔 — 발견된 드리프트 16건
이슈가 명시한 4개 외에 12개를 추가로 발견:
기능 결함 (3건, 위 헤드라인 참고) —
config_dir_probe_before_assume,hook_flag_file_heredoc_timing,merge_ask_ci_comments_precheck무해한 규약 드리프트 (13건)
bash_exit_code_if_trap,codex_delegate_fallback,external_cli_verify_first★,force_history_rewrite_mutation★,input_surface_enumeration,parallel_dispatch_concurrent_file_warning★,pre_external_write_gate,worktree_context_pre_git_op,post_mutation_view_verify,pre_delegation_file_path_verifytype양쪽 존재)pre_commit_staged_file_enumeration★★ = 이슈 본문이 명시한 4개
Cycle 17이 종결되지 않은 이유
로컬
.omc/state/retrospect-hygiene-cursor.json(gitignored)을 직접 읽어 확인: 이슈 미생성입니다. cycle 17은 발견을 cursor의cycle_note문자열로만 기록했고gh issue create가 실행되지 않았습니다. 이 노트는 닫을 대상(이슈)이 없는 채로 cycle 17→18 사이를 떠돌다가, cycle 18에서 범위가 2건→4건으로 커진 뒤에야 #942로 명시적으로 승격됐습니다. 구조적 갭: carriedcycle_note에는 자체 재검증 경로(CI, lint, 닫을 이슈)가 없었다는 것 — 본 PR의 CI lint가 그 구조적 수정입니다.메모리 파일 정규화 (레포 밖 — 커밋 대상 아님)
세션 메모리(
~/.claude/projects/-Users-nathan-song-projects-praxis/memory/)는 이 레포 git 트리 밖의 로컬·per-user 저장소입니다. 위 16개 파일을 정규화했습니다 — 이 PR의 diff에는 나타나지 않으며, 별도 커밋도 없습니다.산출물 (레포 diff, 커밋 6개)
docs(retrospect): document memory frontmatter taxonomy schema— SoT 절 확장 (taxonomy 필드 위치, momentum 예외, cycle 17 미종결 사유)feat(scripts): add memory frontmatter lint script—scripts/check-memory-frontmatter.py+tests/test_check_memory_frontmatter.py(12케이스).hooks/_lib/_memory_dir.py의resolve_memory_dir()을 재사용(PRAXIS_MEMORY_DIR→${CLAUDE_CONFIG_DIR:-~/.claude}/projects/<slug>/memory→ linked-worktree fallback — memory-hint 훅과 동일 순서). 위치 드리프트 / 중복 필드 /hookKeywords·hookEventsblock-form을 검출.ci: wire memory frontmatter lint into test job—.github/workflows/ci.yml의testjob에 독립 스텝 추가 (뒤 커밋에서run-tests.sh편입으로 대체되며 제거됨, 아래 참고)docs(retrospect): mark node_type optional, not required— 위 node_type 결정 반영build(ci): wire memory frontmatter lint into run-tests.sh— 아래 섹션fix(scripts): distinguish structural memory-dir absence from a fixable skip— 아래 섹션scripts/run-tests.sh연결 — 완료 (rev 2)sibling-convention 조사 결과(
check-plugin-manifests.py/check-hook-token-invariants.py— repo-internal invariant script 계열은 둘 다 독립ci.ymljob 없이run-tests.sh전용) 를 따라run-tests.shstep 5로 편입했습니다.PRAXIS_TESTS_STRICT는 이 호출에만env -u로 전달하지 않습니다 — 메모리 디렉터리는 CI/신규 체크아웃에 구조적으로 항상 부재하므로, strict 모드를 그대로 흘리면 CI가 영구 FAIL됩니다.ci.yml의 독립 스텝(위 3번째 커밋에서 추가)은 이제 중복 실행이라 제거했습니다 — 제거 전후 커맨드가 플래그·범위 없이 완전히 동일함을git show로 직접 확인했습니다.출력 라벨 —
SKIPPED가 아니라N/A: 초기 구현은 구조적 부재(CI/신규 체크아웃)를SKIPPED:로 찍었습니다. 리뷰에서 이 레포가SKIPPED를 "고칠 수 있는 갭"(툴 미설치) 전용 어휘로 쓴다는 점(#917 — SKIPPED가 읽히지 않고 스크롤되는 걸 막으려고 만든 장치) — 즉 절대 해소되지 않는 이 조건을 같은 라벨로 찍으면 그 신호를 갉는다는 지적을 받아,N/A:로 분리했습니다. exit-code 시맨틱(strict 시 1, 아니면 0)은 변경하지 않았습니다.검증
python3 scripts/check-memory-frontmatter.py— 실제 메모리 디렉터리(48 entries, 정규화 완료) 대상 clean 확인N/A(strict/non-strict 둘 다) → 드리프트 fixture 대상 exit 1(FAIL 경로,run-tests.sh가 쓰는env -u PRAXIS_TESTS_STRICT래핑 그대로) — 전부 실제 실행 출력으로 확인[memory:hookable]stderr를 낸다는 것을 확인. 실제(정규화 완료) 메모리 디렉터리 대상으로도 재확인.python3 -m pytest tests/test_check_memory_frontmatter.py— 12 passed /python3 -m pytest tests/전체 — 585 passed./scripts/run-tests.sh— 로컬ALL TESTS PASSED(연결 전 rev) + GitHub Actions 실제 CI 런(testjob, commitcf48a71) 로그에서 step 5가N/A:를 찍고FAILED미집계,ALL TESTS PASSED로 종료하는 것을 직접 확인 (검증 앵커 코멘트 rev 2에 실행 출력 첨부)알려진 미해결 갭 (이 PR에서 고치지 않음 — 팀 승인 후 후속)
praxis:codex-review-wrap비대화형 검증 경로(적용 0건, 전제 검증만)로 확인:hookable: true인데hookKeywords가 아예 없거나[]인 경우, 이 lint는 clean으로 통과시키지만 런타임(hooks/advisory-nudge/memory-hint/impl.py:117-139)은 조용히 해당 메모리 전체를 hint 인덱스에서 제외합니다 — lint가 방지하려던 바로 그 실패 모드(silent-dark)를 이 형태에 대해서는 놓칩니다.hookEvents의 block/scalar-form 오류 메시지가hookKeywords와 동일하게 "전체 메모리가 hint 인덱스에서 제외된다"고 서술하지만, 실제로는(impl.py:150-169) 기본 이벤트([Bash])로 폴백할 뿐 메모리 자체는 계속 인덱싱됩니다 — 두 필드의 실패 모드가 다른데 메시지가 같습니다.skills/retrospect/references/stage4-execution.md가 "check-memory-frontmatter.py가 CI의 구조적 수정이라 다음 드리프트는 build를 실패시킨다"고 서술하지만, CI의 메모리 디렉터리는 구조적으로 항상 부재해 이 스텝은 CI에서 항상N/A/exit 0을 반환합니다 — 이 보장은 성립하지 않습니다(로컬 실행에서만 잡힙니다).