fix(audit-I1+I2): drop actor-stub print + CI-conditional self-exit
I1: Removed actor inline-stub (functionless after actor-Deferral) and its init-print line. spine-prototype no longer pretends a deferred lib is loaded. I2: 60-frame self-exit now CI-conditional via SPOREL_CI=1 env var. Interactive dev-runs (without var) loop until ESC. Smoke.sh sets SPOREL_CI=1 globally to preserve headless behavior.
This commit is contained in:
9
init.lua
9
init.lua
@@ -5,10 +5,6 @@ local input = require("lib-core.input")
|
||||
local player = require("lib-core.player_control")
|
||||
local interaction = require("lib-core.interaction")
|
||||
|
||||
-- inline stub (extract in P.0.lib.actor — currently DEFERRED per
|
||||
-- meta/docs/superpowers/specs/2026-05-10-p0-actor-deferral.md)
|
||||
local actor = { hello = function() return "actor stub" end }
|
||||
|
||||
local demo_map = maps.load("maps/demo.map.json")
|
||||
maps.set_current(demo_map)
|
||||
|
||||
@@ -45,7 +41,6 @@ local TARGET_FRAMES = 60
|
||||
|
||||
function init(ctx)
|
||||
engine.print("spine-prototype init: maps loaded")
|
||||
engine.print("inline stubs loaded: " .. actor.hello())
|
||||
engine.print(string.format("map size: %dx%d", m_size.w, m_size.h))
|
||||
local corner = maps.tile_at(0, 0)
|
||||
local interior = maps.tile_at(5, 5)
|
||||
@@ -99,8 +94,10 @@ function update(ctx, dt)
|
||||
-- Interaction proximity-check + dispatch
|
||||
interaction.update(p.x + s.w / 2, p.y + s.h / 2)
|
||||
|
||||
-- CI-conditional self-exit: enables headless smoke runs.
|
||||
-- Interactive runs (no SPOREL_CI=1) loop until ESC.
|
||||
frames = frames + 1
|
||||
if frames >= TARGET_FRAMES then
|
||||
if os.getenv("SPOREL_CI") == "1" and frames >= TARGET_FRAMES then
|
||||
engine.exit(0)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user