Repository navigation
Description
Found while validating #972 / #993 — running the full distcheck suite to confirm the python fix. Same shape as #972 (a vestigial CLI-artifact prerequisite outliving the change that removed it), but a different cause: #739, not #738. #972's own note assumed node_flow_test.py's guard was still correct; it is not.
Problem
#739 made the napi addon carry the CLI (runCli), so no @dirsql/cli-<slug> sub-package is published. platforms.py records this:
@property
def name(self) -> str:
"""napi addon sub-package name (`@dirsql/lib-<slug>`).
Since #739 this is the only per-platform family: the addon carries
the CLI (`runCli`), so no `@dirsql/cli-<slug>` is published.
"""node_flow/gate.py's run() was updated to match — it sanity-checks packages/ts/build/<slug>/<addon_name> and packs @dirsql/lib-<slug>. Three callers were not.
1. tests/integration/node_flow_test.py:27–31 raises instead of skipping. It builds the prerequisite path from two identifiers #739 deleted — bundled-cli-<slug> and Platform.bin_name:
staged = os.path.join(
_TS, "build", f"bundled-cli-{host.slug}", host.bin_name
)
if not os.path.exists(staged):
pytest.skip("staged CLI binary absent (pnpm build in packages/ts)")Platform carries node_platform / node_arch / slug / os / cpu / exe plus the name and addon_name properties; there is no bin_name. So the attribute lookup blows up before the skip guard it feeds:
E AttributeError: 'Platform' object has no attribute 'bin_name'
internals/distcheck/tests/integration/node_flow_test.py:28: AttributeError
This is the one with teeth, and it fails harder than #972's did: the python case skipped silently, this one is a hard red for anyone running pytest internals/distcheck/src internals/distcheck/tests. The node flow's only real-subprocess coverage has not executed since #739 either way.
2. Nothing in CI can see it. internals-distcheck-ci.yml runs colocated-test, unit-lint, integration-lint, unit-coverage, mutation — conventions gates over internals/distcheck/src. None of them executes tests/integration/. The suite's only run is by hand.
3. node_flow/gate.py:5 and :14 — the module docstring still describes what run() no longer does: "pack the main dirsql package and a reconstructed host @dirsql/cli-<slug> sub-package", and "in the shape src/cli/resolve-binary.ts consumes". The code below it packs @dirsql/lib-<slug> and its comment credits loadNativeCore().
4. internals/distcheck/README.md:34 — the node bullet still says the flow packs "a reconstructed host @dirsql/cli-<slug> sub-package".
Change
- Point the test's guard at the prerequisite
run()actually checks —os.path.join(_TS, "build", host.slug, host.addon_name)— so it mirrors the gate's ownstaged_addonrather than restating a retired layout. Keep thenpm/pnpmguard. Confirm the transition directly: it currently raises, and should skip withoutpnpm buildand pass with it. - Correct the
gate.pydocstring and the README line to@dirsql/lib-<slug>/loadNativeCore().
Whether the integration suite should also run in CI is a larger question and deliberately not folded in here — #520's design has these flows exercised for real by the distcheck jobs in dirsql-typescript-ci.yml, with tests/integration/ as the local tier. But that only holds if the local tier works, which is the part this issue fixes.
Note for whoever picks this up
(3) is a docstring-only edit to a file under internals/distcheck/src, which trips the colocated-test gate's co-change sub-check — "source changed without its colocated test". That is exactly what blocked the equivalent tidy-up in #993, where it was dropped rather than exempted (AGENTS.md keeps the exemption count at zero, and a docstring has nothing for gate_test.py to assert). Worth deciding deliberately here rather than rediscovering it: either land (3) alongside a change to gate_test.py that earns its own keep, or leave the docstring and fix only the README.
Validation
(1) needs its raise → skip/pass transition observed directly, the same way #993 observed #972's. (3)/(4) are docs.
Activity
fix(distcheck): guard the node flow on the path the gate actually req…
test: pin the platforms.py <-> platforms.ts mirror (RED)