carlos / platform Public

review: Astra round 1 findings for audit-bugs-2 (READY)

Copy review of the new CLI messages approved unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e26b6b623c0749027f2b1a34b84d58df3797b944 parent 7a8aa17
1 file changed, +38 −0
  • docs/superpowers/reviews/FINDINGS-audit-bugs-2-R1.md +38 −0
diff --git a/docs/superpowers/reviews/FINDINGS-audit-bugs-2-R1.md b/docs/superpowers/reviews/FINDINGS-audit-bugs-2-R1.md
new file mode 100644
index 000000000..1d0f8e49b
--- /dev/null
+++ b/docs/superpowers/reviews/FINDINGS-audit-bugs-2-R1.md
@@ -0,0 +1,38 @@
+Reviewed `origin/main...7a8aa1726585d4bb6403a4d54fc1322a98535d87`, based on `c4b44c34e5deec90e6d3fa5cdffe62c7d8cad9e9`. The requested tip differs from the brief’s `6658a8db` only by adding the brief. This is round 1 of 3.
+
+Findings: **P1: none. P2: none. P3: none.** Under the stopping rule, no further review round is needed.
+
+The seven checks:
+
+1. **Ledger verification:** `Append` stores the entry before publishing HEAD, with a positive count and a lowercase SHA-256 digest. There is no legitimate empty HEAD produced by this writer. The new validation preserves valid published chains, while rejecting `{}`, `null`, missing keys and malformed digests. The timeout bounds each HTTP request, including its body, to 30 seconds; it does not bound the entire chain walk. See [append.go:74](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/ledger/append.go:74), [verify.go:48](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/ledger/verify.go:48), and [cli.go:3834](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/cli.go:3834).
+
+2. **System update and rollback:** The status-decode refusal occurs before upload or promote, so “nothing was promoted” is accurate. After acceptance, malformed or job-less responses explicitly acknowledge acceptance and direct the operator to status. An unreadable progress response says the promote may still be running. Rollback retains success when its completed operation’s response cannot supply a version. None of these added paths recommends repeating the mutation. See [system.go:379](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/system.go:379), [system.go:497](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/system.go:497), and [system.go:727](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/system.go:727).
+
+3. **Ops-account sentinel:** Both the early deletion refusal and `Store.DeleteAccount` use the sentinel. `errors.Is` recognizes wrapped refusals; unrelated errors containing “ops” receive generic advice. See [ownership.go:161](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/console/ownership.go:161), [ownership.go:716](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/console/ownership.go:716), and [ownership.go:790](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/console/ownership.go:790).
+
+4. **Lost subdomain-create race:** The assignment removes the shadowed `err`. The reread updates `cur`, `etag` and `err` together. Read failures refuse; occupied claims remain untouched; retired-claim writes retain their conditional-write checks. See [apisubdomain.go:468](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/console/apisubdomain.go:468).
+
+5. **Capacity paging:** Failed delivery is now logged with host, region and error. The callback, warning level and five-second context remain unchanged. See [haplacement.go:13](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/host/haplacement.go:13).
+
+6. **Escrow alerts:** All three constructors preserve their text. Both consumers use `errors.As`. The joined sealed-open failure already refused launch through `errEscrowUnreadable`; recognizing its alert directly preserves that refusal. The sweep now logs it through the alert branch. Repository searches found text assertions and documented alert text, but no additional production classifier depending on the old concrete error type.
+
+7. **Sandbox guidance:** The change removes the conflicting `/tmp` cache instruction and preserves the existing offline module flags.
+
+Census verdicts for this tip:
+
+| Unit or envelope | Verdict and basis |
+|---|---|
+| `ExecBackend.EscrowSweep` | **APPROVE — retain `legacy / accepted-legacy`.** Read [escrow.go:1590](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/activator/escrow.go:1590), including the changed classification at 1673. Eligibility, authority checks, publication limits and reads are unchanged. |
+| `ExecBackend.escrowConflict` | **APPROVE — retain `legacy / accepted-legacy`.** Read [escrow.go:497](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/activator/escrow.go:497). Same `Lstat`, same refusal conditions and text; only the error representation changes. |
+| `ExecBackend.escrowConflictFound` | **APPROVE — retain `legacy / accepted-legacy`.** Read [escrow.go:1049](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/activator/escrow.go:1049). Marker creation, logging and unconditional refusal remain intact. |
+| `ExecBackend.escrowedLaunchEnv` | **APPROVE — retain `legacy / accepted-legacy`.** Read [escrow.go:1394](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/activator/escrow.go:1394), including 1458–1482. No readiness, lease, conflict or sealed-acknowledgement check is weakened. |
+| Envelope `.` | **APPROVE.** Reviewed changed functions in [cli.go:3812](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/cli.go:3812) and [system.go:359](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/system.go:359), plus their request paths. No new authority or root-controlled input path. |
+| Envelope `internal/activator` | **APPROVE.** Reviewed the four units, the [error helpers at 510](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/activator/escrow.go:510), `errEscrowWriter` at 1328, and publication/error propagation. No new read or write authority. |
+| Envelope `internal/host` | **APPROVE.** The sole production change is [haplacement.go:13](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/host/haplacement.go:13); it adds failure logging only. |
+| Envelope `internal/ledger` | **APPROVE.** Reviewed [verify.go:48](/home/paulca/amadan.net/carlos/platform-audit-bugs-2/internal/ledger/verify.go:48) through the verifier, HTTP getter and writer contract. Validation tightens acceptance without expanding reads. |
+
+The added tests cover the previous failures by source inspection. The race fixture is deterministic; timeout tests have generous margins; modified globals are restored and these tests do not run in parallel. I found no material flake risk.
+
+Changed Go files pass `gofmt -l`; the committed diff passes `git diff --check`. Runtime tests and the census gate were **not verified**: the targeted ledger test stopped before compilation because Go attempted to update `go.mod` in the read-only sandbox. No files were edited, reviewers spawned, or full suites run.
+
+READY
\ No newline at end of file