Convert the Writer's operation vocabulary to a closed enum
WriteOperation replaces free-form operation strings throughout BoardWriter, per the settled rule in 02 § Write-failure surfacing: the banner layer will switch exhaustively over it, so a new operation without a banner rendering is a compile-time hole. Titles enrich at the two points a document read makes them known (updateIndex, and the move/copy pre-flight), so failures after the read name the item; purge never reads and stays title-less. Free-form English survives only in the diagnostic reason. Full suite 300 tests in 56 suites green. Claude-Session: https://claude.ai/code/session_018BjQRYBR6jQja3jCRi5S3A
This commit is contained in:
@@ -471,7 +471,7 @@ struct BoardStoreTests {
|
||||
|
||||
// A Writer operation that fails partway has still touched disk, so the bracket has to close
|
||||
// on the throwing path too — an unbalanced one would suspend the watcher for the session.
|
||||
let boom = BoardWriteError(operation: "probe", path: "/nowhere", reason: .io(message: "disk full"))
|
||||
let boom = BoardWriteError(operation: .style(title: nil), path: "/nowhere", reason: .io(message: "disk full"))
|
||||
do {
|
||||
try store.performWrite { () throws(BoardWriteError) -> Void in throw boom }
|
||||
Issue.record("expected the operation's own error to propagate")
|
||||
|
||||
Reference in New Issue
Block a user