diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 97ae6d51f..030ee3b48 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -187,6 +187,7 @@ the new defaults. | Run one free test file while repairing | `bun test ` | Free, seconds | Never bare `bun test` for the suite | | Run full free acceptance before publishing | `bun run test` | Free, a few minutes | Bun 1.4.2 | | Run the full free suite from a small machine | `bun run test:ubicloud` | Free suite on a billed 16-vCPU VM, about 5 minutes | `UBICLOUD_API_KEY` | +| Clear pregate's test tier on a machine under 8 cores ([remote gate](docs/pregate.md#remote-gate)) | `gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands` (same command keyed or keyless) | Keyed: one billed 16-vCPU VM, worst case $0.38; keyless: free, the selected files run locally in parallel shards | Keyed: `UBICLOUD_API_KEY`; keyless: nothing | | Run the curated Windows-safe subset | `bun run test:windows` (CI: six `windows-latest` jobs) | Free | Windows, Git Bash | | Refresh the Windows duration seed | `gh workflow run windows-free-tests.yml --ref -f record_durations=true`, then commit the `free-test-durations-windows` artifact | Free CI runners | Pushed branch, `gh` with workflow rights | | Run a native Windows or Dia qualification campaign | `gh workflow run native-qualification.yml --ref -f mode=` ([modes](docs/TESTING_INTERNALS.md#windows-free-lane)) | Free CI runners | Pushed branch, `gh` with workflow rights | diff --git a/docs/pregate.md b/docs/pregate.md index 6e9e4f0e0..d79899e1e 100644 --- a/docs/pregate.md +++ b/docs/pregate.md @@ -238,6 +238,24 @@ the supervision above. Close the obligation one of two ways: `spent, reserved, unknown`: a gate that prints no `spent=` is `unknown`, counted at the cap. +gstack's own example: `.gstack/pregate.json` declares +`"remote_gate": "bash scripts/ubicloud/pregate-remote.sh"`. With +`UBICLOUD_API_KEY` set the script runs the selected files on one Ubicloud VM +with `bun run test:ubicloud`'s environment, refuses before creating the VM when +the cap cannot buy a 20-minute run at the size's list price (`UBI_SIZE`, +default `standard-16`), checks the tree and the planned file set on the VM +before any test runs, and reports `spent=` from billed minutes. Without a key +it runs the same files locally in parallel shards +(`test-free-shards.ts --files-from`) and reports `spent=0`. The command is the +same either way (`--remote` always needs a cap; the keyless path spends +nothing). `--timeout 2700` keeps pregate's default 600 s deadline from cutting +off a slow VM run inside its 45-minute wall (the VM's teardown runs in its own +session, so a pregate timeout never strands it): + +```bash +gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands +``` + ## Guards and the lane-done rule