feat(linkage): ADR-0032 Stage A — cell-first calls for baked-record names (KIND-8 reloc)Verified
Widen the cave#266 cell-first call emission from pkgsym names to the name-keyed world: a warm global call to a name with a baked canonical record now loads the record base (imm64, new KIND-8 baked reloc: consumer re-patches to ITS record base or an idempotent mint; the +32 fn-cell displacement lives only in the code — codex P1-1), tests the fn-cell, calls through it, and falls back to the name-keyed rel32 call on an unbound/nil cell. Stage A is a pure emission widening: every fallback patch is still recorded and the re-walk healing is untouched; redefinition now ALSO heals instantly through the cell (the ADR-0031 install door writes exactly this record). Gates, each fixing a measured witness/producer divergence: - runtime unification only (cold/self-host emission byte-identical); - fully-booted sessions only (*ag-use-hosted-macro-eval*): ADR-0026 turns unification on BEFORE prelude bring-up, and prelude emission feeds the .fco witness offsets, which must stay producer-identical; - never during bundle emission (*ag-fco-bundle-emit*, set by BOTH ADR-0017 witness producers — ag-cold-bundle-build natively, produce-warm-bundle.lisp via the compiled setter): eligibility consults the producer's own static pool and funcl-cold's is a subset of stage2's, so per-name agreement is impossible; - the baked lookup routes through a runtime HOOK (*ag-call-baked-cell-fn*, the *ag-reader-find-package-fn* pattern) set from stdlib, keeping the emit path free of static edges into reader-index machinery. Loader: KIND-8 arms in load-reresolve-baked-reloc — baked hit patches the record base; no-baked-record consumers mint (cell starts unbound, so such sites use the fallback until an install arrives: graceful). NOTE: the ADR-0017 cold-vs-warm .fco witness is NOT green — it was already broken before this session (bisected: DIVERGED at cbb941f / eaa0c57 / cb4275b; 7,469 differing bytes of producer-asymmetric prelude-offset drift), invisible because test-fast-sharded excludes the bundle tests. Filed as cave#315 with the bisect data. Stage A is witness-NEUTRAL: +22 bytes over its base, and without these gates the divergence was ~150KB of shape drift — the gates stay. Verified: 8/8 sharded suite, smoke, fasl spike suite (16/0), alexandria via the auto-loaded fasl, 12/12 package edge probes; replay boot 160.66G vs 160.53G instructions (+0.13%, perf-neutral as designed — the wins land at Stage C). ADR-0032 status: Accepted, Stage A implemented. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By:
Claude Fable 5 <noreply@anthropic.com>