#307 asdf fasl replay: *WILD* resolves to an unbound ASDF/SOURCE-REGISTRY-own twin — *wild-asd* init dies 'not a sequence' (next layer after cave#306)

closed
Opened by atgreen

Residue after cave#306 (f9c6e27). The asdf fasl replay now clears everything through asdf/output-translations and aborts in asdf/source-registry with:

; Error: the value is not a sequence | in: LOAD

The raiser is stdlib LENGTH on the UNBOUND MARKER. The failing action is asdf/source-registry's (defparameter wild-asd (make-pathname :directory nil :name wild :type "asd" :version :newest)) — asdf.lisp:13368. Measured in the surviving post-abort session:

So during asdf/source-registry's define-package REPLAY, uiop's ensure-package machinery (ensure-inherited / ensure-symbol / ensure-mix arms) minted a package-own WILD record into the new package's own alist — the cave#301/#303 class, now on the replayed-ensure-package intern door — and the wild-asd init thunk's KIND-2 read resolved to that unbound twin. Source-load and the compile session stay consistent (no twin).

Isolation attempts that did NOT reproduce (all round-trip green in micro-fixtures): plain user-pkg defvar+read, cross-package inherited read via cl:defpackage (:use), make-pathname with keywords. The divergence needs uiop's own ensure-package graph — suspect the replay-time do-external-symbols / find-symbol state during the define-package differs from compile (edge replay ORDER), sending one of ensure-package's arms down its minting path.

Repro: (fasl-compile "asdf.lisp" X) ~250s; (load X) fresh image 0.15s. Next step: name-filtered WILD traces (the cave#303 stdlib-door trace recipe: reader-intern-in-current-package / %pkg-accessible-intern / intern / pkg-add-export-name + ag-quoted-emit-symbol) on compile vs replay, diff the door sequences.

Comments (1)

atgreen3992950447

FIXED in 7016ac0 — and with it the asdf fasl replay completes END TO END (zero errors, all packages through ASDF/FOOTER, (asdf:asdf-version) => "3.3.7", wild-asd => #P"*.asd"). The #302→#307 onion is closed for the load itself.

The twin was minted by the READER at COMPILE time (traced: [RD cur=ASDF/SOURCE-REGISTRY MINT]), not by the replayed ensure-package. find-symbol-via-uses-walk required a used package to both EXPORT and OWN the name; cave#253's assumption 'the owner is co-used in every :use-reexport group' is false for uiop's aggregator: asdf/source-registry uses UIOP (which reexports WILD) but not the owner UIOP/PATHNAME, and uiop's ensure-export path never publishes the record into UIOP's own table (funcl intern returns an inherited-accessible existing without publishing — per CL semantics). The walk missed → reader minted the package-own twin → the wild-asd thunk's KIND-2 carried home=ASDF/SOURCE-REGISTRY (wire-verified) → the replay door resolved the unbound twin ('not a sequence' = LENGTH of the unbound marker). The live compile session survived only via its name-keyed value patches, masking the twin.

Fix: when USED exports NAME but doesn't own it, resolve recursively through USED's own use list (the CL meaning of an inherited external), depth-bounded at 16. Only previously-missing lookups change behavior; this also unifies identity for the whole class of uiop-aggregator-reexported symbols read from asdf/* packages.

Next frontier filed separately: (asdf:load-system "alexandria") through the FASL-loaded asdf runs the operate machinery and dies on 'invalid number of arguments: MAKE-PLAN expected 0, got 5' — a generic-function dispatch split (mini-clos defgeneric/defmethod via fasl). Notably (alexandria:compose #'1+ #'1+) => works even from the aborted partial load. Gates: sharded suite 8/8, spike oracle green, --hosted 42, fixed point held.