Files
Pulse/.github/scripts
pulse-triage[bot] d3c0b00b02 Fix monitoring test logger data race and rebalance CI backend shards
1. Eliminate the recurring main Build and Test Backend tests (rest-1)
   DATA RACE observed in runs 46191313678 (job 141127584174) and
   46197384546 (job 141144000959), where
   TestPollPBSConfigLoggingDoesNotBlockConfigEditOrPeerPoll overwrote
   the unsynchronized global zerolog/log.Logger struct while background
   alerts.NewManager().periodicSaveAlerts() goroutines leaked by earlier
   tests called log.Debug():
   - Install a single atomic io.Writer router (monitoringTestLogSink) on
     log.Logger once in internal/monitoring/main_test.go TestMain and
     route all 10 internal/monitoring/*_test.go log-capture and
     log-suppression sites through setPackageTestLogOutput /
     disablePackageTestLogs (atomic sink swap + atomic zerolog global
     level) and syncTestLogBuffer, plus a -race regression test.
   - Add t.Cleanup(m.alertManager.Stop) to all six
     TestMaybePollPhysicalDisksAsync_* tests in
     monitor_pve_disk_alert_settle_test.go and
     monitor_pve_disk_fallback_test.go.

2. Rebalance .github/scripts/go-package-test-seconds.txt from ten
   complete post-#5428 hosted Build and Test runs (seven 3-way PR runs
   and three 2-way main push runs, runner-speed normalized) to address
   PR checks (Pulse) — the #1 slowest stage in output-constraints.json
   (19.1m median / 44.8m p90):
   - Set REST_SHARD_FIXED_SECONDS 165.028 0.000 and
     REST_SHARD_FIXED_SECONDS_3 32.619 236.856 0.000 (replacing the
     inverted pre-#5428 309.230 / 191.908 / 0.000 offsets).
   - Leave-one-out holdout cross-validation cuts runner-normalized peak
     shard task-seconds on 7/7 3-way holdouts (-86.8s to -214.8s) and
     3/3 2-way holdouts (-58.9s to -117.6s).

3. Add disposable per-suite NODE_COMPILE_CACHE bytecode caching to
   frontend-modern/scripts/__tests__/check-bundle-size.test.mjs and
   build-embed-assets.test.mjs, matching sync-embed-dist.test.mjs,
   to avoid recompiling jsdom across 107 test child processes.

Contract-Neutral: Test-harness logger synchronization, CI shard scheduling weights, and test-only Node bytecode caching; no production code, runtime behavior, or subsystem contracts changed.
Change-source: pulse-maintainer
2026-11-28 23:28:12 +00:00
..