Skip to content

backends: run the pinned upstream web extension in a trusted host Pi session behind the bridge #3686

Closed

Description

@schlessera

Out of scope

Egress routing and data-routing/taint/budget admission (sibling slice), subscription/current-model login (sibling slice), persistence (#2766), forks (#2767), workflows beyond the four core tools (#1987, #1988), browser/credential-command adapters (#1989). No pi-web-access upgrade beyond the pinned comparison artifact without its own review.

Context

Part of #2765. Read that epic's rulings (executor A: the full upstream extension in an actual trusted Pi session; credential exclusion A), and docs/plans/host-owned-web-search.md: "Artifact and runtime identity" (pinned pi-web-access 0.41.0, tarball SHA-256 68c4eb20…1aec, measured with Pi SDK 0.99.2) and "Full-extension authority map". The offline prototypes are in experiments/host-web-search/ (executor.ts, host.ts).

The host resolves web-search.json from PI_CODING_AGENT_DIR, XDG or HOME (resolveWebSearchConfigPath, packages/ui-sdk/src/server/web-search.ts:188), while workers get private state (packages/ui-backend-pi/src/worker-launch.ts:99-102,187). The brief still reads that file for the retired extension (readWebSearchBrief, packages/ui-backend-pi/src/session-resources.ts:261).

Blocked by #3685

Scope

  • Production executor behind the bridge slice's internal boundary. It runs the pinned upstream extension in a host-owned trusted Pi session holding provider configuration and API/environment credentials under existing trusted host policy. The credentialed process loads only that extension and host-owned resources: no repository-defined extensions, hooks, settings or configuration, no host HOME or config-directory mount, no full-cache or full-brain copy.
  • Pin the package with integrity and compatibility tests. State any dependency, Node or Pi SDK requirement and the host packaging counterpart under the release skill.
  • Report the deferred workflows and excluded credential modes consistently in host settings, catalog and brief.
  • Amend docs/decisions/governed-writable-workers.md with the executor, workflow and credential rulings.

Acceptance criteria

  • An ordinary governed Pi worker's web_search, fetch_content, get_search_content and source_check calls execute in the host executor and return results, proven by a real keyless Pi-worker test with fictional Odysseus loopback provider replies.
  • Credential sentinels and private config paths are unreadable from the worker. The credentialed process executes no repository-defined configuration, hooks or extension code. Parent config bytes are unchanged after a run.
  • Deferred workflows and excluded credential modes are reported as unavailable in settings, catalog and brief. No nested or command bypass reaches them.
  • Executor death and restart within a session have child exit and cleanup receipts, and no process leak.
  • Named executor-isolation mutations fail their intended tests and are restored, recorded in the PR.

Verification

bun run test packages/ui-backend-pi packages/ui-server packages/ui-sdk
bun run typecheck && bun run lint
bun run check:pr --base origin/main

Pinned upstream package, existing network guards, loopback-only provider transport. No provider keys, real user configuration or paid inference.

Contract impact

New supported setting/catalog fields are additive: CONTRACT: prefix, integration contract updated, contract label, minor changeset. The new dependency follows the release skill.

Activity

  1. added
    type: feat
    area: ui-server
    area: backends
    priority: p2
    agent-ready
    blocked
    contract
    security
    on Nov 8, 2026
  2. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3685 is closed, so scripts/sync-project.ts is removing the blocked label.

  3. removed
    blocked
    on Nov 9, 2026
  4. self-assigned this
    on Nov 11, 2026
  5. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-b3127a52. Branch: feat/3686-trusted-web-executor.

    closure-only overlap with long-lived draft PRs; no direct path collision on the cited source files

  6. added this to the 0.45.0 milestone on Nov 11, 2026
  7. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Delivered to main as 95a68ef66 via #3968 (milestone 0.45.0). The four core Pi web tools now run in a trusted host executor: the pinned pi-web-access@0.41.0, loaded alone in its own Pi SDK session with private per-session state, a sanitized config (workflows, cookies and credential commands off) and host-only provider keys. Ready-candidate proof passed on the exact merge tree (run 43100837242), including the real bubblewrap worker host-web scenario. The new dependency required a native diagram requalification under the 2026-11-11 ruling; receipts are at #3968 (comment). Main's own heavy run on the squash is 43104693518. Egress and admission continue in #3687, and subscription search in #3688.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: backendsarea: ui-servercontractpriority: p2securitytype: feat

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions