Skip to content

Do not show a simulation result where nothing was tested - #87

Merged
Pranav-Mathad merged 1 commit into
mainfrom
issue-86-simulation-labels
Nov 29, 2026
Merged

Pranav-Mathad merged 1 commit into
mainfrom
issue-86-simulation-labels

Conversation

@Pranav-Mathad

Copy link
Copy Markdown
Owner

Closes #86.

Web wording, one spec sentence pair and the README limits. No change to the simulation, results/ or the bundles, so nothing needs to be run again.

Why

Of the 119 simulations in the published results, 40 do not test the proposed fix, and the screen showed them as a result:

What the simulation did artemis shopware graylog Was shown as
Real move of the declaring file (cheap loops) 38 5 36 "Checked by simulation" or "Simulated: the link remains"
Link-removing fix (route_through_api, invert_dependency, extract_interface): every link between the two modules is deleted, then the link is reported as gone 8 5 1 "Checked by simulation"
Nothing on the map changed: a move with no recorded declaring file, or both ends in one module 4 9 13 "Simulated: the link remains" (25), "Checked by simulation" (1)

Examples: artemis rank 39 is about one import line and reported 164 links removed. graylog ranks 6 and 7 and shopware rank 4, all in a top 10, said the link remains although nothing was moved.

What changes

One helper, simulationKind(finding) in web/src/screens/decisions/FixFirst.tsx, decides the wording for the list badge, the detail text and the grid's fix panel:

Case List badge Detail text Grid panel
Simulated, 0 links removed and 0 added Not simulated Not simulated. Nothing on the map changed for this fix. Same sentence, no "Try the fix" button
Simulated, link-removing fix Effect if the link is removed Effect if the link is removed: all 164 links between the two modules are taken away, loops 304 to 303. No new exceptions. Title "Effect if the link is removed" when on; the button stays
Everything else unchanged unchanged unchanged
  • spec.md §8.5: two sentences for these two cases.
  • README.md Limits: a new bullet with the counts above, and the existing "link remains" counts corrected from 32, 10 and 35 to 29, 1 and 22, because 25 of those were never simulated.

What I ran and saw

make check passes: ruff, 36 Python tests passed and 1 skipped, contracts up to date, typecheck, 4 web tests, build.

The app was served locally and these pages of the committed bundles were rendered with headless Chrome (Decisions detail, grid with the fix off, grid with the fix on). The text was read out of the rendered page.

Finding List badge Grid panel
artemis rank 39 Effect if the link is removed "Try the fix"; title "Effect if the link is removed" when on
artemis rank 59 Effect if the link is removed same
artemis rank 54 Not simulated new sentence, no button
graylog ranks 6 and 7 Not simulated new sentence, no button
shopware rank 4 Not simulated new sentence, no button
artemis rank 7 Checked by simulation (unchanged) unchanged
artemis rank 62 Simulated: the link remains (unchanged) unchanged
artemis rank 1 (never simulated) Not simulated (unchanged) unchanged

Counts under the helper's rule, from the bundles:

artemis shopware graylog
Checked by simulation 9 4 14
Simulated: the link remains 29 1 22
Effect if the link is removed 8 5 1
Not simulated, nothing changed 4 9 13
Simulated, adds exceptions 0 0 0

Limits

  • This relabels; it does not fix the simulation. A move still moves the whole declaring file and not the named symbol (graylog rank 4: the fix names two constants, the simulation moves their whole file and adds 106 links). A link-removing fix still deletes every link between the two modules. Changing that alters judge output and needs the results regenerated; see section 5 of Do not show a simulation result where nothing was tested #86.
  • The three link-removing action names are repeated in the web code, with a comment pointing to LINK_REMOVING in src/codexray/judge/jobs.py. If that list changes, this one must follow.
  • Not looked at by eye. The text was read from the rendered page; nobody has seen the screens.
  • "Try the fix" on an "Effect if the link is removed" finding still redraws the grid with the link taken away. That is what the title says, but it is not a test of the fix.

@Pranav-Mathad
Pranav-Mathad merged commit 0187d9f into main Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not show a simulation result where nothing was tested

1 participant