Skip to content

[CHORE] Update infra to ty 0.0.53: ignore possibly-missing-submodule and unused-type-ignore-comment #1892

Description

@oberstet

Summary

Our check-typing recipe runs Astral's ty unpinned (we deliberately ride the
latest release and adjust on the go — ty ships near-daily and we want to stay
current rather than freeze). ty 0.0.53 started emitting two diagnostic classes on
our existing, unchanged source that the recipe's --ignore allowlist does not yet
cover, so ty check now exits 1 and the Code Quality Checks job fails.

This is pure toolchain drift — not a code regression. The fix is to add the two
new rules to the recipe's ignore list.

Evidence

Surfaced on PR #1887 (an unrelated one-line example cleanup), CI run 75977933002,
job Code Quality Checks → "Code static typing (via ty)":

+ ty==0.0.53
...
Found 922 diagnostics
error: recipe `check-typing` failed with exit code 1
##[error]Process completed with exit code 1.

Diagnostic breakdown — 0 errors, all warnings:

count rule where
921 warning[possibly-missing-submodule] vendored src/autobahn/wamp/gen/** (FlatBuffers-generated), plus a few flatbuffers.* re-export sites in message_fbs.py / message.py / protocol.py
1 warning[unused-type-ignore-comment] src/autobahn/util.py:1062 (tags = OrderedDict() # type: ignore)

Every diagnostic is in src/autobahn/…; none in examples/ or .audit/, confirming
PR #1887 is not the cause.

Timeline confirms drift, not code:

  • last green master run: 2026-06-19 (Fix 1878, Fix 1878 #1879) on an earlier ty
  • this run: 2026-06-25 picked up ty 0.0.53 → red

Master HEAD would be red on a re-run today; the breakage is independent of any open PR.

Root cause

check-typing (in justfile) invokes ty check … src/autobahn/ with an explicit
--ignore <rule> allowlist (the # FIXME: Many ignores needed until type annotations are fixed block). ty 0.0.53 emits possibly-missing-submodule (the vendored
FlatBuffers runtime uses flatbuffers.number_types / flatbuffers.encode /
flatbuffers.packer submodule access that ty can't statically resolve) and flags
the now-redundant blanket # type: ignore in util.py as unused-type-ignore-comment
— neither is in the allowlist, so ty returns a non-zero exit.

Proposed fix

Add to the check-typing recipe's ignore list:

        --ignore possibly-missing-submodule \
        --ignore unused-type-ignore-comment \

Rationale per rule:

  • possibly-missing-submodule — fires on vendored, generated FlatBuffers code we do
    not hand-maintain; the imports are correct at runtime. Ignore (consistent with the
    existing unresolved-import / unresolved-attribute ignores for the same generated
    surface).
  • unused-type-ignore-comment — a single stale # type: ignore in util.py:1062.
    Ignoring the rule keeps this CHORE minimal and drift-only. (Optional follow-up: just
    delete the now-unneeded comment instead — but verify it doesn't resurface a different
    diagnostic on that assignment under the current ty.)

Explicitly not pinning ty. Policy is to ride the latest release and extend the
ignore list as ty evolves; pinning is rejected here on purpose.

Acceptance criteria

  • just check-typing (all venvs: cpy311–314, pypy311) exits 0 against current
    master with ty 0.0.53.
  • Code Quality Checks job is green.
  • No source change required beyond the recipe (the optional util.py comment
    removal can be a separate tidy-up).

Notes

  • Fix lands on its own fix_<n> branch / PR, merged to master, then merged into PR Remove duplicate run call for ApplicationRunner #1887
    so that PR can go green (its example/audit change is unrelated and correct).
  • This is the same class of issue addressed in crossbar by "handle ty rule name
    differences across versions in check-typing"
    — autobahn's recipe is the static
    --ignore variant and will keep needing these top-ups as ty advances. A future
    hardening (out of scope here) could auto-tolerate unknown/warning-level rules the way
    crossbar's recipe does.

Checklist

  • I have searched existing issues to avoid duplicates
  • I have provided a minimal reproducible example
  • I have included version information
  • I have included error messages/logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions