Repository navigation
Conversation
bb4a514 to
7f86406
Compare
|
@clawsweeper re-review — the previous review run appears to have stalled at the status placeholder (lease expired without a durable review). Re-queueing. HEAD 7f86406d58d. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 4:38 AM ET / 08:38 UTC. ClawSweeper reviewWhat this changesThe PR makes standalone MCP App GET and HEAD responses expose matching UTF-8 Merge readinessKeep this PR open: current main still omits the standalone host’s HEAD representation lengths, while this refreshed branch applies the existing sibling pattern with focused real-HTTP coverage. No actionable correctness or security finding was identified. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Gateway’s opt-in standalone MCP App host serves a shell and authenticated app-view responses over HTTP. Browser and MCP App clients enter through the host handler, which authorizes requests and returns HTML, JSON, or plain-text representations. flowchart LR
Client[Browser or MCP App client] --> Request[Standalone HTTP request]
Request --> Route[Host routing and authorization]
Route --> Representation[HTML JSON or text representation]
Representation --> Headers[Response metadata]
Headers --> Output[GET body or bodyless HEAD response]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +79. Total +80 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Merge the owner-local representation serializer and canonical plain-text reuse after exact-head CI confirms the refreshed branch. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: current main suppresses HEAD bodies before setting a representation length, and the PR’s localhost HTTP regression directly exercises those paths. Is this the best way to solve the issue? Yes—the response owner is the narrowest place to serialize once and attach matching metadata, consistent with the existing sandbox and board HTTP handlers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5b5fdacfdaa8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
7f86406 to
dfc4fcc
Compare
|
@clawsweeper re-review — the P2 finding is addressed at head dfc4fcc5435: the active-view-limit 429 now goes through the same HEAD-aware respondString as the other routes, with a GET/HEAD parity regression test at activeRequests = 4 (429 carries the JSON Content-Length, HEAD ends with no body). Branch also rebased onto current main as flagged. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: zenglingbiao <[email protected]>
dfc4fcc to
26c5fdf
Compare
|
@clawsweeper re-review Refreshed this contributor PR onto current main after resolving the real stale-branch conflict. The corrected head preserves the newer standalone browser and operation timeouts, reuses the canonical plain-text response helper, and proves GET/HEAD parity for shell, multibyte authenticated view, unauthorized challenge, and active-view-limit responses against a real localhost HTTP server. Current-main reproduction failed all four new cases; the repaired standalone, sandbox, and board suites pass all 36 tests. The PR description also clarifies that HEAD Content-Length is optional under RFC 9110 and that standalone MCP Apps are opt-in. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer verification for reviewed head 26c5fdf:
This is an opt-in MCP App surface. RFC 9110 allows HEAD |
|
Merged via squash.
|
…nclaw#120905) Co-authored-by: Peter Steinberger <[email protected]>
Summary
Fix GET/HEAD representation metadata for the opt-in standalone MCP App host (
mcp.apps.enabled === true). The public shell, authenticated view, unauthorized ticket challenge, and active-view-limit response now advertise the exact UTF-8 byte length of their corresponding GET representation while HEAD sends no response body.Problem and root cause
Node suppresses HEAD response bodies but does not synthesize
Content-Lengthfor them. The standalone host built HTML, JSON, and plain-text responses through separate paths, so all four HEAD responses omitted useful representation-size metadata even though their GET equivalents exposed it. RFC 9110 permits omittingContent-Length; when supplied on HEAD, its value must match the corresponding GET representation. This change restores interoperability and GET/HEAD parity; it does not claim the previous responses violated the RFC.Fix and scope
respondPlainTextimplementation for standalone 401/404/503 responses and remove the duplicated local plain-text responder.Buffer.byteLength, including multibyte HTML and tool payloads.WWW-Authenticate,Vary: Authorization, CSP, cache policy, active-view leases and concurrency limits, POST behavior, the browser's initial-load timeout, and the existing operation-timeout grace projection.Real HTTP proof
The focused regression starts a real ephemeral localhost HTTP server, invokes
handleMcpAppStandaloneHttpRequest, and sends realfetchGET and HEAD requests. On unmodified current main, all four new cases failed because the HEADContent-Lengthwas absent:After the fix, every route has identical GET/HEAD status and UTF-8 byte length, HEAD has an empty body, authorization/challenge/Vary and cache headers remain intact, and the authenticated representation still contains the current 65-second operation timeout:
Formatting and a fresh independent Codex autoreview both passed without actionable findings. Contributor credit is preserved for @zenglingbiao.