test(editor): pin the rescan stale-Home verdict and the draft-survives repoint (review r1)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
MF-1: the hoisted `guard watchedHome == home` in rescan was live logic with no pin — the only new guard still observable after the gate (a scan started under A can sit in its detached hop while the gate passes and bind flips to B; landing after B's own scan it would hold A's list under the B binding until the next B-side event, which with nothing open is never). `scanLibrary` is the per-model injectable library scanner beside `scanPieceCards` (captured before the hop); the pin parks an A scan past the repoint, lets B's scan land, releases, and asserts the list is still B's and `contentRevision` did not move. Mutation check: hoist removed → rail-filtered `9 executed / 8 passed / 1 failed`, ONLY that pin, `posts.map(\.id) → ["alpha"]` and `contentRevision → 3` vs `revision → 2`; restored byte-exact (sha256 prefix d86ce09d6b7e6bd2 before and after). N-1: the draft-survives-repoint decision pinned — newPost targets the selected A piece's project, the draft rides the repoint intact, and `saveDraft()` lands under B only, in the draft's OWN project even though B does not have it (materialize creates with intermediates). Filtered GREEN: PostsModelRepointTests + PostsModelDepartureTests 19/19. swiftformat 0/152, swiftlint 0.
This commit is contained in:
1 parent
97712fbacb
commit
92344e224c
3 files changed
+75
-1
No files matched your search
@@ -159,6 +159,10 @@ final class PostsModel {
|
||||
/// detached disk read is otherwise faster than any test can arrange).
|
||||
/// Per-model, never static (the hosted suite runs tests in parallel).
|
||||
var scanPieceCards: @Sendable (URL) -> [FixCardStore.StoredFixCard] = FixCardStore.scan
|
||||
/// brief-28 r1 (MF-1): the library scanner behind `rescan` — the same
|
||||
/// injection shape, so the stale-Home pin can HOLD an old library's scan
|
||||
/// past a repoint and watch its continuation land under the new binding.
|
||||
var scanLibrary: @Sendable (URL, PostScanCache?) -> [Post] = Post.scan
|
||||
/// #93: per-file watcher on the open external file — the #67 conflict
|
||||
/// check reused verbatim for foreign files.
|
||||
var externalWatcher = PostsWatcher()
|
||||
|
||||
Reference in new issue
Block a user