carlos / platform Public

Review briefs: instance usage census card and whole branch

Astra census review (#280) and the one whole-branch review, run in
parallel on c5cdec97c.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev ae3f77d9b67791fe8202f10c0db79584d239d997 parent c5cdec9
2 files changed, +118 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-branch.md +77 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-census.md +41 −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-WoGjJu
.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 golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/prometheus/client_golang v1.17.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 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 github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ssm v1.74.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
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/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.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/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec

amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-branch.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-branch.md
new file mode 100644
index 000000000..e735e1d69
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-branch.md
@@ -0,0 +1,77 @@
+# Review brief: instance usage, whole branch, round 1 of 3
+
+Repo carlos/platform, branch `instance-usage`, commit c5cdec97c5c405f03bc975d7c4367d53f3f8b62b.
+Under review: the diff `git diff origin/main...HEAD` (origin is the
+amadan.net remote), excluding review briefs and findings files.
+Authorities: `docs/superpowers/specs/2026-11-29-instance-usage-design.md`
+(rev 5, merged on main as 96731431a), the plan
+`docs/superpowers/plans/2026-11-29-instance-usage.md` (on this branch;
+its own review history is at its end), the approved copy
+`docs/superpowers/notes/instance-usage-copy.md`, AGENTS.md. Do not review
+against unmerged branches.
+
+You are an independent reviewer giving the one whole-branch review
+before merge (AGENTS.md stopping rule 3). Read the diff, then the code
+around it, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's ruling (spec §2): a lower bound; no completeness, no partial
+ answer; whole UTC months from `from`; one object per box, date and app.
+- The design (spec rev 5) is reviewed and closed. Review the code
+ against it.
+- Per-task Astra reviews already ran on Tasks 2, 3, 5 and 6 (findings in
+ `docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-task{2,3,5,6}-R1.md`);
+ all were READY AFTER FIXES and their P2s are fixed. A P3 parked: the
+ oversized-object log in `internal/console/usagedays.go` names the
+ economics sweep.
+- The census card has its own independent review running in parallel;
+ do not duplicate it.
+
+## What to check
+
+1. Spec coverage end to end: R1-R7, D1-D8, T1-T13. Anything the spec
+ requires that the branch does not do, or does differently.
+2. Changes produced by P2 fixes that touch security and were not
+ re-reviewed (AGENTS.md rule 1): the usage credential's rotation
+ refusal while the switch is off (both rotate doors, commit 928e5f8ca);
+ the bounded `@from` check and overflow checks (2f26b3e70).
+3. Behaviour changes outside the feature: `getJSON` in the root package
+ now returns an overflow error past 1 MiB for every caller instead of a
+ silently truncated body (apimode_limit.go); the services help and its
+ golden files; the jobs guard now admitting declared request jobs;
+ code moved for the code-health ratchet (internal/host/canary_count.go,
+ internal/console/hostnorm.go, apimode_limit.go, cmd/console
+ startPostClaimWork, internal/host newUsageMeter): confirm each move is
+ verbatim and behaviour-neutral.
+4. The CLI output against the approved copy and the UX rule (state first),
+ and `docs/site/cli.md`, parity rows.
+5. Cross-task integration: the names, keys and shapes the meter, the
+ flush, the route and the CLI share; the end-to-end test.
+6. Rollout safety (spec §12): with `CONSOLE_INSTANCE_USAGE` off nothing
+ user-visible changes on a console; with `CARLOS_INSTANCE_USAGE=off`
+ a box writes nothing new; a box rolled back to an older build leaves
+ nothing an older reader misparses.
+
+## 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.
+- **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 problem, the evidence
+(file:line, verified), the failure scenario, a concrete fix and the
+invariant or trust boundary it breaks (its fault family). End with
+exactly one verdict: **READY**, **READY AFTER FIXES** (no P1), or
+**NOT READY** (P1s listed).
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites (targeted `go test -run` is
+fine; the sandbox may refuse to build).
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-census.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-census.md
new file mode 100644
index 000000000..dbc966d1a
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-census.md
@@ -0,0 +1,41 @@
+# Review brief: instance usage census card, round 1 of 3
+
+Repo carlos/platform, branch `instance-usage`, commit c5cdec97c5c405f03bc975d7c4367d53f3f8b62b.
+Under review: the census card
+`docs/superpowers/notes/census-proposal-instance-usage.md`, its overlay
+`internal/provision/testdata/plan14-root-reads-instance-usage.tsv` and
+chain line, the record-write inventory
+`internal/provision/instance_usage_census_test.go`, and the branch's
+diff against main on the amadan.net remote:
+`git diff origin/main...HEAD`.
+Authorities: AGENTS.md "The census: the reviewer decides" (the reject
+rule is there, verbatim); `docs/superpowers/specs/2026-11-29-instance-usage-design.md`
+§12 "Census (R2-7)" (merged on main as 96731431a).
+
+You are the independent census reviewer (Paul, #280, 2026-10-26: the
+reviewer decides every class; nothing escalates). Give a verdict,
+APPROVE or REJECT, for every unit and every re-pinned envelope on the
+card, citing the lines you read.
+
+Reject, as a finding the author fixes, if the change lets root open, run,
+query or follow anything it did not before from a path or input a
+tenant, an app or a box agent can create, write or name; if it weakens a
+check, refusal, validation, argument or environment root relies on; if a
+new disposition is wrong for the unit's reads; if a removed unit moved
+rather than went (the card says two were moved verbatim: confirm the
+bodies are identical); or if the diff cannot settle any of these.
+Otherwise approve.
+
+Known: `usage_cmd.go` printUsage and type usageAnswer are flagged as new
+readers because the scanner matched a struct field named ReadAt; say
+whether you agree they read no file.
+
+## Severity and output
+
+For each unit and envelope: APPROVE or REJECT with the evidence. Then
+findings ranked P1 (a REJECT), P2, P3, each with its fault family. End
+with exactly one verdict: **READY** (every unit approved), **READY AFTER
+FIXES** (no reject; listed P2s), or **NOT READY** (rejects listed).
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.