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
3 times, most recently
from
October 14, 2026 22:56
092a7b9 to
61abab1
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cross-field check splits into status conflicts and checker conflicts, and the proof check counts the CI fields from PROOF_CI_FIELDS instead of a literal 3. 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>
…hases 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>
anth-volk
force-pushed
the
ruff-complexity-tests-scripts
branch
from
October 15, 2026 00:06
61abab1 to
c88d8f4
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