{ "schemaVersion": "2.0", "kind": "architecture-tree", "title": "hexa-lang — Architecture (SSOT)", "summary": "Single source of truth for the final architecture", "viewer": "architecture.html", "serve": "python3 serve.py (로컬 서버 + 브라우저 자동 오픈; file:// fetch 차단 우회)", "convergence": { "note": "재발방지 학습 SSOT (인라인 마커 이관)", "records": [ { "id": "BENCH-CLM-TRAIN-SEGFAULT", "state": "completed", "value": "alloc_raw buffers allocated inline + filled via void helpers (no raw-pointer return across val-arena fn-scope); tiny+small+medium run SIGSEGV-free", "threshold": "hexa run bench/clm_train_bench.hexa exits 0 with default HEXA_VAL_ARENA (on); all 3 scales print valid loss", "source": "bench/clm_train_bench.hexa" }, { "id": "CLM-STEP-CONV-BWD-HOST-SCALAR-WALL", "state": "in_flight", "value": "nn_conv1d_bwd in stdlib/flame/conv_lib.hexa was a host-scalar 4-nested loop (T·Cout·Cin·K≈201M iter/call × 4 calls/step) with no GPU kernel — CLM step 60325ms vs PyTorch 12.7ms = 4750×. FIX: replaced with forge_dispatch_matmul im2col+GEMM+col2im path (same algorithm as clm_conv_gpu.hexa::conv1d_bwd_via_forge, verified max|Δ|≤1e-9). Also fwd upgraded t_matmul→forge_dispatch_matmul. Parity + speedup measurement on summer RTX5070 sm_120 pending (see bench/vs_pytorch/bench_hexa_clm_step.hexa).", "threshold": "CLM step median on summer < 1000ms (>>1000× speedup expected); parity max|Δ|≤1e-9 vs naive path", "source": "stdlib/flame/conv_lib.hexa" }, { "id": "METACLOSURE-SEED-POSITIONAL", "state": "ossified", "value": "path defaulted to cli_positional(0) → `--seed \"expr\"` mis-bound expr as a filename (file-not-found) since the file-branch precedes the seed-branch; sister `absolute` works only because it has no --file path", "threshold": "bare positional is a --file ONLY when --seed is absent", "source": "compiler/meta_closure/check.hexa" }, { "id": "N6LATTICE-COMPOSE-INDEX-MISCOMPILE", "state": "in_flight", "value": "p[q[i]] read garbage index 0x8_0000_0006 (len4 OOB) = HexaVal tag/payload upper-32 corruption (cf #3551/#3544 array-element-as-index)", "threshold": "split let idx=q[i] before p[idx]; real fix = codegen index-from-array-element lowering", "source": "compiler/n6_lattice/verify.hexa" }, { "id": "CONTAINS-KEY-FREEFN-EMIT", "state": "ossified", "value": "free-fn contains_key(m,k) fell through to bare _contains_key (dyld not found) — only .contains_key method + has_key/map_contains_key were mapped", "threshold": "map free-fn contains_key to hexa_map_contains_key like has_key", "source": "self/codegen.hexa" }, { "id": "MUSL-OPENSSL-STATIC-DEPS", "state": "ossified", "value": "musl static build needs libssl+libcrypto static archives (not available in all musl toolchains by default); hexa_cc needs -lbsd on musl for openssl compat", "source": "self/main.hexa" }, { "id": "CUDA-RUNTIME-MARKER", "state": "in_flight", "value": "cuda asset consumer needed HEXA_CUDA=1 on EVERY hexa build else cudaLaunchKernel/cublas undefined (-lcudart env-gated); install.sh auto-pulls cuda asset but build did not auto-link (#3723 v6b)", "threshold": "cuda asset hexa run/build links cudart WITHOUT env (marker-detected); CPU install byte-identical", "source": "self/main.hexa" }, { "id": "CUDA-STUBS-SELFCOMPILE", "state": "in_flight", "value": "self/main.hexa os_clang_ldflags cuda -L discovery is TOOLKIT-LAYOUT-ONLY and repeatedly misses real lib locations. (1) #3696-era: omitted -L/stubs → 'ld cannot find -lcuda' in the -cuda release Package step. (2) 2026-07 extension: the -L probe only knew CUDA_HOME=/usr/local/cuda (targets/x86_64-linux/lib | lib64) → a bare vast/runpod pod (NO toolkit, pip-wheel nvidia-cuda-runtime-cu12 puts libcudart.so.12 under /nvidia/*/lib with NO bare .so linker-name) → cuda_probe='' → no -L → -lcudart link wall → cuda_available()=0 despite HEXA_CUDA=1. install.sh _has_cuda_runtime had the SAME toolkit-only blindspot. FIXED: install.sh _pip_nvidia_roots/_wire_pip_cuda_libs materialize a hexa-owned symlink farm $HX_HOME/cuda-libs (bare .so linker names, existence IS the record); _has_cuda_runtime=toolkit∪pip; os_clang_ldflags probes farm(tier1,-L+-rpath)→CUDA_HOME(tier2,verbatim)→live-pip(tier3). Root pattern: cuda lib discovery must enumerate ALL real lib sources (toolkit + stubs + pip site-packages), not assume /usr/local/cuda.", "threshold": "(a) release -cuda Package step green (libcuda from stubs). (b) bare pip pod: cuda_available()=1 with ZERO per-pod symlink/export. Byte-eq NEUTRAL on non-pip/toolkit hosts (all new main.hexa code inside if cuda_on; toolkit host has no farm → tier2 verbatim → char-identical link line incl. no rpath) → byteeq 3-target GREEN gate. install.sh farm builder locally verified (glob fallback + 6 bare .so names + idempotent). Remaining: byteeq 3-target CI + real bare-pip-pod smoke.", "source": "self/main.hexa" }, { "id": "CLI-RUNCACHE-STALE-ABI", "state": "ossified", "value": "local run-cache key used only sha(source)+static version_str('0.1.0-dispatch') → toolchain upgrade reused a stale hexa_run. .o built against an older runtime ABI → dyld 'Symbol not found: _regex_match/_json_stringify/_contains_key' on v0.241.x", "threshold": "fold running-binary size+mtime into the LOCAL cache key (precompile probe base-key unchanged so shipped precompile still hits)", "source": "self/main.hexa" }, { "id": "hxmetal-default-on-headless-device-check", "state": "ossified", "value": "default-ON polarity 가 NSString(objc) 만 보고 live 진입 → headless/no-GPU darwin(GitHub Actions macOS 러너)서 MTLCreateSystemDefaultDevice()=nil 인데 HXM_LIVE=1 → device_non_null assert fail → faithful-nobaseline darwin RED (#3830).", "threshold": "default-ON 은 mac+Metal-device 둘 다일 때만 — MTLCreateSystemDefaultDevice()==0 이면 stub 폴백", "source": "self/runtime/hxmetal_stub.hexa" }, { "id": "CLI-ARGV-STANDALONE-PREFIX", "state": "ossified", "value": "compiled bin standalone argv has no .hexa script slot; .hexa-scan fallback to 2 skipped the subcommand at index 1 → top-level status banner+exit4", "threshold": "fallback to 1 when argv[1] is not a .hexa script", "source": "stdlib/sim_universe/sim_universe.hexa" }, { "id": "CLOUD-CROSSPROJECT-FORCE", "state": "in_flight", "value": "--force is a CONFIRM-skip, NOT a cross-project license: a rent-session trap auto-passing --force (with a mis-parsed id) destroyed another project's pod (an anima session killed a runpod pod tagged to a different project)", "threshold": "cross-project REAL-mismatch refuses even under --force; teardown requires re-running from the owner repo (same-project/orphan/untracked unaffected). ESCAPE (PR #4337): a billing pod unreachable from its owner repo is NOT un-killable — the EXPLICIT --yes-cross-project flag (never --force alone) overrides", "source": "stdlib/cloud/cloud_cli.hexa" }, { "id": "CLOUD-RENT-COST-TRAP", "state": "in_flight", "value": "cloud rent had NO way to list offers without provisioning a billable pod — verifying 'do offers exist / at what $/hr?' cost a real rental; worse, an unrecognized --dry-run was SILENTLY IGNORED, the search picked an offer ($0.43/hr) and CREATED an instance (LIVE incident 2026-07-01). Sibling gap: the cross-project down-guard made a cost-leaking pod owned by another project UN-KILLABLE via the sanctioned CLI (only raw vastai destroy + cloud forget worked).", "threshold": "cloud rent --search-only/--dry-run lists offers then EXITS renting NOTHING (vast prints id/$hr/specs via vast_list_offers; runpod reports the --gpu selector); an unknown flag on the $-incurring rent verb FAILS LOUD (exit 2, no provider call) — never silently ignored; teardown escape = explicit --yes-cross-project (never --force alone); cloud forget stays guard-free for already-gone registry cleanup", "source": "stdlib/cloud/cloud_cli.hexa" }, { "id": "ATLAS-REGISTER-BAKED-PATH", "state": "ossified", "value": "register/.discoveries + embedded path resolved ONLY to baked $HOME/core/hexa-lang → silent no-op from any other checkout (e.g. ~/dancinlab/hexa-lang); cwd-relative repo-local was the documented-but-unimplemented intent", "threshold": "resolve cwd-relative FIRST via fs_exists; baked $HOME path is last-resort fallback", "source": "tool/atlas_cli.hexa" }, { "id": "build-aprime-stale-native-seed-o", "state": "ossified", "value": "warm-tree 의 build/*_native.o 가 seed.s 갱신 후에도 [ ! -f .o ] 가드로 재생성 skip → 옛 심볼셋(예: leg-B Z2a 가 rt_str_trim C body RETIRE 했으나 stale rt_hi_native.o 는 trim 그룹 누락)으로 link → undefined _rt_str_trim. alloc-stale warm-tree 수렴이 rt_hi 에서 재발.", "threshold": "seed.s -nt .o 면 재assemble (5 native-seed 가드 rt_hi/array/map/alloc/str 전부)", "source": "tool/build_aprime.sh" }, { "id": "x86-native-seed-link-wiring", "state": "ossified", "value": "Any build script that links self/runtime.c MUST assemble + link the CANONICAL native-seed object set AND pass its pairing -D macros, exactly as build_aprime.sh:272-406 does. runtime_core.c dropped the C bodies of rt_array_*_native / rt_map_*_native / rt_str_*_native (always extern) and gates the C arena behind #ifdef HEXA_RT_ALLOC_NATIVE (runtime_core.c:1450). So: (a) omitting array/map/alloc/rt_hi seed .o = `undefined reference to rt_map_get_native / hexa_arena_alloc`; (b) linking the alloc seed WITHOUT -DHEXA_RT_ALLOC_NATIVE=1 = `multiple definition of hexa_arena_*` (both the C arena and the seed define them). Recurrences: (1) build_native_linux_x86_64 gcc line, (2) shipped v0.262.0 runtime.a missing array_core_native.o (bricked hexa run/build of every x86_64 program), (3) THIS build_hexa_cli driver+module_loader link. Fix = the canonical set + the alloc macro, the build_aprime way.", "source": "tool/build_hexa_cli.hexa" }, { "id": "build-precompile-exec-bigout-brokenpipe", "state": "ossified", "value": "REAL root cause (#3833 misdiagnosed as pipe-buffer overflow): the runtime exec-drain (hexa_drain_bounded) has a HARD ceiling HEXA_EXEC_DRAIN_MAX_MS (default 120 s). #3833 redirected build output to a logfile so the pipe went SILENT — leaving the trailing `echo __BRC__` as the ONLY captured byte. A large `hexa build` entry running >120 s on a loaded host (aiden shared pool: install_firmware_hook ~156 s, build_precompile ~157 s — both >120 s) makes the drain hit its ceiling and fclose() the read end while /bin/sh is STILL building; the trailing echo then writes to a dead pipe -> SIGPIPE/EPIPE (`echo: write error: Broken pipe` on bash / `echo: I/O error` on dash) AND the captured output lacks `__BRC__=` -> rc defaults to 1 -> a SUCCESSFUL build is reported FAIL. Looks 'random' because which entries cross 120 s depends on host load; darwin/arm64 hosts are faster so stay under -> GREEN. hexa_exec's post-drain hexa_spawn_reap does a BLOCKING waitpid, so the child always fully completes regardless of the drain cutoff.", "threshold": "write the build rc to a FILE (`echo \"$?\" > rcf`), NOT down the exec pipe, then read rcf from disk — the result path no longer touches the pipe, so a drain-ceiling cutoff cannot corrupt it (host-load / dash-vs-bash / linux-vs-darwin robust). #3833 logfile-redirect kept; only rc-capture moved off the pipe.", "source": "tool/build_precompile.hexa" }, { "id": "RUNPOD_APT_DEPS_LIBBLIS", "state": "ossified", "value": "apt-get install build-essential clang lld git curl ca-certificates libblis-dev — libblis+clang required for hexa self-host build", "source": "tool/deploy_h100.hexa" }, { "id": "RUNPOD_SSH_SEMICOLON_CHAIN", "state": "ossified", "value": "SSH with semicolon-chained commands exits 255. Use bash -c 'cmd1 && cmd2' or separate SSH calls", "source": "tool/deploy_h100.hexa" }, { "id": "ING-STALE-VERIFY-FIRST-BEFORE-REVIVE", "state": "ossified", "value": "aged ING 항목(수일 묵음)은 merged PR로 이미 처리/진행됐을 수 있는데 보드는 자동 scrub 안 됨 → git-verify 없이 작업 착수하면 머지된 일을 재작업(redo-waste). 이번 세션 #34=이미 #3805(rent 하드닝 4가드)·#33=이미 #3899(collision mangle)+summer 실측 링크성공 → 둘 다 거의 재작업할 뻔. 동형 재발: QA 캠페인 census가 fix마다 라인이동으로 stale→phantom FP, 누적 후 origin/main 재생성으로 해소. 일반 클래스=추적기(ING/census)가 산출물 머지와 비동기로 drift.", "threshold": "aged ING/추적항목 작업 착수 前 verify-first 필수: (1) git log origin/main grep 키워드+ING번호 (2) 가능시 실측 재현(예 summer 빌드 exit=0=FIXED) → DONE이면 scrub, ACTIVE-by-others면 STOP관망, 진짜잔여만 작업. 추적기가 stale일 수 있다고 가정.", "source": "ING.jsonl" }, { "id": "POOL-BUILD-AGENT-STRAND-SELFHARVEST", "state": "ossified", "value": "pool-build을 background agent로 돌리면 agent가 서버측 rate-limit(또는 호스트 재부팅)으로 죽어도 빌드는 호스트서 완료되는데, agent가 결과를 수확/verdict작성 못해 결과가 /tmp에 unharvested로 방치(R5 seed-converge=10시간 방치·R6 gcc-O1=2회 strand+재부팅 wipe). 메인세션이 의심하고 호스트 ground-truth(cat /tmp/*RESULT*)로 직접 수확해야 발견됨.", "threshold": "재발조건=heavy pool 빌드+검증을 agent로 위임 시 매번. 해결=빌드 스크립트가 self-harvest(결과를 host:/tmp/_RESULT.txt에 직접 기록)하게 만들어 agent 생존에 무관하게 결과 보존+메인세션 cat 수확. 호스트 재부팅 시 /tmp wiped 가능→코드는 branch에 보존+verify 재실행. 죽은/타임아웃 호스트 재두드림 금지(poll-min-30m).", "source": "tool/stage_build_hexa" }, { "id": "CUDA-LINK-MISSING-SSL", "state": "in_flight", "value": "self/main.hexa CUDA link path (~L1487) early-returns after adding -lcudart/-lcuda/-lcudadevrt but BEFORE adding -lssl/-lcrypto (lines 1496-1500 are never reached for CUDA builds). When a deployed runtime.a has a CUDA host object compiled with -DHEXA_HAS_OPENSSL, the linker finds undefined refs to EVP_* in any hexa run. Workaround: compile runtime_cuda_host.o without -DHEXA_HAS_OPENSSL (gates out hexa_aes256_ctr_xor, the only EVP_* caller).", "threshold": "Fix self/main.hexa ~L1487: probe OpenSSL (pkg-config --libs openssl) and append result to the CUDA return line before -lcudart/-lcuda. Requires 3-target byteeq CI PR. Until then, CUDA deploy archive must NOT include -DHEXA_HAS_OPENSSL-compiled objects.", "source": "self/main.hexa" }, { "id": "CUDA-BUILD-CORES-EXPLICIT-LINK-MULTIDEF", "state": "ossified", "value": "build_cuda_runtime extracted *_native.o from prebuilt runtime.a and linked them EXPLICITLY as .o files. The frozen runtime_core.c (restored from blob 151c52c82 by restore_frozen_seeds) predates HEXA_RT_ALLOC_NATIVE guards and still #includes runtime_hi_gen.c unconditionally → 19× `multiple definition`: hexa_arena_alloc/mark/rewind/reset (4) + rt_str_split/lines/pad_left/pad_right/repeat/center/to_upper/to_lower/trim/trim_start/trim_end/starts_with_b/ends_with_b/contains_b/from_int (15). SHIPPED runtime.a is fine (archive lazy-pulls only needed symbols) but explicit-link forces BOTH objects. Root cause = the frozen seed's gating does NOT match the symbol set provided by the native .o seeds.", "threshold": "After restore_frozen_seeds, call _regen_runtime_core_for_cuda() (awk-unescape of runtime_core_emit.hexa SSOT → runtime_core.c WITH HEXA_RT_ALLOC_NATIVE guards), reconcile_runtime_c_ssot_dups (drop 4 migrated f64<->bits weak defs from runtime.c), and Z2a patch (#include runtime_hi_gen.c removed when rt_hi_native.o in CORES). Same pattern as stage_resolve_runtime_a already does. CPU build: compile fresh runtime.o with RTFLAGS instead of extracting from archive.", "source": "tool/build_cuda_runtime" }, { "id": "BUILD-CUDA-RUNTIME-CUDA-HOME-SM80-ZEROS", "state": "ossified", "value": "build_cuda_runtime defaulted CUDA_HOME=/usr/local/cuda-13.0. When that path is absent (e.g. summer has cuda-12.9 only), PATH prepend has no effect and system nvcc (CUDA 12.0, /usr/bin/nvcc) is used instead. CUDA 12.0 compiles sm_80 objects with -rdc=true. sm_80+rdc+clang-link silently fails device-link init on sm_120 (Blackwell RTX 5070) → ALL GPU GEMM kernels return zero. Stale ~/.hexa-cache/ entries (pre-compiled hexa run binaries keyed by source hash) perpetuate the problem after runtime.a is updated.", "threshold": "CUDA_HOME auto-detect: try cuda-13.0 > cuda-12.9 > cuda-12.8 > /usr/local/cuda canonical symlink (Ubuntu alternatives, always points to active CUDA). DEPLOY step after successful gemm_cuda run: assemble runtime.cuda.a ($CORES + hxlcl_shim.o + runtime_cuda_host.o + runtime_cuda.o + runtime_cuda_dlink.o) → install to ~/.hx/bin/build/runtime.a + rm -rf ~/.hexa-cache/ (DX governance: one command activates GPU on CUDA host). Fix #4216.", "source": "tool/build_cuda_runtime" }, { "id": "RELEASE-CUDA-ASSET-SASS-ONLY-NO-PTX", "state": "ossified", "value": "The shipped hexa-linux-x86_64-cuda asset was built by release CI (GPU-less, SM=80) with `-gencode arch=compute_80,code=sm_80` ONLY — that embeds sm_80 SASS and NO PTX, so on any newer consumer GPU (RTX 5070 = sm_120) every kernel launch fails cudaErrorNoKernelImageForDevice SILENTLY (launches unchecked): cuda_available()==1, [OWN-GEMM-FIRED] banners print, but device buffers stay zero-filled → garbage results. Measured on summer v0.547.0 asset: bytegpt_devres_smoke argmax dev=0/host=46, max|Δ|=551; re-splicing the SAME v0.547.0 emitter source built with the PTX gencode added → PASS argmax 32==32==32, max|Δ|=2.5e-06. release.yml's comment always CLAIMED sm_80 PTX driver-JITs forward — the flag never embedded the PTX. Sibling of BUILD-CUDA-RUNTIME-CUDA-HOME-SM80-ZEROS (local-build variant of the same sm_80-on-sm_120 zeros class).", "threshold": "Both nvcc calls (compile + -dlink) in tool/stage_resolve_runtime_a AND tool/build_cuda_runtime must carry `-gencode arch=compute_$SM,code=sm_$SM -gencode arch=compute_$SM,code=compute_$SM` (SASS + PTX). release.yml cuda job Verify step asserts `cuobjdump -lptx runtime_cuda.o` lists a .ptx image and fails the job otherwise — a gencode regression can never ship a silently-broken -cuda asset again. Consumer-side one-time JIT cost is cached (~/.nv/ComputeCache).", "source": "tool/stage_resolve_runtime_a" }, { "id": "CODEGEN-BOXED-SCALAR-SLOWPATH", "state": "in_flight", "value": "hexa native-emit(aprime_cc --emit=obj)의 일반 동적타입 scalar/array 경로가 gcc-O2 대비 measured 2.9~23× 느림(geomean 8.6×·aiden·reference-match·state/codegen-quality-probe-verdict.md). 커널별 ratio: k1_sum(scalar reduce) 2.86× · k5_fncall 4.41× · k2_collatz(branchy int) 12.53× · k4_branch(modulo) 12.73× · k3_arrmap(배열 map) 23.23×(최대). 어셈 root-cause=박싱 HexaVal 태그-디스패치 모델: scalar op마다 런타임 함수호출(hexa_add_slow/hexa_mul/hexa_mod, 타입태그 스택슬롯)·레지스터할당無·unboxed i64無·strength-reduction無. k3=원소당 7call(hexa_index_get/set bounds-check+box) vs gcc 0call(register pointer-walk+lea+magic-multiply). HEXA_INLINE_INT_BOX=1도 unbox 안됨(5-7 call/iter 잔존). 손튜닝 farr/GEMM은 별도 unboxed 경로=BLIS/cuBLAS parity(일반 유저코드는 거기로 안 내려감).", "threshold": "돌파레버=static-type-inference 기반 int/float scalar unboxing + native-array element access(farr unboxed 기계를 일반 scalar loop로 확장). 진행=codegen-unbox-breakthrough workflow(Map→Design→Plan→state/codegen-unboxing-campaign-plan.md)→최소프로토타입 opt-in HEXA_UNBOX_* default-OFF→런타임 ratio측정+byteeq3타깃 gen3≡gen4+출하smoke→pr-cycle. ⚠️고위험 substrate(codegen)·릴리스무결성 최상위·multi-session·OFF경로 byte-identical 필수. 종착=커널 ratio≈1(parity 도달) 또는 measured 천장. ⚡calltype 레버(#4875 HEXA_UNBOX_HIR_CALLTYPE default-OFF)=builtin-method call-result 타입스탬프→native imul·광역벤치(#4892) TARGET geomean 0.82~0.85(15~18% win)·k6_idxof '1.029 회귀'=실회귀 아님(정정): 격리 k6+k8도 k6=1.029/k8_charcode=0.774 → 'back-to-back 오염설' FALSIFIED. 근인=index_of가 call-지배(iter당 문자열스캔) → unbox 레버리지≈0·ratio≈1.0. ON이 boxed hexa_add call 제거(add1→0)=엄밀히 일 덜함 → 1.029 실회귀 불가=0.69/0.71@0.01s 해상도 노이즈. flip=순-win(레버리지 없는 k6는 parity)·남은게이트=CI byteeq 3-target+nvptx default-ON. verdict=state/static-types/l4_k6_rootcause_verdict.md. ⚡flip PR feat/l4-calltype-default-on(default OFF→ON): pre-flip audit wf_e01c0a15 3렌즈=stamp 22항목 전부 SOUND(i64 arm 모든 도달경로 TAG_INT·f64/bool arm inert type_id 3/5 미소비)+aliasing by-construction byteeq-safe(type_id=read-time 최적화 키지 저장선택자 아님·pair-model tag-slot 분리 per-value·mut-reassign은 hir_to_mir.hexa:5843 _lr_rebuild_local_tid widen guard가 소스무관 커버)+coverage(len-지배 bulk+index_of parity proxy 대표성 OK·bool contains 899/f64 to_float arm은 inert 외삽→k10_contains/k11_tofloat 커널 추가로 측정확증). 게이트=CI byteeq 3-target+nvptx GREEN(default-ON 빌드 gen3≡gen4). ✅VERIFIED(#4897 머지 541b29dab): selfhost-byteeq-real PASS(35m7s)+faithful-nobaseline 3/3 PASS(darwin·linux-arm64·linux-x86_64)+gates-summary pass → calltype default-ON byteeq-3-target 확정, revert 불필요. L4 calltype 레버=byteeq-verified 착지. k10_contains(bool-arm)/k11_tofloat(f64-arm) inert **확인됨**(broadbench2 절대-asm: k10 bool=unbox타깃無·k11 f64 add=1→1 boxed 유지·parity OK 전커널)=flip 전-family 커버리지 완결(audit wf_e01c0a15 예측 일치·bool/f64 miscompile/regress 無). 부수발견+fix: broadbench harness OFF-arm이 `unset`이라 post-#4897(default-ON) OFF==ON 오염→`=0` 명시로 수정(measure.sh:136)·clean full-family delta 재실행은 aiden. ⚡FREE-FN per-scope 레버(#5029 배관 default-OFF·#5030 flip HEXA_UNBOX_FREE_SCOPED default-ON MERGED 0a2caacaf): coarse per-module 안전핀이 흔한 변수명 len을 광역 disqualify해 free-fn len(x) 스탬프가 완전 no-op이던 것(census len fn-stamped=0/UNSTAMPED=2745·convergence l4-freefn-stamp-coarse-shadow-noop-1)을 per-fn accumulating disqualify(_mir_lookup 그래뉼래러티 미러)로 정밀화→len 2755사이트 회수(fn-stamped 0→2755·UNSTAMPED 2745→0·XCHECK dispatch-oracle 미발화=soundness 무결·aiden full self-compile verdict l4-r3-preflip-scoped-xcheck)+byteeq 3-target GREEN. 후속=rider(byte_len/char_code +83·from_char_code는 string반환 OUT·설계 state/static-types/l4_round3_rider_bytelen_charcode_design.md·scoped 이제 default-ON이라 byte-changing 자체 byteeq).", "source": "self/codegen.hexa" }, { "id": "WALL-A-STATIC-TYPES-REJECT-LADDER", "state": "ossified", "value": "2-lane REJECT 사다리 종착(main·30 rung=저비용21+대공사3 트릴로지+round9 배치4+HX3042 partial-move+HX3043 IIFE-arity=FULLY-EXHAUSTED): ①정적타입 FLIP-3 flagless(real=Error/fixture=Warning)·r1~r12·HX3001~3011/3024 unary-neg/3025 index+string/3026 field+string/3030 wrong-enum-match/3033 wrong-enum-compare·삽입점 types.hexa _infer_expr+_check_match+_types_check_binop·assignable⊇equal. ②HEXA-OWN borrowck opt-in(_bck_active OFF) E-ladder=HX3019/3021/3023/3027/3028/3029/3031/3032/3034(E0515/0502/0506/0503/0499/0505/0594/0596/0507)+HX3012 uam·hir_to_mir loan-registry. ③대공사3 LANDED(flow-sensitive)=HX3035 E0381 use-of-possibly-uninit(PR#4660·forward MaybeUninitialized dataflow·rustc_mir_dataflow ref-match·_bck_nll_check reach-matrix fixpoint 재사용)·HX3036 E0597 borrowed-value-does-not-live-long-enough(PR#4663·scope-death→use forward reachability RFC2094 NLL·assign-arm re-borrow gap·lane-isolated asn-lane registry)·HX3037 E0504 closure capture-move(PR#4665·read-only HIR walk over _collect_free capture set × @own call-arg move source·rustc=E0507 리포트나 ledger=E0504 라벨 유지). ④round9 배치4(PR#4669)=HX3038 E0508 array-index move-out·HX3039 E0507 index-projection borrow-move·HX3040 E0505 non-call-arg move-while-borrowed·HX3041 E0515 return-ref-to-temporary. ⑤HX3042 E0382 use-of-partially-moved-value(PR#4671)=HX3035 MaybeUninitialized dataflow의 depth-1 field-projection moved-lane 미러·flat (group,field) pair 키잉—우려된 'place-granular MovePathData 신규축' FALSIFIED(E0381/E0597/E0504 트릴로지에 이어 이 방식으로 falsify된 5번째 벽). ⑥HX3043 E0593 closure-arg-count(PR#4680)=IIFE 서브셋(즉시호출 클로저 리터럴 `(fn(a){..})(x,y)`)—_types_check_call 내 구문적 arity 비교(클로저 노드 children−body param수 vs call args), 클로저 타이핑 불요·lane B always-on static-types(real=Error/*_test=Warning)·corpus-0 증명(6413 *.hexa + 15-file build scan서 real IIFE-arity firing 0)·센서스의 'closure-typing-BLOCKED'가 stale이었음이 falsify(IIFE 서브셋은 타이핑 불요)=E0381/E0597/E0504 트릴로지 패턴으로 falsify된 6번째·최종 벽. byteeq중립(borrowck lane=S3 diag MIR-erase·_bck_active OFF-gate·HX3043 static-types lane=real IIFE 0·fixture Warning-band). catalog HX3001~3043 43 HX30xx codes.", "threshold": "신규 rung=selfhost-gates GREEN+pool bare-run+진단변경시 census 델타0. faithfulness=loosening보장·REJECT=under-reject(KNOWN만). catalog 완결블록(catalog-hexa-1)·types_test main리셋+재적용 union금지(types-test-hexa-1). catalog next-free=HX3044·types_test label next-free=ba(av~az는 HX3043 IIFE 프로브가 소비). ★TERMINUS: byteeq-neutral REJECT 프론티어 FULLY-EXHAUSTED(rustc diagnostics vs catalog gap-census 측정 + 최후 blocked 후보 4건 falsify-측정 = 저비용 rung 잔존 0 확정). 센서스의 4 blocked 후보 중 E0593이 IIFE 서브셋으로 falsify되어 HX3043로 착지(6번째·최종 트릴로지-패턴 falsify—'closure-typing-BLOCKED'가 stale이었음, IIFE 서브셋은 타이핑 불요)→추가 저비용 rung 없음 확정. 잔여 3후보는 전부 선행조건-게이트 별도 캠페인 or 비-defect: (a) unused_variables=신규 bind.hexa used-bit 상태축 + 코퍼스 마이그레이션(합법 코드상 270+ non-`_` unused let) 필요→rung 불가. (b) E0381 field-level partial-init=기계적 ~1 rung(HX3042 (group,field) 인프라 재사용) BUT 선행조건: no-init `let s:S`가 int 0 대신 struct-shaped empty-map로 lower되어야(런타임-시맨틱 변경)·현재는 uninit field-read서 런타임 abort→lint가 불가능-프로그램을 가드=HX3035 대비 marginal value 0. (c) E0308 array-literal homogeneity=VALID-BY-DESIGN(heterogeneous boxed 배열 [\"err\",404]가 실idiom)·거부 시 합법 프로그램 금지→탐지할 defect 없음. ⇒REJECT-진단 프론티어 CLOSED; 추가 확장=신규 checker 상태축 / 런타임-lowering 변경 / 코퍼스 마이그레이션이 필요한 별도 대형 캠페인이지 next-round rung 아님. 전 30 rung opt-in(HEXA_BORROWCK/_bck_active OFF)+report-only=byteeq중립·static-types FLIP 사다리는 always-on flagless 유지.", "source": "compiler/check/types.hexa" }, { "id": "bench-hexa-clm-step-hexa-1", "state": "ossified", "value": "풀CLM step 80× 측정모순 RESOLVED: 75331ms(r1)=anomalous — non-builtin-aware/오염 hexat이 forge_dispatch_*를 hexa_call3 값-디스패치로 잘못 lowering→느린 CPU폴백 측정. 진짜=882ms(현행 main hexat·pool 호스트서 main 직접 빌드·GPU OWN-GEMM-FIRED DEVICE path·median-7 877~886·workflow 931ms와 동차). PyTorch 12.7ms 대비 ≈69×(4750×는 phantom). conv-fix #4227 효과 있음(이전 FALSIFIED는 bad-hexat 아티팩트).", "threshold": "재발조건: forge-using 벤치가 풀에서 비정상적으로 느리거나(75331ms류) hexa_call3/4 타입에러나면 = hexat이 builtin 미인지(stock/오염). 해결: pool 호스트(aiden/summer)에서 현행 main 을 직접 빌드(tool/release_build·./hexa install.hexa)한 hexat 으로 측정. test 롤링 채널은 폐기됨(2026-06-30) — HEXA_VERSION=test 경로 없음. stable 릴리스 컷 불요. per-op regen으로 builtin 박지 말 것(툴체인 오염=측정무효).", "source": "bench/vs_pytorch/bench_hexa_clm_step.hexa" }, { "id": "optim-lib-hexa-1", "state": "ossified", "value": "AdamW device seam(opt_adamw_step→forge_dispatch_adamw) r4 #4261 측정: full-CLM 172.94→159.64ms=7.7% win(summer sm_120·cuda=1·[OWN-GEMM-FIRED]·단일변수 A/B·#4258 173.35 재현). parity: max|dW|=1.11e-16(0.5-ULP FMA)·dm=0·dv=0 — 엄격 max|Δ|=0 아님(gelu/conv device-seam 머지 선례 동급 1-ULP FMA-class). 핵심학습: (1)hexa gpu 가 cuda_available=0 오보고(정적 바이너리 프로브)하지만 hexa run 은 배포 runtime.a 로 cuda=1 정상 → cuda 현행성은 hexa gpu 아닌 hexa run [OWN-GEMM-FIRED]/nsys 커널로 검증(build_cuda_runtime wall 진단). (2)AdamW device kernel 자체는 GPU kernel time 5.4%뿐 → 7.7% win은 host-scalar-loop→device 교체, memcpy/sync/alloc 대량은 잔여(r5 mempool+async+megakernel). (3)DEVRESIDENT int4 경로(anima 생산)는 코히런스 가드로 host 강제→이 PR benefit 없음(후속 device 재양자화 코히런스).", "threshold": "재발조건: device seam 머지 시 'byte-exact by construction' 주장 vs 실측 max|Δ|. 확인: 실측 parity 찍기(주장 금지) — elementwise여도 device FMA/host mul+sub 차로 1-ULP FMA-class(1.11e-16) 날 수 있음(gelu/conv 선례). 머지 bar: 1-ULP FMA-class는 repo 기존 device-seam 동급·det/학습 무해(byteeq 게이트가 결정성 보장)이면 수용 OR 엄격 max|Δ|=0 요구 시 device-kernel FMA-align(runtime_cuda.c frozen-blob follow-on). cuda 현행성은 hexa gpu 미신뢰·hexa run [OWN-GEMM-FIRED]/nsys 커널로. cf convergence conv-lib-hexa-1(install-sh-1 cuda wall).", "source": "stdlib/flame/optim_lib.hexa" }, { "id": "runtime-cuda-c-1", "state": "ossified", "value": "device-residency 측정 TERMINAL(r7 clean GPU 결정판·summer 타세션0·OOM=0·file-script): real ~41% D2H-elim lever(clm_prod 35.4→20.9s) BUT byte-eq INHERENTLY FAILS at d=512 — NOT anima-contention artifact(#4274 confound 결판). matched C1 HOST_NOW ep1 3.6744(bit-stable·healthy→2.45) vs C2 DEVICE_KEEP ep1 4.275/4.459(Δ0.6-0.8·run-to-run 비결정·거의 정체)·BC2≠BC1 at 2-step(누적없이도 발산). TWO SEPARATE bugs: H2(byte-eq killer)=device-resident forward op이 d=512서 racy/wrong(epoch-1부터·run-to-run 비결정·async 무효=L2704 decode race 계열 stream-ordering/atomic). H1(독립 lifecycle leak)=device-mem 2→2002MiB 단조증가(DEVICE_KEEP per-step free 없음)·clean 12GB 무해 OOM=0·압박시 OOM(이전 contended OOM=anima 2.8GB+이 2GB squeeze). bench DEVICE_KEEP NaN도 같은 H2 계열. env-only path TERMINAL·NOT landable. per-op seam(#4237~4261)은 byte-exact win 유지.", "threshold": "재발조건/해결: whole-chain device-residency(CLM_PROD_DEVRESIDENT/DEVICE_KEEP)는 d≥512서 byte-eq INHERENTLY FAIL(clean GPU·OOM=0서도)=측정 TERMINAL wall(env-only). ~41% D2H-elim은 real이나 2 codegen/runtime 버그 fix 선결: (1)H2 forward race/parity — clm_step_determinism_eq oracle을 d=512서 돌려 어느 device-resident op(groupnorm/moe/gelu under DEVICE_KEEP)이 racy/non-det인지 bisect→stream-ordering/atomic fix(L2704 decode race 계열). (2)H1 residency lifecycle — DEVICE_KEEP가 per-step device 텐서 안 free(2→2002MiB ramp)→per-step device-free 추가. 둘 다 codegen/runtime debug round(measure 아님). d=8 byte-eq는 scale 보장 못 함(d=512 필수). 측정은 CLEAN uncontended GPU에서만(타세션 pool 점유 시 HOLD). per-op seam은 byte-exact라 무관·landable.", "source": "self/cuda/runtime_cuda.c" }, { "id": "runtime-emit-full-hexa-1", "state": "ossified", "value": "frozen-seed 재baseline(emitter runtime_emit_full.hexa 편집)을 '비가역 owner-go terminal 벽'으로 반복 오분류한 over-conservative 오류. VALIDATED #4272: setjmp/longjmp frozen-static RESTORE 벽을 reference-match(GCC stage2≡stage3 byte-compare·rustc stage0 cadence 재pin·frozen blob 폐기)로 실제 돌파→∅−8 머지. 확증: runtime.c는 tracked emitter awk합성이라 FROZEN_SEED_REF/151c52c8 재pin 불요·그냥 tracked-file 편집+byteeq 3타깃 reconverge(=GCC make compare)로 검증되는 정석 self-host 진화. 잔여 frozen-static 벽(atexit·varargs fprintf)도 동일 접근 droppable 후보.", "threshold": "frozen runtime emitter 변경으로 shim-static 심볼 native화시 '비가역이라 owner-go' punt 금지(반례=#4272 ∅−8 성공). 게이트=새 byteeq 3타깃 reconverge+clean-pipeline ship smoke GREEN 전 머지금지. reconverge diverge시만 STOP(진짜 miscompile). ★ORDERING(PR#4280 FALSIFIED 실증): install.sh runtime-compile 게이트(clang-18)는 frozen bootstrap seed restore 후 新regen runtime.c 컴파일 → FLOOR runtime.c body가 참조하는 HX_* 매크로(HX_MAKE_STR 등 #4277/#4278 신규)는 runtime_core.c 인라인 정의와 독립 seed-lifecycle이라 '미정의 함수' 컴파일 실패. 따라서 FLOOR raw 생성자를 HX_* 매크로로 drain하려면 frozen-seed가 그 매크로를 먼저 담아야 함(seed re-baseline THEN emitter 참조 · pool 빌드). 로컬 regen runtime.c는 #include 2201로 scope 있어 보여도 frozen-seed 경로는 다름 — 로컬 컴파일로 byteeq-neutral 단정 금지, install.sh clang-18 게이트가 canary.", "source": "self/runtime_emit_full.hexa" }, { "id": "runtime-core-hxlcl-shim-c-1", "state": "ossified", "value": "shim-member count != floor-reduction: literal-empty 목표는 FILE count=FLOOR(self runtime.c·byteeq clang 소비·출하) 감소. runtime_core_hxlcl_shim.c는 standalone-libc MEASUREMENT TU·여기 member 감소는 floor 안줄임(time afad8e5d 실증: floor body inert stub@runtime_emit_full.hexa:2679·flag는 측정 shim만 swap·byteeq는 runtime.a 안소비=구조적 no-op). 대부분 shim flip=svc-remainder floor-reduction-0 벽(time/getrusage/signal). setjmp #4272만 진짜 floor 전진=FLOOR emitter runtime_emit_full.hexa re-baseline해 byteeq가 실제 소비·reconverge 의미有.", "threshold": "shim member 드롭을 literal-empty(ls self c-files) 전진으로 카운트 전: floor-reduction>0 확인(FLOOR runtime_emit_full.hexa body가 native화되어 byteeq 소비분 이동하는가). measurement-shim flip(byteeq 구조적 no-op·floor inert stub 유지)이면 svc-remainder 벽 분류·카운트 금지. 진짜 전진=frozen-floor re-baseline(setjmp式).", "source": "self/runtime_core_hxlcl_shim.c" }, { "id": "forge-det-hexa-1", "state": "ossified", "value": "canonical determinism API(set_deterministic/is_deterministic)가 LATENT never-compiled 표면이라 user program 빌드 실패. 두 결함이 겹침: (1) forge_det.hexa의 extern fn hexa_forge_set_deterministic을 hexat이 FFI dlsym HexaVal-ABI wrapper로 emit→runtime.h C-ABI void(int)와 conflicting types (2) carrier-builtin 전환 후에도 self/runtime.h(손-유지 public ABI 헤더)에 carrier extern 누락→user C의 hexa_call1(set_deterministic,..)가 clang 'use of undeclared identifier'. 'vis not found'+type_checker self-test는 RED HERRING(non-fatal 노이즈·hexat 트랜스파일 rc=0 실증). 어떤 self/*.hexa·stdlib도 forge_det 컴파일 안 해 미포착. HexaVal pair-model↔C-ABI 벽(hxlcl·RFC061) 동족.", "threshold": "해결=runtime-side 3박자(typechecker/codegen 무관·typechecker-recognition 가설은 grounding으로 FALSIFIED): (A) set_deterministic/is_deterministic을 self/runtime_emit_full.hexa에 first-class HexaVal builtin 등록(carrier 글로벌 HexaVal set_deterministic;+hexa_fn_new+HexaVal impl이 C-ABI 브리지·mirror cuda_available). (B) CUDA-branch impl이 C-ABI hexa_forge_* 호출 시 #ifdef HEXA_CUDA 안 그 직전에 extern void hexa_forge_set_deterministic(int);+extern int hexa_forge_is_deterministic(void); forward-decl(emit:9458 cuda_available _hx_cuda_runtime_available extern 미러)·비-CUDA #else엔 미참조 weak stub (gate① PR#4285 d02bd5691). (C★진짜 마지막 gate②) self/runtime.h(user program이 #include하는 손-유지 public ABI 헤더)에 'extern HexaVal set_deterministic;'+'extern HexaVal is_deterministic;' 추가(runtime.h:1767 cuda_available 미러·f8e846c6b). 누락 시 user C가 carrier 글로벌 못 봐 clang undeclared-identifier. 검증=aiden A/B(cuda_available OK vs set_deterministic clang 0err)+darwin CI 전체로그+f8e846c6b 12/12 GREEN(byteeq byte-eq neutral). 예방=신규 runtime carrier builtin 3박자: (i)emitter carrier 글로벌+impl (ii)C-ABI 브리지면 #ifdef forward-decl (iii)self/runtime.h extern + compile-smoke로 caller 1개 보장(byteeq-gate Sanity wire). PR#4285 gate①②모두 GREEN·머지.", "source": "stdlib/flame/forge_det.hexa" }, { "id": "identity-engine-hexa-1", "state": "pos-conv", "value": "identity_engine.hexa의 unguarded module-level selftest 'fn main'이 이 파일을 import하는 fresh 모듈의 entry main을 hijack(flatten이 dep main 먼저 emit→entry main drop). ✅RESOLVED(M2·PR pending): selftest main+gate를 compiler/atlas/identity_engine_test.hexa로 이동→identity_engine.hexa main-free→import 안전(grammar.hexa가 이제 직접 import·grammar_test 12/12 자기 main 실행 확인). LESSON=라이브러리 모듈에 module-level fn main 금지·selftest는 항상 companion _test.hexa로 분리.", "threshold": "재발조건=라이브러리 .hexa에 module-level fn main을 두고 그걸 import하는 새 모듈의 자체 main이 안 돎 · 해결=selftest main을 companion _test.hexa로 분리(module은 main-free 유지)·drill/ 관례", "source": "compiler/atlas/identity_engine.hexa" }, { "id": "architecture-json-1", "state": "pos-conv", "value": "ARCHITECTURE.json blind write가 파일 훼손/거대diff 재발 (1차 #4135 UU blind-add · 2차 jsonl · 3차 indent=1 덤프·자체적발 · 4차 2026-07-03 anima: sidecar convergence add 자체가 indent=2 고정 직렬화로 indent=1 파일 전체 재포맷 13k줄 — 도구 라이터가 원인·diff --stat 검사로 적발 후 indent 복원 커밋으로 상쇄)", "threshold": "재발조건: ARCHITECTURE.json 프로그램 write 시(sidecar convergence add 포함·타 repo일수록 주의). 해결: 기존 파일 indent 감지→동일 스타일 재직렬화→diff --stat로 레코드-only 확인 후 커밋. 근본fix 후보=sidecar 라이터 indent 자동감지(follow-on)", "source": "ARCHITECTURE.json" }, { "id": "restore-frozen-seeds-1", "state": "pos-conv", "value": "FRAG-REGEN 블록이 같은 vehicle서 2연속 결함: ①#4426 착륙 전 OFF-중립 테스트의 git checkout -q . 가 uncommitted 편집을 wipe→머지커밋에 블록 유실 ②#4427 재착륙 spec의 signal_flock sentinel(hexa_signal_install)이 emitter 출력에 없는 심볼(실재=hexa_os_sig_install/hexa_os_flock_open)→항상 sentinel-miss. 두 결함 다 NO-OP-SAFE fallback(FROZEN 유지)이 실패를 조용히 삼켜 rc=0 GREEN으로 위장 — flag-ON 실측 census(nm -u)만이 진짜 검증이었다(#4428/#4429 dual-fix로 종결·ON floor=15 U WALL-only 수렴).", "threshold": "재발조건: ①손편집 상태로 검증 스크립트가 git checkout/reset 류를 실행 ②sentinel/guard 상수를 실제 산출물에 grep 실재확인 없이 지정 ③NO-OP-SAFE fallback이 있는 경로를 rc=0만으로 done 처리. 해결: 편집은 검증 전 커밋 먼저·sentinel은 emitter 출력에 grep 확인 후 지정·fallback 있는 레버는 반드시 flag-ON 측정(심볼 drop 델타)으로 닫는다.", "source": "tool/restore_frozen_seeds" }, { "id": "codegen-hexa-1", "state": "pos-conv", "value": "Field-AssignStmt codegen must recurse to the ROOT lvalue like Index-AssignStmt (RFC-037): obj.field=v lowered as gen2_expr(obj)=map_set(...) breaks when obj is a place (Index/Field) since gen2_expr(obj) is a map_get/index_get rvalue -> clang 'expression is not assignable'. _gen2_nested_field_assign_stmt walks the mixed Field/Index spine to the root Ident and rebuilds with nested map_set/index_set.", "threshold": "Recurs if any AssignStmt/CompoundAssign lvalue whose object is a non-Ident place emits ' = ' C. Regression: tmp_idxassign_smoke field-of-index / field-of-field cases must clang-compile + PASS (44/44).", "source": "self/codegen.hexa" }, { "id": "OWN-START-GATE-VS-SHIP-ARCHIVE-SHAPE-DRIFT", "state": "ossified", "value": "심볼-바닥(nm-UND) 판정은 반드시 SHIP 배치(HEXA_RT_MULTIOBJ=1 + ship env 기본값)를 그대로 돌려야 한다. 단일-TU runtime.a 를 본 게이트/센서스는 MULTIOBJ 멤버가 들고 있는 UND 를 구조적으로 못 본다. ① 원 사례(#4399/#4403): own-start flip 이 GATE-1(own_start_nm_clean_gate) GREEN 인데 release/faithful link 가 전부 '__dso_handle isn't defined' 로 사망 — 게이트는 단일-TU 를 감사했고 ship 은 MULTIOBJ 라 hxlcl_shim.o 가 glibc 'U atexit' 를 들고 있었다. ★★ ② 2026-07-14 재발, 이번엔 더 나쁜 형태 — state/hexa-own/axis2_post_flip6_floor_census.md 가 '②-libc-floor = SANCTIONED-FLOOR TERMINAL REACHED · 0 reducible libc symbols' 라는 종점을 선언했는데, 그 문서 자신의 method 줄이 'source/emitter-gate + git-witness reconcile' 이다 = nm 을 **한 번도 돌리지 않았다**. 소스 grep 대조로 아카이브에 대한 종점을 선언한 것이다. #4944 가 ship 배치(MULTIOBJ)로 실제 nm 을 돌려 반증했다: stage_resolve_runtime_a 232→229 UND, release_build 238→235, 드롭 집합 = 정확히 {mmap, munmap, waitpid}. 근인은 hxlcl_shim.o 가 바로 옆 runtime.o 에 이미 있는 네이티브 raw-syscall 바디를 두고 자기 hxheap_alloc/hxheap_free 안에서 raw libc mmap/munmap 을 부르는 것 — 단일-TU 배치에서는 이 UND 가 보이지 않는다. ⇒ '0 reducible' 은 측정된 사실이 아니라 측정하지 않은 결과였다. 부수: mmap 의 에러 계약은 다른 leaf 의 '<0 → -1' 이 아니다. 커널이 -errno(-ENOMEM=-12)를 돌려주므로 기존 '== MAP_FAILED(-1)' 검사를 통과해 포인터로 역참조된다 — glibc 처럼 [-4095,-1] 전 범위를 MAP_FAILED 로 접어야 한다. fcntl 시드 템플릿(raw -errno 반환)을 mmap 에 복사했으면 살아있는 힙 버그를 심었을 것이다.", "threshold": "재발조건: (a) nm-clean/link-shape 게이트가 단일-TU runtime.a 를 감사하는데 ship 은 MULTIOBJ 인 경우, 또는 (b) 심볼-바닥 census/종점 선언이 nm 을 돌리지 않고 소스 grep 으로만 판정한 경우. 판정: 문서/게이트의 method 줄에 'nm' 과 'MULTIOBJ' 가 둘 다 없으면 그 종점은 무효다. 해결: ① 심볼 게이트는 SHIP recipe 를 그대로 (HEXA_RT_MULTIOBJ=1 + ship env) — 축소된 아카이브 shape 금지. ② 심볼-바닥에 대한 '0 reducible / terminal' 선언은 **반드시 pool 에서 실제 nm 을 ship 배치로 돌린 출력**을 근거로만 하라. 소스 grep 대조는 proxy 게이트이며 아카이브에 대해 구조적으로 눈이 멀었다. ③ 심볼 라우팅을 바꾸는 -D 게이트는 모든 멤버의 컴파일 라인(S2/S3/S4)에 흘러야 하고, 모든 extern TU(hxlcl_shim)에 대응 #ifdef 분기가 있어야 한다. ④ raw-syscall leaf 를 새로 만들 때 에러 계약을 leaf 마다 확인하라 — mmap 은 [-4095,-1] fold 가 필요하고 -1 비교만으로는 -errno 가 포인터로 새어나간다.", "source": "tool/stage_resolve_runtime_a" }, { "id": "ci-pick-runner-sh-1", "state": "pos-conv", "value": "darwin 잡 지연의 구조(2026-07-03~04 실측): picker 매칭이 status==online만 보고 busy 무시(jq_filter)→ghost 바빠도 전 darwin 잡이 ghost 직렬 수렴, mini는 ghost-offline시에만 쓰는 보험. churn-race(runtime-cuda-emit-hexa-1)의 러너-큐 판. ★RESOLUTION 2단(#4539→#4544): (1) #4539 busy-aware 분산(darwin-any=busy시 common label emit)은 snapshot-pin을 완화했으나 dispatch 단일-순간 스냅샷 한계 잔존. (2) #4544 근본해소=slot-free+machine-independent 잡(faithful-nobaseline·advisory smoke: 어느 darwin 호스트서든 동일 byte)은 self-hosted 슬롯 불필요→runs-on: macos-15 클라우드 직결로 self-hosted 경쟁서 완전 제거(linux-arm64 ubuntu-24.04-arm 미러). 실측 근거=ghost×3 busy+mini×6 idle+14 queued. slot-DEPENDENT selfhost-byteeq-real만 ghost gen3 슬롯 유지. ★교훈=slot-free CI 잡의 self-hosted picker 간접경유는 안티패턴; 무료 클라우드 러너(public repo 무제한·무큐)로 직결이 정답.", "threshold": "재발조건: slot-free/machine-independent CI 잡을 혼잡한 self-hosted picker에 간접경유(darwin_label 등)로 태우면 큐 starvation 재발. 해결: slot-free 잡은 무료 클라우드 러너(macos-15/ubuntu-*-arm) runs-on 직결(picker 없음); slot-DEPENDENT 잡만 self-hosted picker. 슬롯 필요여부로 라우팅 분기(kind=darwin picker=슬롯필요만).", "source": "tool/ci_pick_runner.sh" }, { "id": "hexa-cc-c-1", "state": "pos-conv", "value": "Stale-installed hexa가 대형 소비자(anima engine)를 깨는 두 형태: ①pool 설치가 codegen 매핑보다 오래됨(v0.511 lever3 사례) ②러너가 Latest를 설치하는데 Latest 자체가 고착 — release finalize가 cuda-asset RED(v0.553~)로 막혀 Latest=v0.556 동결→canonical install.sh가 신선 호스트에 신형 runtime carrier(hexa_forge_dispatch_gelu_bwd/hexa_farr_packed_gemv_offset) 없는 hexa를 배포→ghost cold-compile 20 errors가 v0.552와 v0.556 둘 다에서 재현(2026-07-03). cloud CI는 Actions 캐시(warm ~/.hexa-cache)로만 살아있었음 = self-hosted 라우팅이 cold-compile을 강제하기 전까지 파손이 가려짐.", "threshold": "'러너/pool이 X를 컴파일 못함'을 대상 결함으로 단정하기 전: ①같은 X가 소비자 CI서 green인지(green=stale install) ②Latest가 고착인지(release finalize RED 체인) 확인 — 고착이면 최신 verified tag 명시 설치(HEXA_VERSION= install.sh·v0.574.1이 ghost 해결)+릴리스 체인 unstick이 root fix. warm-cache로만 green인 소비자=가려진 파손이지 건강 아님.", "source": "self/native/hexa_cc.c" }, { "id": "workflow-1", "state": "pos-conv", "value": "Workflow subagent(및 fable/agent)가 설계·검증 중 mini서 로컬 hexa 빌드(build/aprime_cc·build/hexat·hexa --emit/run/cc)를 spawn하면 각 프로세스 0.5~1.4GB RSS → swap 🔴(6GB+)로 mini가 메모리 크래시(mini=git/gh 전용·heavy build 금지 위반). 실측: zero-c reduction workflow 2개 동시 실행시 aprime_cc 2개(1.85GB)+hexat 2개(1.2GB)+claude 35프로세스 → swap 6.0G🔴.", "threshold": "재발조건=swap🟡→🔴 상승 + ps에 build/aprime_cc나 build/hexat나 로컬 hexa 빌드 프로세스. 해결: (1)즉시 pkill -f 'aprime_cc'·pkill -f 'build/hexat'로 stray 정리 (2)workflow/agent 프롬프트에 '빌드·측정·hexa run/emit/cc는 반드시 summer/aiden(ssh)서·mini서 로컬 hexa 실행 금지' 명시(설계 agent는 git show/grep 소스읽기만·컴파일 검증은 pool ssh) (3)swap🔴일 때 추가 workflow launch 자제(heavy-on-pool·단일머신 부하금지)—러닝 완료로 메모리 해제 후 launch. 관련=memory feedback_run_heavy_on_aiden_summer_not_mini.", "source": "Workflow" }, { "id": "language-surface-1", "state": "pos-conv", "value": "ARCHITECTURE census 노드는 captured-date 스냅샷이지 현행 보증이 아님 — 2026-06-27 language-surface census의 'typecheck stub·동적타입' 서술을 검증 없이 HEXA-OWN L2 설계 전제로 사용→오설계 등록(실제=Wall A static-types r1~r5 main 머지·HEXA_STATIC_TYPES opt-in·r6 브랜치 진행). 설계 전제로 census를 인용하기 전 git log/branch -a로 그 축의 현행을 재검증할 것 (stale-branch trap #3736과 동족)", "threshold": "재발조건=ARCHITECTURE census/스냅샷 서술을 재검증 없이 새 설계·계획의 전제로 복사 · 해결=전제 축마다 git log origin/main -- + git branch -a grep으로 현행 확인 후 인용, census 노드도 그 자리서 현행화", "source": "language-surface" }, { "id": "stage-resolve-runtime-a-1", "state": "pos-conv", "value": "pool ssh 빌드가 선행 'git fetch origin main' 없이 'git checkout origin/main'만 하면 summer/aiden의 STALE origin/main ref를 빌드→방금 머지한 emitter 변경이 없어 보이고 nm 심볼이 안 빠져 verify-done false-negative. 실측: summer HEAD stale서 glob/fgets 게이트=0인데 origin/main엔 정상 존재(#4443+54줄/#4444+18줄). ★변종2(2026-07-18·L2 axis-① delegate census 무효): aiden CI러너 워킹카피(~/actions-runner-hexa)를 'git clone --local --no-hardlinks'로 /tmp 복제→'checkout -f origin/main'. --local 클론은 소스repo refs를 그대로 상속하는데 러너 origin/main이 230커밋·9일 뒤(c27f595e4·2026-07-09·#5005 char_code fix+own-link 전시리즈 이전)라 stale 커밋 착지→delegate census 72.9%/'g0+8 undef=55%'가 이미 고쳐진 결함 재측정=전부 무효. verified HEAD(1e8f7870d) 실증서 대표예제(argparse_eqvalue_test) native clean-link+PASS·g0/g1 .data DEFINED·reloc=base g0로 정면반박→그 위 arm-6 fix DROP.", "threshold": "재발=pool 빌드/census서 방금 머지한 변경이 '없다'/nm 안바뀜 OR census 수치가 최신fix와 모순. 판정=origin/main(git show)에 실재 확인+pool HEAD past 확인. stale=harness(fetch누락/–local ref상속)·코드결함 아님→revert금지. 해결=(빌드)pool은 'git fetch origin main && git checkout FETCH_HEAD' 필수·checkout만 금지. (census)'--local' 클론은 러너 stale ref 상속하니 금지→GitHub https fresh clone OR clone후 'git fetch origin main' + **HEAD sha를 알려진 현재 origin/main tip과 문자열 assert**(불일치=STOP)·census/byteeq 보고에 빌드 HEAD sha 명기(verdict-integrity).", "source": "tool/stage_resolve_runtime_a" }, { "id": "workflow-2", "state": "pos-conv", "value": "다수 agent를 동시 fan-out하는 Workflow가 API 서버측 rate-limit(not usage limit) 걸리면 그 라운드 agent들이 통째로 실패(designs=[]·plan=null). 실측 2회: w7pvnqc6k(engine-gap+verify-plan 2/3 실패)·wrnddfh3h(qsort+strtod+synth 3/3 실패·subagent_tokens=0·2.8s fast-fail). rate-limit은 즉시 재launch해도 또 실패.", "threshold": "재발=Workflow 결과 failures[]에 'Server is temporarily limiting requests·Rate limited'. 해결: (1)즉시 재launch 금지(backoff)—rate-limit 해소(수분~십수분) 후 재시도 (2)잘 스코프된 단일 설계는 Workflow 대신 직접 구현(코드 읽기+emitter 편집·git만·pool 불요)하거나 단일 fable 호출로 강등해 동시 agent 수↓ (3)ScheduleWakeup으로 지연 재시도. 관련=fanout-workflow(≥3만 Workflow)·[[workflow-1]].", "source": "Workflow" }, { "id": "runtime-emit-full-hexa-2", "state": "pos-conv", "value": "#ifdef-gated emitted-C body의 /* */ 블록주석에 mid-line */가 있으면 C 블록주석을 조기종료→뒤 텍스트가 코드로 파싱돼 컴파일 실패. OFF(default)시 #if로 컴파일 제외돼 OFF byteeq/faithful/install-compile 전부 GREEN 통과→버그 은폐. flip(default-ON)이 그 body를 처음 컴파일할 때 노출. 실측: glob #4443 주석 'inline */?/literal matcher'의 */가 flip #4449서 runtime.c:13139 'undeclared literal/matcher/selection' 5-RED.", "threshold": "재발=default-OFF gate를 default-ON flip시 install.sh runtime-compile(clang-18)/faithful가 'expected expression·undeclared identifier' RED인데 OFF선 GREEN이었음. 판정=gated body의 /* */ 블록주석에서 mid-line */ grep(줄주석 //의 */는 무해). 해결=주석 리워드(*/ 제거·star/question 등). 예방=default-OFF ON-body 저작시 /* */ 주석에 */·glob메타문자 금지, flip 前 gated region */ 스캔. OFF verification(byteeq/faithful/compile)은 #if-제외 코드를 검증 못하므로 ON body 정합성 보장 안함(=flip이 첫 실검증).", "source": "self/runtime_emit_full.hexa" }, { "id": "regex-rt-hexa-1", "state": "pos-conv", "value": "regex native path(HEXA_REGEX_NATIVE)를 default-ON flip하면 undefined reference to rt_regex_* 링크실패: emitted runtime.c(runtime.a)가 rt_regex_*로 위임하나 rt_regex_*는 compiler closure(regex_rt.hexa via compiler/main.hexa import)에만 있고 runtime.a엔 미포함. runtime.a를 standalone 링크하는 소비자(consent-checker·faithful runtime-link·유저바이너리)는 rt_regex_* 미해결→ld fail(linux-arm64 #4451). default-OFF는 libc regex라 무해(rt_regex_* 미참조)·flip이 노출.", "threshold": "재발=closure-import 심볼(rt_*)에 위임하는 runtime.c seam을 default-ON flip시 'undefined reference to rt_*' 링크에러(standalone runtime.a 링크서). 판정=OFF byteeq/faithful GREEN이나 flip이 링크RED. 해결=위임대상 심볼을 runtime.a 자체에 컴파일 포함(regex_rt.hexa+thompson+backtrack를 runtime 빌드 TU에 넣거나 .s seed화·glob/fgets/qsort는 runtime.c 내부 self-contained라 무관)·closure import만으론 standalone runtime.a 링크 부족. regex reduction은 gate MERGED default-OFF(#4445)이나 flip=이 wiring 선행. glob/fgets flip은 self-contained라 성공(#4449/#4450).", "source": "stdlib/runtime/regex_rt.hexa" }, { "id": "reap-1", "state": "pos-conv", "value": "CONFLICTING PR를 수동 리프레시할 때, worktree의 로컬 PR 브랜치가 자기 리모트 카운터파트보다 뒤처져 있을 수 있다(이전 세션/reap이 그 브랜치 리모트에 이미 push함). 실측 2026-07-03 #4409: worktree tip이 origin/보다 behind 23인데 그 위에서 바로 origin/main을 머지→ARCHITECTURE 충돌 수동해소까지 마쳤으나 push가 non-fast-forward로 거부(엉뚱한 base). 게다가 리모트 tip 자체도 과거 main만 머지한 상태라 현재 main과 재충돌. stage-resolve-runtime-a-1(pool checkout-without-fetch)과 다른 메커니즘=로컬 worktree가 자기 브랜치 리모트보다 뒤처짐.", "threshold": "재발조건=worktree에서 CONFLICTING PR 브랜치에 origin/main을 머지하기 전에 그 브랜치의 리모트 tip과 동기화 안 함(git status -sb의 behind-N 무시). 해결: 머지 전 반드시 (1)git fetch origin (2)git status -sb로 behind-count 확인 (3)hard-reset을 origin/로 정렬(reset-ok 사유 명시) 후 origin/main 재머지. 캐논=sidecar reap이 이 순서를 내장하므로 가능하면 수동 대신 reap 사용; reap이 doc충돌로 abort하면 위 3스텝을 손으로.", "source": "tool/reap" }, { "id": "stack-landing-guard-yml-1", "state": "pos-conv", "value": "static-types r8~r11+F0/F3/F4 타워를 스택 PR 체인으로 올리며 각 PR base를 main이 아닌 부모 feature 브랜치로 둠 → 각 PR이 down-stack 머지되어 GitHub MERGED 배지는 '부모 흡수'만 의미하는데 tip→main PR이 한 번도 안 열려 root(#4457 r7prep) 이후 +688줄(HX3015~17 포함) 전체가 좌초. 5개 PR(#4476·#4495·#4498·#4515·#4518)이 초록 배지를 단 채 콘텐츠 main 전무 = release-integrity 유령머지가 수 라운드 지속. 검증=git log origin/main -S HX3017/_types_static_flags_hoist EMPTY. 복구=r11-e0063 타워를 squash-onto-clean으로 main 재착지(byteeq-real 3-target 게이트).", "threshold": "재발조건=머지된 head SHA가 main ancestor인지 사후검증 부재 + MERGED배지=실착지 착시. 해결=stack-landing-guard.yml(base≠main 머지 시 PR 경고+ledger issue 기록·main push마다 merge-base --is-ancestor 재조정·전량 착지 시 auto-close). 스택 root 착지 시 base 브랜치 즉시 삭제 관행이 GitHub 자동 retarget을 발동시켜 보강.", "source": ".github/workflows/stack-landing-guard.yml" }, { "id": "catalog-code-uniqueness-yml-1", "state": "pos-conv", "value": "catalog.hexa에 같은 code:\"HXxxxx\"가 둘(HX3019=return-borrow E0515 #4555 + assoc-types not-bound E0046)로 중복 배정 → 진단코드 충돌·release-integrity 결함(convergence catalog-hexa-1). #4562가 assoc not-bound을 HX3019→HX3022(E0046)로 renumber해 즉시 해소.", "threshold": "재발조건=신규 진단 추가 시 기존 code와 충돌하는지 사후검증 부재. 해결=catalog-code-uniqueness.yml(.github/workflows/ + tool/check_catalog_unique.sh)=BLOCKING CI 게이트로 catalog.hexa 내 중복 code:\"HXxxxx\" 거부(#4563·convergence catalog-hexa-1 root fix). 현행 네임스페이스=HX3019 E0515(return-borrow #4555)·HX3020 E0437(assoc surplus #4085)·HX3021 E0502(borrow-conflict PENDING #4557)·HX3022 E0046(assoc not-bound #4562). stack-landing-guard.yml과 나란히 서는 release-integrity 게이트.", "source": ".github/workflows/catalog-code-uniqueness.yml" }, { "id": "selfhost-byteeq-real-yml-1", "state": "pos-conv", "value": "느린 byteeq-real 게이트(~30min ghost darwin serial 큐·flake/requeue)가 병렬·스택 PR을 CI 도중 stale화: PR이 게이트 대기하는 사이 main이 sibling으로 전진→GitHub가 DIRTY/CONFLICTING 표기+admin merge 거부. 실코드충돌·HX충돌 아닌 순수 churn-race(merge-tree conflict-marker=0·catalog/CHANGELOG auto-resolve). mergeability 캐시 재계산 안 됨.", "threshold": "재발=여러 PR 같은시간창 byteeq 대기 중 main 전진. 해결=owner refresh(격리 worktree merge origin/main→push·NO force·merge-tree로 code conflict 0 선확인). RED/BLOCKED 실충돌 오판 말 것(merge-tree+pre-conflict GREEN 확인). 다수 PR=단일 드레이너 순차소진+느린 byteeq PR 마지막.", "source": ".github/workflows/selfhost-byteeq-real.yml" }, { "id": "selfhost-byteeq-real-yml-2", "state": "pos-conv", "value": "선택적 홀: byteeq-real은 self-hosted(ghost) flaky runner라 required-check 아님(gates-summary만 required·github-hosted). GitHub auto-merge가 required 충족 순간 발화→codegen/runtime PR이 byteeq-real GREEN verdict 없이 착지 가능(#4557 borrowck·byteeq run superseded-cancelled 채 auto-merge). byteeq-neutral opt-in default-OFF엔 무해(flag-gate 불변식+base byteeq-green으로 성립)나 BIT-CHANGING엔 release-integrity 위반.", "threshold": "재발=compiler/runtime 파일 PR이 auto-merge enabled+byteeq-real 미완. 해결=(1)드레이너 규율=codegen/runtime-touching PR은 byteeq-real 완료GREEN 확인 후 머지(gates-summary만으로 auto-merge 금지·branch protection 의존 말 것). (2)byteeq-neutral opt-in은 flag-gate 불변식+sibling base-green 정당화+사후 main byteeq GREEN 검증. self-hosted flaky라 required 승격은 트레이드오프(전 PR 차단).", "source": ".github/workflows/selfhost-byteeq-real.yml" }, { "id": "elf-ownstart-exit-code-pair-abi-payload", "state": "pos-conv", "value": "own-emit ELF own-start exec의 exit code가 42 아닌 0으로 측정됐을 때, own x86-64 codegen 결함으로 오진하기 쉬움(main()->int 디스어셈블이 mov 0x2a,%rdx; mov 0x0,%rax=42가 RDX·RAX=0). 실제=codegen 무죄: 이 툴체인은 -> int을 설계상 always-HexaVal(PAIR-MODEL)로 반환—SysV 정수 쌍 rax=tag, rdx=payload(_STMT_RETURN compiler/codegen/x86_64_linux.hexa). 즉 rax=TAG_INT(0)·rdx=payload(42)은 정상 pair-ABI. own-start stub의 exit-code 포워딩은 tag(rax/eax)가 아니라 PAYLOAD(rdx/edx)를 읽어야 함. C-transpile 경로는 main 반환을 discard(crt return 0)라 'exit 0'이 툴체인 기본이고 round-1 gate의 rc==42는 신규 C-canon semantic. unbox-to-bare-rax는 전 in-language call-site ABI(callers unbox rdx) 변경=byteeq-RED default-path이라 기각—stub payload 포워딩이 정답.", "threshold": "재발=own-emit ELF/native exec의 exit code가 소스 return값과 불일치. 해결=own-start stub이 89 C7(mov edi,eax=tag)→89 D7(mov edi,edx=payload)로 payload 포워딩(#4707·compiler/emit/elf_x86_64.hexa:889·opt-in linker라 byteeq-safe). 검증=summer RUN_exit=42. 시블링 arm64 own-start: x1/w1(payload) 포워딩, w0(tag) 아님.", "source": "#4707 · zeroc#29 axis-③ ELF ROUND-1 · Fable root-cause · summer 실측 exit 42" }, { "id": "elf-round3-archive-link-complete", "state": "pos-conv", "value": "axis-③ own ELF linker now links own .o + runtime.a into a running static ET_EXEC with ZERO binutils (round-3 COMPLETE, 4 pool-verified stages): #4711 parse_elf_x86_obj(on-disk ELF64 .o→ElfX86Obj·round-trip PASS)·#4712 parse_ar_archive(GNU ar→[ArMember]·BSD-guard·AR-PARSE PASS)·#4713 archive_extract_fixpoint(심볼구동 멤버 pull to fixpoint·sanctioned libc floor 잔존·EXTRACT-FIXPOINT PASS)·#4714 link_elf_x86_64_ownstart_ar + main.hexa --linker=hexa dispatch(UND-gated). e2e(idle aiden): prog.o(UND rt_answer)+runtime.a(leaf rt_answer→42)→own 링커→260B static ET_EXEC→exit 42. byteeq-neutral(extracted==[]→plain round-1/2 경로·UND 없으면 plain). round-1(exit-code)+round-2(data-seg)에 이어 round-3(archive-link) 완성 = axis-③ '③ no clang link' 자체-링크 실증(옵트인 --linker=hexa).", "threshold": "round-3b DONE(#4716 impl + #4717 coverage runtime-verified: data-segment reloc patch(설계 component B·ElfRel.site_seg tag·data/rodata-resident reloc site를 data vaddr에)+bss slot=5 def-collection(component C)= EDIT-6 data arm. #4717 hand-built 2-obj ElfX86Obj(A=main+rodata/data/bss·B=UND main cross-obj)로 data-arm EXERCISE→DATARELOC 8/8 PASS on summer(abs64·PC32·bss·rodata/data-base·ro=1 self-derived assert). FINDING: hexa codegen data-resident reloc=0(전역=zero-init HexaVal 슬롯+text-resident writer)→data-arm 소비자=외부 .o(runtime.a .data ptr init). round-3(core)+round-3b(data/bss impl+coverage) 전부 runtime-verified. 방법론(4연속 유효): 워크플로 draft+adversarial verify(정적 compile/알고리즘/종료성)→내 적용→idle-pool 실측 검증(summer load starved시 idle aiden 이전)→머지. verdict-integrity 반복 적중: Stage1 harness-mkdir 누락·Stage2 summer-load hang·Stage4 stdbuf env=val 오배치 모두 코드 아닌 launcher/env. 설계 SSOT=state/hexa-own/elf_round3_archive_link_design.json.", "source": "#4711·#4712·#4713·#4714 · zeroc#29 axis-③ round-3 · idle aiden 실측 exit 42 · #4716 round-3b · #4717 data-arm coverage 8/8" }, { "id": "selfhost-done-3axis-fleet-goal", "state": "active", "value": "USER STANDING GOAL set 2026-07-08: drive self-host DONE 3-기준 (①no hexa_cc.c ②no runtime.c ③no clang) to completion via a perpetual 3-lane fleet (selfhost-done-3axis-fleet). Each lane fires-on-arrival round-by-round until its criterion crosses DONE. axis-③ LINK half landed this session (#4711-#4718 own ELF linker: own .o + runtime.a -> static ET_EXEC exit 42, ZERO binutils, opt-in --linker=hexa). See root.activeGoal for the per-axis status SSOT.", "threshold": "Per-axis DONE gates: ①=build/run never invokes the C-transpile delegate (native default) · ②=nm-UND libc floor at the sanctioned-irreducible floor (net-FFI/CRT/exec) with nothing compiling a generated .c · ③=install/build/run never shell out to clang/gcc (own object-emit + hexa_ld default). Each flip opt-in-first->byteeq 3-target GREEN + shipping smoke->default-ON. release integrity > self-host progress. Fleet round-1 scouts each axis's genuinely-open frontier (survey-first, no re-deriving closed walls).", "source": "user goal 2026-07-08 · axis-③ #4711-#4718 · CLAUDE.md SELF-HOST DONE CRITERION" }, { "id": "elf-x86-64-hexa-1", "state": "pos-conv", "value": "③ self-emit O(n²) 벽을 RSS/timing 추론으로 reloc pass에 2라운드(#4779·#4784) 오귀속→둘다 벽 0이동. 진짜=_lookup_label_x86 per-fn intra-branch resolver(jcc/jmp/call마다 fn 全 label linear-scan·cross-fn=full-miss·O(n²) in fn size). #4790 per-fn 1024-way FNV label_bkt 종결. 교훈: superlinear phase를 RSS-plateau 추론으로 특정 금지—verdict-integrity는 pass 내부 phase-attribution에도 적용·같은 region 연속2fix가 벽 안옮기면 그 region 아님.", "threshold": "재발조건=native self-emit RC=124인데 profiler sub-mark 없이 phase 지목. 해결=pack_lir_x86_64에 phase별 stderr-only cg_profile sub-mark(byte-neutral) 후 measure로 판별. 다음후보=encoder string round-trip(선형).", "source": "compiler/emit/elf_x86_64.hexa" }, { "id": "selfhost-native-build-gate-1", "state": "pos-conv", "value": "print()+exit() stdout=[] 빈출력 = 단일 symptom·2원인 (verdict-integrity: 하나로 오귀속 금지). (a) [PR #4790] darwin-arm64 native-build gate stale 러너 false-RED — mini-selfhost hexad v0.574.1 stale dispatch→HEXA_NATIVE_BUILD 무시·clang fallback·stale codegen 빈출력. native emit 자체 건강. gate stale분류기가 link-undefined만 잡아 build-clean stale dispatch 놓침. (b) [측정확증 #4850/#4852] 실재 MULTIOBJ 코드갭 — ship recipe(HEXA_RT_MULTIOBJ=1)에서 runtime_core.c가 별도 TU라 -include runtime_core_sysheaders.h에 printf→hxlcl_write redirect 부재→hexa_print_val이 glibc 버퍼 printf(nm build/runtime.a: U printf/fflush/fputs/fwrite×4)·own-start(-nostartfiles·no __libc_start_main·no _IO_cleanup)+명시 exit()가 버퍼 tail 유실. single-TU runtime.a는 U 0(runtime.c가 #include 위에서 printf→hxlcl_write 매크로 redirect·raw write(2) 생존). summer 실측: single-TU U=0 vs MULTIOBJ U=4 · C-repro printf+raw SYS_exit_group→[] · +fflush→[hi]. #4850 stage5 RED은 (b)이며 워크플로 합성의 'stale 아티팩트' 결론을 정정. fix=#4852 HEXA_ZEROC_EXIT_FLUSH(default-OFF·byte-neutral·hxlcl_exit의 raw exit_group 직전 fflush·ON-body 컴파일 GREEN).", "threshold": "재발조건=(a) selfhost_native_build_gate RED인데 산출바이너리가 native 아님(libsodium/openssl=clang fallback)→native-path assertion(#4792 MERGED)·stale러너 재프로비전. (b) print+exit 빈출력이 build-clean인데 native path 정상→nm runtime.a의 U printf/fflush 카운트로 판별(>0=MULTIOBJ glibc-buffered·build_native stage5 위생라인 #4852이 자동덤프). 다음=default-ON flip(exit-flush-ON vs sysheaders printf→hxlcl redirect=axis-② U 4제거 우위·둘다 bit-changing→byteeq3 soak 필수) + #4850 L1 job에 HEXA_ZEROC_EXIT_FLUSH=1 배선. 연관=elf-x86-64-hexa-1·runtime-emit-full-hexa-2.", "source": "tool/selfhost_native_build_gate" }, { "id": "codegen-hexa-2", "state": "pos-conv", "value": "#4800/#4801 SELFEMIT_PACK_OUT started as a COMPILER-BREAKING regression (param-type packing corrupted boxed [Int] args → flag-ON aprime couldn't compile trivial main). R7 (branch feat/axis3-r7-packout-lineage, _selfemit_pack_out_lineage_fn value-provenance narrowing) FIXES the correctness break — pool flag-ON verify: HX1101=0, exit 42, x86_serialize mark reached, valid .o. BUT the memory premise is now FALSIFIED at full self-emit scale: peak RSS = 19.87GB WITH the pack lever, NOT the claimed ~6.8GB. The lever is MEASURED-INERT for peak RSS — the serialize out-accumulator emits only a 6.87MB ELF (≤~220MB even fully boxed), so it was NEVER the 19GB wall. The real self-emit memory wall = the boxed frontend compilation arena (lower_ast_to_hir 50.6s + codegen 125.8s over the 68,260-line source's boxed AST/HIR/MIR). My original 'serialize out boxed → 19GB' root-cause AND the '19GB→6.82GB confirmed' stamp were both misattributed measurements.", "threshold": "Recurrence: attributing a self-emit peak-RSS wall to a specific accumulator without checking its OUTPUT size (6.87MB ELF cannot explain a 12GB swing). Resolution: R7 is mergeable ONLY as a correctness regression-fix (default-OFF, byte-neutral) — do NOT default-flip SELFEMIT_PACK_OUT (zero measured RSS benefit). The real ③ self-emit memory round must target the boxed frontend arena (ast_to_hir/HIR/MIR boxing), not the ELF output stream. Discipline (still): verify a codegen flag with a full flag-ON self-build to completion AND size-check the claimed hot allocation against its output before stamping a memory win.", "source": "self/codegen.hexa" }, { "id": "build-aprime-sh-1", "state": "pos-conv", "value": "POD/HOST RAM for memory-heavy self-emit measurement: a community RunPod CPU slice advertises host RAM via free (e.g. 1133GB) but cgroup-caps at /sys/fs/cgroup/memory.max=8GB — a ~19.87GB frontend-arena self-emit census OOM-kills mid-compile, never reaching the serialize-time peak where all 5 IR carriers are co-resident. --secure often still assigns COMMUNITY. Pool aiden/summer = 30G each (marginal but fits a 19.87GB peak when idle; earlyoom risk near 66%). The R7 verify DID reach 19.87GB on some RunPod pod, so it is achievable, but the slice's cgroup cap is the gate, not advertised host RAM.", "threshold": "Before dispatching ANY pod/host for a memory-heavy census/build, verify RAM via cgroup not free: cat /sys/fs/cgroup/memory.max (or memory.limit_in_bytes) >= the run's peak + margin — free leaks host RAM through the container namespace. For the ~19.87GB frontend-arena census require memory.max >= ~42GB; community slices cap at 8GB (disqualifying). Fallback = an idle pool host (summer 30G idle fits a 19.87GB peak). Always measure clean or QUARANTINE (infra-wall-noneval) — never grade an OOM-truncated run (verdict-integrity). Sibling: build-aprime-sh-1 (STABLE non-community pod methodology).", "source": "tool/build_aprime.sh" }, { "id": "runtime-c-synth-dedup-1", "state": "pos-conv", "value": "runtime.c는 emitter(runtime_emit_full.hexa) 출력의 awk-synth 합성물 — 이 합성이 중복 #define 라인을 DEDUP한다. #ifdef-gated emitted-C body에서 같은 매크로명을 2번 #define(예: ON=empty·OFF=static)하면 synth가 한쪽을 제거→#ifdef/#else 구조 붕괴→컴파일 'unknown type name'. 실측 #4853: axis-② stdio linkage용 `#ifdef HEXA_RT_STDIO_NATIVE #define HXLCL_STDIO_LINK #else #define HXLCL_STDIO_LINK static #endif` 매크로가 runtime.c:1097서 16-target RED(default-OFF인데 OFF 컴파일도 깨짐). fix=재사용 매크로 폐기·각 함수 시그니처에 inline #ifdef(external ON/static OFF) 직접 emit — emitter의 기존 `#if defined(__x86_64__)` 블록과 동일 패턴이라 synth 보존됨. ✅#4894 MERGED(2026-07-12): HXLCL_STDIO_LINK #ifdef arm=FILE* fake-fd (void*)(fd+1) swap(shim_emit.hexa:1343-1466·#else libc delegate·default-OFF byteeq-neutral)·stage_resolve_runtime_a _zc_stdio_link 게이트. 다음=HEXA_RT_STDIO_LINK=1 MULTIOBJ nm-U FILE* cluster(fopen/fread/fwrite/fclose/ftell/fseek+fuel_abort log) drop 측정=런북 state/hexa-own/l3_nmU_filestar_runbook.md.", "threshold": "재발조건=gated emitted-C에서 같은 매크로명 2회 #define 후 install.sh/faithful RED('unknown type name'/'expected'). 판정=emitter에서 중복 #define grep. 해결=재사용 매크로 대신 함수/선언 단위 inline #ifdef. OFF verification(byteeq/faithful)은 #if-제외 못하므로 ON-body는 flip/실사용이 첫 검증(runtime-emit-full-hexa-2 sibling).", "source": "self/runtime_emit_full.hexa" }, { "id": "stage-resolve-flag-space-1", "state": "pos-conv", "value": "stage_resolve_runtime_a 컴파일 라인에 새 -D flag 토큰을 replace_all로 추가할 때 trailing space를 떨어뜨리면 `$_zc_flag-Dnext`로 뭉개진다 — flag=ON일 때 `-DHEXA_FLAG-DHEXA_NEXT`(한 토큰)이 되어 다음 인자(-DHEXA_ZEROC_DROP_RTCORE_INCLUDE·-I self·-DHEXA_CUDA)를 삼킴. 실측 #4852→#4854: `$_zc_exit_flush-DHEXA_ZEROC_DROP_RTCORE_INCLUDE`(공백누락 5사이트)→flag ON시 DROP_RTCORE_INCLUDE 유실→runtime.c가 runtime_core.c 인라인→hexa_sqrt 등 중복→release_build multidef=219. OFF(default)는 빈문자라 `-DHEXA_NEXT`로 정상→byteeq OFF-lane이 못잡음.", "threshold": "재발조건=flag ON build에서 release_build multidef 또는 예상 -D 누락. 판정=stage_resolve grep '_zc_[a-z]*[^ =]'(flag 토큰 뒤 non-space). 해결=flag 삽입시 `$_zc_flag ` trailing space 보존·전 사이트 sweep. 예방=default-OFF flag의 ON-path는 byteeq(OFF)로 검증 불가→full release_build(HEXA_*=1)로 실검증 필수(runtime-emit-full-hexa-2 sibling).", "source": "tool/stage_resolve_runtime_a" }, { "id": "runtime-c-1", "state": "pos-conv", "value": "파일→f32 읽기가 값-boxing 되어 RSS 가 파일 크기의 ~10배로 폭발한다 (2026-07-12 summer 실측: read_bytes 1.43GB → RSS 15.3GB; 이전 anima 303M 사례 1.2GB → ~24GB). read_bytes_at 슬라이스로도 peak 이 안 줄어든다 — 반환 바이트도 boxing 되기 때문. 진짜 fix 는 런타임 mmap(RFC025).", "threshold": "재발조건: 대용량 f32/가중치 파일을 hexa 로 읽는 잡. 증상 연쇄 — cgroup memory.high 초과 → mem_cgroup_handle_over_high 스로틀 → D-state 무한잔류 → 부모 세션 사망 시 PPID=1 고아가 GB 를 문 채 잔류 → D-state 가 loadavg 에 카운트돼 호스트가 '다운'으로 오진됨(ssh 인증은 통과, 셸 spawn 만 1~3분). 해결: 원격 hexa 잡은 sidecar pool on 으로 실행(orphan fence 가 프로세스그룹 수거); 이미 생긴 고아는 ps PPID=1 + /proc//wchan=mem_cgroup_handle_over_high 로 확진 후 kill -9.", "source": "self/runtime.c" }, { "id": "runtime-core-emit-hexa-1", "state": "pos-conv", "value": "Native-backend escaping-packed arrays (TAG_ARRAY_I64/F64/F32) flowing through a type-erasing boundary (struct field via hexa_map_get / fn-return / generic) reach a BOXED runtime reader (hexa_len/hexa_index_get/hexa_iter_get) that does NOT discriminate the runtime tag -> HX_IS_ARRAY false for a packed tag -> len collapses to 0 / index aborts (tag=12). Poly readers (hexa_arr_poly_len/get) already discriminate; gen2-C carries inseparable {tag,payload} so is immune. Two-backend path-mismatch at the RUNTIME reader layer. MEASURED fix GREEN (aiden 5020100). SECONDARY trap: build_native reuses HEXA_PREBUILT_RUNTIME=build/runtime.a (stale) so emitter edits need a forced stage_resolve_runtime_a rebuild to take.", "threshold": "Recurs whenever a new boxed HexaVal reader/consumer is added without a packed-tag branch. Fix = mirror hexa_arr_poly_* discriminate into EVERY boxed reader (uniform-representation soundness). Blast: _x86_compute_live_ranges empty X86Intervals -> degenerate regalloc -> cc_self miscompiles all array-returns (axis-3 L2). Verify on a FRESH runtime.a (rm build/runtime.a + HEXA_PREBUILT_RUNTIME= stage_resolve_runtime_a), else a stale archive masks the fix.", "source": "self/runtime_core_emit.hexa" }, { "id": "elf-x86-64-hexa-2", "state": "pos-conv", "value": "own-link dyn 경로의 init 결함은 3중이고 근인은 crt_handoff 다. ★이전 기록('dyn .init_array 는 INERT 로 두라 — DT_INIT_ARRAY 와 real bounds 둘 다 억제')은 FALSIFIED — 그 rc 0→2 는 ctor out-of-context 가 아니라 .init_array TEXT-CLOBBER 였다(영역만 물질화하고 site_seg==6 reloc arm 은 init_stub 게이트에 남겨둠 → ctor vaddr 가 소유 오브젝트 .text 머리를 덮음; 바이트증거: runtime_core.o .text+0 = hexa_drain_env_ms 자리에 ctor 포인터 0x444d89/0x444dd9/0x444e89 = _hexa_init_stdio/_mem_cap/_malloc_tuning 의 st_value 와 정확히 일치). _hx_run_init_array 의 호출자는 _hx_start_c 하나뿐이라 dyn 에서 real bounds 만으로 재실행될 수 없다. 영역과 reloc arm 은 반드시 함께 움직인다. ★진짜 근인 = crt_handoff 가 crt1.o 를 끌어 _start 를 glibc 에 넘긴 것. _hx_start_c 가 init 권한자다(프로세스 스택에서 hxlcl_environ 저장 + __init_array walk + hxlcl_exit 로 own atexit LIFO 드레인). 넘기면 통째로 안 돌아 hxlcl_environ 이 영원히 NULL → hxlcl_getenv 는 그 벡터만 걷는다(libc environ fallback 없음 — OP-19e 가 nm-clean 위해 컴파일아웃) → env() 가 모든 키에 '' = 크래시 없는 조용한 오답, 4개 게이트 전부 통과. ★정답지 = ld (같은 오브젝트, 링커만 다름 · 실측): ld 는 -nostartfiles 로 runtime.a 의 own _start 를 유지한다 — entry=own _start 0x402480, __libc_start_main UND=0, _hx_start_c 존재, env(HOME)=/home/aiden. own-link 는 entry=crt1 0x400120, __libc_start_main UND=1, _hx_start_c 부재, env(HOME)=''. crt_handoff 채택 이유(링커의 합성 23바이트 _start 스텁이 teardown 없어 dynamic exit 에서 rc139)는 정당했으나, runtime.a 의 진짜 _start(FLIP-7)가 바로 그 teardown 을 제공한다 → objs 가 이미 _start 를 정의하면 crt1 을 끌지 마라(entry 는 이미 _start 심볼조회로 해석 → runtime.a 것으로 착지). ★ctor 이중실행은 버그가 아니라 설계: ld 는 DT_INIT_ARRAY 와 real __init_array_start/end 를 같은 영역에 낸다 → ld.so _dl_init 이 한 번, _hx_start_c→_hx_run_init_array 가 또 한 번. ctor 가 전부 멱등이라 성립하고 순서가 load-bearing(ld.so 패스는 hxlcl_environ==NULL 일 때 도니 getenv 읽는 ctor 들이 no-op, 두번째 패스가 진짜 일한다).", "threshold": "재발조건: own-link 가 링크 형태(static/dyn)를 init 권한(누가 _start 를 주는가)과 묶을 때. 이 둘은 직교한다 — dynamic 이어도 own _start 를 유지할 수 있고 ld 가 정확히 그렇게 한다. 판정: own-link 바이너리와 ld 바이너리를 같은 소스로 만들어 nm -D | grep __libc_start_main 과 readelf -hW entry 를 비교하라. 다르면 init 권한이 갈린 것이다. ★검증은 반드시 behavioral 이고 in-process 여야 한다: env() 갭은 자식 프로세스로는 안 보인다(execve 가 커널로부터 진짜 envp 를 준다) — 3줄짜리 println(env(HOME)) probe 를 양 링커로 빌드해 비교하라(tool/ownlink_behavioral_smoke 어서션 3). byteeq/corpus-parity 는 링커의 방출 바이트만 비교해 이 클래스를 구조적으로 못 잡는다. ★소스가 아니라 실물을 봐라: self/runtime.c 는 gitignored 지만 emitter 산출물이 아니라 frozen seed 다(tool/restore_frozen_seeds — 'no SSOT emitter, only fragments'). emitter(runtime_emit_full.hexa)는 3-인자 hxlcl_capture_environ(argc,argv,envp) 를 무조건 방출하지만 출하 runtime.c 는 #ifndef HEXA_ZEROC_OWN_START 로 감싼 (void) 버전이라 FLIP-7 기본ON 에서 캡처 ctor 가 runtime.a 에 아예 없다(nm 확인). emitter 를 읽고 'artifact 가 stale' 이라 기각하면 오판한다 — nm/readelf 가 심판이다. 변경 지점도 emitter 가 아니라 restore_frozen_seeds post-restore 패치(OP-17/OP-19e/ZEROC-* 선례).", "source": "compiler/emit/elf_x86_64.hexa" }, { "id": "stage-resolve-runtime-a-2", "state": "pos-conv", "value": "B3-A0 own-obj lane (HEXA_RT_OWNOBJ) has TWO ship-recipe false-green traps distinct from clean-isolation verify. (1) Each of the 9 A0 families' resolver opens with a cached shortcut '[ -f build/_native.o ] && { export flag; return 0; }' that PRE-EMPTS the A0 own-emit branch below it — in a NON-CLEAN build (release_build reuses build/ across stages/runs) a stale .s-built .o silently satisfies the shortcut, so A0 never re-emits and the ship runtime.a keeps .s members while HEXA_RT_OWNOBJ=1 prints ZERO 'B3-A0 OWN-OBJ' lines (green-in-isolation because the direct verify rm's the .o first; dead-in-ship). FIX: gate every A0-family shortcut on '[ \"${HEXA_RT_OWNOBJ:-0}\" = \"0\" ]' so under the flag the resolver reaches A0 authoritatively (per-family HEXA_RT_OWNOBJ_ quarantine still needs a clean build/). (2) The A0 ship WITNESS (release_build HEXA_RT_OWNOBJ=1) links HEXA_PREBUILT_RUNTIME at Stage-0; if that env var is INHERITED from the host shell (summer profile sets it to ~/.hx/bin/build/runtime.a, a CUDA-baked installed archive) the witness links runtime_cuda*.o and dies on '__cudaRegisterFatBinary/__cudaRegisterFunction undefined' (Stage-0 self-host link has no -lcudart) — an infra wall UNRELATED to A0. FIX: pin HEXA_PREBUILT_RUNTIME=$PWD/build/runtime.a + HEXA_CUDA=0 + rm build/*_native.o build/runtime.a so Stage-0b rebuilds the CPU-only own-obj runtime.a the witness then links. Same false-green class as OWN-START-GATE-VS-SHIP-ARCHIVE-SHAPE-DRIFT (verify must run the SHIP recipe, not a reduced/clean shape).", "threshold": "재발=HEXA_RT_OWNOBJ=1 release_build/witness가 'B3-A0 OWN-OBJ' 0줄(직접 verify는 9/9 GREEN)이거나 __cudaRegister* undefined로 죽음. 판정=(1) build/_native.o가 pre-exist하는 non-clean build에서 A0 미발사 → 캐시 shortcut이 OWNOBJ-게이트 없음 grep '\\[ -f build/[a-z_]+_native.o \\] && \\{'(게이트 미적용). (2) 링크가 ~/.hx/bin/build/runtime.a(설치본,CUDA obj) 사용 → HEXA_PREBUILT_RUNTIME 상속됨. 해결=(1) 9개 A0-family shortcut을 '[ ${HEXA_RT_OWNOBJ:-0} = 0 ]'로 게이트. (2) witness는 HEXA_PREBUILT_RUNTIME=$PWD/build/runtime.a 고정+HEXA_CUDA=0+build/*_native.o·runtime.a purge. default-OFF byteeq-neutral.", "source": "tool/stage_resolve_runtime_a" }, { "id": "stage-resolve-runtime-a-3", "state": "pos-conv", "value": "A1 own-obj wiring (E4 --keep-global on hxlcl_core.hexa) is NOT uniform across families — two structurally-different classes with a critical externals trap. (A) libm family (fmod/sin/cos/exp/log): the pre-existing path was build-time `--emit=asm hxlcl_core.hexa` + $CC, which ALREADY carries hxlcl_core's cross-references, so swapping to `--emit=obj --keep-global=hxlcl_` is a clean drop-in (own-emit = 1 global + rest STB_LOCAL, same external contract the archive already resolves). VERIFIED 5/5 own-emit 1-global. (B) string/mem family (strcmp/strncmp/strchr/strdup/strstr/calloc/free/realloc): the pre-existing path is a FROZEN seed that tool/isolate_native_seed.py ISOLATED to ZERO undefined externals (self-contained, cross-target-clean incl darwin ___errno_location). E4 `--keep-global` does NOT isolate — it demotes the other 79 shims to STB_LOCAL but KEEPS their bodies + cross-references, so own-emit strcmp.o carries 5 undefined externals (__errno_location, environ, hxlcl_malloc, slot_900, stderr) that the isolated seed had 0 of. The `_rnsc_bad` non-carrier-undef check (convergence stage-resolve-runtime-a-3) exists precisely to reject these. So a blind libm-style wrap of the string/mem family would REGRESS the isolation (reintroduce cross-target-fragile externals) and likely fail _rnsc_bad. The string/mem A1 members need an isolation step (own dead-code-elim to strip unreferenced shims, OR a --keep-global + own-strip pass), NOT just --keep-global. libm A1 DONE (5 members); string/mem A1 = distinct sub-problem.", "threshold": "재발=A1 string/mem 멤버(strcmp 등)를 libm처럼 --keep-global만으로 own-emit 배선 → own-emit .o가 isolated frozen seed엔 없던 undefined externals(slot_900·environ·stderr·__errno_location) 재도입 → _rnsc_bad 거부 또는 크로스타깃(darwin) 링크벽. 판정=nm own-emit-.o | grep ' U ' > 0 인데 frozen seed의 nm U == 0. 해결=string/mem은 --keep-global + isolation(dead-code-elim으로 미참조 shim 제거) 필요·libm(build-time --emit=asm 기왕 externals 보유)만 --keep-global 단독 drop-in. verify-before-wire: own-emit .o의 nm U를 frozen seed와 대조 후 배선.", "source": "tool/stage_resolve_runtime_a" }, { "id": "asm-hexa-1", "state": "pos-conv", "value": "arm64 asm-TEXT 이미터(_fmt_label)는 Mach-O @PAGE/@PAGEOFF/@GOTPAGE/@GOTPAGEOFF 페이지-릴록 접미를 GNU-as ELF 스펠링(bare-adrp/:lo12:/:got:/:got_lo12:)으로 번역해야 한다(target=arm64-linux-gnu). @PAGE 접미는 codegen(arm64_darwin.hexa 33사이트)이 만드는 내부 LIR 라벨 규약이고 두 object writer(elf_arm64.hexa=R_AARCH64_ADR_PREL_PG_HI21/ADD_ABS_LO12_NC · macho_arm64.hexa=ld64 kinds)가 reloc kind 파싱에 쓰므로 규약 자체는 유지 — asm-text 렌더링만 번역한다. 이름은 arm64_darwin이지만 arm64-linux도 이 codegen을 재사용하며, Mach-O 스펠링은 asm-text에서만 샌다. 같은 @PAGE→:lo12: 클래스가 alloc/fs_core/runtime_hi regen 스크립트에 perl post-pass로 3번 복붙돼 있는데(부채) 4·5번째 복사는 안티패턴 — 클래스 fix는 _fmt_label 한 곳.", "threshold": "재발=arm64-linux native seed(.s)가 GNU-as에서 'unexpected characters following instruction ... adrp xN,sym@PAGE'로 조립 실패 → seed 미생성 → runtime.arm64.a에 심볼 결여 → own-link fixpoint가 runtime.o 끌어 libc UND(strtod 등) undef. 판정=aprime --emit=asm --target=arm64-linux-gnu 출력에 @PAGE>0. 해결=compiler/emit/asm.hexa _fmt_label에서 _is_elf_arm64(target) 게이트로 _elf_arm64_page_reloc 번역(GOTPAGEOFF>GOTPAGE>PAGEOFF>PAGE 순·substring, 새 _ends_with 정의 금지=macho_arm64.hexa와 flat-globals 충돌 #3899). darwin/x86은 다른 브랜치→byteeq-neutral. regen perl post-pass·$CC-time sed 금지(부채복제·seed audit 파괴). 번역 삽입은 반드시 '.'/'['/'{'/'#' carve-out 前(.LCstr0@PAGE가 '.'로 시작해 verbatim 반환되면 @PAGE 잔존).", "source": "compiler/emit/asm.hexa" }, { "id": "elf-arm64-hexa-1", "state": "pos-conv", "value": "own-link(link_elf_arm64_ownstart_ar)에서 bss_vaddr_base = data_vaddr + len(data_bytes)는 16-정렬돼야 한다. 섹션심볼 sec_N_X(seg 2=bss)는 bss_vaddr_base + value로 해소되고, ldr x,[sec,:lo12:] (LDST64_ABS_LO12_NC)는 8-정렬 타겟을 요구해 _apply_arm64_reloc가 (raw & 7)!=0이면 rc=2 거부. Road A dyn 경로가 append하는 dynstr/dynsym/rela/_DYNAMIC/interp 블롭(interp /lib/ld-linux-aarch64.so.1 = 27B 홀수)이 len(data_bytes)를 비정렬로 남겨 bss_vaddr_base가 홀수가 됨. static 경로는 8-pad된 GOT에서 끝나 노출 안 됨. (참고: 섹션-base ro_base/da_base 16-정렬도 방어적으로 유효하나, 이 결함의 진짜 근인은 bss_vaddr_base.)", "threshold": "재발=own-link이 .bss 섹션심볼 대상 LDST64/128(kind 286/299) 릴록에서 rc=2(오정렬), 특히 dyn(Road A) 경로에서 dyn-blob append 후. 판정=DIAG에서 S가 홀수/비8정렬 + A=0 + 타겟이 seg2(bss). 해결=bss_vaddr_base 계산 前 data_bytes를 16-정렬 pad. --linker=hexa opt-in이라 static byteeq/shipping 무영향.", "source": "compiler/emit/elf_arm64.hexa" }, { "id": "elf-arm64-hexa-2", "state": "pos-conv", "value": "own-link crt1-handoff(Road A dyn) 경로는 C-ABI main 트램폴린이 필요하다. hexa fn(main 포함)은 16B HexaVal pair를 x0=tag/x1=payload로 반환·TAG_INT=0. crt1의 __libc_start_main은 main을 C-ABI int main()으로 보고 x0(tag=0)를 반환값으로 읽어 exit(0). 정적 hand-stub은 x1(payload)를 mov x0,x1으로 읽어 42를 냈으나 crt1 경로엔 어댑터 부재. fix=text offset0에 24B+8pad 트램폴린(stp/mov x29/bl real-main/mov x0,x1/ldp/ret)+main def를 트램폴린(def_off=0)으로 리다이렉트·main_off=실제body(bl패치). codegen 무변경. summer RC=42 확인.", "threshold": "재발=own-link dyn(crt1-handoff) 프로그램이 main return 대신 0(TAG_INT)으로 exit(정적경로는 정상). 판정=qemu rc가 main 반환값 불일치(특히 0). 해결=crt_handoff에 C-ABI 트램폴린(payload x1→x0)+main def 리다이렉트. x86 link_elf_x86_64_ownstart 동일 gap(sibling). --linker=hexa opt-in→shipped byteeq 무영향.", "source": "compiler/emit/elf_arm64.hexa" }, { "id": "action-yml-1", "state": "pos-conv", "value": "self-hosted 3러너가 mini 디스크 1개를 공유하는데 ccache가 무제한 성장 + 각 잡이 actions/cache로 수GB tzst를 동시 압축해제(피크 = tzst + 추출본 동시 점유) → 87% 찬 디스크에서 ENOSPC. 터지는 지점이 캐시 복원 한복판이라 워커가 완료보고 없이 죽고, GitHub은 잡을 in_progress로 영구 고착(고아)시킴 → PR 체크가 diff와 무관한 RED로 도배됨. 2026-07-13 실측: #4930에 가짜 RED 15개 + 고아 런 6개(9시간 고착) + mini 재부팅. 재실행만으로 15 RED→2(advisory)로 복구 = 코드 무죄 확증. FIX: ccache-setup 액션(모든 무거운 잡의 단일 통과점)에 (a) CCACHE_MAXSIZE 상한 항상 적용(무제한 성장 차단·LRU 축출은 byteeq 중립 — 미스는 재컴파일일 뿐) (b) 복원 前 디스크 헤드룸 가드: floor(15GiB) 미만이면 prune, hard floor(5GiB) 미만이면 fail-fast로 원인을 로그에 남기고 거부(한복판 ENOSPC 고아화 방지).", "threshold": "재발조건: 러너 호스트 여유공간이 낮은 상태에서 self-hosted 잡 동시 실행. 진단: 3타깃 전부 RED인데 base가 최신(behind=0)이면 코드 결함이 아니라 인프라를 의심 — gh run view --log-failed | grep -i 'no space left'; 고아 잡(in_progress 수시간)이 함께 보이면 확진. 해결: 고아 런 취소 → 공간 회수 → rerun --failed로 참-판정. commons infra-wall-noneval = 인프라벽은 평가 판정에서 격리.", "source": ".github/actions/ccache-setup/action.yml" }, { "id": "array-new-leaf-x86-64-s-1", "state": "pos-conv", "value": "근인=pair-ABI로 raw libc calloc 호출(Fable 실측·mini darwin-arm64 재현). aprime native emit이 시드의 'extern fn calloc'을 hexa pair-ABI(인자=tag/payload 레지스터 쌍·반환 payload=둘째 레지스터 rdx/x1)로 낮추는데, 시드 .o의 U calloc은 링크에서 C-ABI libc calloc에 바인딩된다 → 실제론 calloc(0,1)이 호출되고 반환 포인터(rax/x0)는 버려지며 죽은 rdx/x1의 쓰레기값이 배열 descriptor로 민팅됨. 실측: hexa_array_new() 반환 payload=0x1a5(포인터 아님·3회 동일) → 역참조 즉시 exit=139 SIGSEGV. CI 시그니처 일치(run 29248099835 'regen_cc_manual: Segmentation fault: 11' — 링크는 성공·실행에서 사망 = multiple-def/가드매크로 클래스 아님). hexa_array_new는 runtime_core.c C코드 수십 곳 + transpile된 컴파일러의 모든 []가 부르는 최핫패스라 hexat이 자기 트랜스파일 첫 배열에서 즉사. 백엔드가 이 함정을 스스로 문서화함(compiler/codegen/x86_64_linux.hexa:2236-2239 'reads the caller's single rdi as the TAG and walks garbage') — 그래서 Route C _is_cabi 화이트리스트가 존재하나 calloc은 미등재이고 시드 regen은 Route C를 쓰지 않았다. ⚠️반증된 내 초기가설: '생성자 계약(레이아웃/태그/refcount) 불일치' — C 바디도 calloc(1,sizeof(HexaArr)) zeroed 그대로 반환(runtime_core_emit.hexa:2752)이라 계약은 동일, 기각. ⚠️더 중요한 함정: '정상 형제(arr_zeros_leaf)가 동일 패턴인데 초록이므로 pair-ABI 호출은 정상'이라는 추론은 FALSE — 형제도 같은 결함을 갖되 쓰레기값이 우연히 readable 포인터라 죽지 않고 조용히 len=0 엉터리 배열을 반환할 뿐이고(실측), zeros는 hexat C-transpile 핫패스에 없어 노출이 안 됐다. 초록≠무결.", "threshold": "재발조건: self/native 시드가 raw libc 심볼(calloc/malloc/realloc/write/exit)을 extern으로 직접 부를 때. 판정=시드 .s의 'call calloc' + 'unbox user-call result payload'(rdx/x1에서 payload 추출) 조합. 실측 하네스=시드 .o + pair-ABI C 드라이버 링크 후 실행(구 시드 linux exit139/darwin SIGSEGV·zeros linux exit9). ✅FIXED(array_new): 시드를 HexaVal-ABI carrier hexa_ptr_alloc(self/runtime.h:872)로 재작성+4워드 명시 zero+OOM guard, regen ALLOWED_U 및 stage_resolve_runtime_a ARR-NEW U-floor 게이트를 carrier-only로 조임(두 화이트리스트가 raw libc를 통과시킨 구멍). carrier가 pair로 실포인터 반환함 실측(payload=0x1051a4018). ⚠️잔존: arr_zeros_leaf/array_typed_leaf/array_typed_leaf_f64가 여전히 raw libc extern(#4918/#4922/#4927로 배포됨) — 동일 carrier 치환 필요. 재-flip 게이트=3-target .s regen + 드라이버 스모크(신 시드 exit0) + byteeq 3-target.", "source": "self/native/array_new_leaf_x86_64.s" }, { "id": "nobaseline-gate-yml-1", "state": "pos-conv", "value": "own-link/self-host default-flip 게이트는 install.sh가 만드는 실제 소비자 레이아웃($HX_BIN/{hexa,build/,self→소스})을 재현해 테스트해야 한다. 2-layer 결함: (L1) bare release_build은 build/aprime_cc 미생성→resolve_native_cc()=\"\". (L2) raw stage_precompile_package 타르볼(dist/hexa-${TARGET}/)은 self/ 없음→resolve_hxroot()(self/main.hexa:1630)의 마커 self/native/hexa_cc.c 부재→\".\"반환→resolve_prebuilt_runtime() fallback ./build/runtime.a 부재→\"\". 둘 중 하나라도 \"\"면 own-link leg(:3587) inner if(:3590) false→무-트레이스 fall-through→C-transpile delegate(clang on .bin.c). 측정확증(aiden): env로 HEXA_APRIME_CC+HEXA_PREBUILT_RUNTIME 명시 또는 self/ 심링크(마커)만 있어도 own-link 발화(43-1,exit2). 즉 실제 ~/.hx 설치는 own-link로 감—게이트가 raw 타르볼(self/ 마커 없는)을 테스트한 fidelity 결함이 false-RED. 형제게이트(byteeq·corpus-parity·determinism)가 명시 build_aprime+env로 green이어도 실제 소비자 CLI ladder 미검증. 이 class=게이트가 실제 출고/설치 경로 아닌 privileged/incomplete env 검증→false-green(selfemit-smoke #4591·stale-runtime.a trap 동류). 마커역설: resolve_hxroot이 axis-①이 지우려는 hexa_cc.c를 마커로 씀→삭제전 중립 sentinel로 decouple 필수.", "threshold": "재발조건=self-host/own-link 기본경로를 opt-in/explicit-setup/raw-tarball 게이트로만 검증(install.sh 레이아웃 미재현). 해결=(1)release_build+stage_precompile_package (2)HARD packaging gate test -x /build/aprime_cc (3)install.sh 레이아웃 재현: staged build/ 복사+ln -s /self $HX_BIN/self(resolve_hxroot 마커)+마커 assert (4)중립cwd+HEXA_APRIME_CC/HEXA_LANG/HEXA_PREBUILT_RUNTIME 전부unset로 $HX_BIN/hexa를 default 'hexa build' census+own-link positive assert+clang-0 교차검증. Option A(게이트에 build_aprime/env 손수주입)=tune-to-green 금지—privileged env 날조.", "source": ".github/workflows/nobaseline-gate.yml" }, { "id": "release-build-1", "state": "pos-conv", "value": "pool 측정/빌드 드라이버가 툴 실제 인터페이스를 확인없이 추정→반복실패(1세션 5회 재발): (1)darwin엔 setsid/timeout 없음 (2)hexa build는 --backend/--emit 플래그 없음(hexa build -o out·Linux x86_64 native default) (3)(4)release_build는 TARGET=linux-x86_64 AND LIBS=\"-lm -ldl\" AND CC=gcc 셋 다 필수(하나씩 에러로 발견=피로 안티패턴) (5)./hexa는 wrapper→hexa.real 필요. ★정답=hand-roll 말고 검증된 하니스(state/hexa-own/l5_b4_precensus_run.sh)의 release_build invocation 그대로 복사(reference-match)", "threshold": "재발조건: pool서 새 측정/빌드 드라이버 작성(특히 야간 피로). 해결: 새로 짜지말고 최근 성공한 하니스의 build/invocation 블록을 복사· --help로 플래그/env 확인·호스트OS 프리미티브 확인·verdict-integrity로 rc≠0/CLI에러=측정경로결함(결과 아님) 격리·같은 env를 하나씩 에러로 발견 시작하면 즉시 성공 하니스 참조로 전환", "source": "tool/release_build" }, { "id": "macho-arm64-hexa-1", "state": "pos-conv", "value": "aprime --keep-global= --isolate demotes non-keeplist DEFINED globals to file-local on ELF (STB_LOCAL) but NOT on Mach-O — on darwin the imported-module globals stay N_EXT global and collide. MEASURED: axis-② map-query isolated seed (imports the runtime prelude to absorb rt_map_* delegates) → linux-x86_64 emits EXACTLY 8 globals (all else STB_LOCAL), no multidef; darwin-arm64 emits the 8 keeplist + ~87 leaked prelude globals (rt_cos/rt_regex_*/rt_pthread_*/_bt_*) → Case-B S5 ld -r multidef=95, faithful-nobaseline(darwin) RED. The Mach-O nlist writer must clear N_EXT (or set N_PEXT private-extern so ld -r/strip -x localizes) for non-keeplist defined syms, mirroring the ELF STB_LOCAL branch. VERIFICATION GAP that hid it: the seed check counted only 'hexa_map_* present == 8' (via llvm-nm on darwin, since GNU nm can't read Mach-O) — it MUST assert TOTAL globals == 8, else leaked prelude globals pass unseen until the full-archive ld -r.", "threshold": "재발=own-obj --isolate 씨앗이 ELF선 8-global no-multidef인데 darwin faithful-nobaseline/release_build서 Case-B S5 multidef=N(대량). 판정=darwin 씨앗 llvm-nm TOTAL 'T/global' count > keeplist size(x86_64는 ==keeplist). 해결=macho_arm64.hexa 심볼 emit서 non-keeplist defined 심볼을 N_EXT clear(또는 N_PEXT)로 file-local화(ELF STB_LOCAL 분기 미러). 예방=씨앗 검증은 keeplist 존재수가 아니라 TOTAL global==keeplist를 per-target(darwin=llvm-nm) 단언·flip은 3-target byteeq+shipping smoke GREEN 전 머지금지(x86-only-green 금지).", "source": "compiler/emit/macho_arm64.hexa" }, { "id": "bind-hexa-1", "state": "pos-conv", "value": "A from-scratch Fable design (self-contained no-file-access prompt) proposed 6 NEW __hx_mem_load/store_{i64,i32,f64} raw-memory leaves as a hard NEW-LEAF-FIRST prerequisite for the array typed-leaf push port — but __hx_ptr_load/store{64,32,8} (signature (ptr,offset)) ALREADY EXIST in the bind.hexa allowlist and array_core.hexa read-half already uses them. i64/i32 raw load/store needed ZERO new leaves.", "threshold": "재발조건=Fable(또는 파일접근 없는 설계)가 __hx_* leaf/intrinsic 신규 추가를 요구할 때. 해결=수용 전 반드시 grep '__hx_' compiler/check/bind.hexa 로 기존 allowlist를 census; 특히 raw-mem은 __hx_ptr_{load,store}{64,32,8}(ptr,offset)가 이미 존재. 파일접근 없는 설계의 '신규 필요' 판정은 repo 대조 전까지 미확정으로 취급.", "source": "compiler/check/bind.hexa" }, { "id": "array-core-hexa-1", "state": "pos-conv", "value": "In a native runtime seed (.hexa compiled by aprime to a runtime.a .o), plain hexa 'int' arithmetic +/*/>=/== compiles to BOXED-value helper CALLS (hexa_add_slow / hexa_mul / hexa_cmp_ge) — NOT native machine ops. A boxed result carries NaN-box tag bits, so it is WRONG when passed as a raw byte offset to __hx_ptr_load/store or stored into a raw i32/i64 field. array_core.hexa's read-half uses __hx_payload_mul/add/sub/lt/ge (inline native leaf, no boxing) for exactly this reason. Caught by a summer nm of the array_typed_leaf i64 seed draft (hexa_add_slow/mul/cmp_ge appeared in the U-floor).", "threshold": "재발조건=새 runtime seed 저작 시 offset/field/compare 산술에 평문 int 연산자 사용. 해결=값이 __hx_ptr_* offset 또는 raw 저장으로 흐르면 __hx_payload_{add,sub,mul,ge,lt,le,gt,eq,ne} 리프를 쓸 것(값이 extern C int arg로 흐르거나 그대로 raw 저장되는 스칼라만 평문 허용). 검증=aprime --emit=obj 후 nm U-floor에 hexa_add_slow/hexa_mul/hexa_cmp_* 가 보이면 boxed-arith miscompile 냄새 → __hx_payload_* 로 교체.", "source": "stdlib/runtime/array_core.hexa" }, { "id": "x86-64-linux-hexa-1", "state": "pos-conv", "value": "A stdlib/seed hexa fn with a 'float' PARAM does NOT get SSE-class (xmm0) param lowering by default — the SSE fp-ABI (double arg in xmm0/xmm1, PSABI §3.2.3) is applied ONLY to a hardcoded hxlcl_* whitelist (x86_64_linux.hexa:2560-2566: hxlcl_atof/fmod/fp_addmul/inet_pton/setvbuf/...). Every other fn uses the DEFAULT HexaVal-pair ABI (payload in GP regs). So a native seed fn like hexa_arr_f64_push(v:HexaVal, x:float) that must link against a C dispatcher hexa_arr_f64_push(HexaVal, double) — whose C callers pass the double in xmm0 — has an ABI MISMATCH (seed reads x from a GP reg, caller wrote xmm0). This is the concrete 'float-param SSE-ABI wall' (the f64 typed-leaf gate). Discovered while planning the f64 array typed-leaf unit; the Fable design assumed 'confirm hexa lowers float param to SSE' but the answer is NO-by-default.", "threshold": "재발조건=native seed/stdlib fn이 float/double param을 받아 C-ABI(xmm0) C caller와 링크해야 할 때(f64 array·future float runtime prims). 판정=x86_64_linux.hexa:2560+ fname 화이트리스트에 그 fn이 없으면 float param은 GP-payload로 내려감(xmm0 아님)→ABI mismatch. 해결=그 seed fn을 SSE-ABI 화이트리스트(x86)+arm64 등가 classifier에 등록해 float param→xmm0/d0; arm64 등가 classifier 부재면 벽(project_hexa_rfc061_hxlcl_crosstarget_abi_wall)→per-target flip(x86_64 우선). 교훈=파일접근 없는 설계의 ABI 거동 가정은 codegen classifier scope를 repo 대조 전까지 미확정(bind-hexa-1 자매).", "source": "compiler/codegen/x86_64_linux.hexa" }, { "id": "runtime-core-emit-hexa-2", "state": "pos-conv", "value": "A C-shim emitted for a runtime_core.c dispatcher that ALSO has a non-static forward prototype earlier in the file (e.g. hexa_arr_f64_push declared at the prototype block ~1135/2885) MUST be a plain non-static function, NOT 'static inline' — else clang errors 'static declaration of X follows non-static declaration' → runtime_core.o compile FAILS → runtime.a not built → a CASCADE RED across faithful-nobaseline(3-target)/selfhost-byteeq/own-link/@grace (all link runtime.a). The i64 typed-leaf unit didn't hit this (its dispatchers are direct externs, no shim); the f64 unit's double-param C-shim (needed for the float-param SSE-ABI wall, x86-64-linux-hexa-1) did. Discovered on the f64 PR-3 flip (#4922) — the OFF/byte-neutral PR-2 CI passed because the shim arm only compiles when the guard is ON.", "threshold": "재발조건=에미터에서 double/float param 디스패처용 C-shim 추가 후 flip-ON build가 'static declaration follows non-static' C 에러로 runtime.o 컴파일 실패→다수 게이트 연쇄 RED(단 OFF PR은 통과=shim arm 미컴파일). 판정=gh run log 'error: static declaration of follows non-static declaration' + 'ar: build/runtime.o: No such file'. 해결=C-shim을 'static inline' 아닌 plain non-static fn으로(앞선 non-static forward 프로토타입과 일치·단일 TU 정의). 예방=flip PR(bit-changing·guard-ON arm 컴파일)로만 노출되므로 OFF PR byteeq GREEN에 안심 금지·flip PR byteeq 필수.", "source": "self/runtime_core_emit.hexa" }, { "id": "runtime-core-emit-hexa-3", "state": "pos-conv", "value": "When a typed-leaf seed's entry-point symbol NAME collides with a PRE-EXISTING unconditional helper body already emitted into runtime_core.c, flipping the seed guard ON produces 'multiple definition of ' (seed .o vs runtime_core.o) → runtime.a link FAILS → cascade RED. The f64 unit's seed provides hexa_arr_f64_push_bits, but the emitter ALSO had an unconditional hexa_arr_f64_push_bits C body (the census #4174 mint-site bits→double→push helper, all-GPR ABI rdx=bits) — both define the symbol when F64_LEAF ON (and if it had linked, push_bits→push-shim→push_bits would infinite-recurse). Fix = guard the pre-existing unconditional body under the seed's flip macro: '#ifdef extern ; #else #endif' — extern-when-ON keeps a declaration for any downstream caller (no implicit-int) while the seed supplies the sole body; OFF path emits the body verbatim (preprocessor directives = byte-neutral, only compiled object matters for byteeq). This is the SECOND error the static→non-static shim fix (runtime-core-emit-hexa-2) exposed — a flip PR surfaces guard-ON-only errors one layer at a time; each fix can reveal the next.", "threshold": "재발조건=새 typed-leaf seed의 entry-point 이름이 runtime_core.c에 이미 있는 무조건 헬퍼 body와 같음 → flip-ON build가 'multiple definition of ' (seed .o vs runtime_core.o first defined here) → runtime.a 링크 실패 → 다수 게이트 연쇄 RED. 판정=gh run log 'multiple definition of' + '.hexa:' + 'runtime_core.o:...first defined here'. 해결=선존 무조건 body를 seed flip 매크로로 가드(#ifdef GUARD extern; #else body #endif) — ON=extern(seed 단일 body·downstream implicit-int 방지)·OFF=원본 body(전처리기라 byte-neutral). 예방=seed entry 이름 채택 전 grep 'hexa_arr__' self/runtime_core_emit.hexa로 선존 무조건 정의 확인·충돌시 가드 또는 seed 이름 고유화. flip PR은 guard-ON 에러를 한 층씩 노출 — 한 fix가 다음을 드러냄(static-shim→multiple-def).", "source": "self/runtime_core_emit.hexa" }, { "id": "array-new-leaf-hexa-1", "state": "pos-conv", "value": "시드 소스에서 평범한 연산자(a == 0)를 쓰면 BOXED slow-call(hexa_eq)로 낮춰지는데, 이게 TARGET-DEPENDENT다 — x86_64는 인라인 cmp로 접어버리지만 arm64(darwin+linux)는 실제 \"bl hexa_eq\"를 방출한다. 그래서 x86에서만 도는 regen의 cross-assemble U-floor 체크가 clean을 찍었고 arm64의 undefined를 통과시켜 darwin faithful-nobaseline 링크를 깼다(2026-07-13 #4935 1차 regen). 반드시 __hx_payload_* 리프를 쓸 것 — convergence array-core-hexa-1(plain int → boxed hexa_mul/add_slow)의 arm64-노출 판이다. 더 근본적 구멍: regen의 U-floor 검사가 크로스-어셈블러 부재 시 \"WARN … cross-assemble check skipped\"로 조용히 degrade하는 escape-hatch였다 → 어셈블러 없이 방출된 .s를 직접 파싱하는 TOOLCHAIN-FREE 스캔(call/bl 타깃 중 파일 내 미정의 심볼은 전부 ALLOWED_U여야 함)을 추가해 3타깃 무조건 강제. ALLOWED_U 정책: 허용 = HexaVal-ABI carrier(hexa_ptr_alloc·hexa_exit) + 백엔드 자체 헬퍼(hexa_bool = HexaVal hexa_bool(int), runtime_core.c:2016 — codegen이 leaf truth-test에 직접 방출하며 ABI를 통제, 배포된 모든 기존 시드가 보유). 금지 = raw libc(pair-vs-C-ABI 미스컴파일) + boxed slow-call(hexa_eq/hexa_mul/hexa_add_slow = plain 연산자를 썼다는 흔적).", "threshold": "재발조건: self/native 시드 소스에 __hx_payload_* 아닌 평범한 산술/비교 연산자를 쓸 때. 판정: 재생성된 arm64 .s에 \"bl hexa_eq\" / \"bl hexa_mul\" / \"bl hexa_add_slow\"가 등장한다 — x86 .s는 깨끗해 보이므로 절대 x86만 보고 판단하지 말 것. 게이트: regen의 toolchain-free asm 스캔이 이제 3타깃 전부에서 U-floor를 강제하므로 재발 시 regen이 exit 1로 거부한다(깨진 시드에 실제로 돌려 arm64 hexa_eq BREACH 검출 확인).", "source": "stdlib/runtime/array_new_leaf.hexa" }, { "id": "build-aprime-sh-2", "state": "pos-conv", "value": "build_aprime의 clang 오류 캡처 필터가 정작 원인 심볼명이 든 줄만 버렸다. Apple ld는 다음 3줄로 보고한다: (1) \"Undefined symbols for architecture arm64:\" (2) 들여쓴 따옴표 줄 — 여기에만 심볼명이 있다 (3) \"ld: symbol(s) not found\". 그런데 기존 필터 grep -iE \"error:|undefined\" 는 (1)과 clang의 error: 줄만 매칭하고 (2)를 흘려버린다 → CI 로그에 헤드라인만 남고 어떤 심볼이 undefined인지 알 수 없어 로그만으로 진단이 불가능하다(2026-07-13 arm64 bl hexa_eq 링크 파손 때 실제로 겪음 — 심볼명을 못 봐서 시드를 로컬에서 다시 어셈블해 nm으로 역추적해야 했다). FIX = 필터에 referenced from · symbol(s) not found · 들여쓴 따옴표 줄(^[[:space:]]+\")을 추가하고 head 를 5→20으로 확대. 컴파일/링크/스모크 3개 사이트 전부 동일 패치. 검증: 실제 Apple ld 출력 샘플로 구 필터는 심볼 줄 유실, 신 필터는 보존 확인.", "threshold": "재발조건: 빌드/링크 스크립트가 컴파일러 stderr를 grep으로 필터링해 요약할 때, 진단에 필요한 줄(심볼명·파일:줄)이 필터 패턴에 안 걸리는 경우. 판정: CI 로그에 \"Undefined symbols\" 헤드라인은 있는데 그 아래 심볼명이 없다. 규칙: 오류 요약 필터는 헤드라인이 아니라 CULPRIT을 담은 줄을 반드시 포함해야 한다 — Apple ld는 들여쓴 따옴표 줄, GNU ld는 \"undefined reference to `sym`\" 줄.", "source": "tool/build_aprime.sh" }, { "id": "alloc-syscall-arm64-s-1", "state": "pos-conv", "value": "hexa_ptr_alloc 은 이름과 달리 ARENA 다 (실측 · 이 사실 자체는 참). runtime.a 안에 정의가 둘 있고 링크에서 이기는 쪽은 alloc_syscall_native.o 이며, 그 본문[self/native/alloc_syscall_arm64.s:3148]은 bl _hexa_arena_alloc 로 arena bump-allocator 에 바로 위임한다. runtime.o 의 weak malloc 정의[self/runtime_emit_full.hexa:16465]는 링크에서 진다. 빌드 로그 확증: RT-NATIVE ALLOC-RB HEXA_RT_ALLOC_NATIVE=1 native arena path. 따라서 배열/맵 DESCRIPTOR 를 hexa_ptr_alloc 으로 잡으면 안 된다 — C 원본 주석[self/runtime_core_emit.hexa:2739]이 명시 금지한다: 배열은 프레임을 탈출하고, arena descriptor 는 rewind 후 다음 bump-alloc 에 재사용되어 len/cap/items 가 조용히 덮어써진다(실측 lever-c: diags desc len 0→15). items 버퍼는 arena-safe(escape-heapify), DESCRIPTOR 만 heap 이어야 한다. C 가 calloc 을 쓴 것은 arena 회피를 위한 의도적 방어다. → 해결: HEAP carrier hexa_heap_zalloc/alloc/realloc 신설(convergence runtime-core-emit-hexa-4). ⚠️⚠️ 인과 정정 (2026-07-14): 나는 이 사실을 근거로 \"build_aprime 의 index 7 out of bounds(len 2) = arena descriptor 오염\" 이라 판정했으나 FALSIFIED 다. 내 변경이 하나도 없는 순수 origin/main 대조군에서도 동일 증상이 재현됐고, GitHub 새 clone 에서는 같은 main 이 정상 빌드됐다. 진짜 원인은 풀 호스트 트리에 남은 stale 생성 아티팩트(내 시드 실험 잔재 · gitignore 대상이라 git checkout 이 복원/삭제 안 함)였다(convergence build-aprime-sh-3). 교훈: 사실이 참이라고 그것이 눈앞 증상의 원인인 것은 아니다. 반드시 대조군을 돌려라.", "threshold": "재발조건: 시드/런타임이 프레임을 탈출하는 객체의 descriptor 를 hexa_ptr_alloc 으로 할당할 때 → 조용한 len/cap 오염(\"index N out of bounds, len M\" 류). 해결 = hexa_heap_zalloc(heap) 사용. scratch(프레임과 함께 죽는 것)만 hexa_ptr_alloc(arena). ⚠️ 격리 드라이버 스모크는 carrier 를 malloc stub 으로 대체하므로 이 결함을 못 잡는다 — 실제 runtime.a 링크 빌드까지 가야 한다. ⚠️ 그리고 이 증상을 보면 반드시 대조군(내 변경 0 · GitHub 새 clone)을 먼저 돌려라: 같은 증상이 stale 생성물에서도 나온다.", "source": "self/native/alloc_syscall_arm64.s" }, { "id": "runtime-core-emit-hexa-4", "state": "pos-conv", "value": "HEAP 전용 pair-ABI carrier 신설(hexa_heap_alloc/zalloc/realloc). 배경: 네이티브 .s 시드는 hexa pair-ABI 로만 호출 가능한데 descriptor 를 잡을 수단이 없었다 — hexa_ptr_alloc 은 이름과 달리 ARENA(alloc_syscall_native.o 가 링크에서 이기고 bl hexa_arena_alloc 로 위임)이고, 배열 descriptor 는 프레임을 탈출하므로 arena 에 두면 rewind 후 재사용되어 len/cap 이 조용히 덮어써진다. ★설계 핵심 = STRONG(non-weak): weak 였기 때문에 arena 시드가 hexa_ptr_alloc 을 소리 없이 가로챘다. strong 이면 어떤 시드가 같은 이름을 정의하는 순간 multiple-definition 게이트가 빌드 시점에 터진다 — 조용한 교체를 구조적으로 불가능하게 만든다. ARRAY_NEW 가드 바깥에 emit 할 것(시드가 켜져도 carrier 는 남아야 함). 검증: nm runtime.a → runtime.o 에 T(strong) 3종, weak 0, 타 멤버 정의 0.", "threshold": "재발조건: 새 runtime carrier 를 weak 로 추가하거나, 네이티브 시드가 carrier 와 같은 이름을 정의할 때. 판정: nm runtime.a 로 정의 멤버가 runtime.o/runtime_core.o 가 아니거나 심볼 타입이 W/S/v 면 위험. 규칙: descriptor 클래스 할당은 반드시 hexa_heap_* (heap), 프레임과 함께 죽는 scratch 만 hexa_ptr_alloc(arena). 그리고 시드 소스는 __hx_payload_* 리프만 쓸 것(plain 연산자는 arm64 에서만 boxed slow-call 방출).", "source": "self/runtime_core_emit.hexa" }, { "id": "build-aprime-sh-3", "state": "pos-conv", "value": "gitignore 된 생성 아티팩트(self/runtime.c · self/runtime_core.c · self/runtime_hi_gen.c · self/bootstrap_compiler.c · self/native/hexa_cc.c · build/ · build/*_native.o)가 풀 호스트 warm tree 에 남으면, git checkout 으로 브랜치를 바꿔도 복원도 삭제도 되지 않아 STALE 로 계속 빌드에 섞인다. 증상은 언제나 '코드 결함'처럼 보인다. ★ 2026-07-14 같은 세션에서 세 가지 다른 얼굴로 3회 재발했다 — (1) build_aprime 트랜스파일 단계 'index 7 out of bounds (len 2)' 사망(summer). (2) 'git checkout origin/main -- .' 로 소스만 새로 덮고 생성물은 놔둔 뒤 재빌드 → clang link 'undefined reference to rt_to_int_native'. 나는 이 실패를 하마터면 내 compiler/check 변경 탓으로 결론지을 뻔했는데, 같은 트리에서 'git checkout -- .' 후 대조군을 돌리니 정상 빌드되어 내 변경 무죄가 드러났다. (3) 며칠 뒤 다시 warm tree 재빌드 시도 → 동일한 rt_to_int_native undefined 재현. GitHub 새 clone(--depth 1) 에서 같은 커밋을 빌드하니 즉시 통과. ⇒ warm-tree 재빌드는 신뢰할 수 없다. 특히 컴파일러 소스를 고친 뒤 성능/진단 A/B 를 할 때는 stale aprime_cc 바이너리까지 겹쳐 거짓 반증을 만든다(실제로 atlas 레버를 한 번 거짓 반증했다).", "threshold": "재발조건: 풀 호스트 warm tree 에서 브랜치를 바꿔가며 반복 빌드할 때(시드/에미터/컴파일러 실험 전부). 판정: 같은 커밋이 GitHub 새 clone 에서는 빌드되는데 기존 트리에서는 실패한다. 해결(우선순위 순): ① 컴파일러 A/B·재빌드는 아예 GitHub 새 clone(git clone --depth 1)에서 하라 — 이게 유일하게 반복 검증된 방법이다. ② 불가피하게 warm tree 를 쓰면 브랜치 전환 후 rm -rf build self/runtime.c self/runtime_core.c self/runtime_hi_gen.c self/bootstrap_compiler.c self/native/hexa_cc.c. ③ 'git checkout origin/main -- .' 는 소스만 덮고 생성물을 남기므로 트리를 오히려 더 섞는다 — 쓰지 마라. 규칙 3개: (1) 코드 결함을 의심하기 전에 내 변경이 0 인 대조군을 먼저 돌려라. (2) 그 대조군은 로컬 clone 이 아니라 GitHub 새 clone 이어야 한다(로컬 clone 은 origin 이 GitHub 이 아니라 엉뚱한 옛 커밋을 빌드해 거짓 확증을 준다). (3) 컴파일러 소스를 고친 뒤 A/B 할 때는 aprime_cc 바이너리 mtime > 최신 compiler/**.hexa mtime 을 강제하라.", "source": "tool/build_aprime.sh" }, { "id": "array-typed-leaf-hexa-1", "state": "pos-conv", "value": "typed-leaf(i64/f64) 시드는 결함이 세 겹이다 — 하나만 고쳐서는 SIGSEGV 가 안 사라진다. ★클래스 C (디스크립터 레이아웃) = 진짜 근인, ABI 수정으로는 원리적으로 못 고친다: C 의 HexaArrI64 는 24바이트 {int64_t* data@0; int64_t len@8; int64_t cap@16}[self/runtime_core_emit.hexa:1366-1370]로 #3352(2acf4a7f7)에서 i64 로 넓어졌는데, 시드는 그보다 한참 뒤(#4917)에 작성됐음에도 옛 16바이트/i32 레이아웃을 쓴다 — stdlib/runtime/array_typed_leaf.hexa:65 malloc(16) · :69-70 store32(a,8)/store32(a,12) · :78-79 load32(a,8)/load32(a,12). 코드젠은 len 을 +8 에서 64비트로 읽으므로[compiler/codegen/x86_64_linux.hexa:1999] len=(cap<<32)|len = 거대값 → bounds check 통과 → OOB SIGSEGV. 반대로 C-mint 배열을 시드 push 가 받으면 cap 을 +12(len 상위 32비트)에서 읽어 cap=0 → realloc(old,0)=free → UAF. 정답지는 같은 리포의 stdlib/runtime/arr_zeros_leaf.hexa:61-63 (store64 @0/@8/@16 + 32B alloc). 클래스 B (스칼라-ABI ingress/return): C 프로토타입이 스칼라를 쓴다(hexa_arr_i64_new(int cap) → cap 은 rdi 단독 · int hexa_arr_i64_len(HexaVal) → 결과는 rax 단독)는데 aprime 는 시드의 모든 파라미터를 (tag,payload) 쌍으로 낮추므로 시드가 cap 을 rsi(미초기화)에서 읽고 len 을 rdx 에 넣는다. hexa_int 도 C-ABI 스칼라라 egress 미스매치인데 sanctioned allow-list 에 들어있어 이름 게이트로는 영원히 못 잡는다. 클래스 A (raw libc egress: malloc/realloc/write) = 알려진 것. ⚠️⚠️ 반증된 내 전제 4건: (1) \"array_core 가 __hxw_ 브리지를 쓴다\" = FALSE — grep 히트는 주석이었고 그 주석은 정반대를 말한다(array_core.hexa:54-63 \"no C bridge needed for this native→native edge; the __hxseed_ bridge exists only for C-side callers\"). (2) \"typed_leaf 가 브리지를 안 쓰는 건 역사적 누락\" = FALSE, 구조적 불가 — 브리지의 #define 은 runtime_core.c 텍스트만 덮는데 typed-leaf 심볼의 호출자는 3종(runtime_core.c · gen2 가 뱉는 user.c · 네이티브 백엔드가 뱉는 raw asm call)이고 cpp 는 뒤 둘에 도달 못 한다. arena 심볼은 코드젠이 한 번도 emit 하지 않아서 브리지가 완결된 것이다. (3) \"len→0 이 SIGSEGV 근인\" = FALSE, 데드 심볼(실호출자 0). (4) \"잠복 결함\" = FALSE — stage_resolve_runtime_a:574 는 opt-OUT 만 있고 시드 .s 9개가 전부 tracked 이며 코드젠 packed 경로도 default-ON → 깨진 시드 x 깨진 레이아웃이 현재 SHIPPED DEFAULT 다. 권고안 = thunk(시드를 *_seed 로 rename + all-HexaVal 시그니처, C 가 정식 이름을 C-ABI thunk 로 소유) — 3종 호출자 전부 커버 · 코드젠/gen2/frozen-seed 편집 0 · rename 이 flag-day 가드가 된다(낡은 runtime.a = undefined symbol 로 시끄럽게 죽음, 조용한 SIGSEGV 불가). 전문 = state/hexa-own/typed_leaf_abi_layout_audit.md.", "threshold": "재발조건: (a) C 구조체 레이아웃이 넓어졌는데 그걸 미러하는 네이티브 시드가 옛 치수로 남을 때 → 시드에 store32/load32 가 보이면 즉시 의심(C 는 int64_t 다). 판정 = 시드의 alloc 바이트수와 필드 오프셋을 C typedef 와 1:1 대조. (b) C 프로토타입이 스칼라 인자/반환을 쓰는 함수를 시드로 대체할 때 → U-floor(이름 게이트)로는 원리적으로 못 잡는다. (c) .s-seed 경로에는 U-floor 검사조차 없다(own-obj 분기에만 _bad 존재) = 기본 배포 경로가 무검사. 해결 = thunk 안(rename + C-ABI 래퍼) + 레이아웃 정정(store64/24B) + carrier 치환, 셋 다 필수. 검증 = C 드라이버가 손으로 유효한 24B descriptor 를 만들어 넘긴 뒤 push/box 를 단언 + 실제 runtime.a 링크 빌드(격리 스모크는 못 잡음).", "source": "stdlib/runtime/array_typed_leaf.hexa" }, { "id": "stage-resolve-runtime-a-4", "state": "pos-conv", "value": ".s-seed 경로(기본 배포 경로)에 U-floor 게이트가 아예 없었다 — _bad 검사가 전부 own-obj(HEXA_RT_OWNOBJ) 분기에만 있었고, .s 조립 분기는 심볼 개수만 세고 undefined 를 안 봤다. 그래서 raw libc U 심볼이 무검사로 ship runtime.a 에 들어갔고, 이게 클래스-A(pair-vs-C-ABI 미스컴파일)를 통과시킨 구멍이다: aprime 는 시드의 모든 호출을 (tag,payload) 쌍으로 낮추는데 raw libc U 는 C-ABI 바디에 묶이므로 인자가 엉뚱한 레지스터로 가고 반환 포인터(rax/x0 단독)는 버려진 채 죽은 rdx/x1 쓰레기가 값이 된다(#4930 이 3타깃 전부 파손). FIX = 4개 .s 조립 사이트(ARR-I64 :630 · ARR-NEW :697 · ARR-ZEROS :757 · ARR-F64 :813) 전부에 U-floor FATAL 게이트 추가. ALLOWED = HexaVal-ABI carrier(hexa_heap_alloc/zalloc/realloc · hexa_throw · hexa_exit) + 백엔드 자체 헬퍼 hexa_bool(codegen 이 ABI 통제). 금지 = raw libc(malloc/calloc/realloc/write/exit) + hexa_int(그 자체가 C-ABI 스칼라라 pair 호출이 항상 hexa_int(0) 반환 — sanctioned allow-list 에 숨어 이름 게이트로는 영원히 안 잡혔다). 검증: 구 zeros 시드(main, raw libc)에 게이트를 돌려 calloc/malloc/write/hexa_exit 4개를 실제로 잡는 것 확인, 신 시드는 통과. 게이트 ON 상태로 summer 전체 빌드 OK.", "threshold": "재발조건: 새 RT-NATIVE 시드 가족을 stage_resolve_runtime_a 에 배선할 때 .s 조립 분기에 U-floor 검사를 안 넣으면 재발. 판정: 배포된 시드 .o 의 nm U 에 raw libc 이름이 보이면 확진(nm build/_native.o | grep \" U \"). ⚠️ U-floor(이름 게이트)로도 클래스-B(스칼라-ABI ingress/return 미스매치)는 원리적으로 못 잡는다 — 심볼 이름만 보기 때문. 그건 시드 시그니처를 all-HexaVal 로 두고 C 가 C-ABI thunk 를 소유하는 구조(convergence array-typed-leaf-hexa-1)로 막는다.", "source": "tool/stage_resolve_runtime_a" }, { "id": "seed-abi-contract-smoke-sh-1", "state": "pos-conv", "value": "시드 게이트가 전부 PROXY 를 검사했고 모든 proxy 가 거짓말했다. (1) .globl 개수 = \"4/4 export\" 인데 그 4개 바디가 miscompile 이었다. (2) nm U-floor = 이름 검사라서 클래스-A(raw libc egress)는 잡지만 클래스-B(스칼라-ABI 미스매치)와 클래스-C(구조체 레이아웃 표류)에는 구조적으로 눈이 멀었다 — 둘 다 수개월간 SHIPPED DEFAULT 였다. (3) byteeq/CI 초록 = 그 경로가 안 밟혔다는 뜻일 뿐. FIX = BEHAVIORAL 게이트: 시드를 들여다보지 말고 canonical C-ABI 엔트리로 실제 RUN 하되 반드시 REAL runtime.a 에 링크해 관측 가능한 계약을 단언한다 — descriptor 오프셋(24B/i64) · len 추적 · amortized-doubling grow 경로 · element round-trip. ★grow 경로가 가장 날카로운 칼날: 레이아웃(C)+carrier(A)+ABI(B) 가 동시에 맞아야만 살아남는다(cap 오프셋이 틀리면 realloc(old,0)=free 가 되고 직후 store 가 UAF). ⚠️격리 스모크 금지 — carrier 를 malloc stub 으로 대체하면 arena descriptor 결함을 통과시킨다(실측). ★판별력 실증(convergence nobaseline-gate-yml-1 의 false-green 함정 회피): summer GitHub 새 clone + env -u HEXA_PREBUILT_RUNTIME 에서 origin/main(깨진 시드)=rc 139 SIGSEGV · 수정 브랜치=rc 0, 22/22 PASS. 알려진 파손 트리에서 RED 를 못 띄우는 게이트는 게이트가 아니다. NOT advisory — 이 클래스를 advisory 로 둔 것이 애초에 출하를 허용한 원인이다.", "threshold": "재발조건: 새 native 시드 가족을 추가/수정할 때 behavioral 계약 게이트 없이 proxy(심볼 개수·U-floor·byteeq)만으로 판정하면 재발. 규칙: 시드는 반드시 (a) canonical C-ABI 엔트리로 실행하고 (b) REAL runtime.a 에 링크하며(stub 금지) (c) grow/realloc 경로를 포함한 관측 계약을 단언해야 한다. 그리고 새 게이트는 반드시 알려진 파손 트리에서 RED 가 뜨는 것을 실증하라 — 안 그러면 false-green 게이트를 하나 더 만드는 것이다.", "source": "tool/seed_abi_contract_smoke.sh" }, { "id": "ownlink-strict-census-sh-1", "state": "pos-conv", "value": "own-link default-ON(#4882/#4902) + 게이트 초록 이 \"clang 이 사라졌다\"를 증명하지 않는다. 두 가지 이유: (1) 게이트 코퍼스가 장난감이다 — cfallback_zero_census/ownlink_corpus_parity 가 컴파일하는 것은 21줄 이하 · use 0개짜리 5~6개(실측: array.hexa 21줄 use=0 · loop.hexa 19줄 use=0 · main.hexa 9줄 use=0). 실제 프로그램은 import-closure(flatten)를 먼저 타는데 own-link 가 그 경로에서 측정된 적이 한 번도 없다. (2) 폴백 사다리가 조용하다 — own-link 실패 시 HEXA_RUN_NATIVE_TRACE=1 일 때만 로그를 남기고 tier-B(ld) → C-transpile delegate(clang) 로 낙하한다(self/main.hexa cmd_build/cmd_run). 못 다루는 프로그램은 소리 없이 clang 으로 되돌아가고 아무도 세지 않는다. release-integrity 관점에선 이 안전망이 옳지만, axis-①(hexa_cc.c 삭제)의 DONE 판정은 \"이 사다리가 절대 안 밟힌다\"는 증거를 요구하고 현재 그 증거는 5-프로그램짜리다. FIX = HEXA_OWNLINK_STRICT=1 fail-closed 모드(폴백을 ERROR 로) + 실제 프로그램 코퍼스 census. 이 수치가 axis-① 제거 가부의 유일한 정량 근거다.", "threshold": "재발조건: self-host/own-link 의 default-flip 을 장난감 코퍼스 게이트의 초록만으로 \"DONE\" 판정할 때. 판정: 게이트가 컴파일하는 프로그램의 use(import) 개수와 줄수를 세라 — use=0 이면 flatten 경로를 안 탄 것이다. 규칙: 폴백이 조용한 시스템에서는 \"초록\"이 \"폴백 0\" 을 뜻하지 않는다. fail-closed 모드로 실제 코퍼스를 돌려 폴백률을 실수치로 낼 것. ⚠️ tool/release_build 는 TARGET(darwin-arm64|linux-x86_64|linux-arm64) + CC + LIBS 를 요구한다 — 미설정 시 즉시 실패한다.", "source": "tool/ownlink_strict_census.sh" }, { "id": "ownlink-strict-census-sh-2", "state": "pos-conv", "value": "census 가 rc(proxy)만 보고 artifact 를 안 봐서 컴파일 실패를 \"own-link 성공\"으로 셌다. 실측(aiden 2026-07-14): tool/compile.hexa 와 tool/ai_native_profile.hexa 를 \"own-link ✅\"로 집계했는데 둘 다 HX2001 undefined name 으로 컴파일 실패했고 바이너리가 안 나왔다. 즉 폴백률 표의 5개 표본 중 2개가 무효였다 — 그것도 우리에게 유리한 방향으로 틀렸다. ★이 세션 내내 \"proxy 게이트가 거짓말한다\"(seed_abi_contract_smoke-sh-1)를 비판해놓고 내가 만든 게이트가 같은 함정을 밟았다. FIX = rc==0 AND [ -x \"$out\" ] 를 둘 다 요구 + rc=0-without-binary 를 NO-BINARY 로 별도 집계 + HX 진단 코드를 출력. 그리고 hx.hexa 의 \"300초 컴파일 타임아웃\"도 컴파일 벽이 아니라 죽은 소스였다: tool/hx.hexa:63 이 use \"tool/raw_audit\" 인데 tool/raw_audit.hexa 가 없다(커밋 87dda7427 \"consumer cascade\" 가 놓침) → module_loader FATAL → flatten 산출물 0 → self/main.hexa 의 \"falling back to raw src\" 경로로 import 미해결 raw 740줄이 컴파일러에 들어간 것이 300초의 정체. hx.hexa 는 삭제된 audit_append/ssot_fingerprint 를 14회 사용하며 대체 구현이 repo 어디에도 없다 = 패키지 매니저 엔트리가 컴파일 불가 상태(별건 버그).", "threshold": "재발조건: 빌드/컴파일 census 나 게이트를 만들 때 종료코드만 보고 성공을 집계하면 재발. 규칙: 빌드 판정은 반드시 ARTIFACT 존재를 요구하라(rc==0 AND 산출물 실재). rc=0 인데 산출물이 없으면 그것 자체가 별도 결함 카테고리다. 그리고 컴파일 시간 이상치를 만나면 먼저 그 소스가 컴파일 가능한지(모듈 해소가 되는지) 확인하라 — 죽은 import 는 flatten 실패 → raw fallback → 병리적 컴파일로 위장한다.", "source": "tool/ownlink_strict_census.sh" }, { "id": "main-hexa-1", "state": "pos-conv", "value": "atlas embed(17k 노드)를 소비자 없이 로드하는 것만으로 컴파일 wall 의 56% 를 태우고 있었다. atlas 의 유일한 최종 소비자는 citation_check 이고 그것은 if strict_citations 안에 있으며 strict_citations 는 기본 false 다(--strict-citations / HEXA_STRICT_CITATIONS=1 로 opt-in). resolve()/lower() 는 AtlasIndex 를 파라미터로 받아 하위로 전달만 하고 조회하지 않는다 — obj 경로가 이미 empty_atlas_index() 로 그 둘을 돌리며 byteeq GREEN 인 것이 그 증거다. 그런데 기본 경로(exec)는 embed 를 만들고 값을 치른 뒤 아무도 안 쓰고 버렸다. ★실측(aiden · 재빌드된 aprime_cc · 같은 --emit=exec · atlas 만 토글 · tool/aot_cc_select.hexa flatten 7638 LOC): EAGER wall 237,282ms(atlas_load 20,506ms · codegen 78,213ms) vs LAZY wall 103,292ms(atlas_load 0 · codegen 15,319ms) → wall -56%, codegen 5.1배. 바이너리 byte-identical(cmp). 메커니즘: atlas_load 이후의 모든 phase 가 일률적으로 4~5배 느려지고 그 앞의 lex/parse 는 무변화 — perf 상 실행의 38.7% 가 hexa_arena_rewind + __blk_set_used + __blk_next(arena 블록리스트 선형 스캔)이다. 17k 노드(~120k 할당)가 블록 수를 영구히 부풀려 함수 스코프 teardown 마다 그 리스트를 훑는 비용이 곱해진다. FIX = emit_kind 가 아니라 CONSUMER 로 게이트: strict_citations 일 때만 _load_atlas(). HEXA_ATLAS_EAGER=1 로 옛 동작 복구(bisect 용). ⚠️함정: aprime_cc 를 재빌드하지 않으면 stale 바이너리로 측정해 \"차이 없음\"이라는 거짓 반증이 나온다(내가 실제로 겪음 — 04:05 빌드 vs 06:48 수정).", "threshold": "재발조건: 컴파일러가 대형 정적 데이터(atlas embed 류)를 소비자 유무와 무관하게 상주시킬 때. 판정: 그 데이터 로드 phase 이후의 모든 phase 가 일률적으로 N배 느려지고 그 앞 phase 는 무변화면 arena/할당자 상주 세금이다. 규칙: 대형 embed 는 emit-kind 가 아니라 CONSUMER 로 게이트하라. 그리고 컴파일러 소스를 고친 뒤 성능 A/B 를 할 때는 반드시 aprime_cc 재빌드를 확인하라(ls -la build/aprime_cc 의 mtime vs 소스 mtime) — stale 바이너리는 거짓 반증을 만든다.", "source": "compiler/main.hexa" }, { "id": "bind-hexa-2", "state": "pos-conv", "value": "builtin 이름을 체커 게이트(bind.hexa::_bind_builtin_names 또는 types.hexa::_is_builtin_method)에 추가하는 것은 절반의 작업이다. 세 surface 가 builtin 집합을 독립적으로 이름 짓는다: ① 체커 게이트(bind/types) ② codegen 매핑(arm64_darwin.hexa::_builtin_runtime_sym) ③ C-ABI leaf(x86_64_linux.hexa::_is_cabi). ①만 채우고 ②를 빼면 매핑 fallthrough 가 bare 심볼을 방출하고 hexa_ld 의 dyn-census 가 그걸 libc-floor UND 로 오분류해 dynamic 라우팅 → 런타임 SIGBUS/rc127. 즉 실패모드가 '컴파일 거부(HX2001)' 에서 '컴파일 통과 후 실행 중 SIGBUS' 로 악화된다. 2026-07-14 실측(#4947): pristine main 의 컴파일러가 자기 리포에 체크인된 stdlib farr 파일을 거부하는 진짜 선재결함(bind.hexa 에 farr_* 32명 미등록 → 140 HX2001 → S3 자체가 안 돎)을 고치려 bind.hexa 에 32개를 추가했는데 arm64_darwin.hexa 의 farr 매핑은 0건이었고(grep 실측) symcensus-lint 가 PR 을 RED 로 막았다. 매핑 정답지 = 레거시 C-transpile 레지스트리 self/codegen.hexa:9358+, 런타임 실제 export = hexa_farr_* (aiden nm -g runtime.a: T hexa_farr_zeros/get/free) → 언어이름 farr_X 는 심볼 hexa_farr_X 로 매핑된다. 이름을 발명하지 말고 레거시 레지스트리에서 1:1 로 베낄 것.", "threshold": "재발조건: bind.hexa 의 _bind_builtin_names 또는 types.hexa 의 _is_builtin_method 에 새 이름을 추가할 때. 판정: symcensus-lint(tool/symcensus_lint.sh · guard C-1) RED — 집합 단언 (whitelist ∪ bind_gate) − (mapped ∪ _is_cabi ∪ special-op ∪ exemption) = ∅ 을 빌드 없이 소스만으로 증명하므로 cloud-CI 에서 즉시 돈다. 해결: 체커 게이트 추가와 codegen 매핑(_builtin_runtime_sym)을 같은 변경에서 함께 하라. 심볼명은 발명 금지 — (a) self/codegen.hexa 레거시 레지스트리에서 1:1 로 읽고 (b) 확신 없으면 pool 에서 nm -g runtime.a 로 실재 확인. ⛔ tool/symcensus_exempt.txt 에 넣어 린트를 초록으로 만드는 것 금지(escape hatch · SIGBUS 는 그대로 남음). 면제는 intrinsic/interp-only/CUDA-gated leaf 전용이며 심볼마다 근거 필수.", "source": "compiler/check/bind.hexa" }, { "id": "main-hexa-2", "state": "pos-conv", "value": "★own-link default-ON(#4902)이 rc=0 으로 '성공'하면서 **startup 에 SIGSEGV 하는 바이너리**를 낳았고, byteeq·ownlink-determinism·ownlink-corpus-parity(#4881)·shipping smoke 가 **전부 GREEN 인 채 통과**시켰다. 2026-07-14 실측(#4952): GitHub 새 clone 으로 부모 커밋을 빌드하면 4개 빌드구성 × 2개 호스트(aiden·summer) 전부에서 동일 SEGV 재현. `./hexa build tool/stdlib_selftest_aggregate.hexa` 가 'OK: built (native own-link, own-start — no clang, no ld)' 로 rc=0 인데 실행 즉시 Segmentation fault rc=139, 출력 0바이트, execve 1개(자식 0개). strace 폴트: mmap(NULL, 0, 0x400000, MAP_SHARED_VALIDATE, 34, 0) = -1 EBADF — 의도한 mmap(NULL, 4194304, 3, 0x22, -1, 0) 대비 **2번 인자부터 레지스터가 한 칸씩 밀렸다**(선두에 tag 레지스터 1개 초과 = **pair-ABI ↔ C-ABI 스큐**). 반환된 -1/NULL 을 무검사로 베이스에 써서 mov %r8,(%rax,%rsi,8) 가 rax=NULL 로 저장 → SIGSEGV si_addr=NULL. ★왜 아무 게이트도 못 잡았나(구조적 · 이게 핵심): (1) own-link 는 **실패가 아니라 조용한 오염**이다 — rc=0 이라 self/main.hexa 의 안전망('ANY own-link failure STILL falls through to tier-B ld')이 **영영 호출되지 않는다**. (2) 플립 근거였던 byteeq/corpus-parity 는 **링커의 방출 바이트와 exit code** 를 비교할 뿐 **링크된 바이너리의 런타임 거동**을 재지 않는다. ⇒ rc==0 · test -x · 심볼 존재 · 바이트 동일성은 **behavior 를 대신하지 못한다**. behavioral 게이트(같은 트리·커밋·바이너리, env 하나만 차이): own-link default → rc=139 출력 0줄 / HEXA_OWNLINK_DEFAULT=0 → aggregate 정상 기동 found=94 pass=86 + jsonl 기록. 조치 = #4902 승격 철회, own-link 를 opt-in(HEXA_OWNLINK_DEFAULT=1)으로 강등(cmd_build self/main.hexa:3623 + cmd_run :4763 lockstep). polarity 영구반전이 아니라 **shipping smoke 를 통과 못 한 승격의 철회**이며, 경로는 플래그로 살아 있어 axis-③ 작업은 계속된다. ★부수: 이 SIGSEGV 를 나는 처음에 #4947(farr bind 등록) 탓으로 오진해 revert PR(#4951)까지 올렸다 — 그러나 tool/stdlib_selftest_aggregate.hexa 는 farr_* 를 **한 번도 호출하지 않는다**. advisory 게이트의 RED 를 main 파손으로 오독한 것이 오진의 출발점이었다.", "threshold": "재발조건: 링커/코드젠/런타임의 default-ON 플립을 byteeq·심볼·exit-code 게이트만으로 승격할 때. 판정: 게이트가 전부 GREEN 인데 실제 산출 바이너리를 **실행**해 보면 죽는다. 해결(재-default-ON 의 게이트): ①**링크된 바이너리를 실제로 실행하는 behavioral smoke** 를 플립의 필수 게이트로 만들어라 — 'rc=0 으로 빌드됐다' 가 아니라 '그 바이너리가 돌고 올바른 출력을 낸다'. 최소 셋: hello-world 실행 + 실제 도구(tool/stdlib_selftest_aggregate.hexa) 기동 + 출력 라인수 검사. ②rc=0 인데 산출물이 오염되는 경로는 fallback 안전망이 **구조적으로 도달 불가**하다 — 안전망을 rc 가 아니라 **산출물 검증**에 걸어라. ③재현은 반드시 **GitHub 새 clone + 캐시 비움 + env 무설정**(러너와 동일)으로 — warm tree 나 env 설정이 있으면 거짓 초록이 난다. ④ABI 스큐 의심 시 strace 로 syscall 인자를 보라 — 인자가 한 칸씩 밀려 있으면 pair-ABI↔C-ABI 스큐다(이 리포의 고질 결함계열). ★잔여: 스큐의 정확한 방출 file:line 미확정 — 그것이 own-link 재-default-ON 의 선결이다.", "source": "self/main.hexa" }, { "id": "elf-x86-64-hexa-3", "state": "pos-conv", "source": "compiler/emit/elf_x86_64.hexa", "value": "★own-link 의 FLOOR-NAME ALIAS(compiler/emit/elf_x86_64.hexa:2476 · A0)가 bare libc-floor UND `` 를 own 바디 `hxlcl_` 에 alias 하는데, 그 대상 바디의 자격 검사가 **두 층 모두** 필요하다. 【층1 · #4954】 **STB_LOCAL 바디에 alias 금지.** LOCAL 심볼의 ABI 는 private — static 함수는 internal-linkage 라 C 컴파일러가 호출규약을 합법적으로 재작성한다(IPA constant-arg elimination). 실측: clang 이 hxlcl_mmap 의 오브젝트-내 호출부 2곳이 전부 addr=NULL·off=0 을 넘기는 것을 보고 그 두 인자를 지운 4-인자 바디를 방출했고, hxlcl_shim.o 의 U mmap(6-인자)을 own-link 가 거기 묶어 인자가 한 칸씩 밀렸다 → mmap(NULL,0,0x400000,3,34,0)=-1 EBADF → 무검사 NULL 저장 → SIGSEGV si_addr=NULL. ld 가 멀쩡했던 이유 = ELF 규칙상 STB_LOCAL 정의는 다른 오브젝트의 UND 를 만족시킬 수 없다 → mmap@plt 바인딩. 【층2 · A0-b】 **GLOBAL 은 필요조건이지 충분조건이 아니다 — libc 썽크 바디에도 alias 금지.** hxlcl_shim.o 는 GLOBAL `hxlcl_` 래퍼를 들고 있는데 그 바디가 문자 그대로 `endbr64 ; jmp ` — **진짜 libc `` 로 가는 tail-call** 이고 `` 를 UND 로 유지한다. 거기에 `` 를 alias 하면 그 바디 자신의 tail-call reloc 이 **자기 자신으로 되돌아온다** → `jmp $-9` **무한 self-loop**, 그리고 alias 로 얻는 staticness 도 0 이다(그 바디는 libc-free 가 아니다). 실측: popen 자식이 dup2(4,1) 을 부르면 hxlcl_dup2 가 자기 자신으로 점프 → 33% CPU 로 영원히 스핀, execve 도달 못 함, 부모는 ppoll/wait4 드레인에서 블록 → 빌드 'OK', 바이너리 HANG(rc=124), 출력 0바이트. TEST = 정의 오브젝트가 `` 를 여전히 UNDEFINED 로 나열하면 그 alias 가 기대는 'own, libc-free body' 전제가 거짓이다 → alias 거부, ld 처럼 libc 로 dyn-route. 진짜 own 바디(raw syscall / 손으로 쓴 native leaf)는 그런 UND 를 안 들고 있어 영향 없다. 【★층1 이 층3 을 깨웠다 — 수정이 잠복결함을 노출시키는 클래스】 #4954(층1) 이전에는 LOCAL alias 때문에 센서스가 전부 DEFINED 로 보아 n_dyn=0 → STATIC 경로 → crt_handoff=0 → init_stub=1 이었다. 층1 을 고치자 7개 심볼이 libc 로 라우팅되어 n_dyn>0 → PT_INTERP → crt_handoff=1 → **init_stub=0** 이 되었고, reloc 루프의 data-arm 술어 `(site_seg==6 && init_stub)` 가 dyn 경로에서 FALSE 로 떨어져 **site_seg==6(.init_array) reloc 이 else=TEXT 패치 팔로 흘러내렸다** — r.offset 은 .init_array 안의 오프셋(0/8/16)인데 base 는 그 오브젝트의 .text 베이스 → **.text 첫 8×N 바이트를 8B 절대 ctor vaddr 로 덮어쓴다**(elf_x86_64.hexa:2972). 실측 바이트(0x433c37=hexa_drain_env_ms): ctor 포인터 3개가 정확히 24B 를 덮고 25번째부터 원본 일치 → call 이 포인터 테이블 한복판에 착지 → 데이터를 코드로 실행 → `mov %ecx,0x44(%rbp)`, rbp=3 → **SIGSEGV si_addr=0x47**. ★behavioral 사다리(같은 트리·같은 소비자 경로·링커 수정만 다름): #4954 as merged = rc=139 SIGSEGV 0바이트 / +E9-GATE = rc=124 HANG / +E9-GATE+A0-b = **rc=1 found=94 107줄** ✅. FIX 바이트증명: broken 의 ctor 포인터가 fixed 에서 ld 프롤로그와 동일해지고 cmp -l = 32바이트만 차이(덮인 24B + call 변위).", "threshold": "재발조건: own-link/hexa_ld 가 심볼을 alias 하거나 UND 를 정의에 바인딩할 때. 판정: own-link 바이너리만 죽거나 행(hang)하고 ld 바이너리는 정상이면 alias 표를 의심하라. alias 대상 바디는 **두 조건을 모두** 만족해야 한다: ①**STB_GLOBAL** 이어야 한다(nm 소문자 t/d = LOCAL = 금지; LOCAL 의 ABI 는 private). ②그 정의 오브젝트가 **`` 를 UND 로 들고 있지 않아야** 한다(들고 있으면 그 바디는 libc 썽크 `endbr64; jmp ` 이고, alias 하면 자기참조 무한루프 + staticness 이득 0). ★**alias/링크 규칙을 고치면 링크 shape 가 static↔dyn 으로 바뀔 수 있고, 그러면 그 shape 에서만 살아있던 잠복결함이 깨어난다.** 특히 init_stub/crt_handoff 로 갈리는 분기를 전수 점검하라 — reloc 루프의 site_seg 술어가 dyn 경로에서 data-site 를 **skip 하지 않고 text 팔로 흘려보내면** .text 를 덮어쓴다(convergence elf-x86-64-hexa-2 가 '.init_array 는 dyn 에서 INERT — region 물질화와 E9 reloc write 를 **둘 다** init_stub 에 게이트하라' 고 이미 적어두었는데, 코드는 region 물질화만 게이트했고 reloc write 는 'data-site 가 아니다' 술어로만 표현되어 skip 이 아니라 text 로 흘러내렸다 — 규율은 맞았고 구현이 반쪽이었다). ★검증은 반드시 **behavioral**: 링크된 바이너리를 **실행**하라(tool/ownlink_behavioral_smoke). byteeq/corpus-parity 는 **링커의 방출 바이트**만 비교하고, corpus parity 의 코퍼스는 장난감 5개라 hxheap 의 mmap 경로(>HXHEAP_SMALL_MAX 4096B)를 한 번도 안 탄다 → 이 결함 클래스에 구조적으로 눈이 멀었다. ★소비자 레이아웃을 재현하라: aprime_cc 를 빠뜨리면 own-link leg 가 조용히 fall-through 해서 C-transpile(clang) 경로를 측정하게 된다 = 거짓 초록(convergence nobaseline-gate-yml-1)." }, { "id": "stdlib-selftest-gate-yml-1", "state": "pos-conv", "source": ".github/workflows/stdlib-selftest-gate.yml", "value": "★CI 게이트가 RED 일 때 required 인지 advisory 인지는 추측하거나 이름으로 판별하지 말고 **브랜치 보호를 직접 조회하라**: gh api repos///branches/main/protection --jq '.required_status_checks.contexts[]?'. 이 리포의 답은 **selfhost-gates-summary 단 하나**다. 나머지(stdlib selftest · static-types corpus · nobaseline · selfhost-byteeq-real · cfallback-zero census · own-link determinism/parity · seed-ABI contract …)는 전부 advisory 이고 그 RED 는 머지 블로커가 아니다. 2026-07-14 나는 이걸 안 하고 오진 연쇄를 만들었다: ① stdlib-selftest-gate 의 RED 를 'main 파손' 으로 오독했다 (그 워크플로 헤더 3번째 줄에 'ADVISORY ONLY — NOT a required branch-protection check' 라고 적혀 있는데 안 읽었다). ② 커밋-이분(686fcd1 SUCCESS → 6a18880 FAILURE)만 보고 #4947 을 범인으로 지목했다. ③ 그 판정으로 무고한 #4944(L3)를 범인으로 몰아 4가지 조사를 지시했다 — 소스 확인 결과 그 코드는 전부 정확했다. ④ 정당한 #4947 을 revert 하는 PR #4951 을 올렸다. ⑤ 그런데 revert 에서도 같은 SIGSEGV 가 났다 → 판정 반증 → PR 닫음. ⑥ 그 뒤에도 advisory 이름을 워처 필터에 하나씩 추가하는 술래잡기를 4번 반복했다. **브랜치 보호를 한 번 조회했으면 처음부터 끝났다.** ★진짜 근인은 따로 있었다(#4952/#4954): own-link default-ON 이 rc=0 으로 '성공' 하면서 startup SIGSEGV 바이너리를 낳고 있었고, #4947 과도 farr 와도 무관했다 — tool/stdlib_selftest_aggregate.hexa 는 farr_* 를 한 번도 호출하지 않는다.", "threshold": "재발조건: CI 체크가 RED 이고 그것이 머지 블로커인지 판단해야 할 때. **첫 행동(다른 무엇보다 먼저)**: gh api repos///branches/main/protection --jq '.required_status_checks.contexts[]?' 로 필수 체크 목록을 조회하라. 그 목록에 없으면 advisory 이고 머지 블로커가 아니다 — advisory 이름을 워처 필터에 하나씩 추가하는 술래잡기를 하지 마라. 판정 순서: ① 필수 목록 조회 → ② 그 체크만 보고 머지 판단 → ③ advisory RED 는 별건으로 분리(gh run list --workflow 로 다른 브랜치도 RED 인지 확인; 여러 브랜치에서 동시에 빨가면 선재 결함이지 특정 PR 탓이 아니다) → ④ advisory 게이트는 캐시/환경 오염으로도 뒤집히므로 커밋-이분만으로 인과 단정 금지. ★워처 규칙: CANCELLED 는 FAILURE 가 아니라 pending 으로 취급하라(내가 취소한 run 을 필수-RED 로 오분류했다). ★revert 를 만들 때는 '**revert 로도 RED 면 내 판정이 틀린 것**' 판별조건을 반드시 심어라 — 이번에 그게 잘못된 머지를 막았다. ★머지 직전 현재 HEAD sha 의 체크를 headSha 로 대조하라(stale-green). ★대조군은 반드시 같은 베이스여야 한다." }, { "id": "action-yml-2", "state": "pos-conv", "source": ".github/actions/pick-runner/action.yml", "value": "pick-runner 의 fallback 은 러너가 **ONLINE 인지만** 본다 — busy 여부도, 좀비 워커도 보지 않는다. 그래서 self-hosted 러너가 살아는 있는데 좀비 Runner.Worker 가 슬롯을 물고 있으면 job 이 self-hosted 로 라우팅된 뒤 **큐에서 무한정 갇힌다**. 주석이 약속하는 'pool-offline 이면 절대 wedge 안 된다' 는 offline 만 커버하고 **busy-지만-일-안-함** 상태는 못 잡는다. 2026-07-14 실측: revert PR 의 필수 체크가 1시간 넘게 QUEUED 였는데, 원인은 코드가 아니라 aiden 의 Runner.Worker 가 616초째 살아있으면서 자식 빌드 프로세스가 **하나도 없는** 좀비였던 것(ps -eo etimes,cmd 로 확인: Worker 는 있는데 clang/cc1/aprime 자식 0). GitHub API 는 그 러너를 busy=true 로 보고했고, 다른 PR 20개의 run 을 취소해도 슬롯이 풀리지 않았다. 좀비 Worker 를 PID-타깃 kill(SIGTERM→SIGKILL)하자 Listener 가 즉시 새 Worker 를 띄워 큐를 다시 잡았다.", "threshold": "재발조건: self-hosted 러너를 쓰는 gate 의 job 이 오래 QUEUED 인데 그 리포의 활성 run 은 몇 개 안 될 때. 판정: (1) gh api repos//actions/runners 로 busy=true 인데 (2) 해당 호스트에서 ps -eo etimes,cmd | grep Runner.Worker 는 있는데 실제 빌드 자식(clang/cc1/aprime/make)이 **0** 이면 좀비다. 해결: 그 Worker 를 **PID 타깃**으로 kill -TERM → (안 죽으면) -KILL. ⚠️ pkill -f 는 절대 금지 — 자기 SSH 세션을 죽인다. Listener 가 살아있으면 새 Worker 를 자동으로 띄운다. 예방(후보): pick-runner 가 ONLINE 뿐 아니라 busy 시간/큐 길이를 보고 stale-busy 면 github-hosted 로 fallback. ★우선순위: main 이 RED 인 동안 revert PR 은 다른 모든 job 보다 우선한다 — 큐가 막히면 다른 run 을 취소해서라도 복구 경로를 뚫어라." }, { "id": "action-yml-3", "state": "pos-conv", "value": "self-hosted 러너 호스트가 **디스크 포화로 마비**되면 sshd 까지 죽어 원격 수리가 불가능해지고, 그런데도 GitHub Actions 는 그 러너를 한동안 online 으로 캐시해 job 을 계속 배정한다 → 그 job 들이 전부 RED 를 양산한다. 2026-07-15 실측(summer-b650m-k): df / = **1GiB free** → ccache-setup 의 디스크 가드(#4931)가 'runner out of disk (1GiB free) — refusing the ccache restore' 로 fail-fast(가드는 정확히 제 일을 했다 — ENOSPC 중간사망으로 인한 phantom RED 를 막았다). 그러나 러너가 계속 job 을 잡아 main 의 nobaseline-gate 가 RED 였고, 나는 그것을 하마터면 **내 게이트(own-link behavioral smoke)의 결함으로 오진**할 뻔했다. 네트워크 진단으로 확정: ping 0% loss(호스트 살아있음) · tailscale active · **SSH 포트 22 무응답**(sshd 마비) · GitHub API 는 status=online 으로 캐시(실제로는 offline). aiden 은 같은 시각 254G free 로 건강 → 내 임시 트리(/tmp/bs 등 1.4G)는 원인이 아니었다. ★조치: 원격 셸이 죽었으므로 소프트웨어로 고칠 수 없다. 유일한 레버는 **GitHub 러너 등록을 제거**하는 것(gh api -X DELETE repos///actions/runners/) — hexa-build 라벨을 aiden 과 공유하므로 제거하면 job 이 aiden 으로만 간다. 되돌릴 수 있다(호스트 복구 후 재등록). ⚠️호스트 자체의 복구는 물리적 접근이 필요하다(콘솔/전원).", "threshold": "재발조건: CI 가 self-hosted 러너에서 RED 인데 그 실패가 코드/게이트 결함처럼 보일 때. **판정 순서(코드를 의심하기 전에)**: ①실패 로그에서 'out of disk' / ENOSPC / 'refusing the ccache restore' 를 찾아라 — 있으면 인프라다(infra-wall-noneval: 평가 verdict 에서 격리). ② 로 호스트 도달성 확인 — '도달 불가' 면 인프라 확정. ③GitHub API 의 status=online 을 믿지 마라(캐시된다) — ping + 로 sshd 생존을 직접 확인하라. ping 은 되는데 22 가 죽었으면 디스크/OOM 마비다. 해결: ①즉시 그 러너의 GitHub 등록을 제거해 RED 양산을 멈춰라(job 이 건강한 러너로 간다). ②실패한 run 을 재실행해 **진짜 결과**를 얻어라. ③호스트 복구는 물리 접근(원격 셸이 죽었으므로) — 사용자에게 명시적으로 알려라. ★예방 후보: pick-runner 가 ONLINE 뿐 아니라 **디스크 여유**를 프로브해 floor 미만이면 github-hosted 로 fallback (현재는 ONLINE 만 본다 — 좀비 워커 사례 action-yml-2 와 같은 클래스: GitHub 이 건강하다고 보는데 실제론 못 쓰는 러너).", "source": ".github/actions/pick-runner/action.yml" }, { "id": "build-aprime-sh-4", "state": "pos-conv", "value": "build_aprime.sh 산출 runtime.a 가 release_build 산출과 다른 형태 → ctor 3개(_hexa_init_stdio=setvbuf+SIGPIPE무시·_hexa_init_mem_cap·_hexa_init_malloc_tuning) 조용히 소실. 근인=HEXA_RT_MULTIOBJ(stage_resolve_runtime_a:2198 기본:-0 로 형태 분기 · release_build:77 export=1 로 runtime_core.o 별도멤버 유지=멤버25·.init_array32B·ctor4개 · build_aprime 은 export 누락→기본0=단일TU=runtime_core.o 미생성=멤버16·8B·ctor1개). 결과: 그 runtime.a 링크 바이너리가 SIGPIPE 기본동작(파이프소비자즉사)+setvbuf없음+mem_cap/malloc미적용. ld/own-link 공통이라 RUN-parity 게이트 무력. own-link env()버그(#4959) 추적중 이 ctor드롭을 '링커회귀'로 오진유발. fix=build_aprime STAGE-0 에 export HEXA_RT_MULTIOBJ=${HEXA_RT_MULTIOBJ:-1}(release_build 미러). 실증(aiden fresh clone): runtime.a 멤버24·runtime_core.o있음·stdio-ctor정의됨+aprime_cc smoke exit42 PASS. PR#4962. 오답처방=stage_reresolve_runtime_a 호출(#4961)=확정no-op(reresolve 는 HEXA_RT_MAP_QUERY_RERESOLVE!=1 self-skip·형태는 MULTIOBJ 결정).", "threshold": "재발조건: runtime.a 생성 경로가 release_build 의 env 계약(HEXA_RT_MULTIOBJ=1)을 미러 안할 때. 판정: 같은 커밋에서 두 경로 산출 runtime.a 를 ar t|grep runtime_core.o 비교(한쪽만 있으면 분기). ★격리트리 필수: 같은 트리 순차/동시빌드는 build/runtime.a 서로 덮어씀(ar rcs in-place·삭제코드 없음)→'runtime_core.o 있다/없다' 뒤집혀보임(2026-07-15 3회 오염). 규칙: 형태 before/after 는 fresh clone 2개(각 빌드전용)·ctor 존재는 nm 실물아카이브(소스 아님). ★구조취약점 잔존: ctor 생존이 'runtime.o 가 우연히 runtime_core.o 심볼 UND'에 매달림→향후 own-obj 플립이 마지막 UND 걷어가면 출하(MULTIOBJ=1)도 runtime_core.o dead member 화→ctor 소리없이 드롭(내구정답=ctor 를 항상링크 runtime.o TU 로 이동).", "source": "tool/build_aprime.sh" }, { "id": "cloud-rent-attribution-label", "state": "in_flight", "value": "hexa cloud rent 는 pod 을 provider 라벨(vast --label / runpod --name)에 WHICH agent · WHICH project · WHICH purpose 를 force-stamp 하는 fail-closed 게이트를 통과해야만 생성한다(별도 jsonl 신설 없음 — provider 라벨이 attribution SSOT). _rent_require_attribution(cloud_cli.hexa) 이 offer-search 前에 --agent(env HEXA_CLOUD_AGENT 폴백) + --project(git repo 또는 flag) + --desc/--purpose 를 검사; 하나라도 결측이면 exit 2 로 아무것도 만들지 않는다(CLOUD-RENT-COST-TRAP 의 fail-loud-before-provider-call 정합). 라벨=_agent_project_purpose_label 슬러그(agent-project-purpose·≤60자·예 claude7-hexa-lang-r12-gold-harvest). 기존 silent 폴백(@unattributed·unspecified·hexa-cloud) 은 rent 경로에서 제거. escape hatch 없음(--force/--label 우회 불가·no-escape-hatch). dft_dispatch 자율 fan-out 은 강제 대신 best-effort 정적 스탬프(dft-dispatch-hexa-lang). --agent 는 _rent_flag_arity 에 arity-2 등록(안 하면 unknown-flag refusal 이 먼저 거부).", "threshold": "byteeq 3-target GREEN (cloud_commands.hexa 는 self/ import → byteeq-relevant) + stdlib selftest @ci_gate(rent_attribution_gate_test·cloud_project_purpose_test) GREEN", "source": "stdlib/cloud/cloud_cli.hexa · cloud_commands.hexa · dft_dispatch.hexa · rent_attribution_gate_test.hexa" }, { "id": "x86-fold-regression-isq2pi-verdict-md-1", "state": "in-prog", "value": "x86_64 faithful-nobaseline fold RED 근인=컴파일타임 float-리터럴 상수-fold가 naive 파서(832) 사용, 런타임 파스체인은 correct(833). probe2 실증(같은 x86 바이너리): __hx_f64_bits(리터럴)=…832 vs to_float(런타임string)=…833. isq2pi=0.39894228040143267794(GELU-bwd 유일 hard-round 상수)만 발현. x86 codegen은 naive fold값 o.float_val 신뢰, arm codegen은 emit때 to_float(text) 재파스로 우연히 correct. 반증: FMA-contraction·long-double(x87)·EXACT-tier·런타임 네이티브파스 전부. self-host seed-skew. advisory 게이트(required=selfhost-gates-summary·byteeq-3-target과 별개).", "threshold": "fix=컴파일러 바이너리 컴파일타임 float-fold를 correct 파서로(seed-skew 해소) 또는 x86 codegen emit-재파스", "source": "state/hexa-own/x86_fold_regression_isq2pi_verdict.md" }, { "id": "frontier-5lane-round1-complete-1", "state": "completed", "value": "5-LANE 프론티어 round-1 완료(2026-07-16) — 5 레인 flip/완료 PR 전부 머지: L1 #4970(axis-③ own-link behavioral smoke gate·선행 default-flip #4882)·L2 #4971(axis-② SYSLEAF native default-ON)·L3 #4972(axis-② array_new 3-target .s carrier)·L4 #4964(static-typing HEXA_ARRAY_ELEM_INFER default-ON·boxed-HexaVal 언박싱 rung-1)·L5 #4975(HX3060 borrowck loop-reinit FP 475→0·프로듀서 birth/detach pm KILL·default-ON flip byteeq-neutral). 각 flip byteeq 3-target GREEN. ★verdict-integrity 교훈: self-hosted CI RED을 보면 infra/회귀 가설 前에 그 체크가 origin/main HEAD에서도 fail인지 먼저 확인. #4975서 cfallback-zero census(x86_64) RED을 aiden 09:30 리부트前 오염 infra로 오진→rerun --failed 했으나 attempt-2(clean aiden)도 재현 FAIL→main HEAD(f0c1a894)도 동일 failure=axis-③ own-link default-flip 트래커의 상속-RED(L5 borrowck와 무관·L5는 byteeq-neutral). 상속-RED는 무시 대상. 머지 판정=byteeq 3-target GREEN + 필수게이트(selfhost-gates-summary) GREEN + 잔여 RED 전부 main-상속.", "threshold": "5/5 레인 flip PR 머지 + 각 byteeq 3-target GREEN. 프론티어는 perpetual — 다음 rung=각 레인 심화(axis-① hexa_cc delegate 삭제 soak·axis-② runtime.c RFC061 ~210fn·axis-③ arm64/darwin own-linker·L4 추가언박싱·L5 B4 GC-free).", "source": "PR #4970/#4971/#4972/#4964/#4975 · frontier ref #2 · cfallback census main-대조 f0c1a894" }, { "id": "action-yml-4", "state": "pos-conv", "value": "ccache-setup 액션은 모든 무거운 잡(nobaseline/selfhost/determinism/miscompile/release)의 단일 통과점인데, `apt-get install ccache` 를 `set -euo pipefail` 아래서 실행해 **transient apt-mirror 장애가 잡 전체를 죽였다**. 2026-07-16 실측: faithful-nobaseline (linux-arm64) 이 `E: Failed to fetch http://ports.ubuntu.com/.../libhiredis .../ccache_4.9.1 ... Network is unreachable ... exit 100` 로 RED — ubuntu-24.04-arm 클라우드 러너의 apt 미러 일시 단절. 이 때문에 byteeq 로는 GREEN 인 PR(#4979/#4984 arm64 레그)이 가짜 RED. 그러나 ccache 는 **컴파일 가속기일 뿐**(미스는 재컴파일일 뿐 emitted/linked 바이트 불변 — 액션 자신의 BYTEEQ-SAFETY 헤더) → 설치는 best-effort 여야 한다. FIX: apt fetch 3회 retry(5/10/15s backoff) 후에도 실패하면 uncached 빌드로 fall-through(기존 `no apt-get` warning 경로와 동일), `set -e`-die 금지. action-yml-1 의 디스크 헤드룸/CCACHE_MAXSIZE 가드와 **직교**(그건 그대로) — 같은 클래스: ccache-setup 의 인프라벽(디스크·네트워크)은 결코 byteeq verdict 를 죽이지 않는다.", "threshold": "재발조건: self-hosted 아닌 클라우드 러너(ubuntu-*-arm/macos)의 byteeq 잡이 apt/brew 의존성 fetch 로 RED. 판정: gh run view --log-failed | grep -iE 'Failed to fetch|Network is unreachable|Could not resolve|exit code 100' — 있으면 apt-미러 transient(infra-wall-noneval, 격리). base 가 최신(behind=0)인데 3타깃 중 한 클라우드 타깃만 RED 이고 실패가 의존성-설치 스텝이면 인프라 확정. 해결: ①rerun --failed(대개 해소) ②원인이 재발성이면 그 설치 스텝을 best-effort(retry+fallback)로 만들어라 — 필수가 아닌 가속기/부수도구(ccache 등)는 미설치가 잡을 죽이면 안 된다. ★예방: 모든 byteeq 잡의 비필수 의존성 설치는 retry+degrade 패턴. 필수 툴체인(clang/ar 등)은 fail-fast 유지(그건 진짜 결함).", "source": ".github/actions/ccache-setup/action.yml" }, { "id": "action-yml-5", "state": "pos-conv", "value": "darwin self-host 게이트 4개(determinism·miscompile-zero·selfhost byte-eq gen3→4·codegen-guard, darwin-arm64)가 ghost-selfhost 러너에서 ccache-setup 디스크가드로 fail-fast('runner out of disk (0GiB free) — refusing the ccache restore') → 3 PR(#4979/#4983/#4984) 전부 동일 RED. 2026-07-17 read-only 프로브로 확정: ghost(ghostui-MacBookAir·개인머신·pool 차단)의 df / = 926Gi 중 238Mi avail(99% full)인데 **actions-runner CI 풋프린트는 사소**(_work 1.1G + ccache 712M + ~/.hx 338M ≈ 2.1GB) — 나머지 914GB는 소유자 개인 데이터(공유 APFS 컨테이너). ★결론: CI 캐시를 전부 비워도 floor(15GiB) 근처도 못 가므로 **CI-side/canonical-repo로 복구 불가** — action-yml-3의 '디스크 회수' remedy가 ghost엔 owner-only(개인 데이터 정리 or 전용 darwin 러너 프로비저닝 필요). 디스크가드·apt-best-effort(#4985)는 정상 — 이건 repo 결함 아니라 host 상태. darwin BYTEEQ 충실성은 별도로 macos-15 CLOUD의 faithful-nobaseline에서 GREEN이라, 이 self-host suite RED은 infra-wall-noneval 격리(byteeq-neutral PR는 회귀불가·필수게이트 selfhost-gates-summary는 PASS·이 4개는 non-required).", "threshold": "재발조건: darwin self-host 게이트가 3 PR 전부 동일 RED이고 base 최신. 판정(코드 의심 전): gh run view --log-failed | grep -i 'out of disk\\|refusing the ccache restore' — 있으면 ghost disk-full(infra). ghost는 pool 차단(개인머신)이라 sidecar pool on 불가·SIDECAR_POOL_ALLOW=ghost는 read-only 프로브(df/du)까지만·개인 데이터 삭제 금지. CI 풋프린트(~2GB)는 15GiB floor에 못 미치므로 **CI-side 해결 불가 = owner가 ghost 디스크 비우거나 전용 darwin 러너 프로비저닝**. 그동안 머지: 필수게이트(selfhost-gates-summary)+3-target faithful(darwin은 macos-15 cloud)+byteeq-real GREEN이면 self-host suite RED 격리하고 진행(byteeq-neutral 변경 한정). ★예방: darwin self-host 게이트를 단일 개인머신 ghost에 고정하지 말고 여유디스크 있는 전용 러너로.", "source": ".github/actions/ccache-setup/action.yml" }, { "id": "hir-to-mir-hexa-1", "state": "pos-conv", "value": "char_code(s)/ord(s) are 1-arg SOURCE builtins but the runtime hexa_char_code(str,index) is 2-arg. The C-transpile leg synthesised the constant index-0 arg (self/codegen.hexa:9338); the NATIVE generic named-call path did NOT, so char_code(s) emitted a 1-arg call and the runtime read a garbage 2nd HexaVal(index) register → returned 0. arm64 hand-injected index only for ord (not char_code); x86_64 for neither. MEASURED: char_code('1')=0 (want 49), stdlib-selftest-gate 4 cloud + 2 codec-timeout fail. FIX(#5005): hir_to_mir call-lowering intercept — callee char_code/ord with exactly 1 arg → synthesise literal_int 0 as 2nd arg + re-lower, so BOTH backends emit hexa_char_code(s,0). Result: gate 89/4/2 → 95/0/0. This real x86 miscompile was MASKED for weeks by a shared ~/.hexa-cache fossil false-red (fixed in #5004); it was twice misdiagnosed as #4947. Root-cause walk that cracked it: verdict-integrity (gcc AND clang both fail = not a host-CC artifact) → FLAG-BISECT on one HEAD build (env-toggle each default-ON flip, immune to cache contamination — falsified 4 codegen levers) → FAULT-SPLIT (print intermediate values: char_code=0 but len/substring correct) → MICRO-SPLIT (char_code vs working char_code_at).", "threshold": "A source builtin whose SOURCE arity differs from its runtime-symbol arity (implicit synthesised arg) is lowered through the native generic named-call path without per-builtin arg synthesis. Detect: the builtin returns a constant/garbage (0) while a sibling with matching arity works; the C-transpile leg has an explicit N-arg synthesis the native path lacks. Prevent: synthesise implicit args at HIR call-lowering (backend-agnostic), not per-backend. Also: bisecting an N-default-ON-flip window with shared ccache/runtime.a lands on wrong (even docs) commits — use flag-bisect on one build instead.", "source": "compiler/lower/hir_to_mir.hexa" }, { "id": "stdlib-selftest-gate-yml-2", "state": "🟢 POS-CONV", "value": "stdlib-selftest-gate(advisory) RED을 코드결함으로 오독 말 것 — 2026-07-18 근인은 ⓐ Gate-스텝 CC-parity 버그 + ⓑ 러너 실부하였고 내 flip(#5013~15)은 완전 무죄였다. 판정 경로: (1) 회귀 테스트가 내 변경과 무관함을 소스로 증명 — thompson_test·cloud_reap_dead·hash160·ripemd160 전부 panic/void/nil 0건 → #5013~15 desugar(리터럴 text-gated)와 MIR 바이트-동일. (2) 실패 모드 판독 — '.c tmp 방출 + no host C compiler found'는 native-emit 미커버 construct가 C-transpile delegate로 fallback했는데 Gate 스텝이 Build 스텝과 달리 CC=clang을 안 물려줘서 난 hard-fail. clang은 러너에 설치돼 있다(which clang=/usr/bin/clang) — 부재가 아니라 env-힌트 갭. (3) timeout 3건은 부하 신호 — aiden load average=18.00(anima h9770 669%·anima_py 371%·train 99.6% 점유·전부 내 세션 아님)서 중량 native-emit(regex NFA·crypto)이 per-test timeout 초과. clean 러너 대조(00:14 b2f72521 pre-flip)=95/95 GREEN 0-timeout. ★picker(ci_pick_runner.sh)는 GitHub 러너 busy-status만 본다 — aiden 러너는 GH-job 없어 busy=false지만 머신은 anima로 포화. picker의 busy-awareness는 머신 실부하를 못 본다(이게 과거 byteeq 기아 #4535류의 근본이기도). fix=Gate 스텝 CC:clang(Build parity·#5016) — native-emit 커버리지는 별도 게이트(nobaseline byteeq·selfemit smoke·cfallback-zero census)가 추적하므로 마스킹 아님.", "threshold": "재발조건: stdlib-selftest-gate(또는 임의 CI 게이트)가 RED이고 내 변경 탓인지 판단해야 할 때. 판정 순서(stdlib-selftest-gate-yml-1의 '먼저 브랜치 보호 조회'에 이어): ① required인지 조회(gh api .../branches/main/protection) — advisory면 머지 블로커 아님. ② 회귀한 테스트가 내 변경과 코드-레벨로 무관한지 소스로 증명(grep으로 내 변경이 건드리는 심볼/리터럴 사용 여부) — 무관하면 flip-독립, verdict-integrity상 격리. ③ 실패 메시지 정독 — 'no host C compiler found'는 컴파일러 부재가 아니라 CC env 미전달일 수 있다(which clang으로 물리적 존재 확인). ④ timeout은 러너 실부하 의심 — 온라인 러너 load average를 sidecar pool on 'uptime'로 확인(GH busy-status는 머신 부하를 안 보여줌). ⑤ 대조군은 반드시 같은 워크플로의 clean-runner GREEN run(pre-변경 베이스). ★Gate/Build 스텝 env 비대칭(한쪽만 CC/HEXA_* 세팅)은 부하-지연時에만 드러나는 flaky 원인이다.", "source": ".github/workflows/stdlib-selftest-gate.yml · tool/ci_pick_runner.sh · #5016" }, { "id": "ci-pick-runner-sh-2", "state": "🟢 POS-CONV", "value": "picker(tool/ci_pick_runner.sh)의 busy-awareness는 GitHub runner의 busy(=GH-job 실행중)만 본다 — 머신 실부하(loadavg)는 blind다. 2026-07-18 실측: aiden 러너가 anima(h9770) Python 실험으로 loadavg 17/12c인데 GH-job은 없어 busy=false→picker가 idle로 오판, heavy byteeq/stdlib-selftest 잡을 aiden으로 라우팅→native-emit이 crawling해 timeout/starvation(byteeq 과거 QUEUED 무기한 + stdlib 1hr+ stuck, 둘 다 이 blindness). ★fix=자기보고 load-gating 라벨 hexa-ready: tool/runner_load_toggle.sh(cron 1분·각 linux 빌더 상주·free=nproc−loadavg5·히스테리시스 FREE_LOW=3/FREE_HIGH=6로 flap 억제·loadavg5로 자기빌드 스파이크 무시·fail-OPEN=에러時 라벨 불변)가 과부하 빌더서 hexa-ready를 DELETE, healthy時 POST(라벨 관리는 github.transfer_pat=administration:write). picker는 hexa-ready를 linux want_labels(probe)+sh_label(emit runs-on) **둘 다**에 필수로 승격 — probe에만 넣으면 GitHub이 emit된 라벨셋(hexa-ready無) 근거로 label-lacking 과부하 러너에 여전히 배정하므로 advisory에 그침; 둘 다 넣어야 authoritative. fail-safe=모든 빌더가 hexa-ready drop(전부 포화)→probe 0 매치→터미널 cloud ubuntu-latest fallback(=pool-offline과 동일 기존 안전경로)로 스필오버=순수 추가용량·게이트 항상 실행가능·wedge 불가. 실측 배포검증: summer free=7≥6→ADD, aiden free=−5→제외(no change). 관련 [[ci-pick-runner-sh-1]](slot-free 잡=cloud 직결)과 보완적 — 그건 slot-free 잡을 picker 우회, 이건 self-hosted를 쓰는 heavy(slot-dependent 포함) 잡에 load-awareness 추가.", "threshold": "재발조건: self-hosted CI 러너가 non-GitHub work(anima 등)로 과부하인데 GitHub busy=false로 idle 오판돼 heavy 잡이 그 러너로 라우팅→starve/timeout. 진단: (1)runners API의 busy는 머신 loadavg를 안 보여준다→sidecar pool on 'uptime'로 실부하 직접 확인, (2)둘 다 busy=True인데 job이 recent(progressing)면 라우팅 아닌 throughput 한계. fix 유지(신 linux 빌더 추가時 필수): 새 빌더에 tool/runner_load_toggle.sh + ~/.runner-load-toggle.env(RUNNER_LABEL_TOKEN admin:write PAT·RUNNER_NAME 러너명 substring) + cron 1분 배포 — 안 하면 hexa-ready 없어 picker가 그 빌더를 절대 안 쓴다(전량 summer/cloud). 롤아웃 순서 불변: 토글러+라벨 먼저→picker PR(역순이면 일시 전량-cloud). 순수 N-빌더 용량천장(전부 legit busy)은 이 레버로 못 고침→3번째 빌더 or leg③ busy時 cloud-선호 플립 필요(별도 결정).", "source": "tool/ci_pick_runner.sh · tool/runner_load_toggle.sh" }, { "id": "l4-freefn-len-stamp-1", "state": "pos-conv", "value": "L4 unbox round-2 — free-fn builtin `len(x)→i64` 스탬프 구현(branch feat/l4-freefn-builtin-len-stamp). 측정=summer census @b2f725216 최대 단일 UNSTAMPED int-producer(free-fn `len` ident-callee 1475·method 93 압도). ★재사용 학습=builtin-vs-user disambiguation 비대칭: (a)CHECKER(_types_check_call)는 TypeEnv 존재→user `fn len`은 fn-kind로 등록, builtin은 미등록(empty callee_t)→env 자체가 disambiguator라 census 불요, `_types_builtin_free_ret` SSOT를 method arm(s.len())과 동일 always-on static-types 레인(_types_static_on)에 대칭 배선(동일 i64·동일 sink→corpus-clean 중립 상속). (b)LOWERING(ast_to_hir)은 main.hexa가 RAW-AST를 TypeEnv 없이 lower→callee.typ 미해결이라 census 필수: per-module binder-name Set(64-bucket FNV)로 `len`이 어디든 바인딩되면 disable(coarse=safety-pin, mis-stamp 불가·miss만 가능). census는 bind.hexa `_bind_walk_expr`+`_bind_pattern` 전 binder 폼 미러(top-level·fn param·Let·For·Try catch-var·Closure param·Match 패턴 ident/enum-payload/struct-field nested)—하나라도 누락시 flip-time false-stamp=self-host 손상, default-OFF 머지선 byte-neutral. sub-flag HEXA_UNBOX_HIR_CALLTYPE_FREE default-OFF·census flag-ON에서만 prime/read(OFF byte·perf중립). Call arm else-if는 t.kind==\"?\" 가드 하→user-fn 스탬프 미덮음. DefId엔 builtin 마커 필드 없음(builtin callee.def==unresolved sentinel 동일)→def·name-only 판별 금지(rank-1 DEAD).", "threshold": "머지 게이트=byteeq-3target OFF-path byte-neutral(sub-flag OFF·census 미prime·PR CI 권위). checker always-on 배선 중립=method arm(s.len()→i64) corpus-clean 증거 상속(동일 값·동일 sink)—PR CI byteeq가 확인, RED시 checker 배선 철회. flip PR(default-ON) 게이트=byteeq-3target+nvptx+behavioral(full suite+ship smoke+running gen-chain 전 config)+A/B census 델타(≈−1475 ident:len·타 이동 0). ★byteeq는 det miscompile 미검출(gen3≡gen4 동일오염 통과)→flip은 behavioral 필수. 재발조건=census binder-폼 누락 or checker/lowering 테이블 drift(둘은 미러—types.hexa _types_builtin_free_ret가 SSOT). 설계 SSOT=state/static-types/l4_freefn_builtin_stamp_design.md.", "source": "compiler/lower/ast_to_hir.hexa · compiler/check/types.hexa" }, { "id": "l4-freefn-calltype-flip-1", "state": "pos-conv", "value": "L4 unbox round-2 R2 FLIP — HEXA_UNBOX_HIR_CALLTYPE_FREE default-ON(opt-out =0). #5024(len-stamp 구현)+#5025(bind-hook census-perf 근인수정 byte-neutral)에 이어 default-ON 전환(branch feat/l4-freefn-calltype-flip). 게이트: byteeq-3target+nvptx GREEN(flip-ON self-host 바이트동일 fixpoint) + #5025 XCHECK MIRROR-CLEAN(shadow==census mismatch=0 summer 실측·behavioral 증명 대행) + A/B census 델타 ≈−1475 ident:len. 단일소스 플립(_hir_free_calltype_enabled env!=0)·코멘트 3곳 lockstep.", "threshold": "", "source": "l4-freefn-calltype-flip" }, { "id": "ci-dispatch-snapshot-hexaready-wedge-1", "state": "pos-conv", "value": "nobaseline-gate linux heavy jobs pin runs-on to [self-hosted,Linux,X64,hexa-build,hexa-ready] at dispatch snapshot time; if the runner loses the load-gated hexa-ready label after dispatch (anima load rises), the queued job waits forever on a now-nonexistent hexa-ready runner. ci_pick_runner.sh fail-open only protects at dispatch time, not against mid-queue label loss. FIX (reusable): gh run cancel + gh run rerun → dispatch re-snapshots with 0 hexa-ready → fail-open emits ubuntu-latest → jobs complete on free github-hosted runners. Detected on #5025 (queued ~1h) + verified clean on #5026 (dispatch fail-opened, no wedge). Durable-fix candidate: emit a busy_label/fallback for linux like the darwin-any path already does for busy-runner snapshot pinning.", "threshold": "", "source": "ci-dispatch-snapshot-hexaready-wedge" } ] }, "columns": [ { "key": "name", "label": "name", "tree": true }, { "key": "role", "label": "role" }, { "key": "id", "label": "id" }, { "key": "detail", "label": "detail" } ], "tree": { "name": "hexa-lang", "role": "self-hosted native .hexa compiler (no LLVM) + hx package manager + embedded atlas theorem dictionary", "id": "hexa-lang", "detail": "", "children": [ { "name": "Overview", "role": "", "id": "overview", "detail": "", "children": [ { "name": "`hexa-lang` is a self-hosted native compiler for the `.hexa` language, shipped with the `hx` package manager. There is **no LLVM anywhere in the toolchain**. ", "role": "", "id": "overview-hexa-lang-is-a-self-hosted-native-compiler-for-the-hexa-lang", "detail": "" }, { "name": "The self-host backend lowers source directly through its own IR to native objects (ELF64 / Mach-O arm64) and links them with its own linker (`hexa_ld`); this native-emit path is a proven byte-identical fixpoint (`gen3 ≡ gen4`) and is the default for `--emit`. ", "role": "", "id": "overview-the-self-host-backend-lowers-source-directly-through-its-own", "detail": "" }, { "name": "Two pieces of C still remain — see Self-host status for the honest accounting: a C-transpile **fallback delegate** still serves some full `hexa build`/`run` flows until the native end-to-end path lands, and a ~5.5k-LOC **C runtime substrate** (the libc/syscall bootstrap floor, generated ", "role": "", "id": "overview-two-pieces-of-c-still-remain-see-self-host-status-for-the-ho", "detail": "" }, { "name": "from `.hexa` emitter SSOTs) is compiled and linked into every binary. ", "role": "", "id": "overview-from-hexa-emitter-ssots-is-compiled-and-linked-into-every-bi", "detail": "" }, { "name": "This substrate is **reducible**: a 2026-06-16 falsification (`.verdicts/zeroc-breakthrough/`) showed ~50% of `runtime_core.c` is pure-algorithm code portable to `.hexa` today (a `.hexa` `hexa_fnv1a` is byte-identical to the C one), the syscall layer is `@asm`-svc eliminable, and the ", "role": "", "id": "overview-this-substrate-is-reducible-a-2026-06-16-falsification-verdi", "detail": "" }, { "name": "libm transcendentals = **ELIMINATED from the default ship (2026-07-01, #4299-4318 + #4314 -lm removal, faithful-nobaseline 3-target GREEN)** — first full libc-family dropped: all math routed to native `_hx_*` (fdlibm/musl/hw-sqrtsd) + a weak native libm-compat layer provides the libm ABI so any raw call links with no `-lm`. **The shim syscall family is likewise ELIMINATED (2026-07-01, #4320-4328 svc-remainder front CLOSED, faithful-nobaseline 3-target GREEN)** — 8 syscalls (clock_gettime·getrusage·fcntl·mkdirat·pipe2·newfstatat·openat·ppoll) routed from libc to raw-svc (x86_64 `syscall` insn / arm64 `svc 0`, arm64 uses the `*at`/`2` variants; darwin keeps the libc delegate via `#else`). A further 8 fs/time syscalls (nanosleep·getcwd·unlink→unlinkat·fstat·stat→newfstatat·mkdir→mkdirat·rename→renameat) were routed libc→raw-svc this session (#4330-4336, per-PR nm-UND delta measured, faithful-nobaseline 3-target GREEN), closing the reducible fs/time syscall front. Genuine residual = a **measured WALL-only floor** (2026-07-03, HEAD 654cbb5e + FRAG-REGEN sentinel-fix, summer clang-18): with every zero-c lever ON (HEXA_ZEROC_FRAG_REGEN=1 restore + -DHEXA_RT_SIGSYS_SVC -DHEXA_RT_DROP_MALLOPT -DHEXA_ZEROC_OWN_MKTEMP -DHEXA_ZEROC_RAND_NATIVE -DHEXA_ZEROC_PROC_SC0_RAW -DHEXA_ZEROC_SIGSET_NATIVE) the runtime.a nm-UND libc floor = **15 U, exactly the sanctioned WALL set**: __libc_calloc/__libc_free (transitive) · atexit/environ (CRT) · dlopen/dlsym/dlerror (FFI) · fgets (FILE*) · glob/globfree (fnmatch fidelity) · qsort (tie-order) · regcomp/regexec/regfree (ERE oracle) · strtod (IEEE oracle) — reducible remainder 0 (state/zeroc-floor-census-2026-07-03.md + state/zeroc-flip-measure-2026-07-03.txt 측정#2). All levers are default-OFF byte-neutral; the default-ON flip is gated on byteeq 3-target + faithful-nobaseline + install smoke GREEN. zero-`.c` is thus a **converged campaign at its measured WALL floor**, not a policy that accepts C permanently. **UPDATE 2026-07-05 — the WALL set is SHRINKING (several 'walls' were measurement/harness artifacts, not scientific ceilings):** `__libc_free` flipped default-ON (#4554, seed-consume, floor 237→236, byteeq 3-target GREEN) + `__libc_calloc` flipped (#4556 prereq-a seeds + #4558 flip, 236→235, byteeq GREEN); the enabling darwin-multidef root-cause was the whole-module seed demotion missing the Mach-O `.private_extern` strip (convergence regen-hxlcl-free-native-s-sh-1). A CI byteeq **path-gap** was found+fixed (#4558): the byte-eq gates only path-filtered self/**|compiler/**, so a runtime.a-composition change made purely in tool/stage_resolve_runtime_a escaped byteeq — now the 6 gates also trigger on the build-path scripts (convergence selfhost-byteeq-gate-yml-1). A break-walls research campaign (web-research answer-key from musl/glibc/jemalloc/mimalloc/rustc/C23) then **FALSIFIED both remaining 'hard' walls as BREAKABLE** (state/zeroc-wall-break/synthesis-2026-07-05.md): **strcmp** was NOT a frozen-static wall — its RT-NATIVE-STRCMP block was LIVE-EMIT (the #4489 faithful-CI empty-emit class); migrating it to frozen seed-consume like free/calloc breaks it, and strcmp is pure-integer AAPCS64 so 3-TARGET bakeable (prereq-a in flight). **realloc** was NOT CRT-sanctioned-blocked — the wall is a provider/consumer header mismatch (native realloc reads a p-16 header the DEFAULT shim malloc never writes); the F1 fix makes the shim malloc write the 16B header (a one-line CRT-malloc wrapper the routec_cabi_smoke harness already proves green), no libc-startup contact. In-flight: str-leaf prereq-a batch (strncmp/strchr/strstr/strdup, #4564-4567) + strcmp prereq-a (#4568), all DEFAULT-OFF byteeq-neutral; the flips drop each from the nm floor (−1 each). Deferred sweeteners (post-flip): word-at-a-time strcmp, realloc F4 tail-grow (pool-measured), F2 sized-realloc intrinsic (16B header tax fleet-wide removal). strcmp🧱/realloc🧱 are thus RE-OPENED (breakable), not terminal. **UPDATE 2026-07-07 — two more WALL families DROPPED (session flips, all measured):** **strtod** flipped to native default-ON (#4651): the native hex/inf/nan tail (rt_str_parse_float_hexinfnan) matches glibc strtod BIT-EXACT (T_mis=0, aiden n=140,678) after 3 measured accuracy rounds — #4639 x86_64 cmp wide-imm codegen fix, #4645 4-family reference-match (underflow RNE + optional-p hex + nan-payload base-0/saturation + \\v\\f ws), #4646 nan(0x..) hex-prefix off-by-one; faithful-nobaseline 3-target nm-DROP strtod. **atexit/environ/__libc_start_main** DROPPED by FLIP-7 own-start default-ON (#4656, bit-changing, byteeq 3-target re-converged + darwin byte-identical + faithful 3-target DROP): mechanism = atexit#4409 + environ ELF alias#4631 + ship-shape nm-clean gate#4634 + _start probes#4638/#4652 + environ-ctor compile-out#4657 + grace-consent consumer-link probe. So the sanctioned WALL set has shrunk from 15U: strtod (IEEE oracle) + atexit/environ (CRT) are no longer floor. Remaining ceiling reframed by the user-standing SELF-HOST DONE CRITERION (CLAUDE.md #4659): DONE = no hexa_cc.c + no runtime.c + no clang; the endgame DAG (state/hexa-own/selfhost_done_criterion_dag_fable.md) shows ③ no-clang needs an own x86_64/ELF object-writer + own ELF linker (hexa_ld is Mach-O arm64 only today; darwin-arm64 is the sole zero-clang path). **UPDATE 2026-07-07b — the DONE-criterion 3-axis campaign opened on ALL THREE axes with measured rounds (16 PRs):** **Axis ① (no hexa_cc.c):** HEXA_BUILD_NATIVE leg-B cold path added to `hexa build` (#4664) — reuses cmd_run's aprime --emit=obj + ld recipe so a build lowers native with 0 hexat/clang, C-transpile fallback intact; aiden measurement CONFIRMED the arm fires (build-native trace) but the leg-B crt-drop was unconditional — root-caused + fixed to nm-probe the resolved runtime.a for own _start (#4674, crt-keep verified on aiden), the clean 0-execve end-to-end still gated on a matched (non-stale) runtime.a. **Axis ② (no runtime.c):** the strcmp non-shim callers (the last non-sanctioned reducible leaf per the 07-06 SSOT reconcile — the 15U WALL is stale, fgets/qsort/glob/regex all already default-ON, seed-flip surface EXHAUSTED) routed to native hxlcl_strcmp via a caller gate (#4667) then flipped default-ON coupled to the RT-NATIVE-STRCMP seed adoption (#4679, faithful-nobaseline 3-target + selfhost-byteeq-real GREEN = strcmp nm-UND DROP). **Axis ③ (no clang):** the biggest track opened — x86_64-linux --emit=obj flipped to the already-wired native ELF writer, killing the last `as` fork on the linux native-emit path (#4676, selfhost-byteeq-real GREEN proves the x86_64 encoder is byte-stable / encode-miss==0 through the self-host fixpoint); --linker=hexa wired for darwin-arm64 to link via the in-tree tool/hexa_ld.hexa instead of ld64+xcrun (#4677); darwin `--emit=exec` routed through the native Mach-O writer to kill the exec-path `as` fork (#4681, DRAFT byteeq). §3.1 de-hardcoded the native cold-path triple/crt/dynamic-linker off `uname -sm` so aarch64-linux also engages (#4668). **Also landed:** strtod-tail native flip already noted above; a regex OFF-vs-ON parity corpus harness (#4670, 1:1 verbatim port of the OFF-path libc bodies — surfaced + fixed a REAL OFF-path hexa_regex_replace zero-width-at-EOS underflow segfault, #4678). **Honest walls named:** axis-③ round-3 track B (`hexa build` DX → hexa_ld) is BLOCKED — hexa_ld links Mach-O .o only, not the runtime.a archive; the hexa_ld corpus gap-log census (track C) is the round-4 maturity measurement. The methodology: a clean-origin/main-worktree Workflow + adversarial-verify pipeline (conv-1) producing implementation-ready specs, each round measure->root-cause->fix under verdict-integrity/infra-wall discipline.", "role": "", "id": "overview-genuine-residual-is-only-libm-transcendentals-gpu-ffi-so-zer", "detail": "" }, { "name": "Its defining feature is an embedded **atlas** — a ~4.2 MB theorem dictionary (P primitives / C constants / L laws / E errors) baked statically into the binary. ", "role": "", "id": "overview-its-defining-feature-is-an-embedded-atlas-a-4-2-mb-theorem-d", "detail": "" }, { "name": "Every formula-bearing function must either cite an atlas law (`@cite(L[id])`), carry an active `@verify`, or declare an explicit `@grace`; otherwise the build refuses to produce a binary (stage S8, fatal `HX8004`). ", "role": "", "id": "overview-every-formula-bearing-function-must-either-cite-an-atlas-law", "detail": "" }, { "name": "Enforcement happens at the **build gate**, not at runtime — the atlas adds 0 ms of runtime cost.", "role": "", "id": "overview-enforcement-happens-at-the-build-gate-not-at-runtime-the-atl", "detail": "" }, { "name": "The compiler runs eight ordered strict-lint stages (S0 parse → S1 resolve → S2 bind → S3 type → S4 domain → S5 units → S6 equational `@verify` → S7 proof `@prove` → S8 citation). A binary appears only when every fatal stage passes. ", "role": "", "id": "overview-the-compiler-runs-eight-ordered-strict-lint-stages-s0-parse", "detail": "" }, { "name": "After the gate, source is lowered HIR → MIR (SSA) → LIR and emitted per target. The compiler is self-hosting: the compiler that builds `.hexa` is itself written in `.hexa` (`self/`).", "role": "", "id": "overview-after-the-gate-source-is-lowered-hir-mir-ssa-lir-and-emitted", "detail": "" } ] }, { "name": "Self-host status", "role": "", "id": "self-host-status", "detail": "Honest accounting of where self-hosting actually stands (no overclaim — `git log` + the `.verdicts/` tree are the evidence):", "children": [ { "name": "table: Layer / State / Evidence", "role": "", "id": "self-host-status-table-layer-state-evidence", "detail": "", "children": [ { "name": "Native-emit backend (own IR → Mach-O / ELF, no LLVM)", "role": "", "id": "self-host-status-table-layer-state-evidence-native-emit-backend-own-ir-mach-o-el", "detail": "State: ✅ byte-identical fixpoint `gen3 ≡ gen4` · Evidence: `.verdicts/.../N5-FIXPOINT-ACHIEVED`, `tool/selfhost_byteeq_gate.sh`" }, { "name": "Default toolchain promotion (`--emit` → native gen3)", "role": "", "id": "self-host-status-table-layer-state-evidence-default-toolchain-promotion-emit-nat", "detail": "State: ✅ flipped + persisted across `hx install` · Evidence: `tool/promote_selfhost.sh`, marker `~/.hx/.selfhost-default`" }, { "name": "Multi-target bootstrap", "role": "", "id": "self-host-status-table-layer-state-evidence-multi-target-bootstrap", "detail": "State: ✅ arm64-darwin · linux-arm64 (real-HW byte-eq) · x86_64 (RUNG 1+2+3) · Evidence: SELFHOST-NEXT domain ledger" }, { "name": "`hexa run` routing", "role": "", "id": "self-host-status-table-layer-state-evidence-hexa-run-routing", "detail": "", "children": [ { "name": "State: ✅ `HEXA_RUN_NATIVE` default-ON for ALL hosts — clang-free native cold path (`aprime_cc --emit=obj` → system `ld` → cache+exec, no C compiler); C-transpile delegate-fallback only for the native-emit gaps (closures emit-fail · ", "role": "", "id": "self-host-status-table-layer-state-evidence-hexa-run-routing-state-hexa-run-nati", "detail": "" }, { "name": "`@lazy` niche). Consumer-live: `install.sh` ships `build/aprime_cc`, and a clang-less host auto-engages native (no host-cc probe is non-fatal). · Evidence: leg-B r26 default-ON (#3782) · r27 ship aprime_cc (#3783) · ", "role": "", "id": "self-host-status-table-layer-state-evidence-hexa-run-routing-lazy-niche-consumer", "detail": "" }, { "name": "r7 no-cc auto-engage (#3766); ROOT-A flatten (#3767) + ROOT-B native-codegen gaps r10–r25 (struct/field · println · shift · range/slice · try/catch · ", "role": "", "id": "self-host-status-table-layer-state-evidence-hexa-run-routing-r7-no-cc-auto-engag", "detail": "" }, { "name": "unary · UTF-8 rodata · void-tag · …); broad-corpus silent-differ audit drove (c) → ≈0 before flip", "role": "", "id": "self-host-status-table-layer-state-evidence-hexa-run-routing-unary-utf-8-rodata", "detail": "" } ] } ] }, { "name": "Remaining residuals (tracked, not silent)", "role": "", "id": "self-host-status-remaining-residuals-tracked-not-silent", "detail": "", "children": [ { "name": "✅ **x86_64 RUNG 2** (done 2026-06-15) — `print(\"hi\")` now prints `hi` via the native x86_64 emitter. The HexaVal 16-byte SysV reg-pair ABI landed in #3340; ", "role": "", "id": "self-host-status-remaining-residuals-tracked-not-silent-x86-64-rung-2-done-2026", "detail": "", "children": [ { "name": "the string-payload `lea` was then dropped in the native-emit data-address matcher (it only saw bare `.LCstrN` labels, not the `[rip+