review: Astra round 1 findings for audit-gate-vet-staticcheck (READY)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+48
−0
docs/superpowers/reviews/FINDINGS-audit-gate-vet-staticcheck-R1.md+48 −0
diff --git a/docs/superpowers/reviews/FINDINGS-audit-gate-vet-staticcheck-R1.md b/docs/superpowers/reviews/FINDINGS-audit-gate-vet-staticcheck-R1.md| new file mode 100644 |
| index 000000000..b3d2781ef |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/FINDINGS-audit-gate-vet-staticcheck-R1.md |
| @@ -0,0 +1,48 @@ |
| +Reviewed round 1 at `4d5862b0470a6f55477cadfd438bb8c9a87fc1cc` against base `15b1ee6b6a65a52b82075003d8d6c2bcbb100ca5`. The difference from the brief’s implementation commit, `11602a45`, is the brief itself. |
| + |
| +**Findings:** no P1, P2, or P3 findings against this change. |
| + |
| +1. **Tagged vet covers the intended files.** The separate plain and tagged invocations at [.amadan/test-gate.sh:171](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/.amadan/test-gate.sh:171) preserve coverage of `departure_queue_default.go` while type-checking the Linux root-runner tests and cutover witnesses. I counted 131 test files with `linux && rootrunner`, plus three supporting non-test files. Vet does not execute their tests. |
| + |
| + Coverage is still incomplete outside this slice: 14 non-Linux test files and the two `race_on_test.go` files remain outside these CI configurations. For example, `devbox_envfile_darwin_test.go` is excluded on Linux, and [.amadan/ci.d/20-cross@5:56](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/.amadan/ci.d/20-cross@5:56) uses `go build`, which excludes tests. These are pre-existing gaps; handle cross-platform test compilation and race coverage separately. |
| + |
| +2. **Staticcheck’s pin, failure handling, and cache arrangement are sound.** [Makefile:55](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/Makefile:55) pins v0.8.2 without adding its dependencies to the application module. The recipe rejects either nonempty diagnostic output or a nonzero exit. I exercised those cases with a stubbed `go` command, including output accompanied by exit status zero. |
| + |
| + Staticcheck is independent of `make test`. The Makefile leaves `GOCACHE` unchanged, creates no per-task Go cache, and places staticcheck’s cache beneath an explicitly supplied absolute `GOCACHE`. Otherwise it retains staticcheck’s default user cache. The locally available amadan runner source supplies writable repository caches and permits module-proxy access; that supports the implementation, but does not establish the live runner’s result. |
| + |
| +3. **The exclusions are an acceptable staged adoption.** [staticcheck.conf:15](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/staticcheck.conf:15) names SA1012, SA1019, and SA4006 with historical counts and enables the remaining SA checks. I could not reproduce those counts in this sandbox. |
| + |
| + The two named production cases deserve different treatment: |
| + |
| + - At [apisubdomain.go:468](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/console/apisubdomain.go:468), the short declaration inside the missing-claim branch shadows `err`. After losing a create race, the reread updates the inner error, while the subsequent check sees the original `os.ErrNotExist`. A successful reread therefore still produces an unreadable refusal. This is a real, pre-existing correctness bug. Fix it in a focused follow-up by avoiding the shadow and testing the lost-create-race path. Its fault family is **error propagation across namespace claim retries**. |
| + - At [replicaplacement.go:126](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/host/replicaplacement.go:126), the publication error is discarded, but publication failures return `done=false`; lines 132–139 retain the work and schedule a retry. I found no lost-retry bug. Error reporting can be considered in the SA4006 follow-up. |
| + |
| + Neither requires expanding this gate-enablement branch into production behavior changes. |
| + |
| +4. **Every added suppression has a truthful reason.** The three production SA2001 suppressions preserve deliberate synchronization: the edge probes cache-lock availability, the scheduler waits for active readers, and the tunnel connection waits for writer users after closure. Their census verdicts appear below. |
| + |
| + The test suppressions likewise preserve their witnesses: callback execution outside `a.mu` at [hasuspect_test.go:497](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/activator/hasuspect_test.go:497); lock availability while a kill is held at [rootfs_cmd_lease_test.go:590](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/activator/rootfs_cmd_lease_test.go:590); the intentional nil-map panic at [jobs_test.go:183](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/console/jobs_test.go:183); raw lowercase header removal at [assetadmit_test.go:323](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/edge/assetadmit_test.go:323); and odd-argument rejection at [text_test.go:50](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/grouproll/text_test.go:50). |
| + |
| +5. **Production behavior is unchanged.** The removed `hosts` slice in [apiinstances.go:453](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/console/apiinstances.go:453) had no consumer. The renamed callback parameter in [demo_jobs.go:182](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/console/demo_jobs.go:182) was overwritten before use; the transaction still obtains and passes its own `life`. The regional-worker condition had an empty body and a side-effect-free predicate. |
| + |
| +6. **The edited tests retain their assertions.** The determinism and shared-instance tests still make two independent calls. Mail-switch tests retain repeated lookups and read-count checks. Admission still checks two read connections, one probe connection, and refusal of a fourth connection. `EqualFold` preserves the visitor-header comparison for the ASCII header names under test. No assertion was removed. |
| + |
| +7. **The documentation matches the implementation.** The README additions, AGENTS additions, and revised `10-gate` header accurately describe the separate tagged-vet and staticcheck jobs. The Makefile correctly explains why staticcheck omits the cutover tag: the existing guard restricts where that tag may appear. |
| + |
| +**Census verdicts** |
| + |
| +| Unit or envelope | Verdict and evidence | |
| +|---|---| |
| +| `RegionalWorker.runHost` | **Approve**, retaining `authority`, `C,J2,J4`, basis `root-input`. Read [regionalworker.go:171](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/hostbox/regionalworker.go:171) through line 286 and [park.go:17](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/hostbox/park.go:17) through line 49. Removing the empty condition changes no enrollment, ownership, evidence, request-limit, revision, or execution check. No new read or authority is introduced. | |
| +| `staticcheck.conf:external` | **Approve** `legacy` / `accepted-legacy`. Read [staticcheck.conf:1](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/staticcheck.conf:1) through line 32 and its Makefile invocation. This is analysis-tool configuration, with no added root-runtime read. | |
| +| `.` envelope | **Approve.** Reviewed the root-level diff, including Makefile lines 35–73 and `staticcheck.conf`. No root Go implementation or application dependency change. | |
| +| `internal/edge` envelope | **Approve.** Read [lbhealth.go:53](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/edge/lbhealth.go:53) through line 86 and both changed tests. The production change only replaces the suppression comment; lock acquisition, timeout, and probe completion remain unchanged. | |
| +| `internal/hostbox` envelope | **Approve.** The only changed implementation is `runHost`, approved above. Its downstream ownership checks remain intact. | |
| +| `internal/schedule` envelope | **Approve.** Read [hostgate.go:44](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/schedule/hostgate.go:44) through line 87. The exclusive acquisition waits for existing readers; only a suppression comment was added. | |
| +| `internal/tunnelclient` envelope | **Approve.** Read [upgrade.go:276](/home/paulca/amadan.net/carlos/platform-audit-gate-vet-staticcheck/internal/tunnelclient/upgrade.go:276) through line 430. `finish` closes before fencing; writer and deadline operations retain their read locks and closed checks. The change is comment-only. | |
| + |
| +Validation completed: shell syntax, diff whitespace, formatting of every changed Go file, and the staticcheck recipe’s three exit/output cases. Tagged vet and real staticcheck execution were blocked by the read-only filesystem. Census tests were not run. Network restrictions prevented checking amadan CI; the census verdict has not been posted to #280. No files were edited, no subagents were spawned, and no full suites were run. |
| + |
| +Round 1 has no P1; the stopping rule ends this review. Exact-tip green CI and recording the census approval remain merge prerequisites. |
| + |
| +**READY** |
| \ No newline at end of file |