Skip to content

Epic: worker profiles, governance policy and host integrity #1642

Closed
22 of 22 issues completed
Closed

Description

@schlessera

Integrated outcome — 2026-10-13

All native children are completed in milestone 0.42.0. Governed interactive/voice workers, strict session tightening, immutable policy reads and user-approved policy writes are integrated with protected paths, maintenance-only execution, worker resource controls and truthful capability/status reporting.

The final policy-review slice is delivered by #1748 (f5433b33e5ed5f8b280049909e3577783cc72953). Its combined selected CI and main-push verification are linked in the closure comment. The actual worker boundary tests in tests/policy-write-boundary.test.ts and packages/ui-sdk/tests/governed-worker.test.ts cover productive native/shell/CLI work and protected-path replacement, ancestor, alias and absent-name behavior. docs/hosting/agent-workers.md and docs/supported-inputs.md describe both profiles and the policy file.

This closes the worker/profile/policy outcome and its documented definition of done. It does not close sibling journal, egress/credential or budget work, and does not claim package publication or deployment.

All 14 selected PR CI jobs and all 14 main-push jobs passed. The actual squash tree matches the verified PR checkout; every main job checked out that squash. Native child states and milestone 0.42.0 were read back before closure.

Outcome

Interactive and voice turns run in a governed worker by default. The brain is writable there, while protected host-trust paths are read-only and cannot be swapped by rename, hardlink or symlink. strict (the 0.41.0 read-only view) is available by policy or per session. A governance policy in context/policies/governance.md is read by the host, read-only to every agent, and changed only outside a turn or through an approved proposal. No host process runs repository code, git or the brain CLI against a brain that governed turns can write. That work runs in maintenance workers. Workers are bounded in memory, processes and CPU, and cannot reach host Unix sockets. Commands the policy rules out are refused.

Guardrail class: G1 (system integrity, including resource exhaustion), plus the policy surface every other class reads.

Settled placement (maintainer, 2026-10-12)

The placement-only ruling approves the tracker proposal’s two locations: profile and limits in the model picker’s This chat section, and one disclosure beneath each turn for its changes, cost and limits. The alternative separate profile/limits control above the composer is superseded. This applies to #1663, #1652, #1653, #1658, #1669 and #1670.

That initial ruling approved placement only. The later approvals below settle their specified interactions and limits; other security/permission rulings and technical prerequisites remain binding. Neither the proposed Activity Roadblocks section nor additional ledger tools/network scope was approved. Accepted placement must be recorded in the appropriate durable design decision when its implementation lands; current issue/comment history supplies the ruling, not shipped UI proof.

Scope

Deliver governed/strict profile resolution, immutable policy access, protected-path handling, maintenance-worker execution, resource controls and truthful host capability status. Own the actual worker-boundary proof and its documentation. Journal/revert, artifact retention, provider/remote credential separation and interactive budgets belong to sibling epics.

Why now

Part of #1636. The read-only default broke the hosted way of working (#1626). The maintainer's 2026-10-11 rulings make governed the default; see the rulings.

Shared context

Constraints and non-goals

  • No unsandboxed or weaker fallback. A strict fallback is stronger.
  • R35: no agent runtime writes policy.
  • No new seams. Autonomous turns stay restricted.

Breakdown

See the sub-issue list. The p0 governed profile lands first, then the policy file, then the rest.

Definition of done

tests/policy-write-boundary.test.ts covers the governed profile's protected paths, including ancestor rename, hardlink, symlink and absent-name creation. docs/hosting/agent-workers.md and docs/supported-inputs.md describe both profiles and the policy file.

Current triage handoff — 2026-10-11

