You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warm fasl cache duplicates the output of nested (load)s #92
Found while running capcov's f-modelcheck workload across ports. It reproduces on main e3dec8b (LuaJIT 2.1.1785763465, macOS arm64). The #84–#88 PRs (#89, #90, #91) don't cause it.
BEGIN|LIB|LIB|END| <- cold fasl cache: correct
BEGIN|LIB|LIB|LIB|LIB|END| <- warm: every LIB is printed twice
BEGIN|LIB|LIB|LIB|LIB|END|
Control: with SHEN_FASL=off the output is BEGIN|LIB|LIB|END| on every run. shen-go 1f587de prints LIB twice, plus its load echo.
A plain top-level (load "lib.shen") in main.shen has the same problem. With main.shen as (output "BEGIN~%") (load "lib.shen") (load "lib.shen") (output "END~%"), the cold run prints BEGIN|LIB|LIB|END| and the warm run prints BEGIN|LIB|LIB|LIB|LIB|END|. So the trigger is output inside a file that a cached file loads; it doesn't matter where the nested load is called from. My guess is that on a fasl hit for main.shen, the replay emits the nested file's output once from the outer record stream and again from the nested load. I haven't confirmed this.
Impact
capcov f-modelcheck registers its judges with (load Path) from inside mc.judge-all. Its first run prints 25 MC lines, identical to shen-go. Every later run prints 36: 11 JUDGE/PASS lines are duplicated. The workload's result therefore depends on the state of the cache.
changed the title [-]Warm fasl cache duplicates the output of a (load) called from inside a function[/-][+]Warm fasl cache duplicates the output of nested (load)s[/+]on Oct 19, 2026
Activity
[-]Warm fasl cache duplicates the output of a (load) called from inside a function[/-][+]Warm fasl cache duplicates the output of nested (load)s[/+]Merge pull request #94 from pyrex41/capcov/fix-92-fasl-nested-load