Skip to content

C-104: one honest failure instead of twenty-five misleading ones #410

C-104: one honest failure instead of twenty-five misleading ones

C-104: one honest failure instead of twenty-five misleading ones #410

Workflow file for this run

name: Run Pytest
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# `fetch-depth: 0` for the TAGS, not the history. The default shallow checkout
# fetches none, so `git tag -l` is empty and BOTH guards in
# tests/test_release_version.py skip — the pair written because tag 1.1.0 was cut
# while pyproject.toml still said 1.0.0. A guard against mis-cutting a release
# that only ever runs on the maintainer's laptop is half a guard, and the half
# that is missing is the one watching the moment it matters.
fetch-depth: 0
# ── sibling checkouts: what CI can verify that a bare checkout cannot ────────
#
# `tests/conftest.sibling_repo` resolves $VIEWS_<NAME>, else the conventional
# `../<name>` directory. In a one-repo CI checkout neither exists, so every
# cross-repo assertion skips — silently and by design, because a missing sibling
# is normal. The consequence was that CI verified strictly LESS than a developer's
# laptop, and precisely on the guards that matter most across a repo boundary.
#
# WHICH siblings are checked out is NOT decided here. It is declared in
# `tests/conftest.py::SIBLINGS`, and `tests/test_ci_sibling_coverage.py` fails if
# this file and that declaration disagree — in either direction. ADR-016.
#
# The prose that used to live here said views-appwrite was PRIVATE. It went public
# on 2026-08-08 and the comment did not, so seven checks stayed dark for no reason.
# That is why the fact now lives in a declaration carrying the date it was checked,
# rather than in a paragraph.
#
# `ref: main` is deliberate on every sibling and is not a default. Without it
# `actions/checkout` takes the sibling's OWN default branch — which for
# views-appwrite is `development` — while ADR-014 §3 says the authority for a claim
# about another repository is that repository's `main`. Two checks in
# test_env_declaration read the sibling's `main` and a third demands reachability from
# `main`; pointed at `development` they would eventually demand contradictory things.
#
# `actions/checkout` refuses a path outside $GITHUB_WORKSPACE, so the siblings go
# inside it and are pointed at by the declared env vars instead of the conventional
# `../<name>` location. `sibling_repo` checks $VIEWS_<NAME> first, precisely so the
# location can be declared rather than assumed. `_siblings/` specifically: it is
# excluded from ruff in pyproject.toml, and the Lint step reported 745 findings in
# someone else's test suite the first time a sibling landed outside it.
#
# No `token:` on any step below, and that is load-bearing rather than an omission:
# the default GITHUB_TOKEN is scoped to THIS repository, so a tokenless checkout of a
# private repository simply fails, loudly, at this step.
#
# An earlier version of this comment said that "verifies the `public` field". There is
# no such field: `public` was deleted from `SIBLINGS` on 2026-08-10 because nothing
# could verify it, and ADR-016 §4 now says so explicitly. A comment in THIS file
# asserting a fact about another repository that nothing checks is the founding
# incident of ADR-016 §3, and it had reappeared here.
- name: Checkout views-appwrite (sibling)
uses: actions/checkout@v3
with:
repository: views-platform/views-appwrite
ref: main
path: _siblings/views-appwrite
fetch-depth: 0
# Fetched for the checks that need only views-datafactory's TRACKED files. The one
# that motivated it is `test_delivery_coverage.py::test_manifest_matches_datafactory_
# land_minus_land_gaul`, C-30's drift tripwire on the 76-cell exclusion manifest: it
# reads `src/datafactory_query/{land,land_gaul}_pgids.json`, both tracked here, and
# until 2026-08-17 it ran only on a laptop — while this repository told a partner in
# writing that the manifest "cannot drift without failing loudly". It could; nothing
# in the gate was watching. Three more checks came with it (the release gate, the
# region-set check, the wire-cast dtype check); see C-46 for the full accounting.
#
# This checkout was tried on 2026-08-03 and reverted, and the revert note said the
# sibling could not be fetched because its GAUL parquets are untracked. That was the
# wrong diagnosis. `data/raw/gaul_admin/` IS tracked (it holds a geojson); only the
# parquets are not — so `test_gaul_lookup_fidelity`'s `.is_dir()` gate passed and the
# comparison died on FileNotFoundError. The gate now checks for the seven parquets
# themselves, so that half skips honestly here and still runs where they exist.
- name: Checkout views-datafactory (sibling)
uses: actions/checkout@v3
with:
repository: views-platform/views-datafactory
ref: main
path: _siblings/views-datafactory
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry install
# ruff is declared in the dev group; a declared linter nobody runs is a claim
# without a check. `ruff check .` is green as of the 3.0.0 bump, so this starts
# enforced rather than as a backlog of pre-existing violations.
- name: Lint
run: poetry run ruff check .
- name: Run tests
env:
VIEWS_APPWRITE: ${{ github.workspace }}/_siblings/views-appwrite
VIEWS_DATAFACTORY: ${{ github.workspace }}/_siblings/views-datafactory
run: |
set -e
poetry run pytest tests/