carlos / platform Public

review brief: static-dir-slash round 2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 3c8641c5dff11166c002f40857f0ef99b3d992ac parent f7c84fd
1 file changed, +50 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-static-dir-slash-R2.md +50 −0

CI cancelled — superseded by a newer push — run details

Intent

Attributed to this commit: 34.3 g CO₂e (4,329,570 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on static-dir-slash, 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-static-dir-slash-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-static-dir-slash-R2.md
new file mode 100644
index 000000000..e98f7f4ec
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-static-dir-slash-R2.md
@@ -0,0 +1,50 @@
+# Review brief: branch static-dir-slash, round 2 of 3
+
+Repo carlos/platform, branch `static-dir-slash`, commit f7c84fdc6b (full sha: `git rev-parse f7c84fdc6b`).
+Under review: the diff `origin/main...f7c84fdc6b` (internal/edge/static.go serveTree, its tests, docs/site/cli.md, and the census overlay).
+Authorities: the static serving and _redirects code on main (internal/edge/static.go, internal/edge/redirects.go), AGENTS.md (stopping rules; "The census: an approval, not a decision").
+
+You are an independent reviewer. Read the diff, then the code it calls, and check every claim in the comments, the commit message and the docs against that code.
+
+## Fixed: do not re-argue
+
+- Paul's ruling 2026-10-29: a folder requested without its trailing slash redirects to the slash form (301), as GitHub Pages and Netlify do. Report only mechanisms that fail it.
+
+## What to check
+
+1. Correctness of the redirect in serveTree: only directories with an index.html, never files, never "/" or an empty path, never a rewritten request; Location is relative ("./<base>/"), keeps the query, and is safe for escaped, unicode, colon-bearing, dot and double-slash paths; HEAD behaves as GET.
+2. Interaction with _redirects: rules evaluated first are unchanged; the `names` guard really prevents a loop with a forced "/x/ /x 301!" rule, and does not leave other loops open (splat rules, host-specific rules, rules on parent paths, a rewrite onto a folder path without a slash).
+3. Interaction with the edge protection guard (probe/hard tiers), the password gate, the asset cache and the edge response cache: can a 301 now be cached or served where a 200 was expected, or bypass a check it should not? Analytics: confirm a 301 is not counted as a page view.
+4. Path-routed static apps (a prefix on another app's host) and temporary static sites: does the relative Location resolve to the right place?
+5. Tests: sound witnesses, nothing existing weakened (one test in static_cache_test.go now requests /about/ instead of /about; check that its point still holds).
+6. Census: the proposal at docs/superpowers/notes/census-proposal-static-dir-slash.md. Answer its review question for the unit `internal/edge/static.go staticSite.serveTree` and the re-pinned envelope `internal/edge`: approve or reject, with the reason.
+7. Docs text in docs/site/cli.md: true to the code.
+
+## Round 2
+
+Earlier rounds: round 1, docs/superpowers/reviews/CODEX-FINDINGS-static-dir-slash-R1.md
+(1 P1: loops with splat/placeholder/host rules; census approved). Fix in f7c84fdc6b.
+
+First give one line per P1 and P2 from round 1: resolved, partly, or not.
+Carry every unresolved finding forward, then add new findings, looking
+hardest at the fix diff `cba536da6d..f7c84fdc6b`, including whether any
+rule shape can still loop with the edge's redirect, and give the census
+verdict again for the changed serveTree (and redirectsSlashForm).
+
+## 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 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 census verdict (approve/reject per unit and envelope). 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; targeted `go test ./internal/edge/ -run ...` is fine.