Skip to content

feat(l0_guard): section 4 — L0 .hexa 파싱 가능성 검증#34

Merged
dancinlife merged 1 commit intomainfrom
feat/l0-guard-parse-check
Apr 13, 2026
Merged

feat(l0_guard): section 4 — L0 .hexa 파싱 가능성 검증#34
dancinlife merged 1 commit intomainfrom
feat/l0-guard-parse-check

Conversation

@dancinlife
Copy link
Copy Markdown
Contributor

Summary

L0 verify 에 section 4 추가 — 각 L0 .hexa 파일을 hexa 로 실행, "Parse error" 0건 = PASS.

airgenome rebuild v2 의 M1 milestone 구현. phantom L0 (파일 존재하지만 파싱 실패) 영구 차단.

Why

기존 verify 는 파일 존재만 검증. dead code 가 L0 자격 유지하는 상태 발생.

증거: airgenome rebuild v2 직전 21 L0 항목 중 다수 phantom (src/core.hexa, modules/load_balancer.hexa 등). L0 47 PASS / 0 FAIL 표시 중에도 파싱 실패 상태였음.

Implementation

  • 각 L0 path 의 .hexa 확장자 검사 (grep -c '\.hexa$')
  • exec(HEXA + " '" + abs + "' 2>&1 < /dev/null | grep -c 'Parse error'")
  • pe == 0 → PASS, pe >= 1 → FAIL

Side effect

파일이 top-level 에서 무거운 작업을 하면 매 verify 마다 실행. 완화: env gating 권장 (airgenome core/core.hexaif env("CORE_SELF_TEST") == "1" 패턴 참조).

Test plan

  • airgenome verify → 21 PASS / 0 FAIL (core.hexa, core_test.hexa 둘 다 parse PASS)
  • nexus self-verify → 9 FAIL parse 즉시 발견 (다른 phantom L0 노출 — 별도 청소 필요)

Follow-up

nexus 자체 L0 의 7개 phantom .hexa 정리 (별도 PR):

  • shared/blowup/lens/lens_forge.hexa
  • shared/hooks/{bootstrap, check-project, bridge-ensure, nexus-engine, nexus-mk2-engine, sync-hooks-to-settings}.hexa

milestone: airgenome shared/config/roadmap/airgenome.json M1_l0_strict

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Why:
- 기존 verify 는 "파일 존재" 만 검증 → dead/broken .hexa 도 L0 자격 유지
- airgenome rebuild v2 의 도화선: src/core.hexa, modules/load_balancer.hexa 등
  파싱 실패 상태로 L0 47 PASS 였음
- 신규 module 작성 시 자동 parse 검증 → 같은 phantom 재발 차단

Implementation:
- 각 L0 path 가 .hexa 확장자면 hexa run 실행
- "Parse error" 출력 카운트 0건 = PASS, 1건 이상 = FAIL
- stdin 차단 (< /dev/null) 으로 입력 대기 회피

Side effect:
- 파일이 top-level 에서 무거운 작업 (시스템 호출 등) 을 하면 매 verify 마다 실행
- 완화: env gating 권장 (예: CORE_SELF_TEST=1 패턴, airgenome core/core.hexa 참조)

검증:
- airgenome verify → 21 PASS / 0 FAIL (core.hexa, core_test.hexa 둘 다 parse PASS)
- nexus self-verify → 9 FAIL parse phantom 즉시 발견 (예상 효과 입증)

milestone: airgenome roadmap M1_l0_strict
@dancinlife dancinlife merged commit cbe20f9 into main Apr 13, 2026
1 check failed
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