Repository navigation
Description
Problem Statement
[tool.ruff.lint] select (pyproject.toml:93) is E, F, I, N, W, UP plus four single codes: B017, RUF022, RUF043 and RUF068. The comment at pyproject.toml:88-92 leaves the rest of RUF to this item. The families that catch defects rather than style are not selected.
Measured at 9da1309 (release/v0.2.25) with the pinned ruff 0.16.8: uv run ruff check --no-cache --exit-zero --extend-select B,SIM,RUF,BLE,ASYNC,PT011,PT015,PT017,PGH003,B011,B015,B018 --statistics src tests reports 1,028 hits.
- 541 are
BLE001. feat(cli): blind exception handling policy #423 owns them and requires triage before enforcement. - 229 are
SIMrewrites, 105 of them nestedwithblocks (SIM117). These are readability preferences. The exception isSIM115(a file opened without a context manager), with 1 hit. - 9 are stale
noqacodes (RUF100) under the project config:ai/gateway_bench.py:69,97,100(S310),ai/gateway_tune.py:432(S603),tests/test_ai_gateway_tune.py:338(S102),tests/test_exceptions.py:172-173(F401),tests/test_sandbox_metrics.py:229andtests/test_sandbox_probe.py:133(N802). feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 plans to remove them; at 9da1309 it has not merged and they are all still present.commands/ci.py:160(noqa: UP036) is not one of them: it is a live suppression that only a narrowed--selectreports. - 21 are
RUF001confusable glyphs: 15 en dashes, 3×and 3ℹ, all deliberate. One example is the line-range regex atai/review_schema.py:380. - 33
B009and 7B010, 35RUF005and 8ASYNC109are style or deliberate (see the ignores below). - The rest, 146 sites in 73 files, include real defect classes:
- 38
raisestatements insideexceptwithoutfrom(B904), all insrc. The original cause drops out of the traceback. - 11
zip()calls withoutstrict=(B905):ai/review/defects.py:159,519,561,ai/review/pipeline.py:2570,2686,2845,ai/review/runner.py:1060,1080,1092,tests/test_review_page_line_numbers.py:113,131(the two test sites are also the twoRUF007hits, anditertools.pairwiseclears both rules at once).pipeline.py:2686copies each verified finding back onto its original. Every path in_validate_segment_findings(ai/review/verification.py:2078) returns one finding per input today. If that ever changed, the zip would silently leave the remaining findings unverified. - 12 mutable class attributes (
RUF012).WorkloadSandboxEngine._prior_samples(sandbox/engine.py:171) is one dict shared by every engine, read at:504and written throughselfat:533;commands/sandbox.pybuilds a fresh engine at eight sites (:139,207,239,281,428,638,755,960). - A
create_taskresult that is never stored (RUF006,ai/mcp/server.py:2983). The task can be garbage-collected before it finishes. - A
Path.home()option default evaluated at import time (B008,commands/mcp.py:96), and a shared list default (B006,commands/ai.py:862,= list(_AGENT_FILES)). - A conditional whose two arms are identical (
RUF034,github/pr_monitor.py:44). - 19 closures that read a loop variable (
B023): 18 in the Tarjan cycle test (tests/test_architectural_invariants.py:308-375,test_no_circular_imports_in_decoupled_subsystems; the nestedstrongconnectstarts at:343and the hits are at:351-367) and 1 attests/test_network_security_and_trace_correlation.py:34. Each closure runs inside its own iteration, so none misbehaves today. - An
itertools.batched()withoutstrict=(B911,ai/cache/valkey_cache.py:156). - One
RUF019(security/vault_broker.py:204) and oneRUF023(security/reference_extractor.py:336), both safe fixes.
- 38
- The 23 duplicate
__all__entries an earlier version of this item counted are gone.RUF068is selected now and reports 0.
Weak test assertions. PT011 finds 10 pytest.raises(ValueError) calls with no match=: tests/test_security_sandbox_and_protection.py:212,218,227,235,246, tests/test_http.py:67, tests/test_argo_fleet.py:467, tests/test_command_decorator.py:53, tests/test_consolidation_serialization.py:47, tests/test_harness.py:129. B011, B015, B018, PT015 and PT017 find 0. CONST_TEST_ASSERTION_LINT_RULES (config/constants.py:2603 at 9da1309; :2693 at 9c879ae, two commits later) pins only B017 and RUF043. The pin works through _ruff_enforces (tests/test_architectural_invariants.py:471) and test_no_test_certifies_a_failure_without_checking_it (:512-531), which reads pyproject.toml with tomllib at :523.
Blanket ignores. The Type Escape-Hatch Ratchet entry (docs/ROADMAP.md:1043, no issue) assigns its step (1) to this item: select PGH003 and turn on mypy's ignore-without-code (:1045). Both report 0 today. ruff --select PGH003 finds nothing, and uv run mypy --python-version 3.14 --strict --enable-error-code ignore-without-code src reports "Success: no issues found in 500 source files". Locking in this clean state costs nothing now.
Cost. Over three runs each at 9da1309, uv run ruff check --no-cache . took 1.50-1.64 s with today's selection and 1.54-1.89 s with the proposed one (uv start-up dominates both). Lint runs in devops ci (commands/ci.py:392-398), in the pre-commit hook (.pre-commit-config.yaml:36-41, ruff v0.16.8 with --fix) and in CI (.github/workflows/ci.yml:51). mypy reads [tool.mypy] both in devops ci (commands/ci.py:406-419) and in CI (ci.yml:57).
Drift. The knowledge-base page that agents retrieve still gives the selection as ["E", "F", "I", "N", "W", "UP"] (src/devops_cli/ai/knowledge_base/devops_cli/libraries/ruff_mypy_pytest.md:39). The only other places the string appears are quotes of this item's old description (docs/ROADMAP.md:1118, which is generated, and the task file), neither of which agents retrieve as library guidance. In the terminal, an unselected rule and a deliberately disabled rule look the same. ignore = ["E501", "N818"] (pyproject.toml:94) gives no reason for either entry.
Proposed Solution
pyproject.toml [tool.ruff.lint]
- Select the
B,RUFandASYNCfamilies. Drop the single codes they now cover (B017,RUF022,RUF043,RUF068).RUF100arrives withRUF, so the 9 stalenoqacodes above are removed in this PR if feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has not removed them first (ruff check --fixunder the project config does it; the# noseccomments beside theS310/S603markers stay). - Select the single codes
SIM115,PT011,PT015,PT017andPGH003. - Keep whatever feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has added (
C901,PGH004,max-complexity) if it has merged. - Ignore
B009,B010,RUF005andASYNC109, each with a one-line reason (see Key Questions). Add a reason toE501(ruff formatowns line length) and toN818(the 10 names inexceptions/ai.py:161-493, such asModelRetryandSuspendedResponseExpired, mirror pydantic-ai's exception API). - Set
allowed-confusables = ["–", "×", "ℹ"]for the 21 deliberate glyphsRUF001flags. If feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has added a[tool.ruff.lint]key allowlist meta-test, addallowed-confusablesto it; otherwise its meta-test fails. - Replace the comment at
:88-92with one line for each family left out:BLE(feat(cli): blind exception handling policy #423),SIM(preference,SIM115kept) andPT018(test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851).
[tool.mypy]: enable_error_code = ["ignore-without-code"].
Fix the 146 remaining sites in 73 files. These are the counts at 9da1309; re-measure at start. The sites are B904 38, RUF059 31, B023 19, RUF012 12, B905 11, PT011 10, B007 7, RUF010 4, RUF015 4, RUF007 2, and one each of RUF006, B911, B008, B006, SIM115, RUF019, RUF023 and RUF034 (138 + 8 = 146; the B020 an earlier count listed has no hit at 9da1309). Fix each PT011 site against its contract, as #421 did: either a narrower exception type or an escaped match=. B911 at valkey_cache.py:156 batches keys into chunks of 500 whose last chunk is normally short, so strict=False is the contract there, with the reason in the call.
Pins in tests/test_architectural_invariants.py
- Add
PT011,PT015,PT017,B011,B015andB018toCONST_TEST_ASSERTION_LINT_RULES, and update its comment (config/constants.py:2599-2603at 9da1309). - Pin
PGH003andRUF100in a suppression constant, not in the test-assertion constant. If feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has merged with such a constant, extend it withPGH003; otherwise addCONST_SUPPRESSION_LINT_RULEStoconfig/constants.pyholdingPGH003andRUF100, with a pin test modelled ontest_no_test_certifies_a_failure_without_checking_it, and let feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 addPGH004. - Pin
"ignore-without-code"in[tool.mypy] enable_error_codeby readingpyproject.tomlthe way:523does.
Docs
- In
ruff_mypy_pytest.md:36-40, name the selected families and point topyproject.tomlas the source. - In the delivering commit, correct
docs/agent/tasks/task-420-extend-the-ruff-rule-set-to-the-correctness-families.md(it says v0.2.25 and Backlog), record the measurements and mark it Done (tests/test_agent_task_files.py:12acceptsBacklog,Ready,In Progress,Done;:36-55rejects a PR field and any unchecked box outside a fence). - Add
changelog.d/420.md. Do not editCHANGELOG.mdordocs/ROADMAP.md:docs/ROADMAP.mdis generated bydevops roadmap rendersince feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate,render) #739 (banner atdocs/ROADMAP.md:4), anddevops pr check-readinessblocks a PR into a release branch that changes either (commands/pr.py:1648-1660,docs/agent/tasks/README.mdpoint 5).
Constraints
- Apply only ruff's safe fixes in bulk (
ruff check --fixwith the project config; 6 safe, 53 unsafe at 9da1309). Review each unsafe fix (RUF059,B007,RUF015) and each manual change by hand. Then run lint, types and tests together withuv run devops ci. - Never run
--fixunder a narrowed CLI--select. ItsRUF100treats the# noqa: F401re-export markers as unused and deletes them (at 9da1309--select RUF100alone reports 31 hits where the project config reports 9). - Change only what a rule demands. If a defect found along the way needs more than the rule's own fix, it becomes a candidate, not part of this PR.
- Keep feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586's
C901,RUF100,PGH004andmax-complexitysettings if present, and add no# noqa: C901. - The gate has a hard 5-minute budget. The lint step may change by less than 1 s, and new tests may add at most 1 s in total. Tests touch no network, no cluster and no real scanner.
- New tests use structural tuple assertions until test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851 settles that.
- This item lands after feat(release): production service image for scheduled jobs and webhook handlers #753 and feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (owner's order, 2026-10-03; see Key Questions); feat(github): single-entry item intake with duplicate detection and placement (
devops roadmap intake) #742 (owner: starts first) and fix(release): one fail-closed release path: cut branch from the remote release tip,uv.lockbump, draft flag, required label and milestone #982 may also land before it, and the sweep covers whatever has landed. fix(release): one fail-closed release path: cut branch from the remote release tip,uv.lockbump, draft flag, required label and milestone #982 shares no site with this item (itscommands/pr.pyedit is the exemption helpers at:1517-1536; this item's only sites there are the twoB904raises at:2127,2167). The counts are still from 9da1309: v0.2.25 keeps moving until the cut (by 9c879ae, two commits later,config/constants.pyhad grown by 90 lines), feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 may merge before the cut, and v0.2.25 leftovers descoped into v0.2.26 land ahead of this item. Re-measure at start.
Scope
One pull request: the pyproject.toml lint and mypy settings, the 146 site fixes plus the one SIM115 noqa, the 9 stale noqa removals if still present, the three pins and their tests, the knowledge-base page line, the task file and changelog.d/420.md.
Key Questions
- Which families does this item select?
B,RUFandASYNCas whole families, plusSIM115,PT011,PT015,PT017andPGH003as single codes. Their hits are defects or tests that cannot fail. Ruff is pinned (pyproject.toml:68,.pre-commit-config.yaml:37), so new rules in these families arrive only with a ruff bump PR, and that PR fixes or ignores them. - Is
BLEin scope? No. feat(cli): blind exception handling policy #423 ownsBLE001(541 hits) and requires triage before enforcement. The comment besideselectnames feat(cli): blind exception handling policy #423. - Is
SIMin scope? OnlySIM115. The other 228SIMhits are readability rewrites with no defect behind them, and 105 are nestedwithblocks in tests. An earlier version of this item listedSIM. The owner can put it back, at the cost of those 228 sites. - Is
PT018in scope? No. test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851 decides it together with the tuple-assert mandate (owner decision D1, recorded in feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 and test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851). The comment besideselectsays so. - Which rules inside the selected families are ignored?
B009/B010(getattr/setattr with a constant, 40 hits). Rewritingsetattr(record, "trace_id", ...)(telemetry/logging_bridge.py:16-17) as attribute access fails mypy strict and would need atype: ignore. The rule is about style, and following it adds an escape hatch.RUF005(35 hits).[*a, b]versusa + [b]is a style choice.ASYNC109(8 hits:commands/ci.py:265,core/process.py:354,github/rate_limiter.py:1953,http/broker.py:136,tests/test_ci.py:236,282,497,tests/test_ui_reactive.py:1221).run_subprocess_asynckills and reaps the child on timeout and raisesTimeoutExpired(core/process.py:416-423). A caller-sideasyncio.timeoutwould cancelcommunicate()and leave the child running. The othersrcsites pass the value on to an API that enforces it, for examplehttp/broker.py:136.RUF001is not ignored.allowed-confusablesadmits the en dash,×andℹ, which are deliberate and are the only three glyphs it reports.
B905:strict=Trueorstrict=False? Usestrict=Truewhere equal length is the contract. Where a mismatch can happen, handle it explicitly. Never writestrict=Falseonly to silence the rule. Atai/review/pipeline.py:2686, usestrict=True. Every return path of_validate_segment_findings(ai/review/verification.py:2078) yields one finding per input, so a mismatch is a defect that should raise.B904:from errorfrom None?from err. Usefrom Noneonly where the cause adds nothing or could carry a secret, and add a comment saying why.- How are the
B023sites fixed? If test(cli): whole-tree import-cycle and interface-layer invariants #848 has merged, the Tarjan test is gone and so are its sites. If not, restructuretest_no_circular_imports_in_decoupled_subsystems(tests/test_architectural_invariants.py:308-375) so no closure captures a loop variable and no function exceeds a C901 cap of 10. Measured at 9da1309, the test scores 15. A helper holding the per-root body would score 14, and a helper holding Tarjan with its nestedstrongconnectclosure would score 11. Either would need a# noqa: C901. Instead, use a module-level_import_cycles(root)and a module-level_strongconnect(state, v)over an explicit state object; these measured 6 and 8. If feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has merged and marked the test withnoqa: C901, remove that marker onceRUF100reports it unused and lower feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586's C901 ceiling to match. Attests/test_network_security_and_trace_correlation.py:34, bindfake_ipas a keyword-only default after*args(lambda host, port, *args, fake_ip=fake_ip, **kwargs: ...). A default placed before*argswould be overwritten bygetaddrinfo's third positional argument. Add nonoqa. - How are the
RUF012sites fixed? The TextualBINDINGSlists (ui/dashboard.py:118,168,ui/widgets.py:191,447,602,ui/pod_inspector.py:35) getClassVar[list[BindingType]]. The constant sets (ai/library/docs_ingester.py:42,docker/sandbox.py:179) becomeClassVar[frozenset[str]]. The three test-class attributes (tests/test_ext_langchain.py:36,tests/test_pydantic_ai_function_signature.py:256,273) getClassVar._prior_samplesmoves into__init__. If sharing across engines turns out to be intended, it becomes aClassVarwith a comment saying so. Moving the sets intoconfig/constants.pyis not part of this item. - How are
B006(commands/ai.py:862) andB008(commands/mcp.py:96) fixed? Both are Typer option defaults. Usetyper.Option(default_factory=...), which Typer 0.27.2 (pyproject.toml:13) supports, or aNonedefault resolved in the function body. Compare the command's--helpoutput before and after, and record any change in the task file. TheB006fix is a one-line change inside the agents command; fix(ai): streameddevops ai chatturns send the user's message #874, docs(agents): instruction surfaces state only what is true, anddevops ai agentsnever overwrites AGENTS.md #840 and feat(ai): pinned invariants survive memory summarization, lead every system prompt and recur on a cadence #985 (v0.2.27) edit other functions ofcommands/ai.pylater and rebase a single line. - What about
SIM115atgithub/rate_limiter.py:218? The function returns the open file so the caller keeps holding theflock, and awithblock would release it. Add an inline# noqa: SIM115that gives this reason. If test(cli): suppression comments may not grow unnoticed #849 has merged, raise itsnoqaceiling forSIM115with the reason in the task file. - Where is
PGH003pinned? In the suppression constant, besideRUF100(andPGH004once feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 adds it). It does not go inCONST_TEST_ASSERTION_LINT_RULES(ROADMAP.md:1045). - Should
B011,B015andB018be pinned too? Yes. They catch tests that cannot fail, and they arrive withB. Without a pin, anignoreentry would turn them off silently. They have 0 hits. - What about other families (
PLE,PLW,DTZ,PIE,TRY,PERF,S)? Not in this item.Srepeats bandit, which the gate already runs.PLW0603needs a separate decision (assessment S5). Each family would need its own measured item. - Does fixing
RUF034atgithub/pr_monitor.py:44change any behaviour? No. Both arms are the literal"COMPLETED", so collapsing them to"COMPLETED"is behaviour-neutral. Whether the original author meant a different value does not matter in production, because both builders pass a bucket (pr_monitor.py:443,:482). - Is feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 a dependency of this item? No (settled). A dependency is an item that must be delivered before this one can be. Nothing here needs feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586:
RUFbringsRUF100on its own, thePGH003pin needs a constant whether or not feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has one, and theB023restructure keeps every function at or under 10 so feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 never needs to mark the Tarjan test. feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 sits in v0.2.25, the current release (docs/ROADMAP.md:784-798; its task file still says Backlog, and it has no branch), and v0.2.26 does not start until v0.2.25 ships, so when this item starts feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 has either merged or been descoped into v0.2.26. If it is descoped, it lands before this item (its three overlaps are the[tool.ruff.lint]table,tests/test_architectural_invariants.pyand the 9RUF100sites, and the v0.2.25 leftover keeps precedence), or this item keeps theRUF100fixes it already lists; either way the plan is the same: proceed, and apply the conditionals above (extend feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586's constant and key allowlist if they exist, otherwise createCONST_SUPPRESSION_LINT_RULES; remove the 9 stale codes if still present). Folding feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586'sC901/PGH004settings into this PR would make it deliver two items and is not done. - Where does this item sit in v0.2.26? Third, after feat(release): production service image for scheduled jobs and webhook handlers #753 and feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (owner's order of 2026-10-03), so its sweep also covers their new code. It touches 146 sites in files that refactor(github): one github session per identity owning token, quota and transport #767, feat(cli): service mode for
devops servewith github webhooks, a polling tick and per-repo job queues #752, fix(security): network references come from url and ip syntax, not identifier-prefix and property-suffix lists #431, feat(release): production service image for scheduled jobs and webhook handlers #753 and refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 edit (github/rate_limiter.py,github/pr_monitor.py,ai/review/runner.py,ai/review/pipeline.py,config/constants.py,tests/test_architectural_invariants.py,pyproject.toml). Merged early, every later v0.2.26 PR only has to pass the widened rule set; merged mid-release, it would force every open PR to rebase and rerun CI. The v0.2.26 chain is: feat(release): production service image for scheduled jobs and webhook handlers #753, feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741, this item; then refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832, refactor(ci): github ci runs the gate throughdevops cifrom one check table #843, feat(cli):devops ci testselects tests from a coverage index built on demand bydevops ci coverage --build-index#406 on the CI side, and refactor(github): one github session per identity owning token, quota and transport #767 (Part A), feat(cli): service mode fordevops servewith github webhooks, a polling tick and per-repo job queues #752, feat(k8s): the roadmap service runs in the cluster's devops namespace, reachable from outside only on /webhooks/github #1083, feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981 on the service side; feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742 starts in parallel on day one. fix(release): one fail-closed release path: cut branch from the remote release tip,uv.lockbump, draft flag, required label and milestone #982 (the release-path fix split from feat(release): item closure summaries, generated changelog and automatic release cut (devops roadmap close) #743) lands after feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 and precedes feat(release): item closure summaries, generated changelog and automatic release cut (devops roadmap close) #743; it may land before or after this item, because it touches none of this item's sites (commands/release.pyhas no hit; incommands/pr.pyit edits:1517-1536and this item fixesB904at:2127,2167; inconfig/constants.pyit edits:2577-2579and this item edits:2693and adds a constant). Whichever of the two lands second rebases nothing of substance.
Acceptance Criteria
-
uv run devops cipasses. Verified by the gate. -
uv run ruff check --no-cache .exits 0 with the new config.uv run ruff check --show-settings src/devops_cli/__init__.pylistsB904,B905,RUF006,RUF012,RUF100,PT011,SIM115andPGH003underlinter.rules.enabled, does not listB009,B010,RUF005orASYNC109there, and showslinter.allowed_confusables = ['–', '×', 'ℹ']. Verified by running both commands; the output goes in the task file. Do not check with a narrowed CLI--select: it replaces the config's selection and drops itsignorelist, and itsRUF100then flags the# noqa: F401re-export markers as unused. Running--fixon it would delete those markers. -
uv run mypy --python-version 3.14 --strict srcpasses with the newenable_error_code. Add a bare# type: ignoreto a line insrcthat has a real type error. mypy must then fail, and its output must include[ignore-without-code]. A bare ignore on a clean line does not prove the setting, because strict mode already fails it as[unused-ignore]. The same bare comment added to a test file fails ruffPGH003. Verified by a local edit, reverted and recorded in the task file. - Taking any rule in
CONST_TEST_ASSERTION_LINT_RULESout of enforcement failstest_no_test_certifies_a_failure_without_checking_it, whether it is deleted fromselector it or its family is added toignore. Doing the same toPGH003orRUF100, or removingignore-without-code, fails the suppression pin test. Verified by local edits, reverted and recorded in the task file. - Every
ignoreentry, and every family left out, has a one-line reason inpyproject.toml. Verified by reviewing the diff. - The PR adds no
per-file-ignoresand no file-level# ruff: noqa. It adds exactly one inlinenoqa(SIM115atgithub/rate_limiter.py:218, with its reason) and no new# noqa: C901. Verified withgit diff -U0 <base>...HEAD -- '*.py' | grep -E '^\+.*noqa', which prints only theSIM115line (removing the 9 stale codes leaves nonoqaon a+line: each is the only code on its marker). If an edit touches a line that carries an existing feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586noqa: C901marker unchanged, the task file lists that line. - The task file lists each fix that changes runtime behaviour (
B905made strict,RUF012moved onto the instance,RUF006,B006,B008,B911) next to the test that covers it, whether existing or new. If_prior_samplesmoves onto the instance, a new test shows that twoWorkloadSandboxEngineinstances do not share samples. Verified in review. - The lint step changes by less than 1 s, measured as three runs of
uv run ruff check --no-cache .before and after. New tests add at most 1 s in total, measured withuv run pytest tests/test_architectural_invariants.py tests/test_sandbox_lifecycle.py --durations=0(or whichever test files the PR adds to). Both figures go in the task file. -
grep -rnF '"E", "F", "I", "N", "W", "UP"' srcreturns nothing. -
changelog.d/420.mdexists and the PR changes neitherCHANGELOG.mdnordocs/ROADMAP.md. Verified bydevops pr check-readiness. - The PR merges after feat(release): production service image for scheduled jobs and webhook handlers #753's and feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's PRs. Verified by
git log --first-parenton the release branch at the cut: the only v0.2.26 item PRs before it are feat(release): production service image for scheduled jobs and webhook handlers #753, feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 and, if they landed first, feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742 and fix(release): one fail-closed release path: cut branch from the remote release tip,uv.lockbump, draft flag, required label and milestone #982, plus v0.2.25 leftovers descoped into v0.2.26 and feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 if descoped.
Out of Scope
BLE001(feat(cli): blind exception handling policy #423), the 228SIMrewrites other thanSIM115,PT018(test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851), and thePLE,PLW,DTZ,PIE,TRY,PERFandSfamilies.C901,PGH004,max-complexity, the C901noqamarkers and the[tool.ruff.lint]key-allowlist meta-test (feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586).TID251for the subprocess runner (docs/ROADMAP.md:955).- Steps (2) and (3) of the Type Escape-Hatch Ratchet entry (
docs/ROADMAP.md:1045): mypy-baseline and the review note. - Moving the
RUF012constant sets intoconfig/constants.py. - Any defect found along the way that needs more than the rule's own fix.
- Editing
CHANGELOG.mdordocs/ROADMAP.md.
Dependencies
No item must be delivered before this one. The numbers below are sequencing and file overlaps.
- feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586 (v0.2.25): not a dependency; shares
[tool.ruff.lint],tests/test_architectural_invariants.pyand the 9RUF100sites. If descoped into v0.2.26 at the v0.2.25 cut it lands before this item; otherwise no action. - fix(release): one fail-closed release path: cut branch from the remote release tip,
uv.lockbump, draft flag, required label and milestone #982 (v0.2.26, split from feat(release): item closure summaries, generated changelog and automatic release cut (devops roadmap close) #743): after feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 and before feat(release): item closure summaries, generated changelog and automatic release cut (devops roadmap close) #743; may precede this item. No shared site:commands/release.pyhas no hit, itscommands/pr.pyedit (:1517-1536) is apart from this item'sB904sites (:2127,2167), and itsconfig/constants.pyedit (:2577-2579) is apart from:2693. - refactor(github): one github session per identity owning token, quota and transport #767 (v0.2.26, Part A): lands after this item; its body names
github/rate_limiter.py,github/pr_monitor.pyandai/review/runner.py, where this item fixesSIM115,ASYNC109,RUF034andB905sites. The transport, ledger, error-class and Link-pagination half is refactor(github): the github session owns transport, ledger, error classes and link pagination #983 (v0.2.28, after fix(github): pr monitor reports copilot as idle or completed when its timeline or reviews read fails #806) and rebases on these fixes too. - feat(cli): service mode for
devops servewith github webhooks, a polling tick and per-repo job queues #752 (v0.2.26): lands after this item; its body namesgithub/rate_limiter.py, where this item adds the one inlinenoqa(SIM115at:218). - fix(security): network references come from url and ip syntax, not identifier-prefix and property-suffix lists #431 (v0.2.26): lands after this item; its body names
ai/review/pipeline.py(B905at:2570,2686,2845) andconfig/constants.py(this item extendsCONST_TEST_ASSERTION_LINT_RULESand adds a suppression constant). - feat(release): production service image for scheduled jobs and webhook handlers #753 (v0.2.26): lands before this item (owner, 2026-10-03); this sweep covers its edits to
tests/test_architectural_invariants.pyandpyproject.toml. - refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 (v0.2.26): lands after this item and opens the CI chain refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 -> refactor(ci): github ci runs the gate through
devops cifrom one check table #843 -> feat(cli):devops ci testselects tests from a coverage index built on demand bydevops ci coverage --build-index#406; its body namestests/test_architectural_invariants.pyandpyproject.toml. - refactor(ci): github ci runs the gate through
devops cifrom one check table #843 (v0.2.26): lands after refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832; it changes how CI runs the lint step, and the lint-timing criterion here assumes the currentuv run ruff check .invocation atcommands/ci.py:392-398. - feat(cli):
devops ci testselects tests from a coverage index built on demand bydevops ci coverage --build-index#406 (v0.2.26, moves to v0.2.28 only if decided at the v0.2.25 cut): lands after refactor(ci): github ci runs the gate throughdevops cifrom one check table #843; its body namespyproject.toml(pytest and coverage tables), the file whose[tool.ruff.lint]and[tool.mypy]tables this item edits. - feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (v0.2.26): lands before this item; its new
commands/k8s/modules and tests join the sweep. feat(k8s): the roadmap service runs in the cluster's devops namespace, reachable from outside only on /webhooks/github #1083 and feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981: the service chain's tail, after refactor(github): one github session per identity owning token, quota and transport #767 and feat(cli): service mode fordevops servewith github webhooks, a polling tick and per-repo job queues #752; no file overlap. - feat(ai): pinned invariants survive memory summarization, lead every system prompt and recur on a cadence #985 (v0.2.27): touches
commands/ai.pyafter fix(ai): streameddevops ai chatturns send the user's message #874 and docs(agents): instruction surfaces state only what is true, anddevops ai agentsnever overwrites AGENTS.md #840, in different functions from theB006fix at:862. - fix(ai): the knowledge base names only commands, options and components that exist #920 (v0.2.27, moves to v0.2.28 only if decided at the v0.2.25 cut): rewrites the knowledge base after docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840 and after this item's edit atruff_mypy_pytest.md:39. - feat(cli): blind exception handling policy #423: owns
BLE001; status not confirmable from the repository. - test(cli): retire the tuple-assert mandate and detect opaque tuple asserts and presence-only tests #851: decides
PT018and the tuple-assert mandate (docs/ROADMAP.md:989); status not confirmable from the repository. - test(cli): whole-tree import-cycle and interface-layer invariants #848: replaces the Tarjan test, which holds 18 of the
B023sites; not merged at 9da1309. - test(cli): suppression comments may not grow unnoticed #849: adds suppression ceilings, which will count the one new
noqa; not merged at 9da1309, and no ceiling test or constant exists. - feat(cli): tests that cannot fail correctly #421 (closed): the precedent for fixing
PT011sites against their contract. - feat(github): github-sourced roadmap, migration and generated roadmap view (
devops roadmap migrate,render) #739 (merged, 6948e1c): madedocs/ROADMAP.mda generated file; steps (2) and (3) of the escape-hatch entry atdocs/ROADMAP.md:1043have no issue. - feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686 and fix(mcp): mcp tools and resources call commands and options that exist #836 (shipped in v0.2.24 through the release squash e6ce3db): feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (tab-k8s) #686 addedui/pod_inspector.py:35and fix(mcp): mcp tools and resources call commands and options that exist #836 moved theai/mcp/server.pysite to:2983.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 1, 2026
Moved from v0.2.25 to v0.2.26 to make room for the seven P1 items left open in the shipped v0.2.23, which were committed earlier. The roadmap-job items placed in v0.2.25 stay, and this item is among the oldest of the rest.
dan-petty commentedon Oct 3, 2026
Owner's order of 2026-10-03: #753 and #741 merge before this item (and #742 may, starting first), so the sweep covers their code. The first-merge criterion is reworded to match.
dan-petty commentedon Oct 3, 2026
Lines cited at dcafadf.
At 132ecc5,
config/constants.py:3003-3012is:3037-3046.#1107 also edits
[tool.ruff.lint] selectand the[tool.ruff.lint]key allowlistCONST_RUFF_LINT_KEYS(config/constants.py:3003-3012), and it lands after this item.allowed-confusables. Its out-of-scope line forTID251on the subprocess runner still holds, so it adds neitherTID251norflake8-tidy-imports.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 selectsTID251and banssocket.inet_aton,socket.inet_ntoa,socket.inet_ptonandsocket.inet_ntopthrough a[tool.ruff.lint.flake8-tidy-imports.banned-api]table, so it adds its own key,flake8-tidy-imports.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 rebases onto this item and keepsallowed-confusablesand this item'sselectentries beside its own. This item needs no change for feat(ci): hand-rolled URL and address parsing failsdevops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107.feat(cli): extend the ruff rule set to the correctness families (#420) (
feat(release): v0.2.26 (#1178)