From b826dd4cc7deffc60fef950dade8fc7912c3a98c Mon Sep 17 00:00:00 2001 From: garrytan Date: Wed, 28 Oct 2026 14:04:32 +0000 Subject: [PATCH] docs: GSTA-139 S4 CHANGELOG entry and the local-push maintenance gap in TESTING_INTERNALS Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ docs/TESTING_INTERNALS.md | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30ebc2a80..2b101ecff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [Unreleased] + +**Three free tests that went red at random now fail only when the code under test is wrong.** Today's flaky-test pass (GSTA-139) traced two Linux reds to their fixtures and fixed a third that was certain to fail under load. No product code changed. + +### Fixed +- **`test/ubicloud-runner.test.ts`**: the watchdog cases expected exit 124 but got 2 or 0, about one run in 62. The cause was not timing. The fake `ssh` had a `*-O*` case arm, meant for `ssh -O exit` but never matched by it, and it caught any remote command whose checkout path held `-O`. That happened whenever the fixture's temporary directory name started with `O`. The arm is gone, and a new test runs a checkout named `ubi-run-O1x2y3`. +- **`test/ship-queue-train.test.ts`, `test/gstack-ship-queue.test.ts`**: `coordinatorClone` now clones the fixture origin with `--no-local`, through git's transport like a real clone of GitHub, instead of copying `origin.git/objects` file by file. Every push into the fixture origin leaves a detached `git maintenance run --auto` there. The local transport drops the shard's `GIT_CONFIG_COUNT` maintenance-off setting, so that process still creates and deletes `objects/maintenance.lock` after the push returns. Two runs failed with `failed to copy file … No such file or directory` on a loose object. The process that removed that object was not identified; the transport clone never lists the directory at all. +- **`test/qa-fix-loop-fixture.test.ts` late-timeout**: the scenario ran its real setup inside a 1000 ms mocked work budget under a 1160 ms deadline, so on a loaded machine the attempt never started (0 of 10 runs under 24 busy loops). It now uses #3413's qa-only fix: the clock stands still from the test body's start until the capture begins, and the deadline is the registered 6080 ms outer budget (20 of 20 under the same load). + +### Gate integrity +- `test/qa-fix-loop-fixture.test.ts` late-timeout asserts that the capture gets exactly 1000 ms, where it used to accept anything between 0 and 1000, and its test deadline is the registered outer budget rather than budget − 5000 + 80 ms. If the workflow's outer budget drops back to the bare work budget, the scenario still fails. A new `slow-setup` scenario keeps the check the old range assertion gave. A controlled clock spends 400 ms in setup, and the capture must get exactly 600 ms. If the workflow passed the whole work budget to the capture instead of what setup left, it would fail. + ## [1.91.294.0] - 2026-10-28 **`gstack-doctor` and setup's hook check start far fewer processes, so the doctor tests fit the Windows CI lane again.** On Windows Git Bash each process start costs 12 to 77 ms, and the doctor spent most of its time starting them: about 3.3 s per `--check` and 6 s per dashboard run. `windows-free-shard (1)` was red on main because `test/gstack-doctor.test.ts` took 553 to 647 s there. Every doctor row, fix line and JSON field prints the same as before. diff --git a/docs/TESTING_INTERNALS.md b/docs/TESTING_INTERNALS.md index 549999ec0..7795c8407 100644 --- a/docs/TESTING_INTERNALS.md +++ b/docs/TESTING_INTERNALS.md @@ -1427,7 +1427,13 @@ Free-suite flake rules: every shard child's `GIT_CONFIG_*` pairs as a backstop, so it covers fixtures that inherit the environment, and `bun run scripts/ship-measure.ts free --backend local` measures with that environment; a fixture with its own - replacement env never sees the backstop. + replacement env never sees the backstop. Neither does the receiving side of + a push to a local path: git's local transport drops `GIT_CONFIG_*` from the + `receive-pack` it starts, so every push into a fixture's bare origin still + leaves a detached maintenance run in that origin. A fixture that clones such + an origin passes `--no-local` (`coordinatorClone` in + `test/helpers/ship-queue-fixture.ts`), so the clone reads it through git's + transport instead of copying `objects/` entry by entry. To reproduce a ledger entry, take the shard's exact file list from the CI run's `free-plan` artifact, then rerun it with the flaky retry off on a CI-mirrored VM: