Repository navigation
Conversation
anth-volk
added this pull request to stack #3917
October 14, 2026 18:47
2 tasks done
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
3 times, most recently
from
October 14, 2026 21:13
17fa756 to
375bd46
Compare
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
from
October 14, 2026 21:53
375bd46 to
dac4ae8
Compare
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
5 times, most recently
from
October 15, 2026 15:21
c88d8f4 to
f627fef
Compare
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
from
October 15, 2026 15:45
f627fef to
50c6a00
Compare
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
2 times, most recently
from
October 16, 2026 05:40
01d6600 to
874f2ca
Compare
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
2 times, most recently
from
October 16, 2026 06:40
1b571c7 to
86958ae
Compare
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
2 times, most recently
from
October 16, 2026 06:59
b7c5336 to
bbe5bc7
Compare
…utput Characterization tests before the complexity refactors: the command line's output and exit status for every command, the ordered schema and validation violations for malformed registries, enforcer descriptions, mermaid graphs, CI test-collection checks and every field the workflow reader extracts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader handles one key line at a time: step tracking, one-line values, run: block scalars and matrix entries each get a method. parse_jobs hands the jobs body to a helper that splits it into jobs, and the two-character quote check gets a named constant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Characterization tests for the version bump inference, the changelog fetch, the collector verifier's Google Cloud reads and delivery wait, the baseline capture's request probes, the migration contract workflow guard, the household event command's audit records and proxy port, the v1 metadata difference shapes, the Cloud Run load generator and the local boot smoke test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…scripts HTTP statuses use http.HTTPStatus; the changelog fragment and Alembic metadata difference lengths get named constants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alue verify and _wait_for_delivery take a CloudReadback (project, metric location and access token) and the delivery wait takes the VerificationProbe, instead of six separate arguments. The command line and the environment variables it reads are unchanged; a 404 is named HTTPStatus.NOT_FOUND. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_client_loop takes the cell's settings, deadlines and record list as one _LoadCellRun instead of seven arguments, and status classification names its codes with http.HTTPStatus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e value The command's arguments, output and environment variables are unchanged; the highest TCP port gets a named constant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Health checks compare against HTTPStatus.OK; the output, exit status and process handling are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fake budget-window result becomes a keyword-only dataclass, and the request bodies and expected response subsets move from if-chains into tables keyed by path and method. Each lookup returns a fresh copy, as the if-chains did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
create_mock_reform_impact drops three parameters no test ever passed, create_mock_budget_window_batch_execution takes the batch's year-by-year progress as one MockBatchProgress, and the cached-error test takes its service, parameters and mocks through one composite fixture, set up in the same order as before. The request-plumbing test's running-years poll passes its progress as a MockBatchProgress too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each region is a keyword-only _Region whose source() returns the same mutable SimpleNamespace the registry held before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The household-lock test's before_cursor_execute listener uses SQLAlchemy's named=True form, so it no longer spells out six arguments it ignores. The user-policy route tests' _association_read drops the country, user and policy parameters no caller passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each case is a _PersistenceFailure, and the test IDs are rebuilt to match the ones pytest generated for the seven separate parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…motion checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rage checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The typed-failure worker becomes a small transport class whose app name the test switches for the retry, the version routes, setup options, stored impacts and economy requests become helpers, and the recorded failure checks move into two assertion helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each downgrade target gets its own assertion helper and every return to head shares one upgrade-check-assert helper; the migration commands, SQL and assertions run in the same order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The helpers extracted from long tests and the new characterization tests get annotations; JSON bodies and ORM rows the tests index stay typed as Any, and the rules loader's downgrade reason is typed as str. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Selecting every ruff rule turns on SLOT001, which asks tuple subclasses to define __slots__. The enum-normalization test's tuple-valued enum gets an empty __slots__; its members, values and normalization are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every rule family now passes, so pyproject.toml selects ALL instead of the per-group list. It ignores COM812 and ISC001, which conflict with ruff format (ruff's documentation says to disable them with the formatter), and D203 and D213, which are mutually exclusive with the kept D211 and D212. The per-file ignores and namespace packages are unchanged. The api.quality.ruff-lint rule's enforcer codes become ["ALL"], which the rules tool's select check and hidden-rule discovery both accept as is, and its statement names the four ignores and why. The rendered rules page and the AGENTS.md rules block are regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3891's user-route credential check took the contract workflow guard's _check_workflows past the complexity limit (C901). Each request's key now comes from _request_key and its problems from _request_violations, which runs the same checks in the same order, so the guard reports the same violations in the same order; the pinned workflow-guard test and the credential tests pass unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n factory #3916 gave create_mock_modal_execution a run_progress parameter, its sixth (PLR0913), but no test passes it: both callers build the default execution. The factory now always reports no run progress, as every caller already received; the tests that relay progress build their executions directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3891's previous-revision test picks a value for each required column through _test_value, whose type checks exceeded the complexity and return limits (C901, PLR0911). The type checks move to TYPED_TEST_VALUES, an ordered table that keeps Enum ahead of its String base, so every column gets the same value as before; the lifecycle tests pass against a disposable PostgreSQL 17 database. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3891's live signed-in lifecycle and signed-out upgrade tests exceeded the statement limit (PLR0915). Each saved resource's round trip runs in _assert_saved_resource_lifecycle, which takes the resource, its v1 field and id as one _SavedResource; the linked reform, report and export checks run in _assert_export_links_the_saved_reform; and the signed-out saving checks run in _assert_signed_out_saving. The requests, their bodies and order, and the assertions are unchanged. (The stack's split of the earlier live policy lifecycle test no longer applies: #3891 replaced that test.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3891's test that signed-in user resources log Supabase sources took five parametrized arguments besides monkeypatch (PLR0913). Each case is now a _UserResourceRequest, and the test IDs are rebuilt to match the ones pytest generated for the five separate parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
from
October 16, 2026 07:05
bbe5bc7 to
1204051
Compare
This branch has not been deployed
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.
Fixes #3931
Summary
Phase 1 step 1.8, group 8b, part 3 of 3: tests, scripts and the rules tool, refactored within ruff's complexity limits, then
select = ["ALL"]. Stacked on #3933. This completes step 1.8.scripts/rules/, still standard-library only and runnable on Python 3.11):HTTPStatusmembers. Each command-line interface is unchanged: the same--helptext, output and exit codes. New tests cover each script.ifchains in the v1 contract test.ALL:pyproject.tomlselects every rule, and ignores only the two that conflict withruff format(COM812,ISC001) and one of each mutually exclusive docstring pair (D203,D213).PT.ALLfound one new finding, a tuple-valued test enum without__slots__, which gets its own commit.api.quality.ruff-lintnow listsALL, and its statement gives the four ignores and why.Testing
make testset at this branch's tip: 2,919 passed, which is the base's 2,433 plus 166, 249 and this PR's 71.uvx ruff@0.15.12 check .(withALL) andruff format --check .are clean. Ruff reports no formatter conflicts.make typecheck-v2is clean.no-untyped-def. Tests are outside the mypy gate and exempt from annotation rules./v2/openapi.jsonpreview and the legacy spec are byte-identical toruff-idioms-arguments, with and withoutOLD_SIMULATION_GATEWAY_URLset..githubscripts read the same environment variables in the same order. The collector'sCOLLECTOR_ID_TOKENandGOOGLE_OAUTH_ACCESS_TOKENare exported byverify_observability_collector.shfrom gcloud.OBSERVABILITY_PROJECT_IDandOBSERVABILITY_METRIC_LOCATIONcome fromvars.*indeploy-observability-collector.yml. I haven't checked that those repository variables exist in GitHub's settings.CI completeruns until the PRs below merge.🤖 Generated with Claude Code