# Import-linter contracts for mgf-test-supervisor (WF-02 / DP-01 / TS-23).
#
# The supervisor is **stdlib-only by mandate** so it can drive pytest in ANY
# consumer's environment without dragging a dependency tree down with it. The
# ONLY sanctioned non-stdlib import is a lazy, try/except-guarded
# `import mgf.common` inside diagnostics.env_fingerprint() (diagnostics.py) —
# diagnostic-only, never load-bearing. Everything else (UI frameworks, heavy
# third-party SDKs, and OTHER mgf-* siblings) is forbidden; CI runs lint-imports.

[importlinter]
root_packages =
    mgf.test_supervisor
include_external_packages = True

[importlinter:contract:mgf-test-supervisor-stays-stdlib-only]
name = mgf.test_supervisor imports no third-party SDK, UI framework, or non-mgf-common sibling
type = forbidden
source_modules =
    mgf.test_supervisor
forbidden_modules =
    # UI frameworks
    PySide6
    PyQt6
    PyQt5
    textual
    rich
    click
    # Web / heavy third-party SDKs
    fastapi
    starlette
    flask
    django
    requests
    httpx
    pydantic
    sqlalchemy
    numpy
    pandas
    # (mgf-* siblings can't be named as external subpackages, but any third-party
    # they would pull is forbidden above, so a sibling import is caught transitively.
    # mgf.common is the ONE allowed dev/diagnostic dep — deliberately not forbidden.)
