The tier axis comes out of the git stack — compose unconditional, postures mode-driven
HistoryStore.compose(boardRoot📒) returns non-optional and runs for every session — the nil the gate produced was the only nil it ever had. makeHistoryProvider is a one-axis decision: git-mode boards bind the git provider, everything else native, in every tier; Session.tier stays recorded, dormant. BoardGitSection shrinks to the four mode postures (.absent and .proPointer die, BoardGitNote and the .git probe with them); every board carries all three popover tabs (BoardInfoTab.available retired); the titlebar branch shows on any git-mode board; the settings sheet and card History section stop reading tier. InertGitTests is repurposed as UntouchedGitTests — the file layer still never opens .git, now load-bearing for mode-none boards. The accessibility audit reaches the settings sheet at last: the fixture board hosts it in every tier, so the free-fixture disabled-row test becomes an open-and-audit test. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -49,7 +49,7 @@ private func churn(_ fixture: WriterFixture, commits: Int) throws {
|
||||
|
||||
// MARK: - Filesystem instruments
|
||||
|
||||
/// One entry under a subtree: path, bytes (nil for directories), and mtime — `InertGitTests`'
|
||||
/// One entry under a subtree: path, bytes (nil for directories), and mtime — `UntouchedGitTests`'
|
||||
/// instrument. Bytes alone would pass a rewrite with identical content; the mtime is the assertion
|
||||
/// that nothing opened the file for writing at all.
|
||||
private struct SubtreeEntry: Equatable, CustomStringConvertible {
|
||||
@@ -169,7 +169,7 @@ struct GitignoreSeedTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
// The file, and the whole of the file — the one seed text, shared with board creation and
|
||||
@@ -192,7 +192,7 @@ struct GitignoreSeedTests {
|
||||
try fixture.file(".DS_Store", Data([0x00, 0x01, 0x42]))
|
||||
try fixture.file("\(Ident.lane1)/.DS_Store", Data([0x00, 0x01, 0x43]))
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
// Not "removed from history later" — never in it. The app has no history-rewriting operation
|
||||
@@ -211,7 +211,7 @@ struct GitignoreSeedTests {
|
||||
try fixture.file(".gitignore", mine)
|
||||
let before = try snapshot(fixture.root, ".gitignore")
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
// Not merged, not appended to, not reordered — and not even opened for writing, which is
|
||||
@@ -226,7 +226,7 @@ struct GitignoreSeedTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
// The user edits it — including deleting the line the app seeded, which is their business.
|
||||
@@ -251,7 +251,7 @@ struct GitignoreSeedTests {
|
||||
func theCommitterObeysTheSameFile() async throws {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
// The user fine-tunes their own noise definition, which is exactly what the file is for.
|
||||
@@ -276,7 +276,7 @@ struct GitignoreSeedTests {
|
||||
// `git init` run outside the app, exactly the shape a cloned or hand-inited board arrives in.
|
||||
_ = try Repository.create(at: fixture.root)
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(git.mode == .git)
|
||||
#expect(!fixture.exists(".gitignore"), "composing history is not a write")
|
||||
}
|
||||
@@ -294,7 +294,7 @@ struct GitignoreSeedTests {
|
||||
try FileManager.default.createDirectory(at: boardRoot, withIntermediateDirectories: true)
|
||||
try Data(Item.board.utf8).write(to: boardRoot.appendingPathComponent("index.md"))
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: boardRoot, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: boardRoot)
|
||||
#expect(await git.addGit() == false)
|
||||
#expect(git.mode == .repoNested)
|
||||
#expect(!FileManager.default.fileExists(atPath: boardRoot.appendingPathComponent(".gitignore").path))
|
||||
@@ -485,7 +485,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 4)
|
||||
|
||||
@@ -532,7 +532,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
@@ -554,7 +554,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
@@ -574,7 +574,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
let before = try snapshot(fixture.root, ".git")
|
||||
@@ -590,7 +590,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
@@ -604,7 +604,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
@@ -624,7 +624,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
@@ -643,7 +643,7 @@ struct GitHousekeepingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
let cardPath = "\(Ident.lane1)/\(Ident.card1)/index.md"
|
||||
@@ -694,27 +694,19 @@ struct GitHousekeeperSchedulingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let plain = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let plain = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(plain.housekeeper == nil, "no repository, nothing to maintain")
|
||||
|
||||
#expect(await plain.addGit())
|
||||
#expect(plain.housekeeper != nil, "the mid-session flip maintains itself like any git board")
|
||||
|
||||
let reopened = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let reopened = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(reopened.housekeeper != nil)
|
||||
}
|
||||
|
||||
@Test("The free tier has no housekeeper anywhere, because it has no git state at all")
|
||||
func theFreeTierMaintainsNothing() async throws {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let seed = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
#expect(await seed.addGit())
|
||||
|
||||
// Structural, not conditional: with no `HistoryStore` there is no housekeeper to disable and
|
||||
// no code path that could reach one (12-editions.md ▸ The free tier and `.git`).
|
||||
#expect(HistoryStore.compose(boardRoot: fixture.root, tier: .free) == nil)
|
||||
// The mode is the *whole* condition. A companion test used to sit beside this one pinning
|
||||
// that the free tier maintained nothing anywhere — structurally, since `compose` answered
|
||||
// `nil` off Pro — and PIVOT 2026-08-07 (12-editions.md) retired both the gate and the claim:
|
||||
// there is no tier to compose under, so this suite's one axis is the one above.
|
||||
}
|
||||
|
||||
@Test("A commit in flight defers the pass entirely — it is never retried")
|
||||
@@ -722,7 +714,7 @@ struct GitHousekeeperSchedulingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
@@ -749,11 +741,11 @@ struct GitHousekeeperSchedulingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let seed = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let seed = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await seed.addGit())
|
||||
try churn(fixture, commits: 3)
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
let housekeeper = try #require(git.housekeeper)
|
||||
housekeeper.threshold = 1
|
||||
housekeeper.delay = .milliseconds(20)
|
||||
@@ -768,7 +760,7 @@ struct GitHousekeeperSchedulingTests {
|
||||
|
||||
// Teardown cancels an armed one, so a closed board's maintenance cannot fire against a store
|
||||
// that has gone.
|
||||
let second = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let second = HistoryStore.compose(boardRoot: fixture.root)
|
||||
let secondKeeper = try #require(second.housekeeper)
|
||||
secondKeeper.threshold = 1
|
||||
secondKeeper.delay = .milliseconds(200)
|
||||
@@ -783,7 +775,7 @@ struct GitHousekeeperSchedulingTests {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
|
||||
let git = try #require(HistoryStore.compose(boardRoot: fixture.root, tier: .pro))
|
||||
let git = HistoryStore.compose(boardRoot: fixture.root)
|
||||
#expect(await git.addGit())
|
||||
|
||||
let housekeeper = try #require(git.housekeeper)
|
||||
|
||||
Reference in New Issue
Block a user