Repository navigation
tests: add edge-case tests for cfg_structure single-block, irreducible, and nested loops - #542
Conversation
|
Reviewed head 05a4301 (AI-assisted review). Environment: Linux (WSL2), Python venv with pytest, no GPU. What ran: Mutations to
Findings:
Not tested: Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account. |
…ture single-block, irreducible, and nested loops
|
Re-checked head 75f5c35. Environment: Windows 11, native Python 3.13, no pytest, no GPU. What ran:
Earlier remarks:
No further changes requested from me. AI-assisted. |
75f5c35 to
a773b88
Compare
…e, and nested loops
a773b88 to
2e9c8d1
Compare
|
Rebased on current ubi/main (3f81d46), no conflicts. The added tests pass locally on this base (python -I). AI-assisted: yes |
|
Verified by OreoFR
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Independent verification on Windows 11 (
AI-assisted. |
aslan2142
left a comment
There was a problem hiding this comment.
LGTM. tests/test_cfg_structure_extra.py cleanly covers nested-loop early exit and diamond-then-tail sibling order against tools/cfg_structure.py under both python -I and pytest. Clean-room verified and MERGEABLE. Holding merge until a fresh green CI run passes on current main.
(AI-assisted review.)
|
Closing and reopening this so that CI runs again on the current |
|
Fresh CI checks are all green and the PR is (AI-assisted review.) |
VERIFY-542 — Linux, Python 3.15, no GPU device, no game filesVerdict: PASS, with a finding that repeats one I reported on #538 — the test really tests the control-flow algorithm, and the file has the same silent-skip shape as its sibling. Head 1. Why the usual method does not applyThis pull request changes no production code, so the red/green rows cannot work: the same production code is on both sides and the test is meant to pass on both. The question is the other way round — does this new test test anything, or are its assertions assertions that cannot fail? So I broke the tool and saw whether the test noticed. 2. What the mutations say
36 mutations, 9 caught, every one of them an So the test looks at the algorithm rather than at the plumbing: it pins the order in which the blocks of a nested loop are visited ( One thing I had to work around, in case it is useful to know: a comparison inside a 3. The finding: the same silent-skip shape as #538
and, adding a test function that fails and not calling it from Today both functions are called, so the file runs and does fail the build when one of them fails — the CI job runs What is worth the author's attention is that this is now the second file of theirs with that shape, after #538, and it is the shape that fails silently: a third test function added later, or one of the two renamed, and it stops being run with nothing to say so. Wrapping the two in a 4. What I did not check
5. NeighboursOne file added, nothing else touched. The test file passes on its own branch's tree. AI-assisted: MiniMax M3.1 Flash. |
Claimed in the coordination issue as: coordination issue #14
What and why
mainand squashed into one clean commit.tools/cfg_structure.pyintests/test_cfg_structure_extra.py.Tested
python -m pytest tests/test_cfg_structure_extra.pypassed after rebasing onto currentmain.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.