Skip to content

P0 — Harden Python type checking and configuration semantics #245

Description

@tomdps

Parent

EPIC #243. Tracking parent only: implementation was delivered sequentially by #256 and #257.

Goal

Make python.types one production, fail-closed authority per canonical Python project. A project runs configured/explicit mypy or Pyright over the exact after-state; it never runs both, guesses brand precedence, abandons a configured-but-missing authority, parses undocumented prose, or reports zero diagnostics without execution evidence.

Accepted prerequisites

#197 established one disposable exact graph session per before/after ValidationFileView, complete-universe refusal, fail-closed exact graph errors, and shared graph-core Python import materialization. Both type-authority implementation slices are now merged into dev.

Delivery graph

Strict order completed: #197 accepted -> #256 -> #257 -> close #245 -> #211.

Parent contract

  1. Exactly one authority is selected per PythonProjectContext.contextFingerprint; config ambiguity is invalid_config, configured missing is tool_unavailable, both available without authority is ambiguous, and no fallback runs.
  2. Checker input is one complete ValidationFileView after-state: source/config/plugins/stubs/support files and project semantics match the equivalent on-disk tree.
  3. Machine protocols and exits are parsed fail-closed; clean, findings, unavailable, invalid, timeout, unsupported, crash/protocol/tool failure, and disabled states carry per-project execution provenance.
  4. Every project result is retained and deterministically aggregated; a failure in one does not erase siblings.
  5. Validation never installs/syncs an environment, rewrites config, mutates source/lock/cache/environment files, or leaks temp roots.
  6. Real pre-provisioned tools and clean packed public opcore execution are mandatory; shims alone are not completion evidence.

Original acceptance mapping

Capability Owner Evidence
Authority algorithm and source-safe capability receipt #256 defines; #257 completes mixed-provider cases PR #278 and PR #279
mypy config/plugin/stub/namespace/strict semantics and JSON protocol #256 PR #278, merged to dev as 40020b0b4ff054551c76ae58b8fe5379fd68aec22
Pyright extends/execution-environment/stub/extra-path semantics and JSON protocol #257 PR #279, merged to dev as 2d4e920e0b08a989953486b261327ed7496c328b
Exact overlay, manifest fingerprint, no mutation, cleanup, packed proof both children PR #278 / #279 focused and installed-artifact evidence
One request with different authorities in different projects #257 PR #279 mixed-authority regression matrix

Closure evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions