Skip to content

Add the Sync bounded context to the domain model #762

Closed

Description

@JSdotNet

Sync now has domain models of its own (device, pairing code, owner scope, change precedence) and four ADRs make it a persistent replica with a blob store, yet .devbook/domain/ has no sync/ folder and the README still calls it a pass-through that "if it ever grows rules of its own, needs an entry in the context map before it grows projects". It grew the projects first. Found in the 2026-09-27 repository review.

Context

  • src/Modules/Sync/Backlog.Modules.Sync/DomainModels/ holds Device, PairingCode, OwnerScope, AnnotationChangePrecedence; TaskChangePrecedence is shared by both replicas with tombstone-wins-on-tie.
  • ADRs 0005, 0009, 0011 and 0014 under .devbook/arc42/adr/ decide the replica, precedence, attachments and pairing.
  • .devbook/domain/context-map.md has no Sync context; .devbook/domain/ folders are capture, dev-pc-management, devbook, environment, inbox, monitoring, productivity, repository-management, roadmap, sessions, tasks, technology-stack.
  • README.md line 94 is the paragraph to rewrite once the context exists.
  1. Run devbook:capture-specs for the Sync aggregate(s) and the invariants their unit tests already establish (constant-time credential comparison, pairing code burned before the device is added, push batch refused whole over the cap, LWW precedence).
  2. Land the context via delivery:flow-spec: .devbook/domain/sync/context.md, domain.md, domain.invariants.md, requirements.md, and the context-map entry with its relationships to Inbox, Tasks and Sessions.
  3. Update the README paragraph in the same change or in Bring README.md level with the tree #761.

Activity

  1. added
    documentationImprovements or additions to documentation
    needs-architectureEscalated: needs an architecture decision before implementation
    triagedClassified by the issue sweep
    in-progressA worker session is actively working this issue
    on Sep 27, 2026
  2. self-assigned this
    on Oct 5, 2026
  3. JSdotNet commented on Oct 5, 2026

    @JSdotNet
    OwnerAuthor

    The issue sweep (2026-10-05) stopped this issue at Scope Discovery and routed it to flow-spec. It opened no branch or pull request.

    Why: adding Sync as a bounded context is a change to the documented domain model. Three decisions belong to the domain role:

    1. Sync's subdomain type (Supporting or Generic).
    2. The relationship pattern on each edge to Inbox, Tasks, Sessions and Devbook.
    3. Which DomainModels types are aggregate roots and which are value objects.

    Scope found, ready for that run:

    • New chapters in .devbook/domain/sync/: context.md, domain.md, domain.invariants.md and requirements.md.
    • Invariants the unit tests already prove:
      • constant-time credential comparison;
      • the pairing code is burned before the device is added;
      • a push batch over the cap is refused whole;
      • last-writer-wins with tombstone-wins-on-tie.
    • Context map (context-map.md): a row and a node, with edges to Inbox (ADR 0009), Tasks (ADR 0005), Sessions and Devbook (ADR 0011).
    • Stale claims that Sync "owns no domain": README.md lines 96-100 and inbox/dependencies.md line 19.
  4. removed
    in-progressA worker session is actively working this issue
    on Oct 5, 2026
  5. added
    in-progressA worker session is actively working this issue
    on Oct 15, 2026
  6. JSdotNet commented on Oct 15, 2026

    @JSdotNet
    OwnerAuthor

    The issue sweep (2026-10-15) opened draft pull request #1297. Told to decide without waiting, it made Sync a Supporting context, upstream of Tasks, Sessions and Devbook as an Open Host Service, with Device and Pairing Code as aggregates and the pairing language moved out of Tasks; the pull request names the alternative (Generic, pairing language left in Tasks).

  7. removed
    in-progressA worker session is actively working this issue
    on Oct 15, 2026
  8. JSdotNet commented on Oct 17, 2026

    @JSdotNet
    OwnerAuthor

    Closed by the issue sweep as already fixed: PR #1297 (merge 712e8f1, on main) adds .devbook/domain/sync/ and lists Sync in context-map.md.

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationneeds-architectureEscalated: needs an architecture decision before implementationtriagedClassified by the issue sweep

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions