Complete and verify the Bun CI cutover #293
Notifications
Due Date
No due date set.
Depends on
#290 Run development and quality checks with Bun
nessar/vac-optimizer
#291 Run all tests and benchmarks with Bun
nessar/vac-optimizer
#292 Serve the deployed application with Bun
nessar/vac-optimizer
Reference: nessar/vac-optimizer#293
Reference in new issue
Block a user
What to build
The maintainer can rely on one reproducible Bun toolchain from
a clean checkout through required CI checks and the production container, with
evidence that no project-owned JavaScript step still falls back to Node.
Acceptance criteria
including their regression scripts, child processes, executable fixtures,
and CI entry points. Preserve their temporary-repository and fake-Docker
tests so local verification performs no real registry writes.
stable-release events. Runtime changes must not alter GitFlow, Conventional
Commit enforcement, publication eligibility, or existing image promotion.
and documented prerequisite. Use the same exact verified Bun release and
frozen dependencies throughout; remove obsolete callers, configuration,
and dependencies after confirming they have no remaining use.
coverage, lint, formatting, standalone type checks, Angular production
build, benchmark protocol, and production container on the integrated
branch. Demonstrate Bun execution with Node unavailable to project commands.
uploads, required benchmark and publication dependencies, and the aggregate
required check. Do not weaken tests, budgets, or gates to claim completion.
treat infrastructure-provided Node as permission to run project commands
with it; surface unresolved infrastructure changes or exceptions.
origin/developbefore the PR to
develop, and rerun affected checks if the base advances.Use the repository's required PR/maintainer integration process; do not push
directly to protected branches or merge without authorization.
existing activation and publication process. Keep local evidence distinct
from live CI results; missing credentials or activation evidence must be
reported rather than bypassed or provisioned without authorization.
published acceptance criteria. No native-tool incompatibility, missing required report,
Node fallback, or unverified required gate may be described as complete.
Do not change branch protections, create release tags, or deploy.
Blocked by
CI-stability evidence gathered on 2026-10-19 while investigating the red pipelines of #304 and #305 (PR #307, closed without merging). It bears on this ticket's "benchmark protocol" and "successful required Gitea checks" criteria. I did not check whether any of it predates the Bun cutover.
1. Real-worker cancellation test is racy (not fixed on
develop)leave-planner.worker.spec.ts› "stops during calendar preparation without a plan or an obligation conflict" failed on #305's pull_request run (run 115, jobtest960, 2026-10-19 07:39 UTC). The outcome wasPlanningIncomplete(user-cancelled), butexpect(outcome.incumbent).toBeUndefined()received aPlanthat had already completed the validation, obligations and expiry stages, so the cancel took effect only after the calculation had gone past preparation.Mechanism, from reading the code: the test cancels on the second
preparationprogress update. The cooperative driver (calculatePlanningAsyncInternal) yields onesetImmediateturn peryield true, six more before the obligations stage (prepareCalendarloops over 2022 to 2028 for that horizon), and the worker reads its queue only between event-loop turns. Whether the host's cancel message arrives within those turns depends on scheduling. It is the same race thatdfe6d28fixed for the checkpoint cancellation test.Not reproduced locally: the old test passed 20/20 on an idle machine and 15/15 on a CPU-contended core. So the diagnosis rests on the mechanism and the matching earlier fix, not on a red-to-green run.
Attempted fix (branch
feature/ci-test-stability, commitaf20c96): set the harness's existingholdForCancelAtStage = 'preparation'and cancel on the firstpreparationupdate (the worker blocks after that progress message until the cancel is delivered, so holding on the first message needs the cancel on the first update). The new test passed 20/20 idle, 10/10 under full CPU load and 15/15 on a contended core. Dropping PR #307 drops this fix too, so the test can still flake.2. Benchmark gate:
two yearshas almost no headroom when load changes mid-runPR #307's pull_request run failed the benchmark (run 120, job 993):
two yearsmeasured 1653.1 ms against a 1648.7 ms budget (multiplier 0.5 x calibration 3297.4 ms). The same commit's push run (run 118) passed with calibration 6394.6 ms (ratio 0.28). A re-run of the failed jobs passed. The change under test did not touch the planning engine.Ratios to the calibration across the 8 benchmark runs of #304 to #307:
Calibration was 3.3 to 3.8 s on quiet runs and about 6.4 s on others. In the failed run the calibration was quiet and the scenarios then ran 1.5 to 1.8x slower than usual (1.52 to 1.78 s against about 1.0 s). From job timestamps, two
testjobs, a build, the security scans and the start of the image build overlapped it on the singlesrvhomerunner (inferred; the re-run overwrote the original job times).docs/gitea-actions.mdalready lists overlapping push and pull_request runs as load the gate cannot absorb.Options considered:
needs:the heavy jobs (no cross-run isolation).srvhomerunner to capacity 1 (complete isolation, slower pipelines).Option 2 is implemented in PR #308 (merged into
developasabfbca1). It leaves the multipliers unchanged, but it does raise the effective budgets when load is detected at the end of the protocol, so weigh it against this ticket's "Do not weaken tests, budgets, or gates". Its documented limit: load that ends before the second calibration is not absorbed. It ran in CI on #308's pull_request run (calibration 6383 ms before, 6395 ms after), but no run has yet had load starting mid-protocol; that case is only covered by a local load test.three yearsandloaded yearhave the least headroom and are the likeliest next flakes.