Found while running swiftlint --strict over the result-chart work in #2222. It is not from that branch: it reproduces on main with no local changes.
ExecutionAuditLog.defaultFileURL() resolves Application Support directly:
internal static func defaultFileURL() -> URL? {
guard let support = try? FileManager.default.url(
for: .applicationSupportDirectory,
in: .userDomainMask,
appropriateFor: nil,
create: true
) else { return nil }
The repo's own custom rule rejects this:
TablePro/Core/Services/Execution/ExecutionAuditLog.swift:40:19: error: Storage Environment Directory Violation:
Resolve the directory through AppStorageEnvironment.shared, or a UI test writes to the developer's own store.
(storage_environment_directory)
Two consequences:
swiftlint --strict fails on main, so the gate cannot distinguish a new violation from this one. Anyone running the mandatory lint step gets a red run they did not cause and learns to ignore it.
- The rule exists because UI tests launch the real app.
TableProUITests runs a sandboxed store through AppStorageEnvironment, and this path sidesteps it, so a UI test run appends to the developer's own execution audit log. That log is hash chained, so foreign entries are not merely noise: they are indistinguishable from real ones and they move the chain forward.
What to do: resolve the directory through AppStorageEnvironment.shared like the other storage classes.
Verified: reproduced on main at edae33c with a clean tree (stashed every local change and re-ran the linter against that one file).
Found while running
swiftlint --strictover the result-chart work in #2222. It is not from that branch: it reproduces onmainwith no local changes.ExecutionAuditLog.defaultFileURL()resolves Application Support directly:The repo's own custom rule rejects this:
Two consequences:
swiftlint --strictfails onmain, so the gate cannot distinguish a new violation from this one. Anyone running the mandatory lint step gets a red run they did not cause and learns to ignore it.TableProUITestsruns a sandboxed store throughAppStorageEnvironment, and this path sidesteps it, so a UI test run appends to the developer's own execution audit log. That log is hash chained, so foreign entries are not merely noise: they are indistinguishable from real ones and they move the chain forward.What to do: resolve the directory through
AppStorageEnvironment.sharedlike the other storage classes.Verified: reproduced on
mainatedae33cwith a clean tree (stashed every local change and re-ran the linter against that one file).