agent-start-demo-log-skip: review brief R1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+78
−0
docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-log-skip-R1.md+78 −0
CI failed — run details
Intent
Attributed to this commit: 11.4 g CO₂e (1,157,313 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on agent-start-demo-log-skip, 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/REVIEW-BRIEF-agent-start-demo-log-skip-R1.md b/docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-log-skip-R1.md| new file mode 100644 |
| index 000000000..801c13a9d |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-log-skip-R1.md |
| @@ -0,0 +1,78 @@ |
| +# Review brief: branch agent-start-demo-log-skip, round 1 of 3 |
| + |
| +Repo carlos/platform, branch `agent-start-demo-log-skip`, commit 3f542e3b760b371474df5815ef7174cf1cd35c71. |
| +Under review: the diff `ddbc0297..3f542e3b` (excluding this brief). |
| +Authorities: merged commit 7d0f26cb (the analytics version of this fix, |
| +"Stop demo analytics blocking demo admission"), AGENTS.md, |
| +docs/superpowers/notes/agent-start-demo-2-rulings.md. |
| + |
| +You are an independent reviewer. Read the diff, then the code it |
| +touches, and check every claim against that code. |
| + |
| +## The bug |
| + |
| +After a demo is purged, an ingress box can still ship request logs or |
| +edge error records under apps/<acct>/<app>/logs/ or errors/ (shipping |
| +retries every 10 s). The console's admission orphan check |
| +(internal/console/apidemo.go, validateDemoAdmissionState) then refuses |
| +every demo create. 7d0f26cb fixed this for analytics/; this branch does |
| +the same for logs/ and errors/. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Scope ruling: the edge records nothing for demo routes or reserved |
| + demo hosts; shippers drop tmp-demo- buckets like analytics UpsertDay; |
| + admission/purge/sweep treat logs/ and errors/ like analytics/. Live |
| + demos have no logs or errors view, so dropping them is intended. |
| +- Not in scope: a pre-roll DB query (ops, not code). |
| + |
| +## What to check |
| + |
| +1. demoUnrecorded (internal/edge/analytics.go): analytics behaviour is |
| + unchanged from 7d0f26cb, and it now also covers observeRecords, |
| + emitEdgeError and the burst Trip record in guard.go. Is any demo |
| + path still recording (other callers of the request recorder or error |
| + sink, e.g. activator, wake, tunnel, assetcatch)? Does the guard.go |
| + change leave burst protection itself intact? |
| +2. Shipper drops (internal/host/logship.go, errship.go): correct key |
| + (k.App), no ordinary app affected, no retry loop or leak. |
| +3. Console: demoStrayPath at all three sites; admission still refuses a |
| + real orphan (live app keys, non-purged demo, non-stray path); the |
| + resumed purge in retireDemoLocked still refuses (errNoMarker) any |
| + non-stray key; the sweep only deletes under the app lock, no apps row, |
| + purged demo. |
| +4. purgedDemoApp tombstone match by first host label |
| + (substr/instr in SQLite): correct for hosts without a dot, names that |
| + are prefixes of other names, and cannot mark a live or different |
| + demo purged in a way that lets admission or the sweep delete or |
| + ignore something it should not. |
| +5. Tests: do they prove the claims (a demo request yields no record and |
| + no error record; an ordinary app unchanged; logs/errors key shapes |
| + match the real shippers' keys)? |
| + |
| +## 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 it breaks (its fault family). 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 reviewers or subagents of your own. Do |
| +not run the full test suites; targeted `go test ./internal/<pkg>/ -run` |
| +is fine, with TMPDIR=/home/paulca/.cache/tmp/claude-1001/asd-logskip and |
| +GOCACHE left at its default. |