Skip to content

test(ui): match versioned MCP sandbox cache policy - #146677

Closed
steipete wants to merge 1 commit into
mainfrom
codex/mcp-conformance-cache-policy
Closed

steipete wants to merge 1 commit into
mainfrom
codex/mcp-conformance-cache-policy

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The MCP app browser conformance test expects no-store for the versioned public sandbox shell, although #146602 intentionally made that shell immutable.

User Impact

No runtime behavior changes. CI verifies the intended public-shell caching while retaining no-store checks for both ticketed MCP app routes.

Why This Change Was Made

Use the existing route table to express each cache policy. Existing operation, history, cancellation, and authority assertions remain intact.

Evidence

  • Current failing flow: 55/56 real-Gateway tests pass; the only failure is the stale sandbox cache assertion, and both quota-recovery cases pass.
  • The original repaired revision passes both MCP conformance cases in hosted CI. That older run failed only the separate quota-recovery case.
  • Rebased onto main 26b9c98. The one-file patch is identical by range-diff, the complete test file is byte-identical to the original repaired revision, and diff whitespace checking passes.
  • The original author reported twelve passing sibling HTTP tests and full changed checks. Those local captures were not independently inspected during this refresh. The unchanged HTTP tests cover matching, stale, unversioned, and policy-mismatched sandbox URLs.
  • Fresh independent P2 review passed with no findings (confidence 0.98); exact-head CI is pending for d60ef8f. Local changed-check planning could not run without dependencies in the isolated refresh checkout; no local test pass is claimed for this rebase.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 11:29 PM ET / September 13, 2026, 03:29 UTC (Revision 2).

ClawSweeper review

What this changes

Updates the MCP Apps browser test to expect immutable caching for the versioned public sandbox shell while retaining no-store assertions for the standalone host and ticketed view.

Merge readiness

✅ Ready for maintainer review

This remains a useful, correct test repair: current main still contains the stale expectation. No actionable findings remain, and the earlier external-contributor proof requirement does not apply to this verified maintainer-authored change.

Priority: P3
Reviewed head: 3e46e89436821cb48da5666c562433a143947253

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported test repair with no actionable correctness or security findings.
Proof confidence 🌊 off-meta tidepool Not applicable: Verified maintainer-authored test correction: the external proof gate does not apply, and no production authority change triggers additional proof. The reported browser and HTTP passes are relevant supplemental validation, not independently executed observations.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Verified maintainer-authored test correction: the external proof gate does not apply, and no production authority change triggers additional proof. The reported browser and HTTP passes are relevant supplemental validation, not independently executed observations.
Evidence reviewed 8 items Verified introduced scope: The pinned merge-base-to-head diff changes only the history-flow comment and route-specific cache assertions. Existing operation, cancellation, authority, and history assertions remain intact; diff whitespace checking passed.
Repair remains necessary on main: Fetched main still expects no-store for all three routes, including the sandbox shell.
Current production cache contract: The sandbox HTTP owner returns public, max-age=31536000, immutable only when the URL version matches the generated shell; other versions remain no-store. Existing HTTP tests separately cover exact, stale, unversioned, and policy-mismatched requests.
Findings None None.
Security None None.

How this fits together

MCP Apps display interactive content inside an isolated browser shell served by OpenClaw. The browser conformance suite exercises the Gateway and standalone host, checking response headers alongside interactions, cancellation, and history navigation.

flowchart TD
  A[Browser conformance test] --> B[Standalone app host]
  B --> C[Ticketed view response]
  C --> D[Versioned public sandbox shell]
  B --> E[No-store assertion]
  C --> E
  D --> F[Immutable cache assertion]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -2. Total -2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 6 8 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 8 -2

Review metrics

None.

Technical review

Best possible solution:

Keep route-specific browser assertions aligned with the existing cache contract while preserving independent checks for uncached ticketed content and stale shell versions.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the mismatch: the browser flow requests a versioned shell that returns immutable caching, while current main expects no-store. Tests were not executed during this read-only review.

Is this the best way to solve the issue?

Yes. Updating the existing route table is the narrow repair; reverting production caching or weakening the ticketed-route assertions would contradict the documented contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 60e806858149.

