Repository navigation
S7 — One declared way to find views-datafactory; no machine-specific paths (C-46) #188
Description
Part of epic #181. Closes register C-46 (Tier 4, [backlog]). Depends on S5.
Background
tests/test_datafactory_deploy_readiness.py is the repo's only cross-repo readiness gate. Line 19:
_DF = Path("/home/simon/Documents/scripts/views_platform/views-datafactory")An absolute path to one person's laptop. Everywhere else it skips; in CI it has never run once. C-46 registers the consequence: the gate cannot be treated as a release gate, and it currently fails on the single machine where it does run.
Meanwhile scripts/build_gaul_lookup.py already solved this properly — it resolves the sibling via $VIEWS_DATAFACTORY with a --datafactory override and a fail-loud message naming both. And tests/test_gaul_lookup_fidelity.py (added 2026-07-31) has a third way, in its own skipif-gated half.
Three call sites, three resolutions, one of them machine-specific.
On WET before DRY: this is the second incident, which is the trigger this repo's philosophy names for extracting. The shape is known now — env var, optional override, skip-with-reason — because the build script has been running it in production for weeks. Extract it; do not invent it.
Work
- One declared resolution. A small helper — suggested
tests/conftest.py, since all consumers are tests and the build script keeps its CLI — that resolves the views-datafactory checkout from$VIEWS_DATAFACTORY, falling back to the conventional sibling path../views-datafactoryrelative to the repo, never to an absolute home directory. - Re-point all gated tests at it:
test_datafactory_deploy_readiness.pyandtest_gaul_lookup_fidelity.py's gated half. - Skip messages must name the env var. A skip that says "checkout not present" tells a contributor nothing; one that says
set VIEWS_DATAFACTORY=/path/to/views-datafactory to runtells them exactly what to do. - Leave the xfail semantics alone.
TestReleaseGatecarries a deliberately-tunedxfailthat "flaps with datafactory's release cadence" and was re-pinned once already. That is a separate judgement from path resolution — do not retune it in this story. If it needs re-pinning now that datafactory has moved pastv1.4.0, say so in the PR and register it; do not fold it in.
Explicitly not in scope: making these run in CI. That needs a views-datafactory checkout in the workflow, which is a CI-cost and cross-repo-coupling decision, not a path fix. Note it in the register as C-46's residual.
Acceptance criteria
grep -rn "/home/simon" tests/returns nothing.- One resolution helper; all three sites use it (build script keeps its CLI flag but the default agrees).
- Skips name the environment variable to set.
- With
../views-datafactorypresent, the gated tests still run and behave as before. - With it absent (and
$VIEWS_DATAFACTORYunset), they skip — they do not error. xfailmarkers unchanged.
Testing
ruff check .
grep -rn "/home/simon" tests/ # must be empty
pytest -q tests/test_gaul_lookup_fidelity.py # 18 passed — sibling present
VIEWS_DATAFACTORY=/nonexistent pytest -q tests/test_gaul_lookup_fidelity.py tests/test_datafactory_deploy_readiness.py
# must SKIP cleanly, not error
pytest -q
The middle command is the acceptance test for this story — a wrong resolution shows up as a collection error, not a skip.
Dependencies
Depends on S5, which rebuilds the lookup from the views-datafactory checkout and will exercise the current resolution first. Landing S7 before S5 would mean re-testing the rebuild against changed plumbing.
Coordinates with S6 — whichever of the two lands second adopts the other's helper. Two ways to find a sibling repo is the defect, not the fix.
Files
tests/test_datafactory_deploy_readiness.py:19— the hardcoded pathtests/test_gaul_lookup_fidelity.py:~54— the second gated halfscripts/build_gaul_lookup.py:~200-215(_resolve_datafactory,main) — the resolution that already workstests/conftest.py— suggested home- Register C-46, Cluster K
Activity
test(seam): S6 #187 — detect coordinate-registry drift; existence is …
Polichinel commentedon Aug 2, 2026
S6 (#202) has landed and left you two things.
1. The helper is built.
tests/conftest.pyhassibling_repo(name),require_sibling(name),git_outputandcommit_is_on_main, withSIBLING_ENValready declaringviews-datafactory → VIEWS_DATAFACTORY. Adopt it; do not add a second way to find a sibling.The skip message is the part worth preserving: it names both the environment variable and the conventional path, so a contributor can run the test rather than merely watch it skip.
2. A second instance of this issue's residual. The gated cross-repo checks do not run in CI — that is C-46's core complaint and now C-57's residual too. A smaller instance surfaced in S6: those checks parse TOML with
tomllib, stdlib from Python 3.11, andpyprojectdeclares>=3.11. The maintainer's box runs 3.10, below the declared floor, so they skip locally as well.So there are now three gated checks that never run anywhere automatic:
test_datafactory_deploy_readiness, the fidelity suite's datafactory half, and S6's registry drift half. Decide the CI question once for all three rather than three times — recorded in C-57's residual as belonging here.test(siblings): S7 #188 — one declared way to find views-datafactory;…
Polichinel commentedon Aug 2, 2026
Landed in #203. C-46 closed. Cluster K closed.
A fourth site turned up that this issue did not list —
tests/test_delivery_coverage.py's drift tripwire had its ownparents[2]walk. Leaving it would have made a closure titled "one declared way" false.grep -rn "/home/"overtests/,scripts/and the package → 0. The deploy gate now runs for anyone with the sibling; its deliberately-tunedxfailmarkers are untouched.Review's best catch: the builder-vs-tests agreement test first skipped when no checkout was present — but both resolvers read
$VIEWS_DATAFACTORYfirst, so they can only diverge in the fallback, which is exercised precisely when nothing exists there. The one case the test was for was the case it declined to check, in CI where it matters most. Now compared unconditionally, mutation-proven.Review also caught the change contradicting itself in the register: Cluster K's scope line still called C-60 and C-46 "partial" eight lines above the note closing them.
The CI decision is recorded, not taken — the issue put it out of scope. Recommendation with reasoning and a named trigger is in C-46's residual, and flagged for S9 (#190) so it lands as a decision someone takes rather than a note someone finds.