Skip to content

Commit 0542f8d

Browse files
dancinlifeclaude
andcommitted
feat(harness): HX4 예외 allowlist 확장 — 실환경 적합성
hexa-lang 실제 스캔 결과 오탐 보정: - editors/, playground/, docs/website/ 예외 (IntelliJ plugin + web assets 필수) - .claude/, .growth/, .superpowers/ 예외 (AI 메모리/캐시) - docs/superpowers/, docs/history/ 예외 (역사 문서) - .log 확장자 예외 - L3: self/ 전체 예외 (컴파일러는 FFI 생성기라 self-host 본질) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a0737c7 commit 0542f8d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

shared/harness/lint.hexa

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,19 @@ fn _hx4_is_exempt(path: string) -> bool {
238238
if path.starts_with("build/") { return true }
239239
if path.starts_with("shared/harness/") { return true }
240240
if path.starts_with("shared/rules/") { return true }
241+
// editors/playground/docs-website: 외부 도구 필수 (IntelliJ Java, web assets)
242+
if path.starts_with("editors/") { return true }
243+
if path.starts_with("playground/") { return true }
244+
if path.starts_with("docs/website/") { return true }
245+
// AI 메모리/worktree/growth 캐시
246+
if path.starts_with(".claude") { return true }
247+
if path.starts_with(".growth") { return true }
248+
if path.starts_with(".superpowers") { return true }
249+
// 역사 문서 (레거시 테스트/빌드 언급 포함)
250+
if path.starts_with("docs/superpowers/") { return true }
251+
if path.starts_with("docs/history/") { return true }
252+
// log 파일
253+
if path.index_of(".log") >= 0 { return true }
241254
return false
242255
}
243256

@@ -300,9 +313,12 @@ fn _hx4_l2_toolchain(path: string) -> string {
300313
}
301314

302315
// L3 런타임 FFI/dlopen 금지 — self/runtime.c 내부 API 만
316+
// 예외: self/ 컴파일러 내부 (ffi 생성기는 self-host 본질), self/ml/ FFI 인프라
303317
fn _hx4_l3_runtime(path: string) -> string {
304318
let e = ext_of(path)
305319
if e != ".hexa" { return "" }
320+
// self/ 컴파일러는 ffi 코드 생성기라 예외
321+
if path.starts_with("self/") { return "" }
306322
let full = REPO_ROOT + "/" + path
307323
let cmd = "grep -E '\\b(dlopen|dlsym|ffi_call|ffi_new|FFI\\.)' '" + full + "' 2>/dev/null | grep -v '@allow-ffi' | wc -l"
308324
let hits = to_int(_str(exec(cmd)).trim())

0 commit comments

Comments
 (0)