One internal seam (PostsModelRail.swift) now pairs every library
verb store write with exactly one library rescan and owns the error
strip: saveDraft, newPostFromSession, rename, trash, createProject,
moveToProject, archivePost, restorePost, unarchiveProject,
importFiles, convertToPost, and runPass pass-state advance (12 sites
on this base; the pass snapshot/stats writes, the publish stamp, and
the editor flush stay outside by design).
The model owns the Home: boundHome is set by bind() alone (app
construction + Settings repoint); every public verb lost its home:
parameter (create post/outline/session-born, rename, move, archive,
restore, trash, convert, project creation, import, select, cards,
passes, blind read, publish).
The three rail entries are railWrite/railWriteReturningReason/
railWriteKeepingStrip — deliberately NOT overloads: a shared base
name let unlabeled trailing-closure calls resolve into the labeled
non-generic entry (Swift binds trailing closures to labeled first
parameters), silently bypassing the strip and the pairing.
Views + 11 test files swept to the homeless signatures (160 sites).
RED suite green: 3/3. Full unit suite: 654/654. Fixes#179
PostsModel.swift had outgrown its lint ceilings — 1127 lines against the
1000 file-length error, class body 361 against 350; both pre-dated the
week and #143 deepened them while naming this split as the follow-up.
The six domain extensions after the class move to their own files,
domain-grouped: PostsModelOutline.swift (mixed-content guard #111 +
Convert to Post #114), PostsModelPasses.swift (pass orchestration #24 +
Blind Read #122), PostsModelCards.swift (stored cards #23 +
apply/skip/done #25 + promote #26, with their support types). The
watcher section (startWatching + rescan) moves to a file-scope
extension so the class body drops to 323 — #111's precedent: same-file
extensions keep private state file-scoped while type_body_length only
counts the class body.
Pure moves, mechanically verified line-for-line: the only edits are the
18 private->internal widenings the cross-file moves force (13
private(set) setters + rescan/dismissExternal/wireSession/
isGuardedOutline/openUnguarded, each doc-noted) and the two
wrapped-condition guards unwrapped per the #142 learning, clause order
preserved. The error ceilings and both opening_brace warnings are gone;
the residual default WARNING-tier notices (708/400 file, 323/250
type-body) match the repo's standing posture — the ticket's own
~700-line landing zone makes the 400 tier unreachable.
Full suite 574/574 by xcresult executed count (573 unit + 1 UI smoke).
Closes#146