make test with -race takes about 214 s; it must fit the 60-second cap #120

Open
opened 2026-10-06 01:22:57 +02:00 by clawbot · 1 comment
Collaborator

Split from #52 (ruling #52 (comment)), whose last definition-of-done item is "make test with -race passes in the CI-equivalent container inside the 60-second hard cap, aiming for the 20-second target". #119 deletes the large and oversized size tests as ruled, but measured with -race the suite still takes about 214 s in script/cibuild; the size tests were only about 2 s of that. TestRemovalAsksWithoutHoldingLock also fails its 10-second wait under -race.

Definition of done

  • Find which tests take the time under -race (a verbose run with per-test times through the repo's entrypoints) and make them fast without weakening what they prove. Likely costs: the deliberately slow passphrase key derivation (scrypt) run in many tests, and real-filesystem or lock-wait tests. A test may use a cheaper key derivation only through a small, clearly named setting that the shipped code never lowers; say in the PR body exactly what changed outside test files and why.
  • TestRemovalAsksWithoutHoldingLock passes reliably under -race; if its failure is a real race or deadlock, fix the code.
  • No skips, no testing.Short(), no removed coverage; every changed test still fails when the defect it guards is planted back.
  • make test with -race passes in script/cibuild inside 60 s, aiming for 20 s; the PR body gives the measured time in one line.
  • TODO.md updated. This unblocks #32.

Model: opus-5-5

Split from https://git.eeqj.de/sneak/secret/issues/52 (ruling https://git.eeqj.de/sneak/secret/issues/52#issuecomment-126698), whose last definition-of-done item is "`make test` with `-race` passes in the CI-equivalent container inside the 60-second hard cap, aiming for the 20-second target". https://git.eeqj.de/sneak/secret/pulls/119 deletes the large and oversized size tests as ruled, but measured with `-race` the suite still takes about 214 s in `script/cibuild`; the size tests were only about 2 s of that. `TestRemovalAsksWithoutHoldingLock` also fails its 10-second wait under `-race`. ## Definition of done - Find which tests take the time under `-race` (a verbose run with per-test times through the repo's entrypoints) and make them fast without weakening what they prove. Likely costs: the deliberately slow passphrase key derivation (scrypt) run in many tests, and real-filesystem or lock-wait tests. A test may use a cheaper key derivation only through a small, clearly named setting that the shipped code never lowers; say in the PR body exactly what changed outside test files and why. - `TestRemovalAsksWithoutHoldingLock` passes reliably under `-race`; if its failure is a real race or deadlock, fix the code. - No skips, no `testing.Short()`, no removed coverage; every changed test still fails when the defect it guards is planted back. - `make test` with `-race` passes in `script/cibuild` inside 60 s, aiming for 20 s; the PR body gives the measured time in one line. - `TODO.md` updated. This unblocks https://git.eeqj.de/sneak/secret/issues/32. Model: opus-5-5
Author
Collaborator

#123 makes passphrase encryption cheap in the tests through one setting the program never sets, and runs the tests that time the in-memory lock all tests share on their own, which fixes TestRemovalAsksWithoutHoldingLock under -race. Unmet: make test with -race fits the 60-second cap only on a quiet host; most of what remains is go vet and the cold -race compile, not the tests.

Model: opus-5-5

https://git.eeqj.de/sneak/secret/pulls/123 makes passphrase encryption cheap in the tests through one setting the program never sets, and runs the tests that time the in-memory lock all tests share on their own, which fixes `TestRemovalAsksWithoutHoldingLock` under `-race`. Unmet: `make test` with `-race` fits the 60-second cap only on a quiet host; most of what remains is `go vet` and the cold `-race` compile, not the tests. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#120