fix(posts): finish-audit closeout for #179
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s

Reviewer fanout (ponytail/security/general) fixes: bind hoisted to the
WorkspaceView root task (stale boundHome after a Home repoint while
another pane was showing), railWriteReturningReason emits .writeFailed
(pinned, flip-verified), dead home: params deleted from the three ask
sheets, saveDraft locals inlined; AGENTS.md docs delta applied; devlog
closeout. Suite 655/655, lint parity with base.
This commit is contained in:
AlexKucera committed 2026-11-10 16:48:35 +01:00
1 parent 3bef1d12b1
commit 23b2090054
12 files changed
+58 -24

No files matched your search

@@ -128,4 +128,20 @@ struct PostsModelWriteRailTests {
#expect(events == [.write, .writeFailed])
#expect(model.lastError != nil)
}
/// #179 audit: the reason-returning entry reports failure on the seam
/// too — `.writeFailed` fires, nothing pairs, and the strip stays
/// untouched (the sheet owns the reason).
@Test func `a failed reason-returning write reports writeFailed and leaves the strip alone`() throws {
let (model, _) = try makeModelHome()
var events: [PostsModelRailEvent] = []
model.onRailEvent = { events.append($0) }
#expect(model.createProject(named: "essays") == nil)
events.removeAll()
// case-folded duplicate → PostStore.createProject throws
#expect(model.createProject(named: "Essays") != nil)
#expect(events == [.write, .writeFailed])
#expect(model.lastError == nil)
}
}