From f165713d05adb619d9dceac28617e7fbb8845971 Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Thu, 15 Oct 2026 16:18:51 -0400 Subject: [PATCH] forgetest: button.c and led.c leave the host-tested rows for the covers of the tests that drive them HOST_TESTED carried forgectrl's src/button.* and src/led.* against host_setup.sh, which presents the button as a held word in a fake switches file and no LED at all. Both are driven on the machine by catalog tests that still run: the fuse view forgectrl.auth reads is two-factor, the token and the physical button (main.c cb_fuse_identity through operator_present, button.c); the setup checks' press prompts read the button and light it through led.c, and setup.check-switches reads both back. manifest.py's own rule puts a path a catalog test exercises on the hardware in that test's covers, not in a row: in a row it is in no fingerprint, so a change to the button's poll, its debounce or the LED release moved nothing and every PASS was inherited past it. - manifest.py: the two rows go (src/hooks.h stays: main.c's hook declarations, proven through the setup routes on a host). - suite/forgectrl.py: src/button.* joins _COVERS_AUTH. - suite/setup_dark.py: src/button.* and src/led.* join DARK_COVERS, the covers of every setup check. The laser tests judge the LED by the target the controller writes (glowforge_laser.c button_led), so led.c is not theirs. Proof: the coverage lint, enforced, on the tree manifest from the current pins: 0 uncovered paths, 0 host-tested row problems, 43 tests. tests/test_manifest.py (34) and the unit suite pass. Acceptance: the fingerprints of forgectrl.auth and of every setup check move; a release campaign runs them again. --- forgetest/forgetest/manifest.py | 2 -- forgetest/forgetest/suite/forgectrl.py | 5 +++-- forgetest/forgetest/suite/setup_dark.py | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/forgetest/forgetest/manifest.py b/forgetest/forgetest/manifest.py index 56abbd5..8e59c6f 100644 --- a/forgetest/forgetest/manifest.py +++ b/forgetest/forgetest/manifest.py @@ -192,8 +192,6 @@ HOST_TESTED = [ ("forgectrl", "docs/advisories/privacy.md", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"), ("forgectrl", "docs/advisories/cloud-service.md", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"), - ("forgectrl", "src/button.*", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"), - ("forgectrl", "src/led.*", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"), ("forgectrl", "src/hooks.h", "forgectrl:tests/host_setup.sh", "forgectrl:.github/workflows/build.yml"), # The setup sheet id from the fuse serial, against golden ids. ("forgectrl", "src/sheetid.*", "forgectrl:tests/sheetid_test.c", "forgectrl:.github/workflows/build.yml"), diff --git a/forgetest/forgetest/suite/forgectrl.py b/forgetest/forgetest/suite/forgectrl.py index 87574e8..278338b 100644 --- a/forgetest/forgetest/suite/forgectrl.py +++ b/forgetest/forgetest/suite/forgectrl.py @@ -10,9 +10,10 @@ from ..catalog import test # The write guard reads the account and the session store (a machine with # an account needs a session from the LAN; this host and the dev image -# write with the token), so both are the guard's domain. +# write with the token), so both are the guard's domain. The fuse view +# is two-factor: the token and the physical button, read by button.c. _COVERS_AUTH = [("forgectrl", "src/auth.*"), ("forgectrl", "src/peer.*"), ("forgectrl", "src/main.c"), - ("forgectrl", "src/session.*"), ("forgectrl", "src/users.*"), + ("forgectrl", "src/session.*"), ("forgectrl", "src/users.*"), ("forgectrl", "src/button.*"), ("forgectrl", "src/ui/login.*"), ("forgectrl", "src/ui/wizard.js")] diff --git a/forgetest/forgetest/suite/setup_dark.py b/forgetest/forgetest/suite/setup_dark.py index af32978..9c2089a 100644 --- a/forgetest/forgetest/suite/setup_dark.py +++ b/forgetest/forgetest/suite/setup_dark.py @@ -26,9 +26,12 @@ PRESS_TEXT = "The button is lit white. Press it now: the laser fires after your # check switches it back on. The bench reference draws its off current # (74) for the first seconds and settles near 630. PURGE_SPINUP_S = 30 +# The checks' press prompts read the button (button.c) and light it +# (led.c) on the machine; the switches check reads both back. DARK_COVERS = [("forgectrl", "src/wizdark.*"), ("forgectrl", "src/wizcalc.*"), ("forgectrl", "src/wiz.*"), ("forgectrl", "src/setup.*"), - ("forgectrl", "src/main.c"), ("forgectrl", "src/ui/wizard.*")] + ("forgectrl", "src/main.c"), ("forgectrl", "src/ui/wizard.*"), + ("forgectrl", "src/button.*"), ("forgectrl", "src/led.*")] # The lens window: the free half-steps below and above the hall edge the # Lens travel check writes, and the fallback the lens frame holds while # they are unset (lens.h).