Skip to content

chore: bring test_go_race back under its 60s budget row (transaction, workspace, gatedrive) (change 0466) - #348

Merged
danielhanold merged 16 commits into
mainfrom
chore/bring-test-go-race-back-under-its-60s-budget-row-transaction
Sep 29, 2026
Merged

danielhanold merged 16 commits into
mainfrom
chore/bring-test-go-race-back-under-its-60s-budget-row-transaction

Conversation

@danielhanold

@danielhanold danielhanold commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

↩ Change 0466 — Bring test_go_race back under its 60s budget row (transaction, workspace, gatedrive)

Summary

tests/test_go_race.sh measured 66–67s against its 60s row, and tests/test_go_toolchain.sh measured 62–66s (cold cache) against its 55s row. This PR moves the slow real-git and real-process tests of internal/repository/transaction, internal/workspace and internal/gatedrive behind //go:build integration, into eight new shard runners. Concurrency tests keep -race in race-mode shards. This follows the 0333/0465 partition.

  • Hoists 0465's no-real-git guard into internal/testsupport (InstallNoGitGuard) and installs it in internal/app (same behavior), transaction and workspace.
  • Adds a budget row for each new shard, sized from serial solo measurements. The 60/55 rows and the 8m race backstop are unchanged.
  • Serial-confirmed: the race gate takes 41.3s at worst (18.7s margin). The toolchain gate takes 34.1s at worst on a cold cache (20.9s margin).
  • Default-corpus -race time: transaction went from ~46s to 1.2s, workspace from ~42s to 1.4s, and gatedrive from ~42s to 20.9s.

The first build gate went red: the hoisted guard called os.Exit from library code, which TestProcessExitSitesAreAllowlisted rejects. Repair commit ad71c3b makes the helper return an error, and each TestMain now does the exit.

Details, measurements and follow-ups are in the results file: docs/results/2026-09-28-bring-test-go-race-back-under-its-60s-budget-row-transaction-results.md.

Review

Reviewer rung: docket-review-deep. The highest build profile was premium, and the diff is over 1500 lines. Findings: 0 blocker, 0 important, 3 minor.

# Severity Finding Disposition
1 minor The BACKSTOP paragraph in test_go_race.sh attributed its CI projection to the wrong change and package, and claimed "same shape" conditions fixed — 175498a
2 minor The stated reason gatedrive has no guard ("process-bound, not git-bound") contradicts its ~12 moved real-git tests fixed — 175498a
3 minor The transaction_race row was sized from one reading 0.15s below a rounding boundary fixed — f7267b3 (three more readings; row 25 → 30)

Follow-ups (reported, not captured)

  • Consider installing InstallNoGitGuard in internal/gatedrive. Its moved corpus is partly real-git, so right now only its budget row would catch a real-git test regrowing in the default corpus.

command: go run ./cmd/docket development test
result: green
head_sha: 726b834
ran_at: 2026-09-29T05:53:02Z

Docket-Plan-Path: docs/superpowers/plans/2026-09-28-bring-test-go-race-back-under-its-60s-budget-row-transaction.md
…ion tag (TestIntegrationTxnApply, change 0466)
… integration tag (TestIntegrationTxnRecovery, change 0466)
…ag (TestIntegrationWorkspaceSetup, TestRaceIntegrationWorkspace, change 0466)
…behind the integration tag (TestIntegrationWorkspaceLifecycle, change 0466)
…ntegration tag (TestIntegrationGatedrive, TestRaceIntegrationGatedrive, change 0466)
…stMain exits (change 0466, repair-1)

InstallNoGitGuard is library code and called os.Exit on its setup-failure
paths, tripping TestProcessExitSitesAreAllowlisted. It now returns
(finisher, error) with the same "<diagnostic>: <cause>" text, removing the
shim dir on a post-create failure; the TestMains of internal/app,
internal/repository/transaction, and internal/workspace print it and exit 1,
so internal/app's diagnostic and exit code are unchanged.

TestInstallNoGitGuardReturnsSetupError pins the returned-error contract.
…ationale (change 0466, review fix)

- BACKSTOP TIMEOUT: attribute the CI projection to change 0465's data and
  internal/repository/transaction's 48.7s; state internal/cli's 24.0s conditions.
- gatedrive's moved corpus is mixed real-process and real-git; the guard was
  left out by the spec's decision and the budget row is the growth detector
  (test_go_race.sh, gatedrive shard header, testsupport/nogit.go).
@danielhanold
danielhanold force-pushed the chore/bring-test-go-race-back-under-its-60s-budget-row-transaction branch from 0d8cac8 to 726b834 Compare September 29, 2026 05:53
@danielhanold
danielhanold merged commit 6d616d3 into main Sep 29, 2026
1 check passed
@danielhanold
danielhanold deleted the chore/bring-test-go-race-back-under-its-60s-budget-row-transaction branch September 29, 2026 05:54
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