Source inspected at main 02d4eb0ce37f621764a80636e8ac95b9b4d19d3c. That earlier snapshot predates #1676. The record and supersession notes are now delivered; consume the delivered-record handoff below. Do not imply its runtime outcome is implemented. Verified the ro-bind launcher at :149, backend native-write restrictions at sdk-options.ts:188 and pi shellCwd at worker-entry.ts:75. Named profiles, masks, maintenance-worker authority and resource mechanisms are supplied scope; actual integrated host/alias/absent-name/socket proof remains required. New supported policy input and policy-check CLI in #1650 follow CONTRACT: and same-commit docs/minor treatment.

Remaining needs: design is specifically per-session strict-control locked/voice state and content in the approved model-picker placement and approved policy-proposal review, cancellation, stale policy and focus behavior. The shared self-contained prompt is #1636 (comment); it now names this child epic and its owning tasks. The high-level governance ruling and proposed scope/copy are inputs, not approval of the complete interaction. Independent infrastructure/measurement tasks can prepare under their own briefs; do not blanket-block them on a drawing.

This is a logical child epic of #1636 with its native task hierarchy already established. Type: feat describes the new behavior; preserve its recorded priority, areas, parent and assignments. Never agent-ready, and no epic-level blocked label is inferred solely from a child's dependency. Complete Definition of done also requires the corresponding documented outcome and integrated proofs, not just closed child states. New arrivals outside the finite snapshot wait for another triage pass.

2026-10-11 source refresh at main 8da5c4213e55afbfe47039d13a33d6943a026c16: #1629 is delivered by #1639 (8da5c42), rootProcCover :114-116 and workerCommand :119-157, with ro-bind brain :149. #1638 now supplies warning/docs on #1632’s status surface, while #1677 is the separate identity mechanism natively under #1645. No identity mitigation or new profile is implied by the proc cover; other native children and complete integrated outcome remain open. The named snapshot source pointers above are historical where explicitly tied to the earlier SHA; use these verified anchors for current coding.

Delivered record and settled default/identity handoff — 2026-10-12

The decision record docs/decisions/governed-writable-workers.md is delivered by #1676 (squash b21428aa), an ancestor of inspected main acec591c83a730e5d68f36bae2b807f95bb5d9c9; its named supersession notes are present in policy-write-boundary.md and async-collaboration.md. This is a delivered design/architecture record, not a shipped governed runtime. Consume the record and the later maintainer ruling: governed is the 0.42.0 default despite interim maintenance-worker credentials, with truthful host-status disclosure; it remains available without the separate-uid helper using mask-only protection and explicit status, while the hosting template always supplies its helper. The record’s delivered “Settled release defaults” section already folds in both questions; no pending record amendment remains for them. No new ruling is required for them.

Existing interaction design prerequisites and native child ownership remain. All proposed runtime guards need their actual integrated tests; record delivery and policy approval do not prove profile activation, journaling, isolation, budgets or egress. This epic remains open without agent-ready.

Current delivered slices — 2026-10-12

#1660/#1692 supplies real worker resource limits, while the governed profile/policy/journal are still separate incomplete outcomes. #1689 retains the detector follow-up. #1690 is delivered by #1706 (08b45c4): trusted bootstrap resets catchable signal dispositions before exec. #1697 is delivered by #1707 (a8fbaa3): refused state copy-out has its named truthful failure. #1703 is delivered by #1711 (8b4fbdc): private sized turn temp, separate admission, usage/purge and held post-exit promotion. Maintenance workers are delivered by #1648/#1694 (bdb1d6d); #1708 owns their distinct capacity gap, with the newly settled 256 MiB command and aggregate defaults. #1710 independently owns root integrated-fixture qualification; no root integrated passing result is inferred. #1649’s four later maintainer rulings govern peer visibility, complete read-only startup views, separate bounded staging and operational state outside the brain; its assigned draft/runtime proof remains unfinished. Inspected main 8b4fbdcff57947344ad574e89b249beabe85cb06: workerCommand is packages/ui-sdk/src/server/worker-launcher.ts:339 (ordinary brain ro-bind at :382), Claude disallowedTools at packages/ui-backend-claude/src/sdk-options.ts:220 and pi shellCwd at packages/ui-backend-pi/src/worker-entry.ts:109. Kept tool_input Activity recording is packages/ui-server/src/activity/recorder.ts:266; governance/classification use packages/ui-server/src/governance/events.ts and roadblocks.ts. Old named SHA receipts stay historical. These are source/merge reconciliations, not fresh full integrated runtime proof, package publication or epic completion. Preserve actual design needs and no epic readiness.

