Skip to content

ui-server: decide whether code history on a private worktree needs a live grant #4367

Closed

Description

@schlessera

Context

Part of #4278. Deferred from the first review of PR #4362 (#4297), where the maintainer ruled these as not blocking.

withHistoryCheckout (packages/ui-server/src/brain/reference-worktrees.ts:709) checks ownership and holder state, but not covered(). After a private repository's grant is withdrawn, the owning principal can still run a fresh capture of the live checkout and restore files through history. codePreview reads the pinned pack with no grant check at all. Access is owner-only and credential-free.

Decision needed

Does history on retained evidence and on the live checkout stay available to the owner after withdrawal, or does it require a live grant?

Scope

Implement the matching check, or the documentation, once ruled.

Out of scope

Grant semantics elsewhere.

Acceptance criteria

  • The ruling is recorded on this issue and in docs/decisions/managed-worktrees.md.
  • If a live grant is required, revert and conflict preview refuse without one, by a test.
  • If not, the decision record says so explicitly.

Verification

bun run test packages/ui-server/tests

Contract impact

None expected.

Activity

  1. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    needs: decisionBlocked on a maintainer or designer ruling, not on code.
    on Nov 21, 2026
  2. schlessera commented on Nov 21, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-21): the owner keeps code history after a grant is withdrawn. The owning principal can still view and revert retained evidence for a private worktree after its grant is withdrawn, as worktree history already allowed before #4297. Revert still requires a fresh capture equal to tree_after, and access stays owner-only and credential-free. docs/decisions/managed-worktrees.md records this explicitly. No live-grant check is added. needs: decision is removed; what remains is the documentation criterion.

  3. added
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    and removed
    needs: decisionBlocked on a maintainer or designer ruling, not on code.
    on Nov 21, 2026
  4. added this to the 0.45.0 milestone on Nov 21, 2026
  5. schlessera commented on Nov 23, 2026

    @schlessera
    OwnerAuthor

    Closed by #4444, squash-merged to main as a3395c4b2. The combined review found every non-native criterion met. Native-measurement criteria for this issue moved to #4420 by maintainer decision, because native proof cannot run on the integration host.

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

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions