Files
Calic 5cdf386f52 docs(launcher-test): sync README version + launcher ref with manifest
manifest.lib is at 0.3.0 (since the markdown.lua image_missing sync),
README still claimed 0.1.0 — bumped. Also bumped the "Tested
Production-Lib Surface" reference from launcher v0.1.0 to v0.3.3 to
reflect the current canonical launcher; the FSM component itself is
unchanged since v0.1.0 (3-way hash check guards drift).
2026-06-16 20:05:40 +02:00

2.2 KiB

sporel-lib-management.launcher-test

P.3.4 reference test-module — validates lib-management.launcher FSM contracts and engine-surface existence via the engine.test.* assertion surface.

  • Module-ID: lib-management.launcher-test
  • Version: 0.3.0
  • Kind: test-module (headless; runs init() once + exits)
  • Note: Embeds its own byte-identical copy of fsm.lua (Sporel-resolver does not resolve module-as-dep; drift guarded by smoke.sh P0-S15-pre hash check).

Run

Sporel.exe --test-libs=lib-management.launcher-test

Output is TAP version 13 on stdout; exit-code = failure-count (0 = all pass).

Coverage Statements (2026-05-16 Fault-Injection Audit)

Verified via deliberate-mutation in the launcher-test fixture's own fsm.lua copy; mutations reverted after observation.

Caught Mutations

# Mutation Caught by
M1 STATE_LIST + "esc" returns STATE_LIST instead of STATE_QUIT_CONFIRM Assertion "list+esc -> quit_confirm" (ok 1)
M2 STATE_QUIT_CONFIRM + "enter" returns STATE_QUIT_CONFIRM instead of EXIT Assertion "quit_confirm+enter -> exit" (ok 3)

Uncaught Mutations (Gaps)

# Mutation Why uncaught Severity
M3 Fallback return state removed (unknown state returns nil) No test calls fsm.next with an unrecognized state string Low

Resolution per Gap:

  • Gap M3: Cheap-fill applied — added assertion fsm.next("garbage_state", "esc") == "garbage_state" to verify unknown-state passthrough (commit see below).

Cheap-Gap-Fills Applied

Gap New Assertion Re-Inject Verifies
M3 unknown state passes through unchangedfsm.next("garbage_state", "esc") must equal "garbage_state"

Tested Production-Lib Surface

lib-management.launcher v0.3.3 (FSM component, unchanged since v0.1.0 — 3-way hash check guards drift) — Tests cover: all 5 explicit FSM transitions (list+esc, quit_confirm+esc, quit_confirm+enter, quit_confirm+click_yes, quit_confirm+click_no), stability for unhandled events (list+click_module), unknown-state passthrough, and engine-surface existence for engine.module.list, engine.module.dir_of, engine.render.draw_text, engine.render.measure_text.