Skip to content

Single-source the public-surface mypy gate in [tool.mypy] instead of four hand-copied flag strings #919

Open

Description

@cemililik

Deferred work · S1-addendum: [tool.mypy] · severity Low · cost ~1 h · recorded in docs/roadmap/risks-and-decisions.md:250

Summary

The typing gate (mypy --strict --follow-imports=silent forgelm/__init__.py forgelm/_version.py tests/typing/public_surface_probe.py) is copied verbatim into ci.yml, CLAUDE.md, AGENTS.md and CONTRIBUTING.md, and only tests/test_guard_wiring.py keeps the copies identical. The Phase 16 S1 addendum deferred a [tool.mypy] single source because it would have changed the gate's invocation in the middle of a review round; that round has closed.

Condition or budget

None left: the reason for deferring (a mid-review change) no longer applies.

State today (re-checked 2026-10-09)

pyproject.toml has no [tool.mypy] section and no mypy.ini exists.

Related

#662 and #686 concern what the gate covers, not where its configuration lives.

Acceptance criteria

  • The flags and files are declared once in [tool.mypy], the four copies become a bare invocation, and tests/test_guard_wiring.py pins the new form.

Recorded in docs/roadmap/risks-and-decisions.md (read at f94595f) and re-checked against the code on 2026-10-09.

Activity

  1. added
    severity: lowMinor defect, inaccuracy or rough edge
    wave: 4Roadmap wave 4: low / info / watch, when touching the module
    source: roadmapPlanned or deferred work recorded in docs/roadmap/
    on Oct 9, 2026
  2. cemililik commented on Oct 11, 2026

    @cemililik
    CollaboratorAuthor

    Where to start

    Thanks for taking a look. Please confirm the issue is unassigned and comment before starting so work does not overlap.

    Start with these files on development:

    Move the existing strict/follow_imports/files values into [tool.mypy], then replace the four copied flag/file lists with the same bare mypy invocation. Update guard-wiring assertions to enforce the new single source. Run python3 -m mypy and the wiring test; prove the public-surface files and strictness stay identical. Do not expand typing scope or fix internal typing debt.

    No [tool.mypy] exists at the verified SHA. The eventual issue PR includes CI changes explicitly requested by that issue; none are made in this preparation task.

    Run the focused tests:

    pytest tests/test_guard_wiring.py --no-cov

    Run these guards/checks as applicable to the changed files:

    ruff format --check tests/test_guard_wiring.py
    ruff check tests/test_guard_wiring.py
    python3 tools/check_bilingual_parity.py --strict
    python3 tools/check_bilingual_code_blocks.py --strict
    python3 tools/check_anchor_resolution.py --strict
    python3 tools/check_tr_links_prefer_mirror.py --strict
    python3 tools/check_usermanual_self_contained.py --strict
    python3 tools/check_usermanual_schema_drift.py --strict
    python3 -m mypy
    python3 tools/check_skill_mirror_parity.py --strict

    If user-facing documentation changes, update the existing Turkish mirror in the same PR; keep commands, code and terminal output in English and structurally aligned. English-only contributor standards need no new mirror.

    Open the PR against development with Fixes #919 once every finding is resolved or explicitly closed with a reason; use Refs #919 for partial work and list the resolved finding IDs.

  3. added
    help wantedExtra attention is needed
    and removed on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: dev-toolingCode area: dev-toolinghelp wantedExtra attention is neededseverity: lowMinor defect, inaccuracy or rough edgesource: roadmapPlanned or deferred work recorded in docs/roadmap/wave: 4Roadmap wave 4: low / info / watch, when touching the module

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions