Skip to content

feat(tests,cli,ci): honest skips with --fail-on-skip, npm gates, CLI fixes (3/5 of #66) - #76

Closed
ofriw wants to merge 19 commits into
pr/66-http-stopfrom
pr/66-infra-cli-ci-npm
Closed

ofriw wants to merge 19 commits into
pr/66-http-stopfrom
pr/66-infra-cli-ci-npm

Conversation

@ofriw

@ofriw ofriw commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Part 3 of the #66 split: infrastructure, CLI, CI and npm packaging.

Base is pr/66-codec-storage (#74), not main. tests/cli-template-utils.ts uses the worker-backed readDir wrapper that #74 introduces. Retarget to main once #74 lands.

What changed

Test runner: skips are visible, and can fail the run. A test that could not run used to return early and look passed. Now:

  • skipTest(reason) throws a sentinel; one shared runTestCase classifies every outcome for TestSuite.run, the filtered TestsRunner.run, and the TUI worker runner.
  • TestResult.skipped and TestSummary.skipped are reported separately; a skip is never a pass and never counts as a failure.
  • printSummary prints the skip count and the reasons.
  • --fail-on-skip (GOATDB_FAIL_ON_SKIP) turns a skip into a non-zero exit on Deno, Node and the browser (the browser receives it through the injected config).
  • The runtime-specific test wrappers (denoTest/nodeTest/serverTest) now skip explicitly instead of passing silently.

Test runner diagnostics. GOATDB_TEST_TIMEOUT_MS is validated (integer, 1..2^31-1) and names the active suite/test, elapsed time and heartbeat age on timeout; workers heartbeat every 10 s; a failing runtime no longer hides the other runtimes' results.

npm. A shared production manifest, public entrypoint type checks (scripts/check-npm-entrypoints.ts, tsconfig.npm.json), archive-content verification (deno task verify:npm-archive), declared runtime deps (chokidar, fast-check, react-dom), and engines.node >= 24.

CLI. compile() appends .exe for Windows targets and returns the compiled path; goatdb init ships dotfile templates from the published package (plain gitignore/npmrc names mapped back), installs Deno deps as ^ ranges in one bounded call, and exits non-zero when installation fails. Templates are copied by scripts/copy-cli-templates.ts.

CI. Deno floor pinned to v2.3.3 with a native using/Symbol.dispose probe, Playwright installed and pinned on the Node job, committed assets verified fresh, Deno test failures now fail the run, and the npm archive and path contract are checked.

Runtime helpers. getEnvVar uses the runtime id and typed config; invalid hardware config reports a validation error; logging entry imports are type-only.

Verification

  • deno task check clean, including the worker module.
  • Deno 717 (715 passed, 2 skipped), Node 717 (705 passed, 12 skipped), browser 407 (406 passed, 1 skipped).
  • deno task verify:npm-archive OK; npm run check:npm-types OK (18 tests).
  • TestFramework covers: a skip is neither pass nor failure, printSummary lists skips, the flag turns skips into exit 1, and the real CLI exits non-zero only with the flag.

Stack

Base #74. pr/66-path-branding (last in the stack) builds on this branch.

Stack position

Third layer of GitHub stack #80 (main ← #74 ← #75 ← #76 ← #77 ← #78).

ofriw added 11 commits October 27, 2026 14:32
Split from 9808cd9: CI and publish workflows pin deno v2.3.3, probe
native using/Symbol.dispose, and add the type-check task they call.
The codec tests and runtime build targets from that commit belong to the
codec/storage PR.
…ect all runtime failures

(cherry picked from commit dccccc6)
@ofriw
ofriw force-pushed the pr/66-infra-cli-ci-npm branch from 44e22d4 to bfabbea Compare October 27, 2026 12:37
@ofriw
ofriw removed this pull request from stack #79 October 27, 2026 12:38
@ofriw
ofriw changed the base branch from pr/66-codec-storage to pr/66-http-stop October 27, 2026 12:38
@ofriw
ofriw added this pull request to stack #80 October 27, 2026 12:38
ofriw added 6 commits October 27, 2026 14:51
lib.dom types postMessage as a window API, so checking the worker module
failed on the transfer list. Cast once at the runtime boundary, where the
worker runtime does accept a transfer list.
ofriw added 2 commits October 27, 2026 14:51
A test that could not run used to return early and look passed, hiding lost
coverage. Add a skip sentinel, classify every outcome in one shared
runTestCase used by the suite runner, the filtered runner and the worker
runner, and count skips separately from passes and failures. --fail-on-skip
(GOATDB_FAIL_ON_SKIP) turns a skip into a non-zero exit across Deno, Node and
the browser. The runtime-specific test wrappers now skip explicitly.
@ofriw
ofriw force-pushed the pr/66-infra-cli-ci-npm branch from bfabbea to 32774b3 Compare October 27, 2026 12:53
@ofriw

ofriw commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by the reviewed, fully verified replacement stack: https://github.com/goatplatform/goatdb/stack/92

Each complete replacement tip passed full Deno + Node + browser suites on current Deno2.9.1 and actual floor2.3.3, with Node24.14.1 and Playwright1.64.1. Exact tip hashes, scope, dependencies, gates and breaking/data notices are in the new PR bodies. Final tip9e9a759f has 0 failures on all six full runs; the 49-source-commit content audit and independent review passed. Remote Actions status is separate from these measured local gates.

Review bottom-up. This replaces the old split, not just its last diff. No PR was merged, no issue was edited, and original remote branches are retained.

@ofriw ofriw closed this Oct 29, 2026
@ofriw
ofriw removed this pull request from stack #80 October 29, 2026 15:14
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