review: Astra round 2 findings on the DPA and retention spec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+70
−0
docs/superpowers/reviews/CODEX-FINDINGS-dpa-and-retention-R2.md+70 −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-Zaw6pu .amadan/test-gate.sh 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 github.com/aws/aws-sdk-go-v2/service/sns v1.43.0 go: downloading golang.org/x/crypto v0.58.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/ec2 v1.324.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/resourcegroupstaggingapi v1.37.0 go: downloading golang.org/x/sys v0.49.0 go: downloading github.com/oschwald/maxminddb-golang v1.13.1 go: downloading github.com/pion/dtls/v3 v3.1.4 go: downloading github.com/pierrec/lz4/v4 v4.1.22 go: downloading github.com/klauspost/compress v1.20.2 go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 go: downloading github.com/wlynxg/anet v0.0.5 go: downloading github.com/prometheus/client_golang v1.17.0 go: downloading github.com/beorn7/perks v1.0.1 go: downloading github.com/prometheus/common v0.45.0 go: downloading github.com/prometheus/procfs v0.12.0 go: downloading github.com/cespare/xxhash/v2 v2.3.0 go: downloading google.golang.org/protobuf v1.36.10 go: downloading github.com/prometheus/client_model v0.5.0 go: downloading golang.org/x/text v0.43.0 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 golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e go: downloading github.com/pierrec/lz4/v4 v4.1.22 go: downloading modernc.org/libc v1.74.1 go: downloading modernc.org/libc v1.74.1 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 amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-dpa-and-retention-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-dpa-and-retention-R2.md| new file mode 100644 |
| index 000000000..0627e64b3 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-dpa-and-retention-R2.md |
| @@ -0,0 +1,70 @@ |
| +1. **R1-1 — Resolved:** explicit `inherit`, `keep` and `days` states preserve each setting. |
| +2. **R1-2 — Partly resolved, P1:** CLI authorizations are covered; in-flight sign-ins can still recreate the deleted identity. |
| +3. **R1-3 — Resolved:** the proposed sweep covers noncurrent versions and retired boxes. |
| +4. **R1-4 — Partly resolved, P1:** DPA applicability is gated by notification; privacy and terms changes still permit insufficient notice. |
| +5. **R1-5 — Resolved:** the fetch now specifies destination checks, HTTPS, refused redirects, timeout and body limit. |
| +6. **R1-6 — Resolved:** recipient-level records, scheduled retries and explicit at-least-once delivery address the original findings. |
| +7. **R1-7 — Resolved:** console-side enforcement removes the additional box reads. |
| +8. **R1-8 — Resolved at spec level:** the required inventory, dispositions and distinction between personal and account-owned credentials address the finding. |
| +9. **R1-9 — Not resolved, P2:** the console’s claimed 24-hour backup window still contradicts the configured retention. |
| +10. **R1-10 — Resolved:** mail-event pruning gets an independent hourly caller. |
| +11. **R1-11 — Resolved:** request records explicitly share log retention. |
| +12. **R1-12 — Resolved at spec level:** the location statement distinguishes app storage from operator-held telemetry. |
| +13. **R1-13 — Resolved:** an incident-notification workflow is specified; its capacity introduces a separate finding below. |
| +14. **R1-14 — Partly resolved, P2:** discovery costs are acknowledged; the replacement one-week guarantee remains unsupported. |
| + |
| +Reviewed `f8c6793005f12e45b5ed2cb3af956aadd83e979b`. No files changed or test suites run. The live privacy page was inaccessible, so completeness beyond the supplied policy excerpts remains unverified. |
| + |
| +1. **P1 — §6.2: checking that a user exists does not fence an in-flight sign-in.** |
| + **Evidence:** the [proposed issuance check](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:417) checks `users`. However, [completeSigninSession](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/emailsignin.go:311) calls `ResolveSignIn` before creating the session, and [ResolveSignIn](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/signinmethods_store.go:93) creates the user and sign-in method when absent. Email proof is consumed separately [before that sequence](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/emailsignin.go:427). |
| + **Failure scenario:** an email callback consumes its proof, deletion commits, then the callback resumes. It recreates the user; the proposed existence check passes and a new session appears. |
| + **Fix:** bind sign-in attempts to an identity generation or equivalent revocation boundary, and check it atomically through identity resolution and credential creation. Explicitly distinguish a fresh registration after deletion from completion of an earlier attempt. Test that interleaving. |
| + **Fault family:** R1-2 — deletion must revoke outstanding authority to issue credentials. |
| + |
| +2. **P1 — §4.3: privacy and terms changes can still take effect without the promised notice.** |
| + **Evidence:** [§4.3](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:248) permits website publication when the insufficiently notified list is “empty or explained.” The [promise table](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:52) requires emailing owners 30 days beforehand. Only DPA applicability uses the delivery-based gate. |
| + **Failure scenario:** delivery fails for an owner, the operator explains that failure and publishes the policy on its scheduled date. The change applies without 30 days’ notice. |
| + **Fix:** require a publication gate tied to successful notification and the full interval, with a defined audience cutoff and treatment of newly created accounts. Remove “explained” as a substitute for satisfying the notice requirement. |
| + **Fault family:** R1-4 — contractual changes must not precede completion of their notice obligation. |
| + |
| +3. **P1 — §§2 and 6.5: automatic app deletion does not cover apps with provisioned services. New finding.** |
| + **Evidence:** [§6.5](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:444) treats deletion as a finite reap delay followed by backup expiry. The automatic [trash sweep explicitly refuses email estate](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/lifetimes_purge.go:236). Its purge also encounters the [object-store guard](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/release/trash.go:345), which refuses a provisioned store or grant. Store teardown belongs to the separate [manual purge path](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/ownership.go:625). |
| + **Failure scenario:** a customer deletes an app with an object store or email service and takes no further action. Automatic purge repeatedly refuses; data can remain indefinitely. A successful replica-only measurement does not cover this case. |
| + **Fix:** specify an authorized, retryable console teardown path for these resources, preserving the existing guards. Include provisioned object stores, environment stores and email services in deletion acceptance tests. If deletion requires another customer action, make that boundary explicit before accepting the deletion request. |
| + **Fault family:** every supported app-deletion path must reach terminal cleanup without an undisclosed manual step. |
| + |
| +4. **P2 — §6.4: the eight-day console-backup claim remains unsupported.** |
| + **Evidence:** [§6.4](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:438) assumes at most 24 hours of current backup retention. The [box-wide configuration](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/ops/litestream.go:129) uses [seven-day snapshot retention](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/lease/lease.go:95), and [includes console.db](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/ops/litestream.go:448). The bucket’s [noncurrent-version window starts afterward; current objects never expire](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/infra/modules/deployment-buckets/main.tf:137). |
| + **Failure scenario:** a snapshot containing deleted personal data stays current for the snapshot-retention period, then remains as a noncurrent version beyond day eight. |
| + **Fix:** define and verify console-specific end-to-end expiry, including stopped replication and successive retention layers. Measuring app deletion in §6.5 does not establish this separate promise. |
| + **Fault family:** R1-9 — backup erasure deadlines must cover successive retention layers. |
| + |
| +5. **P2 — §5.4: “always within a week” has no enforced bound.** |
| + **Evidence:** [the revised guarantee](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:363) retains daily admission and fixed work limits. The existing pass permits [two million deletions and ten minutes per run](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/analyticsprune.go:15), with [at least 24 hours between admissions](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/analyticsprune.go:67). |
| + **Failure scenario:** shortening retention creates more than seven runs’ worth of expired versions. Even with no failures, the sweep takes longer than a week. An alert reports the missed deadline but cannot enforce it. |
| + **Fix:** remove the unconditional maximum, or specify capacity/admission controls and additional bounded processing that establish it. Cover backlog and family-aware cursor resumption in tests. |
| + **Fault family:** R1-14 — timing claims must match bounded scheduler behavior. |
| + |
| +6. **P2 — §5.5: census work remains necessary. New finding.** |
| + **Evidence:** [§5.5 says the census work is removed](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:382), but the change modifies `internal/analytics` and region-host IAM. The root binary [imports analytics](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/apimode.go:37), and [AGENTS.md includes whole package files and infrastructure files](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/AGENTS.md:443). |
| + **Failure scenario:** implementation follows the stated omission and reaches the census gate without the required proposal and independent approval. |
| + **Fix:** restore the census task for the shared analytics code and IAM changes, including review of the widened production-storage deletion authority. |
| + **Fault family:** changes to census-covered source and authority require independent approval. |
| + |
| +7. **P2 — §3.3: acceptance is not bound to the version the owner reviewed. New finding.** |
| + **Evidence:** [§3.3 requires accepting the newest published document](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:125), but specifies no binding between the rendered form and that document. Step-up [parks and later replays the submitted form](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/internal/console/stepup.go:325). |
| + **Failure scenario:** an owner reviews version A; the operator publishes B while the form is open or awaiting step-up. Submission selects B as newest, recording acceptance of text the owner did not review. |
| + **Fix:** include the immutable document ID and digest in the acceptance request. Revalidate them on submission and replay; if accepting only the newest version is required, display the new text and require a fresh acceptance. |
| + **Fault family:** recorded consent must identify the exact document presented to the signer. |
| + |
| +8. **P2 — §4.4: the incident queue cannot meet its deadline for all supported audiences. New finding.** |
| + **Evidence:** [§4.2 caps delivery at 200 per hour](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:228). [§4.4 permits an all-account incident](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-and-retention/docs/superpowers/specs/2026-11-25-dpa-and-retention-design.md:257), with no audience bound or deadline-priority capacity. |
| + **Failure scenario:** 10,000 intended recipients exceed even an immediate 200-message pass plus 48 hourly passes, before retries or competing notices. The deadline is necessarily missed. |
| + **Fix:** specify deadline-aware incident scheduling and sufficient bounded capacity for the supported audience. Account for time already elapsed since awareness, competing notices and retries; surface infeasibility when the incident is entered. |
| + **Fault family:** promised notification deadlines must be supported by delivery capacity. |
| + |
| +No P3 findings. |
| + |
| +R1-2 and R1-4 have now recurred across two rounds. The repository’s stopping rule requires a choice before a third fix in either family: refuse unsupported cases, cut the affected feature, or enforce the invariant centrally with a guard test. I recommend central enforcement for both. |
| + |
| +**NOT READY** |
| \ No newline at end of file |