Skip to content

Separate the two advisory checks, and strengthen what protects them - #69

Merged
74nu5 merged 1 commit into
mainfrom
fix/review6-mediums
Jul 19, 2026
Merged

Separate the two advisory checks, and strengthen what protects them#69
74nu5 merged 1 commit into
mainfrom
fix/review6-mediums

Conversation

@74nu5

@74nu5 74nu5 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Constats de la liste moyenne de la sixième revue.

Un drapeau, deux dangers

--no-coverage-check désactivait aussi l'avertissement de superposition de tableaux, que le README présente pourtant comme inconditionnel.

Les deux signalent des dangers différents — une clé oubliée quelque part, contre .NET qui conserve des éléments de tableau de base qu'on croyait remplacés. Chacun a désormais son drapeau, avec les propriétés MSBuild correspondantes :

--no-coverage-check          couverture=0  superposition=1
--no-array-layering-check    couverture=1  superposition=0

Le test qui épinglait l'ancien couplage épingle maintenant la séparation dans les deux sens.

Un test qui ne testait pas son propre nom

ForLoop_IteratorVariable_IsLocalToForScope vérifiait seulement que deux éléments sortaient — vrai que l'itérateur soit correctement porté ou non, ce que le test par mutation avait confirmé. Il déclare maintenant une variable externe de même nom et vérifie les deux directions : le corps voit son itérateur, la liaison externe survit à la boucle.

Sept assertions non typées

Assert.ThrowsAsync(...) nu accepte n'importe quelle exception, y compris un plantage — c'est ce qui permettait de supprimer la garde de division par zéro avec la suite au vert. Elles sont typées.

L'une d'elles attendait en réalité une ParserException, pas une EvaluatorException : ma première passe globale s'est trompée et la suite l'a attrapée immédiatement. L'assertion nue masquait de quelle couche venait l'erreur.

391 tests, tous verts.

🤖 Generated with Claude Code

Findings from the sixth cold review's medium list.

--no-coverage-check silenced the array-layering warning too, though the README
presents that one as unconditional. They report different hazards — a key you
forgot to set somewhere versus .NET keeping base array elements you thought you
had replaced — and sharing one switch meant turning off the first quietly turned
off the second. Each has its own flag now, --no-coverage-check and
--no-array-layering-check, with matching MSBuild properties. The test that
asserted the old coupling now asserts the separation in both directions.

ForLoop_IteratorVariable_IsLocalToForScope did not test what it is named after:
it checked only that two elements came out, which holds whether or not the
iterator is scoped, and mutation testing confirmed the invariant was unprotected.
It now declares an outer variable of the same name and checks both directions —
the body sees the iterator, the outer binding survives the loop.

Seven bare Assert.ThrowsAsync calls accepted any exception, including a crash;
that is what let the division-by-zero guard be removed with the suite still green.
They are typed now. One of them turned out to expect a ParserException rather
than an EvaluatorException, which the blanket first pass got wrong and the suite
caught immediately — the assertion had been hiding which layer the error came
from.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@74nu5
74nu5 merged commit 709419f into main Jul 19, 2026
3 checks passed
@74nu5
74nu5 deleted the fix/review6-mediums branch July 19, 2026 20:18
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.

1 participant