Skip to content

Check never runs black/mypy — accepted bundles trip upstream CI lint after publish #306

Description

@eduralph

Problem

Publishing accepted bundles as upstream Gramps PRs tripped CI gates the testbed's Check never runs:

Root cause: the Check gates validate behaviour (C4 red→green, T3 suite) and basic shape (GPL headers, POTFILES via t2_shape/t2_potfiles), but never the two static-analysis gates upstream Gramps CI enforces:

  • .github/workflows/black.ymlpsf/black@stable (= black --check --diff .)
  • .github/workflows/gramps-ci.ymlpip install mypy types-requests then bare mypy (reads the repo's mypy.ini)

So a bundle can reach COMPLETE and be published, only to fail upstream lint — found after the PR is open. The pdca.toml gate config even earmarked this as a "STAGED (not yet ported) black/ruff formatter gate."

Fix

Add a gating T2-lint gate (engine/scripts/ubuntu/run-lint.sh) that applies patch.diff to the pinned upstream worktree in the same Docker image and runs black --check (on the patch's .py) + mypy (whole-tree), with distinct exit codes (1 = lint-dirty/block, 2 = infra, 77 = no core .py). Wire it into Check and re-run it as a pre-push guard in publish.py so a lint-dirty bundle can't open a failing PR.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions