Skip to content

ui-server: admit and observe external jobs through existing worker governance #3108

Closed

Description

@schlessera

Context

Part of #3103. A provider adapter alone does not safely expose paid execution to hosted agents. Reuse the rules owned by #1645 and docs/decisions/governed-writable-workers.md. Credential relay ownership is documented at startInferenceRelay, packages/ui-sdk/src/server/inference-relay.ts:71-82; AgentBackend registration at BackendRegistryOptions, packages/ui-server/src/agent/backend.ts:43-57 remains distinct from compute providers.

Scope

Connect external command jobs to authenticated host/session/turn identity, existing approval/data-routing policy, Activity, abort and shutdown. Keep runtime secrets outside worker-readable environments and filesystem authority; a same-UID environment variable is not a demonstrated boundary. Add atomic budget/concurrency admission, cost reservation/reconciliation and recovery/cleanup hooks usable by multiple callers. Keep generic operator configuration and truthful readiness diagnostics in reusable packages.

Out of scope

No new model backend, automatic brain-root upload, claim that VM isolation equals existing worker governance, private hosting configuration or provider-managed remote agent session.

Acceptance criteria

  • Hosted Claude and Pi tool paths invoke the governed operation with trusted caller/job identity; forged provider/caller/profile fields cannot widen authority.
  • Data-to-provider policy and approvals are checked before export/allocation; raw owner credentials never reach ordinary model workers.
  • Concurrent requests cannot oversubscribe the configured budget/concurrency reservation; unknown accounting refuses new work.
  • Abort, disconnect, host restart and unknown vendor outcomes produce truthful Activity and bounded reconciliation rather than false success or orphaned unlimited compute.
  • Missing host isolation/capabilities are reported or refused as required; enabling the feature does not weaken existing local worker governance.
  • Offline integration tests cover both hosted backends, credential denial and adverse lifecycle paths without changing earlier provider history.

Verification

Use the repository's keyless test harness with fake vendor transport and disposable state. Exercise the real implementation, capture a failing-first or mutation receipt for each material boundary, and run the focused tests through the repository test script, typecheck and lint. Live provider proof is a separately authorized operator exercise; no credentials or vendor calls in CI.

Contract impact

Additive public API/CLI/MCP behavior requires contract documentation and a changeset; exact names are settled by the contract task.

Blocked by #3105
Blocked by #3107

2026-10-29 readiness review at main 83252add0357908a00fa4181b8e7b731938c69e7: the scoped implementation brief is complete for the output of its declared prerequisite tasks. Retain every canonical dependency and blocked; add agent-ready only to describe the dependency-gated brief. This is not currently pickable and does not approve provisional terminology/API choices. #3104 must first deliver its contract proposal and record any required maintainer rulings; implement only the accepted resulting contract, reassessing readiness if that output changes this scope. No vendor call, credentials, package change, allocation or release commitment is authorized by this triage. Priority p2 is consistent throughout the open dependency chain.

Activity

  1. added
    type: feat
    area: ui-server
    on Oct 28, 2026
  2. added
    area: backends
    blocked
    contract
    security
    priority: p2
    agent-ready
    on Oct 28, 2026
  3. self-assigned this
    on Nov 2, 2026
  4. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claim claim-3108-640679: layer 5 of the #3103 integration lane. Branch feat/3108-hosted-compute builds on feat/3107-compute-cli-mcp (52126ebc7); none of the layers below it is merged yet. Maintainer rulings of 2026-11-02 for this layer:

    • Slots: concurrency slots and budgets are shared per compute state directory.
    • Hosted runs: they accept only built-in providers and operator-bound credential names, and Boat's options.environment is allowed.
    • Job lifetime: jobs outlive a normal turn end and are cancelled on abort.
    • Activity: compute jobs get their own additive compute origin.
      These will be recorded in docs/decisions/external-compute.md with the implementation.
  5. added this to the 0.45.0 milestone on Nov 2, 2026
  6. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Delivered to the integration lane. #3343 was squash-merged into epic/3103-external-compute as 4e659951b9f07e9b1194eeb7eaaaf29d8b4a1d9f, whose parent is 4604eccd5. Its tree is identical to the tested head b7a33c2bb. Confirmation run 41525577185 passed every selected job, proof included; that was also the first execution of the extended runtime provider-history tests for both backends. The 8 independent-review findings and 3 CI-found defects were fixed with failing-first receipts:

    • the published declarations leaking the core peer;
    • stale turn-surface and Activity expectations;
    • a boot warning on unconfigured hosts.

    Follow-ups: #3347, #3348, #3349, #3350. This issue stays open, with milestone 0.45.0, until the epic branch merges to main.

  7. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Delivered on main through epic #3103's integration branch.

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-serverblockedcontractpriority: p2securitytype: feat

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions