4.3 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-runtime-responses | Preserve runtime responses through proxies | done | 1 | plan.md |
|
|
|
Task 01: Preserve runtime responses through proxies
Summary
Add no-transform to the existing no-store runtime policy. Prove that a
directive-aware proxy preserves working retained canvases on desktop and phone.
In scope
- Write
TestRuntimeNoTransformHeadersfirst. It must fail because current entry, asset, and bootstrap responses lack the directive. - Change
setRuntimeHeadersto sendno-store, no-transform. - Extend
canvas-authenticated-proxy-fixture.tswith optional runtime-HTML injection. Respect the parsed directive, buffer only HTML, and update length. Forward cookies and preserve real SSE streaming and cancellation. - Add a negative control that removes the directive and injects a blocked external script before startup settles. It must produce the unavailable state.
- Add desktop and phone positive cases that reach Ready and read real scoped task data with injection enabled but prevented by the directive.
- Document runtime-path analytics exclusion and Retry in
docs/public/canvases.md. Describe proxy overrides as an operational limitation, not a missing release.
Out of scope
CSP changes, error suppression, Cloudflare account mutations, release republishing, and new browser UI are excluded.
Acceptance
- All successful runtime documents, assets, and bootstrap responses contain both directives. Retained package bytes and digests remain unchanged.
- Positive proxy cases reach Ready on desktop and phone. The negative control still fails through the existing recoverable state.
- Existing authentication, expired-token, denied-write, and event-stream scenarios in the affected suites continue to pass.
Verification
Run from the repository root. Install workspace dependencies before pnpm commands if this worktree has no install. Managed E2E commands rebuild required artifacts.
(cd apps && pnpm install --frozen-lockfile)
(cd apps/backend && go test ./internal/plugins/webapp -count=1)
(cd apps/web && pnpm exec vitest run components/plugins/web-app-frame.test.tsx)
(cd apps/web && pnpm e2e:run --project chromium tests/canvas/canvas-authenticated-proxy.spec.ts)
(cd apps/web && pnpm e2e:run --project mobile-chrome tests/canvas/mobile-canvas-authenticated-proxy.spec.ts)
git diff --check
Files likely touched
apps/backend/internal/plugins/webapp/runtime.goapps/backend/internal/plugins/webapp/runtime_test.goapps/web/e2e/tests/canvas/canvas-authenticated-proxy-fixture.tsapps/web/e2e/tests/canvas/canvas-authenticated-proxy.spec.tsapps/web/e2e/tests/canvas/mobile-canvas-authenticated-proxy.spec.tsdocs/public/canvases.md
Dependencies
None.
Risks
The fixture demonstrates a conforming proxy, not every Cloudflare account setting.
Do not add public from the vendor example to capability-bound runtime responses.
Parallelism
sequential
Inputs
- Plugin runtime design: Runtime startup protocol and Same-origin transport and trust.
- Existing runtime header tests and authenticated-proxy fixture.
- Plan evidence and scope.
Results
Implemented the shared runtime response policy and the directive-aware
authenticated proxy fixture. Runtime documents, packaged assets, host
bootstrap responses, and protocol responses now retain no-store and add
no-transform. The positive proxy cases exercise injection attempts that are
blocked by the origin response, while the negative control removes the
directive and preserves the existing recoverable startup failure.
Recorded verification:
cd apps/backend && go test ./internal/plugins/webapp -count=1passed.pnpm e2e:run --project chromium tests/canvas/canvas-authenticated-proxy.spec.tspassed, 5 tests.pnpm e2e:run --project mobile-chrome tests/canvas/mobile-canvas-authenticated-proxy.spec.tspassed, 2 tests.make -C apps/backend buildpassed.