T02 — Prove the Pi Web integration seam¶
Depends on: none. Status: planned.
Read ../README.md and ../PLAN.md first. Paths are discovery anchors, not permission to skip caller analysis.
Likely files¶
anvil_serving/workbench_app/pi_web.pyanvil_serving/observability/dashboard/console.pydocs/design/workbench/PI-REUSE.mdtests/workbench/test_pi_web.py
Implementation steps¶
- Record installed Pi Web/Pi versions and immutable package identities, license, API/transport routes and session ownership. Read current code/docs locally; verify upstream primary sources only for unresolved contracts.
- Build a disposable development harness using synthetic sessions and fake model responses. Test one embedded Pi tab with existing owner authentication; do not alter the production service or consume live model capacity.
- Test frame/CSP/edge rules, redirects, origin/CSRF checks, cookies, reconnect, assets and service workers. Specify whether cross-origin framing, a supported subpath build or a native RPC seam passes.
- Prove host-session visibility is owner-scoped and managed task sessions retain their sandbox/lease. Inventory public Pi Web extension points for project context and multi-root support. Define an allowlisted versioned context handshake only if needed; validate message origin/source and never carry credentials or raw paths.
- Write a decision receipt listing supported/unsupported features, exact source modifications if required, rollback and the selected implementation. Stop after one bounded spike per viable transport; do not fork the whole app by default.
Save the decision and independently reviewed receipt at the paths defined in
VALIDATION.md. Required decision output:
integration_decision.status = passed | blocked, selected
transport, exact Pi versions, host authority label, task authority proof and
failed-case evidence. Only passed satisfies T03/T05 dependencies. Documenting a
fallback proposal or failed spike does not pass this gate.
Acceptance¶
- [ ] A retained synthetic session opens inside Playground and survives navigation/reconnect without duplicate writers or transcript copying.
- [ ] A different principal, expired identity and forged context cannot read/control the session. Task sessions cannot gain host authority.
- [ ] Chat streaming and extension confirmation work inside Playground through the selected transport; apply frame/CSP/child-navigation checks to iframe options and API origin/CSRF/auth checks to native RPC. No blanket weakening, root service-worker collision or Workbench API shadowing.
- [ ] If reuse fails, document the exact blocker and bounded native-RPC alternative; a standalone link is not final acceptance.
Focused checks¶
Use the existing checkout Python environment and repository test wrapper. These are planned checks, not test results.
Add behavioral regression coverage in the existing suite for new contracts; source-string assertions alone are insufficient. Run browser checks described above. Run broader checks only for changed shared seams or failures.
Stop boundary¶
No installation edits, production header changes or permission expansion during the spike. An unresolved authority contract blocks T03/T05 decisions.
Completion receipt¶
Record commit/files, actual commands and results, browser observations, unresolved items, schema decisions and next eligible packet. Raw deployment evidence stays private. Do not change acceptance boxes without measured proof.
Engineering references¶
Read the implementation guide section and
verified source map for this packet. tasks.json selects the
relevant code/data examples and primary external references. Current APIs and
proposed contracts are labeled separately; examples grant no live authority.