Labels

Label justifications:

  • P3: This is a focused correction to browser-test expectations with no runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Verified maintainer-authored test correction: the external proof gate does not apply, and no production authority change triggers additional proof. The reported browser and HTTP passes are relevant supplemental validation, not independently executed observations.

Evidence

What I checked:

  • Verified introduced scope: The pinned merge-base-to-head diff changes only the history-flow comment and route-specific cache assertions. Existing operation, cancellation, authority, and history assertions remain intact; diff whitespace checking passed. (ui/src/e2e/mcp-app-conformance.e2e.test.ts:920, 3e46e8943682)
  • Repair remains necessary on main: Fetched main still expects no-store for all three routes, including the sandbox shell. (ui/src/e2e/mcp-app-conformance.e2e.test.ts:920, 60e806858149)
  • Current production cache contract: The sandbox HTTP owner returns public, max-age=31536000, immutable only when the URL version matches the generated shell; other versions remain no-store. Existing HTTP tests separately cover exact, stale, unversioned, and policy-mismatched requests. (src/gateway/mcp-app-sandbox-http.ts:55, 60e806858149)
  • Actual request path preserves uncached private content: The standalone handler sets no-store before serving its host or view response and supplies the versioned sandbox URL through buildMcpAppSandboxPath. The shared path builder fingerprints shell HTML and security headers, matching the browser test's expected response. (src/gateway/mcp-app-standalone.ts:328, 3e46e8943682)
  • Merged cache-policy context: GitHub confirms fix: speed up repeated visualization loads #146602 merged at 2026-09-13T01:19:18Z. Its commit patch contains the conditional immutable response policy; it does not contain this browser-test correction. (src/gateway/mcp-app-sandbox-http.ts:55, ba11b302387d)
  • Latest-release comparison: The v2026.9.4 source still sets no-store unconditionally for the public shell. The new cache policy is current-main behavior, and the stale browser assertion remains unresolved there. Local historical blob reads failed; the GitHub contents API supplied the release source. (src/gateway/mcp-app-sandbox-http.ts:49, 3a9d69db306c)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-13T03:07:38.981Z sha 3e46e89436821cb48da5666c562433a143947253 :: needs real behavior proof before merge. :: none

@steipete
steipete marked this pull request as ready for review September 13, 2026 03:25
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Taking over the cache-only refresh and landing of this existing PR for the performance campaign. Current head 3e46e89436821cb48da5666c562433a143947253 is unchanged and unassigned. PR #146587 now passes both quota-recovery cases and fails only this stale sandbox cache expectation (55/56 real-Gateway cases pass): https://github.com/openclaw/openclaw/actions/runs/34737205539/job/103671185832.

I will preserve this one-file patch, refresh onto quota-fixed main, verify source equivalence and exact-head CI, and complete the native maintainer gates. This does not take over or change #146664's separate pointer-delivery repair. No production cache policy or test assertions beyond the reviewed route-specific expectation will change.

@steipete steipete self-assigned this Sep 13, 2026
Retain no-store assertions for the standalone host and ticketed view while expecting immutable caching for the content-versioned public sandbox shell introduced by #146602. Preserve the existing history, cancellation, and authority conformance cases.
@steipete
steipete force-pushed the codex/mcp-conformance-cache-policy branch from 3e46e89 to d60ef8f Compare September 13, 2026 04:52
@steipete

Copy link
Copy Markdown
Contributor Author

Closing as fixed on main by #146667, merged at 2f66380 while this refresh was queued.

I compared the complete landed MCP conformance test with this PR's refreshed head d60ef8f. Main has the same three route/cache pairs and assertion, with an additional as const and equivalent history-comment wording. No behavioral repair remains to land here. The refresh's independent P2 review was clean; its CI was still pending when the overlap landed, so no new CI pass is claimed.

The obsolete exact-head run will be canceled. PR #146664's separate pointer-delivery work remains untouched. Thanks for the original focused repair.

@steipete steipete closed this Sep 13, 2026
@RomneyDa
RomneyDa deleted the codex/mcp-conformance-cache-policy branch October 22, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant