fix(stack_verify_all): 증인 계층을 조용히 건너뛰고 ALL OK 를 냈다 - #36
Merged
Conversation
`if am_ledger and am_peer_name:` 에 else 가 없었다. 증인 원장을 넘겨도
`am_peer_name` 이 없으면 **L2 교차증인이 아예 안 돌고**, 그런데도 판정은 `ALL OK` 였다.
⇒ am 체인이 **초록불 뒤에서 영영 안 측정될 수 있었다.**
stack_verify_all(mm_ledger=…, am_ledger=…) # peer 이름 없이
→ (before) verdict: "ALL OK"
→ (after) verdict: "ALL OK (partial: 1 requested layer(s) did not run)"
scope.layers_skipped[0].why = "am_ledger given but am_peer_name
missing — the witness layer did not run; this verdict says
nothing about the am chain"
★ **요청했는데 안 돈 것**만 partial 로 친다. `anchor_dir` 를 안 준 건 그게 아니다 —
L3 를 **요청하지 않은** 것이라 `scope.layers_not_requested` 로 적고 판정은 깨끗이 둔다.
(이 구분을 안 하면 L1만 부르는 정상 호출까지 partial 이 된다.)
같이 고친 둘:
· **docstring 이 "the whole stack" 이라 약속했다.** 전체를 잰 적이 없다 — 인자로 받은
원장만 재고 `stack.json` 을 **안 읽는다**. 그대로 적고, 디렉토리 전체 커버리지는
`verify_all.py` 오케스트레이터로 가라고 가리켰다.
· `seals valid` 가 **잰 개수**를 같이 낸다. 그 문장은 빈 원장에서도 참이다.
시험 51 통과. 남은 실패 1건(`test_prereg_lint_clean_seal_has_no_warn_or_fail`)은
**이 변경 전 origin/main 에서도 재현된다** — 이 커밋과 무관하다.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
대장님 승인 머지 — B(중대 변경·mcp 공급망 최고민감). stack_verify_all 공개툴이 am_ledger만 주고 am_peer_name 없으면 L2 조용히 skip+ALL OK 반환하던 것 수리(layers_skipped 노출·partial 표시)·seals valid 분모 표기·docstring '전체 스택' 과대주장 정정. 버전 0.2.10→0.2.11·CI 4/4·이상 0. |
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.
if am_ledger and am_peer_name:에else가 없었다. 증인 원장을 넘겨도am_peer_name이 없으면 L2 교차증인이 아예 안 돌고, 그런데도 판정은ALL OK였다.⇒ am 체인이 초록불 뒤에서 영영 안 측정될 수 있었다. 이건 검증기가 절대 하면 안 되는 한 가지다.
★ partial 의 정의 — "요청했는데 안 돈 것"만
anchor_dir를 안 준 건 그게 아니다. L3 를 요청하지 않은 것이라scope.layers_not_requested로 적고 판정은 깨끗이 둔다.(mm_ledger)— L1만 요청ALL OK·layers_not_requested: ["L3 anchor"](mm_ledger, am_ledger)— 증인 요청했는데 안 돎ALL OK (partial: 1 requested layer(s) did not run)(mm_ledger, am_ledger, am_peer_name, anchor_dir)ALL OK·layers_run: [L1, L2, L3]· 6/6이 구분을 안 하면 L1만 부르는 정상 호출까지 partial 이 된다(첫 구현이 그랬고, 기존 시험이 그걸 잡았다).
같이 고친 둘
"Verify the whole stack in one call"이라 약속했다. 전체를 잰 적이 없다 — 인자로 받은 원장만 재고stack.json을 안 읽는다. 그래서 caller 가 안 넘긴 원장에 대해선 아무 말도 못 한다. 그대로 적었고, 디렉토리 전체 커버리지는verify_all.py오케스트레이터로 가라고 가리켰다.seals valid가 잰 개수를 같이 낸다. 그 문장은 빈 원장에서도 참이다.시험
51 통과. 남은 실패 1건(
test_prereg_lint_clean_seal_has_no_warn_or_fail)은 이 변경 전origin/main에서도 재현된다(git stash로 확인) — 이 PR 과 무관하고, 로컬 형제 체크아웃(../measure_mirror_poc)을 타고 들어가는mm.py:463 TypeError다. CI 가 판단할 몫으로 둔다.맥락
이건 수리 둘 중 둘째다. 첫째는 measure-mirror 쪽
verify_all.py의 범위 문제(선언 4개 / 원장 82개)이고, 그건 별건 PR 이다 — MCP 경로는stack.json을 아예 안 읽어서 거기를 고쳐도 이쪽엔 아무 일도 안 일어난다.