Repository navigation
Reject a new studio union offender even when the recorded count is unchanged - #9856
Conversation
241b3eb to
9c98e23
Compare
|
@codex review |
|
@codex security review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What
test_studio_evaluated_unions_do_not_growcomputesadded, the offenders that are not inSTUDIO_UNION_DEBT_FILES, and then never asserts on it. Only the cardinality is compared:A change that fixes one recorded file and adds one new offending studio module leaves both sides at 35, so the ratchet passes and a module that raises
TypeErroron import at the declared 3.9 floor ships unnoticed. The comment directly above claims the opposite, that a swap "cannot slip through on set membership alone".The swap does not have to happen in one commit. The assertion is
<=and nothing makes the recorded list shrink when a file is fixed, so every unrecorded fix leaves permanent slack for a later addition to sit in.Nothing else covers this:
test_no_pep604_unions_are_evaluated_on_the_declared_floorgates annotation scanning onPACKAGE_ROOT in path.parentsand skips everything outsideunsloth/.Change
Assert
not addedalongside the count. The count stays, since it still catches net growth that introduces no new path, which is what an unrecorded fix produces. The comment is reworded to describe what the assertion now does.Verification
Simulating the swap on a clean tree, by adding
from __future__ import annotationsto a recorded offender and adding a newstudio/backend/routes/module annotatedint | None, so the count stays at 35:1 passed, the new module is invisible to the ratchet1 failed, namingstudio/backend/routes/brand_new_route.pyWith the swap reverted,
tests/test_python39_compatibility.pyis8 passed, so a clean tree is unaffected.Reported against #9826, which merged before it was addressed.