chore(lint): repo-wide green becomes the contract
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Close the lint arc #194-#197: deliberate-style rule disables with rationales (#194), filter-safe test renames + --test-case-name-format preserve (#195), every surviving warning fixed through the sanctioned lint-stable shapes (#196), and the docs now state the true contract (#197): bare swiftlint . reports zero violations and swiftformat . reformats nothing, while push gates stay scoped to the push's own files (settled #190 design) — the pre-push hook's stale 'pre-existing violations' rationale blocks refreshed, gate logic untouched. Also in the sweep: quiesce the FSEvent-burst watcher race in LibrarySearchTests (two rescans double-count one shared PostScanCache miss; benign revision over-bump), pin the learnings scan's symlink-skip contract (flip-verified — defended in depth by the lstat guard AND contentsOfDirectory's own symlink refusal), reorder that scan's guard so cheap rejections precede the directory listing, and park the roster chmod window with a ceiling comment. Finish-audit: 3 reviewers, 0 blocking; the one code finding was disproved by probe (&& out-binds ?? — the guard was correct). Suite 693/693 via scripts/full-test.sh; swiftlint 0 violations; swiftformat 0/141; hook rig 23/23. Closes #197
This commit is contained in:
1 parent
0ab00eb7b6
commit
d7fd11cf0d
29 files changed
+549
-269
No files matched your search
@@ -44,14 +44,17 @@ struct ProfileProvisionerFailureTests {
|
||||
func configUntouched() -> Bool {
|
||||
(try? String(contentsOfFile: configPath, encoding: .utf8)) == config
|
||||
}
|
||||
// Shared per-phase runner: same binary/root/payload master, the
|
||||
// server seam varying per phase (default = perform's own default).
|
||||
func pass(_ payload: String, server: String? = Bundle.main.executableURL?.path) -> ProfileProvisioner.Outcome {
|
||||
ProfileProvisioner.perform(
|
||||
hermesBinary: binary, profileRoot: profileRoot, payloadRoot: payload,
|
||||
masterRoot: master, serverBinaryPath: server,
|
||||
)
|
||||
}
|
||||
|
||||
// Failed pass: registration never reached, config untouched.
|
||||
let failed = ProfileProvisioner.perform(
|
||||
hermesBinary: binary,
|
||||
profileRoot: profileRoot,
|
||||
payloadRoot: badPayload,
|
||||
masterRoot: master,
|
||||
)
|
||||
let failed = pass(badPayload)
|
||||
guard case .failed = failed else {
|
||||
Issue.record("expected copy failure, got \(failed)")
|
||||
return
|
||||
@@ -61,13 +64,7 @@ struct ProfileProvisionerFailureTests {
|
||||
// Skipped pass: nil serverBinaryPath is the test seam — nothing
|
||||
// registers, config untouched. (The failed pass already seeded the
|
||||
// shared master — 2 present there, only the 6 profile links copy.)
|
||||
let skipped = ProfileProvisioner.perform(
|
||||
hermesBinary: binary,
|
||||
profileRoot: profileRoot,
|
||||
payloadRoot: goodPayload,
|
||||
masterRoot: master,
|
||||
serverBinaryPath: nil,
|
||||
)
|
||||
let skipped = pass(goodPayload, server: nil)
|
||||
#expect(skipped == .seeded(copied: 6, present: 2))
|
||||
#expect(configUntouched())
|
||||
for profile in ["museion", "museion-pass1", "museion-pass2"] {
|
||||
@@ -77,13 +74,7 @@ struct ProfileProvisionerFailureTests {
|
||||
// Registering pass: the CLI rail ran (markers + invocations per
|
||||
// profile) and still not one byte of config.yaml is written by the
|
||||
// provisioner — the entry lands through the CLI, or not at all.
|
||||
let registered = ProfileProvisioner.perform(
|
||||
hermesBinary: binary,
|
||||
profileRoot: profileRoot,
|
||||
payloadRoot: goodPayload,
|
||||
masterRoot: master,
|
||||
serverBinaryPath: "/fake/Museion.app/Contents/MacOS/Museion",
|
||||
)
|
||||
let registered = pass(goodPayload, server: "/fake/Museion.app/Contents/MacOS/Museion")
|
||||
#expect(registered == .seeded(copied: 0, present: 8))
|
||||
#expect(configUntouched())
|
||||
#expect(FileManager.default.fileExists(atPath: (binDir as NSString).appendingPathComponent("mcp-registered-museion")))
|
||||
|
||||
Reference in new issue
Block a user