Fix the three PR #249 review findings that arrived after the merge - #253
Merged
wormeyman merged 1 commit intoAug 22, 2026
Merged
Conversation
PR #249 got seven review findings. Four arrived while it was open and were fixed in 2809e8d. The other three landed three minutes and thirty-nine seconds after the squash merge, so they shipped. `analyze-rail-box-orientation.mjs` read `.bounding_box` off `dump.directions.find(d => d.created)` without guarding the undefined. That is the total-failure case - no direction placed anything, or the Lua pcall raised before `created` was set - and it is exactly what the "every direction produced a placement" and "no Lua errors" controls exist to report. Instead it threw a TypeError while building the fixture literal, which happens before `controlsAllPassed` is consulted, so the run died naming neither the probe nor the failed control. `actualPosition` two lines up already guarded the same emptiness. Regenerating the fixture from the original dump gives a byte-identical file, so the guard changes nothing on real data. `analyze-blueprint-grid-position-gui.mjs` suppressed a whole class of steps to excuse one substitution. The game refuses some grid positions, the session says to substitute the nearest accepted value, and the analyzer hid the asked-for label so that would not read as a skipped step. But it used one boolean over every `gridpos-` label, so two substitutions excused three missing steps and `gridpos-0-0` disappeared from `stepsNotCaptured` - a genuinely skipped step, and the row that establishes the non-default check, vanishing from the list whose only job is to name what was skipped. That is the silent cap the field was written to prevent, in the code written to prevent it. One substitution now excuses one missing step, counted and spent in the order SESSION.md walks them. The `gridpos-` pattern moves into a named constant, because `expectedFor` and this filter have to agree about what one is, and the looser copy was winning. The fixture is regenerated from the original run's capture stream rather than edited, and it reproduces byte for byte apart from the restored `gridpos-0-0`. The probe README predicted the wrong numbers for run 2. It said the rail sits at y=20 with a collision-box edge of 17.764, and it said run 2 replaces the assembling machine. The rail is at 21 - `probe-rail-box-orientation` measured that a rail requested at (20, 20) is placed at (21, 21) - its box edge is 19.102 off the measured runtime box, not the 17.764 that `data.json`'s disputed -2.236 gives from the wrong position, and the machine stays in the layout and merely moves. That file is what an operator reads while the run is in front of them, and it says a bad prediction "is not silent" - true, but a bad prediction looks identical to a bad run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013SHoE9cH9kd6vtpHM1PzZ1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #249 drew seven review findings. Four arrived while it was open and were fixed in
2809e8d6. The other three were posted at22:47:0x, three minutes and thirty-nine seconds after the squash merge at22:43:28Z, so they shipped unaddressed. This is those three.No production code.
vp checkis clean, and both touched fixtures regenerate byte for byte from their original capture streams.The unguarded read that would hide its own control
analyze-rail-box-orientation.mjsread.bounding_boxoffdump.directions.find(d => d.created).findanswersundefinedwhen no direction placed anything - everycreate_entityfailing, or the Luapcallraising beforecreatedis set - and that is precisely the case the "every direction produced a placement" and "the probe recorded no Lua errors" controls exist to report.Instead it threw a
TypeErrorwhile building the fixture literal, andcontrolsAllPassedis not consulted until after that literal is built. So a total failure exited with a stack trace naming neither the probe nor the failed control.actualPositiontwo lines above already guarded the same emptiness withplaced[0]?.position; this was the one read that did not.Regenerating
rail-box-orientation.jsonfrom the original dump produces a byte-identical file, so the guard is confirmed to change nothing on real data.A suppression rule wider than the thing it excused
The game refuses some grid positions - run 2's layout rejected 3,5 on the parity rule after run 1 accepted it - so
SESSION.mdtells the operator to substitute the nearest accepted value.analyze-blueprint-grid-position-gui.mjssuppressed the asked-for label fromstepsNotCapturedso a substitution would not read as a skipped step.It did that with a single boolean over every
gridpos-label. Two substitutions therefore excused three missing steps, andgridpos-0-0vanished - a step genuinely never run, and the one that establishes the non-default check, disappearing from the list whose only job is to name what was skipped.That is the silent cap
stepsNotCapturedwas written to prevent, reproduced inside the code written to prevent it. One substitution now excuses one missing step, counted and spent in the orderSESSION.mdwalks them. Thegridpos-pattern also moves into a namedGRIDPOS_LABELconstant:expectedFormatched/^gridpos-(-?\d+)-(-?\d+)$/while this filter used a barestartsWith, and the looser copy was the one in charge.The fixture is regenerated from the original run's capture stream, not edited. It reproduces byte for byte apart from the one restored entry:
One note on the review that found this: it cited a case labelled
gridpos-3-5-savedas live evidence. That label is real, but it belongs to run 1 - it was in the fixture frome165d3a4through6f1ed55aand was replaced twelve minutes before the review posted, when run 2's fixture landed in55533bda. The mechanism was live regardless, throughgridpos-0-0instead.A README predicting numbers the probe had already corrected
probe-blueprint-grid-position-gui/README.mdstill described run 2 with pre-measurement figures:LAYOUTkeepsassembling-machine-1, moves it to (10.5, 30.5) and adds the rail as a fourth entitycontrol.lua:100places it at y=21; its own header at line 77 predicts box edge 19.102Both errors compound. The rail sits at 21 because
probe-rail-box-orientationmeasured that one requested at (20, 20) is placed at (21, 21). Its box edge is21 - 1.8984375 = 19.102off the measured runtime box;data.jsonsays-2.236, which the game disagrees with, rails being the only entities the two disagree about at all (#251). The old 17.764 took the wrong box from the wrong position:20 - 2.236.This matters because the README is what an operator reads while the run is in front of them, and it promises that a wrong prediction "is not silent". It is not - but it looks identical to a bad run, and all three predictions would have missed.
analyze-blueprint-grid-position-gui.mjs:63andcontrol.lua:77already carried 19.102; the README was the last file with the old number.CLAUDE.md
The
stepsNotCapturedparagraph gains the worked example, because the failure is more instructive than the field: a suppression rule has to be as narrow as the thing it excuses.🤖 Generated with Claude Code
https://claude.ai/code/session_013SHoE9cH9kd6vtpHM1PzZ1