review: Astra findings for race-activator-1249, round 4
Refs #1249
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+38
−0
docs/superpowers/reviews/FINDINGS-race-activator-1249-r4.md+38 −0
CI passed — run details
diff --git a/docs/superpowers/reviews/FINDINGS-race-activator-1249-r4.md b/docs/superpowers/reviews/FINDINGS-race-activator-1249-r4.md| new file mode 100644 |
| index 000000000..4d71c1515 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/FINDINGS-race-activator-1249-r4.md |
| @@ -0,0 +1,38 @@ |
| +Reviewed `377e3702ac60008a35662ad750b7655feae99eff`, focusing on round four. It differs from the brief’s code commit only by adding the brief. |
| + |
| +No P1 findings. |
| + |
| +**P2 — The guard misses ordinary asynchronous starts.** |
| +[internal/activator/knobguard_test.go:143](/home/paulca/amadan.net/carlos/platform-race-activator-1249/internal/activator/knobguard_test.go:143) |
| + |
| +Fault family: every goroutine reading a package setting must finish with a happens-before edge before restoration. |
| + |
| +The scanner recognizes direct selector calls, but misses starters used as function values. For example, this setting-changing test passes the guard: |
| + |
| +```go |
| +setKnob(t, &wakeWaitBound, time.Second) |
| +start := time.AfterFunc |
| +start(time.Second, func() { |
| + _ = wakeWaitBound |
| +}) |
| +``` |
| + |
| +The selector `time.AfterFunc` is not the called expression, and the call to `start` is not a selector. Name-based reach cannot recover the missing start because the imported function has no entry in `byName`. A package-level `var start = time.AfterFunc`, an extracted `wg.Go` method value, and a renamed `time` import have equivalent gaps. Direct `context.AfterFunc(ctx, callback)` also escapes detection. |
| + |
| +A pending callback is absent from both the tracked set and production stacks, so restoration can proceed before its setting read. This defeats the enforcement required by the brief, although I found no existing converted test using these escapes. |
| + |
| +**Fix:** recognize starter references, including function values and import aliases, and cover `context.AfterFunc`. Require tracking or an explicit, justified exemption for these paths. Add negative fixtures for these cases to the guard’s test. |
| + |
| +No P3 findings. |
| + |
| +The tracking mechanism itself is sound: registration precedes launch, and deferred `finish` removes the record under the same mutex acquired by the join. That orders prior reads before restoration, including after `Goexit` and when completion precedes the join’s first inspection. Intervening mutex users do not lose that ordering. `afterTracked` also registers pending timers before scheduling them. |
| + |
| +The scan includes build-tagged test files, package-level initializers, and test methods. The listed exemptions match the current bodies examined. I found no additional cleanup-order failure in the converted paths. The revised comments correctly distinguish test-started goroutines from production goroutines for the reported `awaitWake` race. |
| + |
| +No activator production source changed since round three. The existing census approval for `Service`, `Service.residentLeaseShort`, and the `internal/activator` envelope therefore stands. |
| + |
| +Validation was static. `git diff --check` passed. The two targeted guard tests could not start because Go attempted to update `go.mod` on the read-only filesystem. Network restrictions prevented reading amadan #1249; round history came from the checked-in briefs and findings. No files were changed, reviewers spawned, or full suites run. |
| + |
| +Round four has no P1 findings. Apply the P2 correction within this final round; no fifth review is requested. |
| + |
| +READY AFTER FIXES |
| \ No newline at end of file |