Skip to content

S7 (#188) — one declared way to find views-datafactory; Cluster K closes - #203

Merged
Polichinel merged 1 commit into
developmentfrom
feat/s7-declared-datafactory-path
Aug 2, 2026
Merged

Polichinel merged 1 commit into
developmentfrom
feat/s7-declared-datafactory-path

Conversation

@Polichinel

Copy link
Copy Markdown
Collaborator

Closes #188. Closes register C-46. Closes Cluster K. Part of epic #181.

What C-46 actually cost

Four sites resolved views-datafactory four different ways. One was:

_DF = Path("/home/simon/Documents/scripts/views_platform/views-datafactory")

So the repo's only cross-repo release gate had never run anywhere but one laptop. "Skipped in CI" undersold it.

site was
test_datafactory_deploy_readiness.py an absolute path to one developer's home directory
test_gaul_lookup_fidelity.py its own _REPO.parent / "views-datafactory"
test_delivery_coverage.py its own parents[2] / … — a fourth site the issue did not list
scripts/build_gaul_lookup.py the shape that was already right

Now: grep -rn "/home/\|/Users/\|C:\\" over tests/, scripts/ and the package → 0. With the sibling present the deploy gate runs (1 passed, 3 xfailed, its deliberately-tuned markers untouched). Without it: clean skips, no collection errors. Every skip names VIEWS_DATAFACTORY and the conventional path.

Two resolvers, on purpose

A script must not import from tests/ — dependency direction — and the contracts differ: the script returns a Path even when absent so main can raise naming both the flag and the variable; the helper returns None because a missing sibling is a normal skip.

WET before DRY. What is guarded is not the duplication but the agreement, because a builder writing from one checkout while the tests verify against another would report success on a lookup compared to a producer it was not built from.

Review sharpened that guard, and it was the right catch

The 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, and it declined in CI, where it matters most.

Fallback paths are now compared unconditionally. Mutation-proven:

E  AssertionError: the builder's fallback and the tests' fallback resolve different
   directories; with no environment override they would disagree silently

Review also caught this change contradicting itself

  • Cluster K's Resolution scope: line still called C-60 and C-46 "partial" — eight lines above the note closing them.
  • C-46's body still asserted a [backlog] state that ended on resolution.

Both fixed. A cluster that closes with a contradiction inside its own block undercuts the closure, and this epic exists to stop exactly that.

Cluster K closes — five entries, all full

C-59, C-61 (build-time guarantees) · C-43 (the value-correctness debt) · C-60 (the declared lookup_version) · C-46 (the machine-specific path).

The fix strategy predicted the shape correctly. What it did not anticipate is recorded in the closing note:

A cluster about "the artifact is trusted but unverified" had a verification apparatus that was itself partly unverifiable — the gated half it prescribed could not run for anyone but the maintainer, and the provenance stamp it relied on could silently become the string "unknown".

What remains is not this repo's: whether views-datafactory's area-majority join is right at high latitudes is #387 there. C-43's scope split holds.

The CI question — recorded, not implemented

The issue put it out of scope, so this states a recommendation with reasoning and a named trigger rather than acting:

Do not add sibling checkouts to the per-PR workflow. It couples this repo's CI to another repo's default branch — an unrelated upstream commit turns this repo red, which is the flapping TestReleaseGate already documents and was re-pinned for once. The always-on halves guard the committed artifact; the gated halves answer "is the producer still consistent with us?", a scheduled question, not a merge gate. If wanted: a weekly workflow that opens an issue on divergence.
Trigger: the next time an upstream change reaches FAO through this repo without anyone noticing first.

Three gated groups now share that decision — this gate, the fidelity suite's producer half, and C-57's registry half. Flagged for S9 (#190) so it lands as a decision someone takes rather than a note someone finds.

Verification

ruff check .                                                       # clean
pytest -q                                                          # 299 passed, 3 skipped, 41 xfailed, 5 known pyarrow
VIEWS_DATAFACTORY=/nonexistent pytest -q                           # 293 passed, 12 skipped — no errors
grep -rn "/home/\|/Users/" tests/ scripts/ views_postprocessing/   # 0
git diff --stat origin/main -- tests/fixtures/                     # empty

Register: 74 concerns, 18 open, 56 resolved.

🤖 Generated with Claude Code

… Cluster K closes

Four sites resolved the producer's checkout four different ways, and one of them
was an absolute path to a single developer's home directory. The repo's only
cross-repo release gate had therefore never run anywhere but that laptop — which
is what register C-46 was open for, and why "it is skipped in CI" understated it.

All four now resolve the same way: $VIEWS_DATAFACTORY, else the conventional
directory beside this repo, never an absolute path to a particular machine. Every
skip names the variable AND the path, so a contributor can run the test rather
than watch it skip.

A fourth site turned up while doing the work — tests/test_delivery_coverage.py's
drift tripwire had its own parents[2] walk. The issue listed three. Leaving it
would have made a closure titled "one declared way" false.

The builder keeps its own resolver, deliberately and now argued in writing. A
script must not import from tests/ — that is the dependency direction backwards —
and the contracts genuinely differ: the script returns a Path even when the
checkout is absent so main can raise naming both the flag and the variable, while
the test helper returns None because a missing sibling is a normal skip. WET
before DRY. What is guarded is not the duplication but the property that matters:
that the two AGREE. A builder writing from one checkout while the tests verify
against another would report success on a lookup compared to a producer it was
not built from.

Review sharpened that guard. It first skipped when no checkout was present — which
is exactly when the fallback path is exercised, so the one case it existed for was
the case it declined to check, and it declined in CI where it matters most. The
fallback paths are now compared unconditionally; mutation-proven by pointing the
builder at a different directory.

Review also caught this change contradicting itself in the register: Cluster K's
resolution-scope line still called C-60 and C-46 "partial" eight lines above the
note closing them, and C-46's body still asserted a [backlog] state that ended on
resolution. Both fixed.

Cluster K closes: five entries, all full. Its own note records what the strategy
did not anticipate — that a cluster about "the artifact is trusted but unverified"
had a verification apparatus that was itself partly unverifiable.

The CI question is recorded as a residual with a recommendation and a named
trigger rather than implemented, because the issue put it out of scope: do not
couple this repo's per-PR CI to another repo's default branch; if wanted, a weekly
scheduled check that opens an issue on divergence.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Polichinel
Polichinel merged commit af5a894 into development Aug 2, 2026
4 checks passed
@Polichinel
Polichinel deleted the feat/s7-declared-datafactory-path branch August 2, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant