Skip to content

[REFACTOR] Fix mypy type errors in tools/recorders/misc modules #433

Closed

Description

@squid-protocol

🎯 Objective

The long tail of the 235 mypy errors measured in #429 -- everything outside the 5 core-engine files covered by #432. As of the initial measurement:

`galaxyscope.py` (16), `spatial_mapper.py` (13), `cobol_jcl_auditor.py` (8), `security_lens.py` (8), `manifest_parser.py` (8), `dev_agent_firewall.py` (6), `llm_recorder.py` (6), `gitgalaxy_config.py` (4), `ai_appsec_sensor.py` (3), plus ~15 files with 1-2 errors each.

Should do #431 (root-cause fixes) first -- re-measure remaining counts here afterward.

🛠️ Approach

Same as #432: fix in small PRs, remove resolved entries from `tests/mypy_audit_baseline.json` (#430) as you go. Lower priority than the core-engine cleanup (#432) since these modules see less traffic, but still worth clearing out over time so the baseline trends toward zero.

Parent: #429

Activity

  1. added
    python
    refactor
    priority: low
    on Jul 25, 2026
  2. squid-protocol commented on Jul 25, 2026

    @squid-protocol
    OwnerAuthor

    No dedicated session here yet, but two files in this issue's scope got cleared as a side effect of #432's `galaxyscope.py` session: `binary_anomaly_detector.py` and `supply_chain_firewall.py` (their `run_xray_audit`/`run_firewall_audit` `config` parameter signatures didn't match their own docstrings' documented dual-calling-convention support -- fixed alongside `galaxyscope.py` since that's what called into them).

    Remaining in this issue's "long tail" scope, largest first: `manifest_parser.py` (8), `security_lens.py` (8), `cobol_jcl_auditor.py` (8), `llm_recorder.py` (6), `gitgalaxy_config.py` (4), `dev_agent_firewall.py` (4), plus a dozen-ish files with 1-3 errors each. Still open, nothing else started.

  3. squid-protocol commented on Jul 25, 2026

    @squid-protocol
    OwnerAuthor

    Done -- baseline for this scope reached 0.

    File(s) Errors PR
    galaxyscope.py 16 (resolved as part of the earlier root-cause/#431 pass)
    security_lens.py 8 #452
    manifest_parser.py 8 #454
    cobol_jcl_auditor.py 8 #456
    llm_recorder.py 6 #458
    dev_agent_firewall.py 4 #460
    gitgalaxy_config.py 4 #462
    ai_appsec_sensor.py 3 #464
    remaining ~16 files (1-2 errors each) 24 #467

    manifest_parser.py's locate_physical_package() and llm_recorder.py's _build_markdown() fixes were genuine bugs, not just annotations -- a Path return type that could actually be None, and two variable-name collisions across a ~1100-line function. Details in each PR body.

    Full epic wrapped up in #467 -- see #429 for the final summary.

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

    priority: lowpythonrefactor

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions