From 22dcbcfb74891ddbb0fbb99616fbaed0cdda6b5b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 23 Sep 2026 10:06:36 -0400 Subject: [PATCH] fix: the lane/program guard compared every section, not just programs (4295) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `test_every_lane_gets_a_program` asserted `set(cp.sections()) - {"supervisord"} == expected`, so it failed the moment the generated config grew non-program sections. b09ee87 added three — the control socket that lets `supervisorctl` reach supervisord — and the property the test exists for had not moved at all: every lane still has a program and no program is not a lane. Now compared over `program:` sections only, both directions. A guard that fires on a correct change is one people learn to edit rather than read, which costs more than it catches. I reported b09ee87 as green off runs 7328 and 7330 and did not look at 7329, which was red on this. The image itself smoked clean — that part was true — but "green" was a claim about the commit and I checked two of its three runs. Earlier in this session I had been reading all three every time. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01LVjrnpQjRgHdvq95rASoiR --- tests/test_gen_supervisord.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/test_gen_supervisord.py b/tests/test_gen_supervisord.py index d7c5c74..a127e15 100644 --- a/tests/test_gen_supervisord.py +++ b/tests/test_gen_supervisord.py @@ -39,10 +39,19 @@ def test_it_is_valid_ini_with_a_supervisord_section(): def test_every_lane_gets_a_program(): """One image carries every lane since step 6, so nothing is conditional. - A lane in LANES with no program is a queue with no consumer.""" + A lane in LANES with no program is a queue with no consumer. + + Compared over the `program:` sections ONLY, both directions: no lane + without a program, and no program that is not a lane. It used to compare + every section minus `[supervisord]`, which made it fail the moment the + config grew non-program plumbing — the control socket did exactly that, + and the property it exists for had not moved at all. A guard that fires on + a correct change is one people learn to edit rather than read. + """ cp = _parse() + programs = {s for s in cp.sections() if s.startswith("program:")} expected = {"program:web"} | {f"program:{lane.name}" for lane in LANES} - assert set(cp.sections()) - {"supervisord"} == expected + assert programs == expected def test_the_ml_lane_runs_even_though_it_ships_disabled():