2026-10-12 record read-back at main 6f74aaa19d6707db95401649113e65c47787b27a: docs/decisions/governed-writable-workers.md:1409-1416 now records the final release defaults explicitly. Removed the superseded request for a later implementation PR to add them; runtime/design prerequisites remain unchanged.

Updated 2026-10-12: applied the approved epic scope/ownership clarification; preserved detailed outcomes, criteria, exclusions, decision links and recorded rulings.

2026-10-12 source/delivery refresh: reconciled the merged maintenance/signal/save/temp slices and current named launcher/backend anchors. Existing dated snapshot receipts stay historical; no new full integrated/runtime/publication proof or design approval is claimed.

Approved interactions and remaining implementation — 2026-10-12

The profile and policy interaction questions are settled and folded into their owning task bodies. #1663 approval keeps profile/limits in the picker’s This chat section, read-only for voice; interactive changes apply next turn only after successful save, with confirmed values retained on failure. #1662 approval uses existing approval cards, frontmatter diff plus body-diff disclosure, read-only policy under Devices & agents, and accurate changed-section labels without an automatic loosens/tightens verdict. Existing approval authority and voice/autonomous exclusions remain binding.

#1679 approval chooses one dismissible 75% warning band using the server’s actual MiB/percentage measurement and the existing reviewed continuation action. #1708 approval restricts nested user namespaces in maintenance commands without widening other workers or changing numeric limits.

These recorded rulings resolve this epic’s current design/decision needs. The governed profile, policy reader/enforcement, profile selection, warning and maintenance follow-ups still require implementation and integrated proof. Child dependencies and the full protected-path definition of done remain; this epic stays open and never agent-ready. Earlier dated triage/placement receipts are historical inputs superseded by these approvals, not additional approval requests.

