carlos / platform Public

Astra review closed

On branch activator-settle-wait

Astra (gpt-6-astra, high). Round 1 on edbf1fd0: request-changes, one P2. Verbatim:

  • P2 — Cleanup still misses an asynchronous generations-file writer. At rootfswakerelease_test.go:299, waitBackground can return while reapUnprovenWake is still writing. That uncounted goroutine deletes its obligation at opset.go:958, then calls persistGenerations at line 964. Shutdown can observe the empty obligation map and return between those operations, with background == 0. This path is exercised by TestStatelessStatefulFallbackUnprovenKeepsLease, which enables proof during cleanup and leaves reaping to Shutdown. The same TempDir RemoveAll race therefore remains possible. Count or join asynchronous reapers from before launch through their final write, preserving synchronous callers. Invariant: protected directories outlive every writer.

Targeted tests could not run: the read-only sandbox prevented Go from creating its work directory.

VERDICT: request-changes Fixed in f3cbbc10. Round 2 and census on 7b0e83ac, verbatim:

Reviewed HEAD 7b0e83ac39dd09930aab6d24b9d7ce0ac6f1a1bd against origin/main.

Round 2: the round 1 P2 is resolved. In opset.go:860, the counter increments before launching the reaper. The deferred decrement runs after reapUnprovenWake returns, including its failed-proof return and its final synchronous generations-file write at opset.go:968. The existing busy and legacy-entry guards remain intact. No P1/P2 remains in the requested fix.

Census verdicts:

| Unit | Verdict | Evidence and basis | |---|---|---| | Service.wake | Approve | Read activator.go:2093–2383. Adds only balanced atomic counting around the existing body. Admission, reads, launch inputs and outcome writes remain unchanged. legacy / accepted-legacy remains valid. | | type Service | Approve | activator.go:1620–1626 adds an in-memory atomic counter. No new input or authority; the existing authority disposition remains valid. | | Service.RunCmd | Approve | Read cmd.go:729–1034. Assigns the counter pointer before publishing the hold. Ownership, incarnation, lease, generation, environment and exec checks remain unchanged. legacy / accepted-legacy remains valid. | | Service.runReleaseAdmitted | Approve | Read rootfsrelease.go:372–577. Assigns the counter before publishing the release hold. Admission, staged-process reads, lease checks and execution arguments remain unchanged. legacy / accepted-legacy remains valid. | | Envelope internal/activator | Approve | The additional changed functions preserve existing behavior apart from counting, as detailed below. |

For the envelope, I read cmdHold.settleStarted:185–189, stop:222–251, settle:259–278, retrySettle:288–306, and reapUnprovenWakesLocked:860–880. Each launched attempt is counted before launch through callback completion. Proof conditions, retry guards and callback ordering are unchanged. I also traced the existing reaper, releaseProven and synchronous persistence path.

These changes introduce no new root-accessible path or input and weaken no check, refusal, validation, argument or environment constraint.

git diff --check passed. Tests and census validation were not run in this read-only session.

CODE: no P1/P2 CENSUS: approve