review: Astra round 1 findings for staticcheck-sa4006 (READY)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+58
−0
docs/superpowers/reviews/FINDINGS-staticcheck-sa4006-R1.md+58 −0
diff --git a/docs/superpowers/reviews/FINDINGS-staticcheck-sa4006-R1.md b/docs/superpowers/reviews/FINDINGS-staticcheck-sa4006-R1.md| new file mode 100644 |
| index 000000000..3a2cd0722 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/FINDINGS-staticcheck-sa4006-R1.md |
| @@ -0,0 +1,58 @@ |
| +Reviewed round 1 at `03eaf0a3d7a090ab4db39edb8792b40a30ae3cea`, against merge base `a23423b7c8b5f5c4105e7a797feaf4d88061054b` of the amadan `origin/main`. The requested commit adds only the brief to its named code revision, `7bce5f83`. |
| + |
| +P1: none. |
| +P2: none. |
| +P3: none. |
| + |
| +All nine production changes remove unused assignments while preserving calls, arguments, ordering and error checks. I found no discarded value that should instead have affected behavior: |
| + |
| +- Publication errors always accompany `done=false`, preserving retry backoff. |
| +- Mail settlement re-reads the gate and its tag before the final conditional write. |
| +- Canary parsing obtains the same app through `canaryPointer`. |
| +- Managed fleet processing re-reads boxes after preparation, preserving newly allocated boxes. |
| +- Release settlement reads the deadline again after each failed stop. |
| +- Both instance-control paths retain the fresh slice value used to explain a failed post-reload check. |
| + |
| +The seven restored assertions check the intended behavior: |
| + |
| +| Evidence | Assessment | |
| +|---|---| |
| +| [domains_cli_test.go:829](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/domains_cli_test.go:829) | Checks the detach confirmation using the newly captured output. | |
| +| [apiinstancemove_home_test.go:216](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/console/apiinstancemove_home_test.go:216) | Checks that the accepted home-region move creates exactly one registration. | |
| +| [apiinteractive_test.go:371](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/console/apiinteractive_test.go:371) | Checks that the stranger’s refusal preserves the record and serial and creates no grants or audit events. | |
| +| [domainbuy_fix_test.go:219](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/console/domainbuy_fix_test.go:219) | Checks the browser’s rate-limit response text alongside HTTP 429. | |
| +| [tombstone_test.go:671](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/lease/tombstone_test.go:671) | Checks that repeated lifts of an already-lifted tombstone perform no writes. | |
| +| [ha_duties_test.go:262](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/registry/ha_duties_test.go:262) | Distinguishes the expected adoption refusal from an unexpected database error. | |
| +| [record_test.go:32](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/relay/record_test.go:32) | Checks read success, record contents and preservation of the successful write’s ETag after a rejected stale write. | |
| + |
| +Both lint suppression reasons are accurate. The residue is planted before landing and consumed by later assertions in [movesbuildstatepark_test.go:30](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/host/movesbuildstatepark_test.go:30). The pinned inputs are captured before installation and passed to its verification in [movesinstall_test.go:483](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/host/movesinstall_test.go:483). Those uses remain behind existing unconditional skips. |
| + |
| +Moving context creation past the skips preserves behavior when the skips are removed. The removed `rollbackUnitRestart` initialization only constructed a closure; both branches still assign the closure ultimately used. No required side effect was removed. |
| + |
| +Census unit verdicts: |
| + |
| +| Unit | Verdict and evidence | |
| +|---|---| |
| +| `runDeploy` | **APPROVE**, retaining `legacy / accepted-legacy`. [deploy.go:488](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/deploy.go:488) discards only the unused total; records, truncation and errors remain checked. No new read or authority. | |
| +| `Reconcile` | **APPROVE**, retaining `legacy / accepted-legacy`. [reconcile.go:349](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/domains/reconcile.go:349) retains account validation; `canaryPointer` supplies the app through the same parser at line 1003. Minting and removal conditions are unchanged. | |
| +| `replicaPlacementWorker.run` | **APPROVE**, retaining `legacy / accepted-legacy`. [replicaplacement.go:128](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/host/replicaplacement.go:128) retains completion and backoff behavior. Every error return in [fleetbind.go:491](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/host/fleetbind.go:491) returns false. | |
| +| `Participant.Step` | **APPROVE**, retaining `authority / C,D`. [participant.go:264](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/hostrelocate/participant.go:264) still counts the attempt before probing and passes the updated observation into both the probe and result recording. The removed `c` assignment has no subsequent use on that path. | |
| +| `staticcheck.conf:external` | **APPROVE**, retaining `legacy / accepted-legacy`. [staticcheck.conf:34](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/staticcheck.conf:34) enables SA4006 without disabling another check or changing root runtime behavior. | |
| + |
| +Census envelope verdicts: |
| + |
| +| Envelope | Verdict and evidence | |
| +|---|---| |
| +| `.` | **APPROVE** — [deploy.go:488](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/deploy.go:488) and [staticcheck.conf:34](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/staticcheck.conf:34) preserve runtime authority and strengthen lint coverage. | |
| +| `internal/activator` | **APPROVE** — [rootfsrelease.go:663](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/activator/rootfsrelease.go:663) preserves stop reasons, timeout, retry timing and deadline checks. | |
| +| `internal/domains` | **APPROVE** — [reconcile.go:349](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/domains/reconcile.go:349) preserves account/app selection and route mutation conditions. | |
| +| `internal/host` | **APPROVE** — [replicaplacement.go:89](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/host/replicaplacement.go:89) preserves registry reads, retirement proof, coordinator checks and publication retries. | |
| +| `internal/hostops` | **APPROVE** — [mail_reconcile.go:152](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/hostops/mail_reconcile.go:152) retains the fence write and error handling; the read at line 251 supplies the tag for settlement after identity and revision validation. | |
| +| `internal/hostrelocate` | **APPROVE** — [participant.go:264](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/hostrelocate/participant.go:264) preserves attempt accounting, observation freshness and probe authority. | |
| +| `internal/instancectl` | **APPROVE** — [gen.go:425](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/instancectl/gen.go:425) and [rootfs.go:748](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/instancectl/rootfs.go:748) retain both view calls, reload decisions, tier checks and start refusals. | |
| + |
| +The record-write re-pin for `ControlWriter.ReconcileMailGate` is **APPROVED** as `nonrecord / sel:Put`. Its write arguments and conditional-write checks are unchanged. [staticcheck_sa4006_census_test.go:12](/home/paulca/amadan.net/carlos/platform-staticcheck-sa4006/internal/provision/staticcheck_sa4006_census_test.go:12) preserves the prior inventory and rejects changes to classification or write kinds. |
| + |
| +Independent byte-hash checks matched all five proposed unit fingerprints and the mail-gate record-write fingerprint. Formatting of every changed Go file and `git diff --check` passed. Targeted tests could not start because the read-only sandbox prevented Go from creating its work directory; executable census checks and staticcheck were not independently verified. No files were changed, reviewers spawned or full suites run. |
| + |
| +READY |
| \ No newline at end of file |