PostsModel write rail — one seam pairs every store write with the rescan #179

Closed
opened 2026-11-09 11:18:51 +01:00 by AlexKucera · 0 comments
Owner

What to build

From the 2026-11-09 architecture review (content line, step 1 of 2).

Every library verb — create post / outline / session-born post, rename, move to project, archive and restore, trash, convert, project creation — routes through one internal seam that pairs the store write with the library rescan and owns the error strip. Today fourteen call sites hand-copy the write-then-rescan-then-error choreography; a new verb copies it again and a forgotten copy is a silent stale-library bug.

The model owns the Home: the home parameter disappears from its public methods — construction and the Settings repoint remain the only two places it is set. The editor's flush/save-draft keeps its own posture outside the rail (different error semantics, editor-owned).

Acceptance criteria

  • All store-write call sites route through the one seam; no hand-copied write-then-rescan pairs remain
  • The pairing is pinned once: a write through any verb is followed by exactly one rescan
  • No public model method takes a Home parameter; callers pass none
  • Editor flush behavior unchanged (own tests still green)
  • Full suite green

Blocked by

None (can start immediately).

[Generated by AI]

## What to build From the 2026-11-09 architecture review (content line, step 1 of 2). Every library verb — create post / outline / session-born post, rename, move to project, archive and restore, trash, convert, project creation — routes through **one internal seam** that pairs the store write with the library rescan and owns the error strip. Today fourteen call sites hand-copy the write-then-rescan-then-error choreography; a new verb copies it again and a forgotten copy is a silent stale-library bug. The model owns the Home: the `home` parameter disappears from its public methods — construction and the Settings repoint remain the only two places it is set. The editor's flush/save-draft keeps its own posture outside the rail (different error semantics, editor-owned). ## Acceptance criteria - [ ] All store-write call sites route through the one seam; no hand-copied write-then-rescan pairs remain - [ ] The pairing is pinned once: a write through any verb is followed by exactly one rescan - [ ] No public model method takes a Home parameter; callers pass none - [ ] Editor flush behavior unchanged (own tests still green) - [ ] Full suite green ## Blocked by None (can start immediately). [Generated by AI]
AlexKucera added the ready-for-agent label 2026-11-09 11:18:54 +01:00
Sign in to join this conversation.