Denial is not absence — detection learns the unverifiable answer 06 ruled for it
Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
@@ -1123,6 +1123,30 @@ struct GitUndoBindingTests {
|
||||
#expect(session.git?.committer == nil, "no committer, and so nothing that could write there")
|
||||
}
|
||||
|
||||
@Test("The default provider closure binds the native stack on an unverifiable board too")
|
||||
func proOnAnUnverifiableBoardBindsTheNativeStack() throws {
|
||||
// "`unverifiable` joins the same branch structurally" (`AppModel.makeHistoryProvider`) — a
|
||||
// denied ancestor check is no more a repository the app manages than a repo-nested one is.
|
||||
//
|
||||
// This exercises the seam directly rather than through `openBoard`: reaching `.unverifiable`
|
||||
// on a real board needs a denied *ancestor*, and POSIX permission bits (unlike the sandbox's
|
||||
// independent per-path grants) cascade — chmoding a real ancestor to deny its `.git` check
|
||||
// also denies reading the board's own files underneath it, so the board could never actually
|
||||
// open (`BoardGitModeDenialTests` in `BoardGitModeTests.swift` covers the detection axis
|
||||
// itself against real denied directories; this covers what the composition root does with
|
||||
// whatever mode a `HistoryStore` reports, real detection or not).
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
let store = try BoardStore(rootURL: fixture.root)
|
||||
let (model, tearDown) = try makeModel()
|
||||
defer { tearDown() }
|
||||
|
||||
let git = HistoryStore(boardRoot: fixture.root, mode: .unverifiable, ledger: EchoLedger())
|
||||
let provider = model.makeHistoryProvider(store, .pro, git)
|
||||
|
||||
#expect(provider is NativeHistoryProvider)
|
||||
}
|
||||
|
||||
@Test("The free tier's repo-nested board still binds the native stack — it never detects one")
|
||||
func freeTierOnARepoNestedBoardIsNativeToo() throws {
|
||||
let outer = try WriterFixture()
|
||||
|
||||
Reference in New Issue
Block a user