carlos / platform Public

review brief: DPA acceptance branch, round 2 (fix wave)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9bcb582cfda58c225e59b8953d09aeb50f6eb2b3 parent 9490007
1 file changed, +101 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-acceptance-branch-R2.md +101 −0

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-9nKcH2
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.45.6
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ssm v1.74.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.40
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.38
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.40
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.40
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec

amadan: job cancelled — a newer push superseded it

Intent

Human

<task-notification> <task-id>ae7fc6e35880bf752</task-id> <tool-use-id>toolu_01Ah4fFaSzksC5RSC5m2fU8f</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/260ddc60-0dfc-4cf8-8857-7688d6275097/tasks/ae7fc6e35880bf752.output</output-file> <status>completed</status> <summary>Agent "Fix wave: branch review findings" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: all seven findings and D1 are fixed. `make code-health` passes, and server.go is at 4210 lines against its allowance of 4223. Commits (not pushed): - 4108d2dc: P1-1, P1-2, P1-3, P2-4, P2-6 (store calls take a context; accepting and publishing check and decide inside the insert transaction; newest means highest id everywhere; unique errors read by driver code) - be7148fa: P2-5 (the acceptance pane shows the processor, the version link and the summary) - 9490007c: P2-7 and D1 (shared rate-limit sentence with deck row DPA-C98; bidi escapes) Tests: build, vet and gofmt are clean. The targeted DPA, legal and claim-probe run passed: 79 PASS lines, 0 FAIL. I added the DPA accept claim probe to the run by name, because `TestClaim.*Route` does not reach it. Concerns: - Live accounts are marked `deleted_at = 0`, not `IS NULL` (the column is NOT NULL DEFAULT 0), so I used `= 0`. - The brief's DPA-C38/C39 are actually DPA-C36/C37 in the deck. I used C35, C36, C37 and C23 as intended, with no new copy. - The stale first-publication guard relies on a new hidden `mode` form field. A post without it is classified from the current rows: a stale terms or privacy baseline would become a later version needing notice, not a second baseline. - A new test hook field, `dpaAcceptHook`, is on Server in server.go. - `accountSettingsPage` now lives in dpapane.go even though it is general settings code. - DPA-C98 is still waiting for Paul's approval. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/.superpowers/sdd/2026-11-25-dpa-acceptance/branch-fix-report.md</result> <usage><subagent_tokens>218082</subagent_tokens><tool_uses>61</tool_uses><duration_ms>1734188</duration_ms></usage> </task-notification>

Attributed to this commit: 12.4 g CO₂e (1,543,226 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on dpa-and-retention, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-acceptance-branch-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-acceptance-branch-R2.md
new file mode 100644
index 000000000..ff003671f
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-dpa-acceptance-branch-R2.md
@@ -0,0 +1,101 @@
+# Review brief: DPA acceptance (slice 1) branch, round 2 of 3 (scoped to the fix wave)
+
+Repo carlos/platform, branch `dpa-and-retention`, commit 9490007c.
+Under review: the diff `edaed836..b65435b8` (merge base with main to tip),
+excluding `docs/superpowers/specs/`, `docs/superpowers/reviews/` and
+`docs/superpowers/plans/` except the copy deck
+`docs/superpowers/plans/2026-11-25-dpa-acceptance-copy.md`.
+Authorities: the spec `docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md`
+rev 5 (§3.1 to §3.7 only; later sections are later slices) and the plan
+`docs/superpowers/plans/2026-11-25-dpa-acceptance.md`, both on this branch
+and reviewed (spec through four Astra rounds, closed by Paul). AGENTS.md.
+
+You are an independent reviewer. Read the plan, the spec sections, then the
+code, and check every claim against the code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings in the spec's review history and §1: no approval step;
+ owner-only acceptance; letterhead as operator data; the agreement text is
+ fetched once, must already be canonical, and is stored byte for byte.
+- Approved copy: every user-facing string is in the copy deck, approved by
+ Paul. Report only a string that differs from its deck row, or a
+ user-facing string that is not in the deck.
+- Controller rulings and deferred minors from the per-task reviews:
+ `docs/superpowers/reviews/dpa-acceptance-deferred.md`. Some deferred
+ items have since been fixed; say which are still open, and which of the
+ open ones should be fixed before merge.
+
+## What to check
+
+1. Security boundaries, end to end across tasks: the operator fetch
+ (`internal/console/legalfetch.go`, `oplegal.go`) as an SSRF boundary; the
+ agreement body rendered unescaped into account settings
+ (`dpapane.go`, `templates/account_settings.html`) as an XSS boundary,
+ checked by `canonicalAgreement`; the SVG logo check; gate order on every
+ new route (customer: session → CSRF → owner → allowWrite →
+ requireFreshAuth; operator: operatorOnly first, as alertOperatorForm).
+2. What was accepted is what is recorded: the id/digest/letterhead binding
+ through step-up replay, the record page reading the acceptance's own ids,
+ `dpaInForce`/`dpaPending` (`dpainforce.go`).
+3. Account deletion paths end the live acceptance (`ownership.go`,
+ `store.go` ReapAccount).
+4. Census, parity and route lists edited by these tasks: additive, and
+ nothing weakened.
+5. Anything that would fail CI (the full console package was never run
+ locally, by design; CI runs it).
+
+## Round 2: scoped
+
+Round 1: `docs/superpowers/reviews/CODEX-FINDINGS-dpa-acceptance-branch.md`
+(NOT READY: P1 code-health ratchet; P1 acceptance after account deletion;
+P1 concurrent first publications; P2 two "newest" orders; P2 pane lacks
+processor, link and summary; P2 unique errors by message text; P2 rate-limit
+copy). The fix wave is `57605869..9490007c`; the fixer's report is
+`.superpowers/sdd/2026-11-25-dpa-acceptance/branch-fix-report.md` (git-ignored
+scratch; read it from the worktree path).
+
+Controller rulings in the fix wave, fixed scope: document ID is the single
+"newest" order; the pane shows the processor with the approved record strings
+(DPA-C35..C37) and the version link (DPA-C23) and the operator's summary; the
+rate-limit sentence is "Too many requests. Wait a minute and try again."
+(DPA-C98, pending Paul's copy approval); acceptance checks account, ownership,
+document and letterhead inside its transaction because foreign keys are off.
+
+First give one line per round 1 P1 and P2: resolved, partly, or not. Then
+inspect the fix diff for new problems it introduced. Also judge two things the
+fixer flagged: moving `accountSettingsPage` into dpapane.go to get server.go
+under its code-health allowance (is that a fair move or gaming the ratchet?),
+and the new hidden `mode` field guarding stale baseline submissions. Do not
+re-review code the fix did not touch. Run `make code-health` if you can.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+ Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review. (The
+ census, and review of any newly changed security, root, termination
+ or production-storage behaviour, still check the fix; see AGENTS.md,
+ "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for
+ another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not
+raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the area, the problem, the evidence
+(file:line, verified), the failure scenario, a concrete fix and the
+invariant or trust boundary it breaks (its fault family). Then the deferred
+list triage. End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another
+ round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites (the console package takes over
+30 minutes); a targeted `go test ./internal/console -run '<name>' -count=1`
+is fine for a specific doubt.