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.yml → psf/black@stable (= black --check --diff .)
.github/workflows/gramps-ci.yml → pip 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
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.yml→psf/black@stable(=black --check --diff .).github/workflows/gramps-ci.yml→pip install mypy types-requeststhen baremypy(reads the repo'smypy.ini)So a bundle can reach COMPLETE and be published, only to fail upstream lint — found after the PR is open. The
pdca.tomlgate 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 appliespatch.diffto the pinned upstream worktree in the same Docker image and runsblack --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 inpublish.pyso a lint-dirty bundle can't open a failing PR.Related
blackto thepdca doctordependency check) — adjacent but distinct: this gate installs black/mypy inside the container, so it doesn't depend on hostdoctortooling. Not closed by this work.