test: size markers for 32 grandfathered files (batch 1 of 2) - unmarked 1678 -> 636 - #54
Merged
Merged
Conversation
The unmarked-test baseline (gates/unmarked_baseline.txt) counted 1678 tests with no small/medium/large marker, so the no-network guarantee covered only newer tests. This batch marks 32 files, about 1,250 tests, by the chip's rules: small by default; medium for anything async (the Windows Proactor loop opens a socketpair pytest-socket refuses), anything using tmp_path, and anything building a TestClient - in the test, in a fixture it uses, or in a helper of its class. A file that comes out uniform carries one module-level pytestmark; otherwise each class or function carries its own. Every touched file was run under its new markers: 1252 passed. Two tests in test_api.py::TestConfigSettingsSecurity first failed with SocketBlockedError under small - the class builds its TestClient in a helper method, which the static pass had not looked inside. They are medium, as the rule says, and the helper case is now part of the rule. No test was changed in any other way. No hidden network dependency was found in this batch: every SocketBlockedError traced to a TestClient. Signed-off-by: Ahliana Byrd <ahliana.byrd@gmail.com>
Signed-off-by: Ahliana Byrd <ahliana.byrd@gmail.com>
Signed-off-by: Ahliana Byrd <ahliana.byrd@gmail.com>
ahliana
added a commit
that referenced
this pull request
Sep 9, 2026
…of 2) - unmarked 636 -> 2 (#55) * test: size markers for the remaining 64 grandfathered files (batch 2 of 2) Same rules as #54: small by default; medium for async tests, tmp_path, and a TestClient built in the test, in a fixture, in a class helper or - new in this batch - in a module-level helper such as `_client()`. One module-level pytestmark where a file is uniform, otherwise per class or function. Existing markers untouched; no test changed in any other way. Every touched file was run under its new markers: 687 passed. Thirteen tests across test_cost_projection.py, test_scans_admin_gate.py and test_legiscan_usage_api.py first failed with SocketBlockedError under small; all three files build their TestClient in a module-level helper. They are medium, as the rule says. No hidden network dependency was found: every blocked socket in both batches traced to a TestClient. The unmarked baseline goes 636 -> 2. The two are tests/test_canary.py, the gate's own canary pair, left unmarked deliberately - it is the ring's file, not this repo's. Every test this repo owns now carries a size claim, and every `small` one runs with sockets blocked. Signed-off-by: Ahliana Byrd <ahliana.byrd@gmail.com> * docs(report): end-of-work report for size-markers batch 2 Signed-off-by: Ahliana Byrd <ahliana.byrd@gmail.com> --------- Signed-off-by: Ahliana Byrd <ahliana.byrd@gmail.com>
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.
Why
gates/unmarked_baseline.txtcounted 1,678 tests with nosmall/medium/largemarker, so the gate's no-network guarantee (pytest-socket on everysmalltest) covered only tests written after the gate arrived. This is batch 1 of 2, kept under the 400-line limit.Rules applied, per the chip
tmp_path, and anything building aTestClient, whether in the test, in a fixture it uses, or in a helper method of its class.pytestmark; otherwise each class or function carries its own. Existing markers untouched.import pytest.Result
gates/unmarked_baseline.txt)Every touched file was run under its new markers: 1,252 passed.
What the run found
Two tests in
test_api.py::TestConfigSettingsSecurityfailed withSocketBlockedErrorundersmall. The class builds itsTestClientin a helper method, which the first static pass had not looked inside. They aremedium, as the rule says. No hidden network dependency surfaced in this batch: every socket the guard caught traced to aTestClient, never to a real host.One trap, now in the brief
The gate takes the closest
smallmarker. A single@pytest.mark.mediumtest inside a file that carries a module-levelsmallstill has its sockets blocked.docs/SESSION_BRIEF.mdsays so and gives the two ways out.Test plan
🤖 Generated with Claude Code