carlos / platform Public

review: Astra round 1 on the DPA PDF branch (READY AFTER FIXES)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev bc628e95c560729ea1e1997924f5e65f32ab02af parent 232a7b3
1 file changed, +26 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-dpa-pdf-branch.md +26 −0

Intent

Human

<task-notification> <task-id>affe7552153f68c50</task-id> <tool-use-id>toolu_01MFq6vjg8f2UFgY4y8k9pMe</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/260ddc60-0dfc-4cf8-8857-7688d6275097/tasks/affe7552153f68c50.output</output-file> <status>completed</status> <summary>Agent "Implement S2 Task 3: PDF route" 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: done. All three review fixes are in, on top of e97e96fe; nothing is pushed. Commit: 232a7b38 `console: DPA PDF review fixes (engine gate first, print leads on 502)`. - **P2:** with no PDF engine, the route now returns the plain 404 straight after the membership check, before reading anything. The new test `TestDPAPDFNoEngineSkipsReads` breaks the acceptance read on purpose. With no engine it gets the byte-identical 404; with an engine it gets 500, which proves the read really fails. - **P3:** the claim fixture text and the comment in `dpa_pdf_census_test.go` now carry your narrowed "writes no app records, sidecars or bucket objects…" wording. - **Minor:** on the 502 page, Print is now the main button and Download PDF the secondary one. The normal record page and the no-engine page are unchanged. Tests: TestDPAPDF*, TestDPARecord*, TestDPAAccept*, the copy decks, the claim census tests, the screen budget test, the claim authority census, the DPA claim probes and `TestPlan9B8RecordWriteCensus` all pass. The census digest didn't change. Build, vet, gofmt and `make code-health` are clean. Concerns: none new. Report (fix round appended): /home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-pdf/.superpowers/sdd/2026-11-26-dpa-pdf/task-3-report.md</result> <usage><subagent_tokens>165088</subagent_tokens><tool_uses>8</tool_uses><duration_ms>363659</duration_ms></usage> </task-notification>

Attributed to this commit: 21.2 g CO₂e (2,806,574 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on dpa-pdf, 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-FINDINGS-dpa-pdf-branch.md b/docs/superpowers/reviews/CODEX-FINDINGS-dpa-pdf-branch.md
new file mode 100644
index 000000000..7505080b5
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-dpa-pdf-branch.md
@@ -0,0 +1,26 @@
+Reviewed `cc6c77b2..0552118dc0ed3d01fdcd939b09122ae1ce04ddd4` within the brief’s exclusions. No P1 findings.
+
+1. **P2 — Disabled PDF route can return 500 instead of 404.** [dpapdfroute.go:67](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-pdf/internal/console/dpapdfroute.go:67)
+ With `PDFEngine` empty, the handler still loads the acceptance, document and letterhead. A failed DPA query or missing referenced row therefore returns 500 before reaching the disabled-feature check. The plan requires a plain 404 when no engine is configured.
+ **Fix:** Check `PDFEngine` immediately after successful membership gating, before `dpaLiveRecord`. Add coverage showing disabled downloads remain 404 when a DPA read would fail.
+ **Fault family:** Disabled-route refusal ordering.
+
+2. **P3 — “Writes nothing” overstates the route’s behaviour.** [dpa_pdf_census_test.go:13](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/dpa-pdf/internal/provision/dpa_pdf_census_test.go:13)
+ On PDF failure, `renderDPARecord` calls `accountPage`, which updates the last-account pointer. The claim fixture repeats the same broad assertion. This does **not** invalidate the record-write classification: neither path writes app records, sidecars or bucket objects.
+ **Fix:** Narrow the comments to those protected records and acknowledge normal page-rendering side effects.
+ **Fault family:** Accuracy of census explanations.
+
+Deferred-minor triage:
+
+- **Before merge:** Fix the disabled-engine ordering above.
+- **Keep the planned final witness:** Inspect every printed page after the logo-plus-entity header change. Source inspection cannot establish clipping or pagination.
+- **Follow-up only:** Exact-cap and rejected-engine-URL tests; making Print primary on the 502 page; correcting “writes nothing.”
+- **No required change:** The mutable deadline is confined to sequential tests; production initializes the client; displaying escaped pending flash errors is acceptable.
+
+The canonical-body check, data-URI logo construction, escaped base URL, accepted IDs, filename sanitization, and production client’s proxy/redirect restrictions look sound. The census digest matches `routeDecls`, its classification guards remain intact, and the parity and route inventories include the new route.
+
+Formatting and diff-whitespace checks passed; the new census file passed a targeted gitleaks scan. Targeted Go tests could not start because the read-only sandbox denied Go’s temporary build directory. No files were changed.
+
+Round 1 has no P1: apply the P2 fix without reopening the review, subject to the repository’s scoped post-fix checks.
+
+**READY AFTER FIXES**
\ No newline at end of file