Activity

  1. added
    area: core
    area: ui-sdk
    area: ui-server
    area: backends
    priority: p0
    epic
    security
    on Oct 11, 2026
  2. 22 remaining items

  3. schlessera commented on Oct 12, 2026

    @schlessera
    OwnerAuthor

    2026-10-12 delivered-slice reconciliation: #1703 closed through PR #1711, squash 8b4fbdcff57947344ad574e89b249beabe85cb06, milestone 0.42.0. Workers now have bounded private turn temp and shared admission accounting; both backends expose scoped usage/purge with output-link preservation and governance receipts. Complete selected ready-PR CI passed, and the verified squash matches its tested combined tree. This delivers the approved temporary-capacity slice; the epic's other profile/policy outcomes and its complete definition of done remain separate. Maintenance-worker temporary capacity and root integrated-fixture qualification remain tracked in #1708 and #1710.

  4. schlessera commented on Oct 12, 2026

    @schlessera
    OwnerAuthor

    Update for #1649 / draft #1723: all three existing rulings are implemented at bc82d42, including bounded 256 MiB staging in the shared admission ledger, named ENOSPC and Retry refusals, disclosure and both-host receipts. A new G1/G2 database-layout conflict remains: in-brain UI operational state makes strict fallback refuse, while dropping the directory mask exposes private fixture database bytes. #1649 now has the exact runtime evidence, ruling options and needs: decision; the child remains open and draft. No new layout policy or weaker mask was invented. Full proof and ready-PR CI are incomplete; no merge, publishing or deployment occurred. The epic remains incomplete, and journal/revert siblings retain their scope.

  5. schlessera commented on Oct 12, 2026

    @schlessera
    OwnerAuthor

    Design brief: profiles, policy and host status, the epic view (#1642)

    The epic's remaining design need is the per-session strict control and the policy-proposal review. Both are in task briefs:

    Host status, stated truthfully in one generated block. The picker's Limits disclosure and the Agent policy view render the same lines, from the same generator as the agent note (#1626/#1632):

    Profile      governed (default) · strict (this chat)  · strict (set by policy)  · ran strict: a protected file was a link
    Protected    policy, git config/hooks, .env (masked), bunfig.toml, + 6 more     ▸ list
    Host         separate worker identity            | shared identity · mask-only protection
                 maintenance workers hold push and provider credentials (interim, until #1673/#1674)
    Network      recorded, not limited               | not recorded yet
    Room         64 MiB per conversation              (#1679)
    
    • Unknown is never enforced-looking: a fact the host doesn't report prints unknown.
    • The interim-credential and mask-only lines are plain facts, not warnings. They implement the 2026-10-11 ruling's "host status says so".
    • Launcher fallback to strict shows on the turn ledger (ran strict · a protected file was a link) and on the latest-turn line in the picker.

    Policy proposals: the approval card shows a frontmatter-only DiffBlock and the rationale as the agent's words. It handles stale-base and re-validation refusals with nothing written. Speech can only decline. A receipt row records the hash change. Invalid proposals never reach the user.

    Decisions needed: see the open questions on #1663 (placement, voice, where the Limits facts live) and #1662 (the loosens classifier, the body diff, where the view lives).

  6. added
    needs: decision
    needs: design
    and removed
    needs: design
    on Oct 12, 2026
  7. schlessera commented on Oct 12, 2026

    @schlessera
    OwnerAuthor

    2026-10-12 triage: reconciled the new design brief and its precise open questions into the body. The proposal has no recorded maintainer approval; restored needs: design alongside the live needs: decision label and retained binding architecture, permissions and dependency blockers. Factual source/coordination corrections are folded into the specification, without selecting the proposed interaction.

  8. schlessera commented on Oct 12, 2026

    @schlessera
    OwnerAuthor

    2026-10-12 triage: folded the placement-only maintainer ruling into the current specification and removed the superseded placement alternatives. Profile/limits are in the picker’s This chat section; changes/cost/limits use one disclosure beneath each turn. Remaining interaction, numeric/security/permission and technical questions stay explicit; Roadblocks UI and extra tools/network scope are not approved. Existing needs and real blockers remain.

  9. added this to the 0.42.0 milestone on Oct 12, 2026
  10. removed
    needs: decision
    needs: design
    on Oct 12, 2026
  11. schlessera commented on Oct 12, 2026

    @schlessera
    OwnerAuthor

    Integrated outcome — 2026-10-13

    All native children are completed in milestone 0.42.0. Governed interactive/voice workers, strict session tightening, immutable policy reads and user-approved policy writes are integrated with protected paths, maintenance-only execution, worker resource controls and truthful capability/status reporting.

    The final policy-review slice is delivered by #1748 (f5433b33e5ed5f8b280049909e3577783cc72953). Its combined selected CI and main-push verification are linked in the closure comment. The actual worker boundary tests in tests/policy-write-boundary.test.ts and packages/ui-sdk/tests/governed-worker.test.ts cover productive native/shell/CLI work and protected-path replacement, ancestor, alias and absent-name behavior. docs/hosting/agent-workers.md and docs/supported-inputs.md describe both profiles and the policy file.

    This closes the worker/profile/policy outcome and its documented definition of done. It does not close sibling journal, egress/credential or budget work, and does not claim package publication or deployment.

    All 14 selected PR CI jobs and all 14 main-push jobs passed. The actual squash tree matches the verified PR checkout; every main job checked out that squash. Native child states and milestone 0.42.0 were read back before closure.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendsarea: corearea: ui-sdkarea: ui-serverepicpriority: p0securitytype: feat

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions