From 8149a44f9336eedc62314e25c5b803e8058993da Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Tue, 13 Oct 2026 19:01:30 -0400 Subject: [PATCH] laser_stream_test: session B's FIRE-gap check moves to its density twin Session B ran JOB_M3_TERM under the analog model; session F runs the same job under density and checked its span, density and termination, but not check_fire_gaps (no stepless run carrying FIRE), which B alone held. F now runs it, and B goes: analog never runs on a machine, and the analog ladder keeps its own termination and gap checks. - check_fire_gaps on density-full, its worst gap in the PASS line. - Session B's run and checks go; the JOB_M3_TERM comment names F. Proof: the harness passes whole on a null-sink build of the grblHAL-glowforge working tree under Linux, density-full with a worst fire gap of 270 ticks. pyflakes is clean. Acceptance: none. The harness runs in grblHAL-glowforge's CI. --- scripts/bench/laser_stream_test.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/scripts/bench/laser_stream_test.py b/scripts/bench/laser_stream_test.py index 923a117..6e388e8 100644 --- a/scripts/bench/laser_stream_test.py +++ b/scripts/bench/laser_stream_test.py @@ -222,7 +222,7 @@ JOB_Z = [ # the moves are counted from: Z3 is 9 half-steps on the screw, Z4 is 12. LENS_CONF = "lens_hall_edge_z_mm = 3\n" -# Session B: M3 constant power to the end of the stream. The core never +# M3 constant power to the end of the stream (session F). The core never # issues a laser-off update for M3, so the stream engine itself must # terminate the cycle dark (rule 7). JOB_M3_TERM = [ @@ -1016,15 +1016,6 @@ def main(): % (len(data), sum(1 for b in data if b & 0x80), len(fire_ticks), powers, x_max, tail_steps, gap_a)) - # --- session B: M3 constant power to stream end, rule 7 ------------- - data = run_session("m3-term", JOB_M3_TERM, conf=ANALOG_CONF) - if not count_fire(data): - fail("[m3-term] no FIRE bits in the stream") - check_termination("m3-term", data) - gap_b = check_fire_gaps("m3-term", data) - print("PASS [m3-term]: %d bytes, %d fire ticks end dark, max fire gap %d" - % (len(data), count_fire(data), gap_b)) - # --- session C: cycle churn, rules 8-9 ------------------------------ data = run_session("churn", JOB_CHURN, conf=ANALOG_CONF) if not count_fire(data): @@ -1086,8 +1077,9 @@ def main(): if got != 1.0: fail("[density-full] S1000 rendered density %.4f, expected 1.0" % got) check_termination("density-full", full) - print("PASS [density-full]: S1000 -> density 1.0000 over %d ticks, ends dark" - % (b - a)) + gap_f = check_fire_gaps("density-full", full) + print("PASS [density-full]: S1000 -> density 1.0000 over %d ticks, ends dark, max fire gap %d" + % (b - a, gap_f)) # --- session G: churn under the model (rules 7-9 still hold) -------- ch = run_session("density-churn", JOB_CHURN, conf=DENSITY_CONF)