Repository navigation
refactor(portal): separate confirmations and remove guard coupling - #282
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. The confirmation split reuses the existing renderers, and the API guard no longer depends on portal rendering or browser-session services. No speculative functionality was added. SpecNo merge-blocking intent findings. The split preserves confirmation refusal precedence, copy and submitted form state. Portal routes own the name bounds, and the changed responses for unroutable overlong POSTs and encoded-slash GETs match the brief. I found no API behavior regression in the diff or focused tests. Verification
Summary: Standards 0 blockers, worst issue none. Spec 0 blockers, worst issue none. |
Opus reviewSecond reviewer, standing in for grok build. Reviewed Verdict on the brief's question: yes, this is a net simplification. What I verified directlyEvery status and copy string the old
StandardsOne merge blocker, the rest judgement calls.
Clean on the two review specs. SpecNo requirement missing, no scope creep. Three findings, all judgement calls.
On the "portal socket tests unchanged" claim: The guard test edits relocate rather than delete: the seven POSTs move from the 414 loop to the 404 loop, correctly, since a 101-character parameter cannot match any route and SummaryStandards: 5 findings, worst is the stale Model: |
|
Addressed the Astra and Opus review feedback in Fixed
Kept as is
Verification on the latest commit
No unresolved review or CI blockers. This remains stacked on |
01f9737 to
99bc99c
Compare
4daed9f to
ada4f7f
Compare
99bc99c to
65905d1
Compare
ada4f7f to
82c40d5
Compare
The CLI converted wire refusals into seven separate error classes and then reconstructed the same fields for output. Repo writes and definition comparisons duplicated logic too. Use one RejectedError carrying the decoded refusal, share the atomic patchy.json writer, and compare canonical definition defaults. CLI messages, JSON failure documents, kinds and exit codes remain unchanged. Direct output and the child-CLI relay share the documented field allowlist, and an existing lifecycle test now asserts the complete failure document. This diff is confined to packages/patchy. Stacked on #282, with base branch `portal/cleanup-portal-router`. ## Verification - `pnpm lint` and `pnpm typecheck` passed after the review fixes. - All 209 CLI, login and reminder tests passed after the review fixes. - Before the review followup, the full suite passed all 938 tests with two workers and `pnpm test:packed-cli-e2e` passed. The initial default-worker run hit two Postgres timeouts and an unexpected worker exit. - A temporary before/after probe confirmed 28 refusal documents and exit codes were byte-identical. A separate future-field probe failed before the allowlist fix and passed afterward. - See the review-disposition comment for the decisions and latest-commit CI results. Implemented with openai-codex/gpt-6-astra in Oh My Pi.
The guard lost its portal branch in #282. The classify case only showed that non-API paths are public, which the first classify case already pins, and the live-server block re-asserted the portal's own 414/404/401 answers. The portal page tests own those now; the guard keeps its one check that portal refusals do not spend the exhausted API limit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 66d87e5bd219de6abcd2eb8e1918e5e3fcb86d1c)
Portal rendering mixed confirmations with the index, card and versions pages through one mutable options bag. The API guard also depended on portal rendering and browser-session services just to answer hand-crafted overlong names.
Split confirmation handling into
confirmationPage, preserving the existing refusal precedence, copy and form state. Leave portal name bounds to its routes and remove the portal branch from the API guard. Unroutable overlong POSTs and encoded-slash GETs now use the existing 404 responses; API behavior stays unchanged.Stacked on
portal/cleanup-read-path(#281). This PR contains only the next cleanup commit and should merge after that branch.Verification
pnpm lintpassed.pnpm typecheckpassed.pnpm exec vitest run apps/server packages/portalpassed: 86 tests across 5 files.Model:
openai-codex/gpt-6-astra. Harness: Oh My Pi.