Skip to content

docs: SPEC for helper check propagation — the call path, not the body, decides - #338

Merged
xzawed merged 2 commits into
mainfrom
docs/spec-helper-check-propagation
Sep 26, 2026
Merged

xzawed merged 2 commits into
mainfrom
docs/spec-helper-check-propagation

Conversation

@xzawed

@xzawed xzawed commented Sep 26, 2026

Copy link
Copy Markdown
Owner

docs/slices/SPEC-helper-check-propagation.md 초안. 방향은 사용자 확인(2026-09-26, §9-71.6의 권고안 F2) — ! 본문이 부른 무한 헬퍼의 산술도 검사하고 -3을 전파한다. §4의 DP-P2~P11은 확인 대기이고 제품 코드는 없다. 관련: DP-O7(이 슬라이스가 뒤집는다) · DP-O4/O6/O8 · D17 · #238.

쓰기 전에 잰 것 (E2)

  • 코퍼스 조사(컴파일러 IR로): §7 83파일의 헬퍼 50개가 전부 !에서 닿고 17개가 검사할 연산을 가진다 · 의도한 wrap에 기대는 헬퍼는 어느 코퍼스에도 0 · examples/에는 이 모양이 없다(수용 D는 예제에 헬퍼를 넣는다, DP-P11).
  • 시험 구현의 결함 다섯 — SPEC이 고친다: 바인딩이 헬퍼 경로의 -3을 선언하지 않음 · 쌍둥이 이름 충돌(E0428) · 주변 -D warnings에서 빌드 실패 · 쓸모없는 쌍둥이 · export가 검사를 멈춤. 셋(충돌 · -D warnings · export)과 지문 불변 · 멈춤→-3은 손으로 다시 쟀다.
  • 크기: 예제 26개 바이트 동일, 헬퍼 많은 합성 모듈 .text +9.7%.

Grok

  • plan: export 무한 호출 대상 포함 YES · 한 집합으로 바인딩 술어 충분 · allow(dead_code) 대신 참조되는 본문만 방출(과다 방출을 숨기지 않으려고 — 이 답이 설계를 바꿨다).
  • verify, 한 번에 주장 하나: §0.1 수치 ↔ §9-71 CONFIRMED · 오늘의 술어 결함 DISCREPANCY(-2는 무한 헬퍼에서만 없고 fixed의 이유가 달랐다) · ml_ck_ 이름 무충돌 CONFIRMED · 내부 일관성 DISCREPANCY(수용 I의 범위 항목이 없었고, allow(non_snake_case)가 모든 모듈의 생성 Rust를 바꿔 수용 H와 부딪혔다 → 이미 있던 문제라 §5로 옮김) → 고친 뒤 재검증 CONFIRMED.
  • doc_claims 50/50.

🤖 Generated with Claude Code

xzawed and others added 2 commits September 26, 2026 19:03
…, decides

Direction confirmed by the user (2026-09-26, §9-71.6 F2): arithmetic executed on behalf of a
fallible body is checked wherever it is written, and -3 propagates. The draft asks for
DP-P2..P11: exported infallible callees included, any return type, fail at the operator,
DP-O6 parity after `result`, one set in ir.rs read by codegen and both bindings (the
prototype's .h/.pas never declared ML_ST_OVERFLOW for a helper-only path), `ml_ck_<f>`
names (the prototype's name collided, E0428), emit referenced bodies only (the prototype
broke builds under ambient -D warnings), fingerprint/ABI unchanged, no replacement escape
hatch for DP-O7, and a helper added to an example for acceptance D.

Measured before writing: a census through the compiler's IR (no corpus helper relies on
intended wrap), code size, and the prototype's defects, three of them re-run by hand.
Grok plan: exported callees YES, one set SUFFICIENT, referenced-only emission over allow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ers, the re-measure is in scope, and non_snake_case stays out

Grok verify: `fixed` is excluded because it is string-return only, not by DP-A3, and a
fallible helper can produce -2 (already declared, every ! body is scanned); acceptance I had
no scope item; an allow(non_snake_case) line would change every module's generated Rust and
contradict acceptance H, so the pre-existing non_snake_case case is recorded in §5 instead,
and acceptance G separates the collision check from the -D warnings row.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xzawed

xzawed commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

⚠️ AI 리뷰가 완전 검증되지 않음 — 기본값이 적용됐습니다(비활성/API 키 없음/빈 diff). AI 배점은 측정값이 아니므로 총점을 부분 점수로 보세요.

🔵 SCAManager 분석 결과

총점: 89/100 (등급 B)

점수 상세

항목 점수 만점
커밋 메시지 13 15
코드 품질 25 25
보안 20 20
구현 방향성 (AI) 21 25
테스트 10 15

@xzawed
xzawed merged commit 78b4522 into main Sep 26, 2026
2 checks passed
@xzawed
xzawed deleted the docs/spec-helper-check-propagation branch September 26, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant