Astra round 1 findings for console-perf-quick-wins
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+39
−0
docs/superpowers/reviews/CODEX-FINDINGS-console-perf-quick-wins-r1.md+39 −0
CI failed — run details
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-console-perf-quick-wins-r1.md b/docs/superpowers/reviews/CODEX-FINDINGS-console-perf-quick-wins-r1.md| new file mode 100644 |
| index 000000000..8f8c1f930 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-console-perf-quick-wins-r1.md |
| @@ -0,0 +1,39 @@ |
| +Reviewed `origin/main..16e026f93507fa3771786241536572d558070cce`, following round 1’s brief. Found one P2; no P1 or P3 findings. |
| + |
| +**P2 — Task 2: Account-name URLs miss account-wide cache invalidation.** |
| + |
| +In [appframe.go:283](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/appframe.go:283), `frameClear` passes the raw `{sqid}` or `{account}` URL segment to `clearAccount`. Cache entries use the resolved account’s sqid. Both browser and personal CLI requests accept account names; [apicli.go:267](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/apicli.go:267) resolves that name without replacing the path value. |
| + |
| +A concrete failure occurs during `POST /api/cli/apps/<account-name>/new`: |
| + |
| +1. App creation inserts the database row at [server.go:4821](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/server.go:4821). |
| +2. Before creation writes the default pipeline at line 4864, a concurrent account-home or app GET can discover the row and cache a frame with no pipeline. |
| +3. Creation completes, but both response-time clears target the account name rather than its sqid. The next view can retain the legacy ladder for the remainder of the 30-second TTL. An unfinished load also escapes the generation bump. |
| + |
| +**Fix:** Supply the resolved `acct.Sqid` to account-wide invalidation after authorization, through request-local invalidation state or explicit handler clears. Preserve the existing gate order. Add a regression test using a named-account create route, holding the pipeline write while a GET caches the incomplete frame, then checking the first post-create view. |
| + |
| +**Invariant:** Every completed console write invalidates the affected app’s frame, including loads already in flight. This is a display-consistency defect; write authorization continues to use fresh reads. |
| + |
| +Other review checks: |
| + |
| +- Frame copying, error exclusion, expiry, and generation handling are sound when invalidation reaches the correct entry. Clearing unknown names allocates no slots. Frame loads remain behind membership/app gates, and non-GET/HEAD requests bypass the cache. |
| +- The request memo is request-scoped and installed only on GET/HEAD. Box completeness survives memoization; write requests retain direct reads. |
| +- Settings flags match the sections’ template dependencies. The one-key deployment check retains the existing `List` fallback and refusal on read errors. |
| +- Account telemetry reads the same account key written by both settings handlers and preserves defaults and unreadable-state handling. |
| +- No changed handler reorders its authorization gates. |
| +- Cold reset clears both new process caches. The account-settings `calls 2` allowance matches its remaining reads; app screens retain `over:` records for their cold cost. The session ceiling is 320. I could not independently reproduce the recorded timings or request total. |
| + |
| +`git diff --check` passed. Targeted tests could not start because Go’s build-directory creation failed with `read-only file system`. No full suites ran, no subagents were spawned, and no files were changed. |
| + |
| +Census verdicts apply to `16e026f93507fa3771786241536572d558070cce`: |
| + |
| +- **APPROVE — `Server.loadRolloutJoin`**, [apiinstances.go:689](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/apiinstances.go:689). The configured registry, account-filtered fleets, prefixes, and completeness decisions remain unchanged. Memoization adds no root-readable input. |
| +- **APPROVE — `Server.systemBoxes`**, [apisystemupdate.go:270](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/apisystemupdate.go:270). The same platform and fleet reports are read; registry-error and strict-mode behavior remain intact. |
| +- **APPROVE — `Server.handleAppLogs`**, [server.go:4166](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/server.go:4166). The host picker reuses the account/app-scoped records already consumed by page assembly. It introduces no new root path or authority. |
| +- **APPROVE — `Server.geoipInventory`**, [apisystemgeoip.go:237](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/console-perf-quick-wins/internal/console/apisystemgeoip.go:237). Prefix construction moves into the helper without changing fleet-name provenance, expected-box enumeration, or incomplete-evidence handling. |
| +- **APPROVE — `internal/console` envelope re-pin.** The changed functions and their callees introduce no additional root open/run/query/follow authority and weaken no root-read validation. The P2 above concerns in-memory invalidation. |
| +- **Decision rows match Paul’s ruling.** `handleAccountSettings` directly reads account telemetry; `assembleViews` contains the existing registry listing and account scoping; `Assemble` delegates that work and no longer performs those reads itself. |
| + |
| +Fix the P2 without reopening this review, then perform the required census checks for the resulting diff. |
| + |
| +**READY AFTER FIXES** |
| \ No newline at end of file |