Skip to content

S7 — One declared way to find views-datafactory; no machine-specific paths (C-46) #188

Closed

Description

@Polichinel

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

  1. 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-datafactory relative to the repo, never to an absolute home directory.
  2. Re-point all gated tests at it: test_datafactory_deploy_readiness.py and test_gaul_lookup_fidelity.py's gated half.
  3. 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 run tells them exactly what to do.
  4. Leave the xfail semantics alone. TestReleaseGate carries a deliberately-tuned xfail that "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 past v1.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-datafactory present, the gated tests still run and behave as before.
  • With it absent (and $VIEWS_DATAFACTORY unset), they skip — they do not error.
  • xfail markers 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 path
  • tests/test_gaul_lookup_fidelity.py:~54 — the second gated half
  • scripts/build_gaul_lookup.py:~200-215 (_resolve_datafactory, main) — the resolution that already works
  • tests/conftest.py — suggested home
  • Register C-46, Cluster K

Activity

  1. added
    storyA single reviewable unit of an epic
    testingTest/parity/validation work
    on Aug 1, 2026
  2. added a commit that references this issue on Aug 2, 2026
  3. Polichinel commented on Aug 2, 2026

    @Polichinel
    CollaboratorAuthor

    S6 (#202) has landed and left you two things.

    1. The helper is built. tests/conftest.py has sibling_repo(name), require_sibling(name), git_output and commit_is_on_main, with SIBLING_ENV already declaring views-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, and pyproject declares >=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.

  4. added a commit that references this issue on Aug 2, 2026
  5. Polichinel commented on Aug 2, 2026

    @Polichinel
    CollaboratorAuthor

    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 own parents[2] walk. Leaving it would have made a closure titled "one declared way" false.

    grep -rn "/home/" over tests/, scripts/ and the package → 0. The deploy gate now runs for anyone with the sibling; its deliberately-tuned xfail markers are untouched.

    Review's best catch: the builder-vs-tests agreement test first skipped when no checkout was present — but both resolvers read $VIEWS_DATAFACTORY first, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyA single reviewable unit of an epictestingTest/parity/validation work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions