Repository navigation
Closed
Labels
priority/p2-mediumPriority P2: standard workscope/cliCore CLI framework, Typer subcommands, options, and tablestype/testType test: a new or changed test
Milestone
Description
Context & Rationale
Any gate in this repo can be passed by suppressing it.
Current counts:
src: 93type: ignore, 24# noqa, 13# nosec, 1pragma: no cover.tests: 166type: ignore, 7# noqa, 3# nosec.
mypy runs only on src, so warn_unused_ignores never prunes the 166 in tests. These are also unwatched:
- file-level directives;
- ruff
per-file-ignores; [[tool.mypy.overrides]]blocks;- coverage
omit.
A grep miscounts: 'nosec' matches inside 'nanosecond' (telemetry/tracer.py:929).
docs/ROADMAP.md:1064 (Type Escape-Hatch Ratchet, P2, no issue) covers blanket ignores and explicit Any, but not counts.
Scope & Deliverables
- Deliverable:
- One test in
tests/test_architectural_invariants.pycounts, withtokenize(comment tokens only), oversrcandtests:type: ignore;noqa, per rule code;nosec;pragma: no cover;pragma: no mutate;- file-level directives.
- From
pyproject.tomlit also countsper-file-ignoresentries,[[tool.mypy.overrides]]blocks and coverageomitentries. - The kinds live in
config/constants.pyand the ceilings inconfig/defaults.py, set to the counts at merge. Each check is count ≤ ceiling. - The failure message names the kind, the ceiling and the files. It says to fix the cause, or to raise the ceiling with a reason recorded in the task file.
- One test in
- Acceptance criteria:
- The test passes at merge.
- Adding one
# type: ignoreto a module insrcfails the test, naming the kind, the ceiling and the file. - A fixture with 'nanosecond' in a comment is not counted.
- Removing a suppression keeps the test green.
- The test runs in at most 1 s, with no new dependency.
- Key questions:
- Does feat(cli): blind exception handling policy #423 raise the BLE001 ceiling in its own PR? (proposed) Yes, with the reason in its task file.
- Constraint: Use ≤ so independent PRs merge cleanly, and lower a ceiling whenever you touch its kind.
Strategic Alignment
- Milestone: Backlog
- Depends on: feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586
Metadata
Metadata
Assignees
Labels
priority/p2-mediumPriority P2: standard workscope/cliCore CLI framework, Typer subcommands, options, and tablestype/testType test: a new or changed test
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 3, 2026
Lines cited at dcafadf.
After #1107 lands, add
ast-grep-ignoremarkers as one more kind in this item'stokenizepass.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107's ceiling counts. That is one pernet-rule id listed in a# ast-grep-ignore: <rule-ids>comment, undersrc, the tree feat(ci): hand-rolled URL and address parsing failsdevops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107's rules and test cover. A marker that lists two ids counts two, the same way this item countsnoqaper rule code.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 measured 110 rule ids on 99 marker lines at dcafadf. A comment count checked against the id ceiling would leave about 11 markers of slack, and the gap grows each time a marker gains an id.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107's ceiling. feat(ci): hand-rolled URL and address parsing failsdevops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107 addsDEFAULT_NET_CONSTRUCT_SUPPRESSION_CEILINGnext toDEFAULT_C901_SUPPRESSION_CEILING(config/defaults.py:694) and gives it its own count test. Compare this kind against that ceiling instead of declaring a second one for the same markers.devops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107's counter, or replace feat(ci): hand-rolled URL and address parsing failsdevops ci, AGENTS.md makes the library the rule, and reviews stop discarding the findings #1107's test with this pass, so that a single count backs the ceiling.dan-petty commentedon Oct 8, 2026
Linked: #423 and #1347. #1347 caps blind excepts per file, and #423 lowers those caps and adds
# noqa: BLE001markers that this item counts. Found by the 2026-10-08 backlog review.dan-petty commentedon Oct 14, 2026
Moved to v0.2.36: v0.2.36 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)
test(cli): suppression comments may not grow unnoticed (#849) (#1590)
dan-petty commentedon Oct 16, 2026
What changed
#1590, merged into
release/v0.2.36as 327fbfa.5 file(s) changed.
How it was verified
Check runs at 52531b1:
Acceptance Criteria of
docs/agent/tasks/task-849-suppression-comment-ceilings.md:tests/test_architectural_invariants.pycounts, withtokenize(comment tokens only), oversrcandtests:type: ignore,noqaper rule code,nosec,pragma: no cover,pragma: no mutate, file-level directives, andast-grep-ignorepernet-*rule ID (tests/test_architectural_invariants.py::test_suppressions_stay_under_their_ceilings).pyproject.tomlit also countsper-file-ignoresentries,[[tool.mypy.overrides]]blocks, and coverageomitentries (tests/test_architectural_invariants.py::test_every_comment_and_pyproject_suppression_kind_is_counted).src/devops_cli/config/constants.pyand the ceilings insrc/devops_cli/config/defaults.py, set to the counts at merge, with each check enforcingcount <= ceiling.# type: ignoreto a module insrcfails the test, naming the kind, the ceiling, and the file, and instructing to fix the cause or raise the ceiling with a reason recorded in the task file (tests/test_architectural_invariants.py::test_adding_a_type_ignore_in_src_fails_naming_kind_ceiling_and_file).'nanosecond'in a comment is not counted (tests/test_architectural_invariants.py::test_nanosecond_comment_and_string_literals_are_not_counted).tests/test_architectural_invariants.py::test_removing_a_suppression_keeps_the_ceiling_check_green).feat(release): v0.2.36 (#1615)