Skip to content

feat(B9.6c): delete crypto_blowfish.c — rewire bcrypt_pbkdf to hexa-native blowfish (.c 230→229) - #1816

Merged
dancinlife merged 3 commits into
mainfrom
b9.6c-blowfish-delete
May 27, 2026
Merged

dancinlife merged 3 commits into
mainfrom
b9.6c-blowfish-delete

Conversation

@dancinlife

Copy link
Copy Markdown
Contributor

Summary

First real .c deletion toward the hexa-lang .hexa-only north-star (RUNTIME.flip B9.6c). Deletes self/native/crypto_blowfish.c by removing the bcrypt_pbkdf runtime builtin (all 5 surfaces) and rewiring its single caller self/stdlib/ssh/keyfile.hexa to the RUNEQ-proven hexa-native port stdlib/crypto/blowfish.hexa (landed #1814).

  • .c count 230 → 229 (verified at HEAD via git ls-tree).
  • Builtin removed from all 5 surfaces: runtime.c include, runtime.h decl, bind.hexa allowlist, codegen.hexa emit + _is_builtin_name, hexa_cc.c frozen emit (regenerated, not hand-edited).
  • keyfile.hexa now does use "stdlib/crypto/blowfish"; the bcrypt_pbkdf(pw_bytes, salt, rounds, 48) call resolves to the hexa stdlib fn (exact signature match).

Verification (all green)

  • hexa cc --regen → regenerated hexa_cc.c has 0 hexa_bcrypt_pbkdf refs (was 1).
  • Fixpoint byte-identical: gen2 (promoted) ≡ gen3 (re-regen) — transpiler self-stable.
  • Link test: hexa_cc.o + runtime.o (built without crypto_blowfish.c) → links clean, no undefined hexa_bcrypt_pbkdf.
  • runtime.c compiles clean after dropping the #include (no dangling symbol).
  • keyfile.hexa parses + direct-transpiles with the new transpiler: emitted .c has 0 runtime hexa_bcrypt_pbkdf refs, 3 hexa-level bcrypt_pbkdf refs (resolved via the use import).

Test plan

  • CI green (build + transpile gates)
  • Confirm no other repo consumer references the removed hexa_bcrypt_pbkdf symbol

🤖 Generated with Claude Code

dancinlife and others added 3 commits May 28, 2026 05:48
…hexa-native blowfish

6 source edits (regen + .c-delete pending):
- runtime.c: drop #include native/crypto_blowfish.c
- runtime.h: drop hexa_bcrypt_pbkdf decl
- bind.hexa: drop bcrypt_pbkdf from builtin allowlist
- codegen.hexa: drop emit branch + _is_builtin_name entry
- keyfile.hexa: use "stdlib/crypto/blowfish" (hexa-native KDF)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ative blowfish (.c 230→229)

First real .c deletion toward the .hexa-only north-star. Removes the
bcrypt_pbkdf runtime builtin (5 surfaces) and rewires its one caller
(self/stdlib/ssh/keyfile.hexa) to the RUNEQ-proven hexa-native port
stdlib/crypto/blowfish.hexa (landed PR #1814).

- self/native/crypto_blowfish.c: deleted (the C bcrypt KDF impl)
- self/native/hexa_cc.c: regenerated via `hexa cc --regen` (bcrypt emit dropped); fixpoint byte-identical (gen2≡gen3); links clean against runtime.o (no undefined hexa_bcrypt_pbkdf)
- keyfile.hexa direct-transpile resolves bcrypt_pbkdf to the hexa stdlib fn (0 runtime hexa_bcrypt_pbkdf refs in emitted .c)

(runtime.c/runtime.h/bind.hexa/codegen.hexa/keyfile.hexa edits in parent commit 955abe2)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… byte-identical)

Companion to the crypto_blowfish.c deletion: the regenerated transpiler
no longer emits the hexa_bcrypt_pbkdf runtime call. `hexa cc --regen`
fixpoint confirmed gen2≡gen3 byte-identical; links clean against
runtime.o with no undefined hexa_bcrypt_pbkdf symbol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dancinlife
dancinlife merged commit 19b3850 into main May 27, 2026
1 check passed
dancinlife added a commit that referenced this pull request May 27, 2026
… proven) (#1817)

- B9.6c flipped [x]: crypto_blowfish.c deleted (#1816), 7-surface + regen,
  fixpoint byte-identical — codegen-wire recipe proven end-to-end
- status: .c = 229, native = 31
- next-candidate analysis: sha256 is NOT clean (many core-compiler callers +
  name mismatch); blowfish was the only clean 1-caller case
- register B9.6d: find next clean 1-caller + name-match .c-delete candidate

Co-authored-by: dancinlife <search5599@proton.me>
dancinlife added a commit that referenced this pull request May 27, 2026
self/native/hxtok.c (750L) + hxtok.h (49L) — a standalone Qwen2.5 BPE
tokenizer C lib — is a dead shim: zero build scripts reference it
(tool/*, *.json, *.sh), zero .so/.dylib artifacts exist, and zero code
FFI-calls HxTok/hxtok_* anywhere in the repo (the only repo-wide match
is an archived-roadmap text literal in compiler/roadmaps_archive, not a
code reference). All 8 listed consumers (self/ml/qwen_bpe, tokenizer,
tokenizer_bpe, tokenizer_test, tokenizer_trainer, self/test_tokenizer*,
stdlib/flame/flame_bpe_corpus_*) use the pre-existing pure-hexa BPE
path (qwen_bpe.hexa / tokenizer_bpe.hexa), never the C lib.

After deletion all 8 consumers parse cleanly, proving the C lib carried
no live behavior — RUNEQ is moot (zero live callers). Not in runtime.c
(standalone). This is the v565_grad_analysis.c (#1818) / crypto_blowfish
(#1816) dead-file git-rm pattern, NOT a from-scratch port. RUNTIME.flip
B9.5a flipped [⛔DUP]→[x]; audit doc reclassified.

Co-authored-by: dancinlife <search5599@proton.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dancinlife added a commit that referenced this pull request May 27, 2026
#1821)

self/native/hxvocoder.c (455L) — a standalone HEXA-SPEAK neural-vocoder
C lib (additive synth sin/exp/clip hot-loop, libm-only) — is a dead
shim. Re-verified from scratch (the docs/runtime_native_c_layer_audit.md
"layer ① port candidate, neural_vocoder.hexa reference exists" verdict
was wrong on two counts): all 8 exported symbols (hxvocoder_decode_nv /
_decode_wave / _linear_proj / _synth_additive / _tanh_vec / _vec_zeros /
_version / _write_wav) have ZERO references in any .hexa/.c code file
(only repo-wide matches are archived text in roadmaps_archive). The sole
build reference is a file_exists()-guarded optional link in
tool/build_native.hexa that auto-skips once the file is gone — that dead
block is removed too. No .h/.so/.dylib/.o artifact, no build_toolchain
.json entry, no dlopen. Not #include'd by runtime.c (standalone). The
audit's claimed neural_vocoder.hexa does not exist in-tree; the "1,922x
vocoder" is the pure-hexa Griffin-Lim path in self/ml/speech_audio.hexa.

clang -fsyntax-only self/runtime.c EXIT=0 (untouched), zero remaining
hxvocoder_* symbol refs in code post-deletion. This is the hxtok (#1820)
/ v565 (#1818) / blowfish (#1816) dead-file git-rm pattern, NOT a port.

B9.6f re-verification ledger (the audit's 4 "primary suspects"): only
hxvocoder is DEAD. hxflash_linux / hxlayer_linux / hxvdsp_linux are LIVE
— each has real extern-fn FFI consumers + a dedicated build script
(self/ml/hxflash.hexa+gpu_train, self/ml/hxlayer.hexa+bench/test,
bench/hxblas_linux.hexa @link("hxvdsp")) — they need a multi-session
port, NOT a clean delete. All other standalone native .c (gpu_codegen
_stub, hxffi_slot, hxblas, hxccl, hxlmhead, hxqwen14b/32b, lora_cuda
_host, hexa_cc) re-scanned = all LIVE with callers/build-refs (PRESERVE).
RUNTIME.flip B9.6f [x]; audit doc reconciled (B9.6d table corrected).

Co-authored-by: dancinlife <search5599@proton.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dancinlife
dancinlife deleted the b9.6c-blowfish-delete branch June 13, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant