Skip to content

workspace repos should link their parent by pinned pubkey (not remote-add); add % parent sentinel + der sync #287

Description

@sfriedenberg-etsy

Problem

der init-workspace records no link to a parent repo, and the only existing
way to set up sync — remote-add — writes the remote as a content object
(genre Repo). A subsequent push :z (or any query catching it) would ship
that pointer object back to the parent, which is nonsensical. A workspace's
parent relationship is infrastructure, not content.

Proposed feature

Record a workspace's parent as a pinned-by-pubkey entry in
.dodder-workspace (never a content object), reached via a position-scoped
% sentinel in push/pull, plus a new der sync for the bidirectional
flow.

  • [parent] pin in .dodder-workspace: pubkey (authoritative identity,
    verified on every use), locator, location-type, original-id
    (scope-prefixed, for guidance/debugging).
  • % in remote-position of push/pull resolves to the verified pin.
    Distinct from %'s existing query-position virtual-marker meaning — no
    collision.
  • der sync [query] = pull % then push %, local conflict resolution
    between (halt before push if pull leaves conflicts).
  • Parent inference at init-workspace (and der set-parent): 0 in-scope
    repos → no pin; 1 → silent pin; 2+ → interactive picker
    (clown-resume-styled bubbles/list, grouped by scope, dialog-local tridex
    for pubkey shortening), hard-fail non-TTY.
  • New CLI: der set-parent [id] / -unset, der init-workspace -parent <id>
    / -no-parent, der info-workspace surfaces the pin.

Purely additive: remote-add + explicit der push /name unchanged.

Dependency

Builds on the in-flight repo-id resolution / pinning layer (scope
enumeration: cwd/user/system, ../ distance). Cannot land until that exists.

Design doc

Full design committed at
docs/plans/2026-06-24-workspace-parent-linking-design.md. Likely warrants an
FDR once implemented.

:clown: clown 0.3.14+295fae7
amarbel-llc/clown@295fae7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions