### reproduction command $ CONTAINER_ID=$(docker ps -q --filter "label=devcontainer.local_folder" | head -1); docker exec "$CONTAINER_ID" bash -c 'VAULT=/tmp/banal-batch-5-fixture; rm -rf "$VAULT/.banal/stage" "$VAULT/.publish"; (swift run banal publish --json --vault "$VAULT" > /tmp/rapid-a.out 2>&1; printf "%s" $? > /tmp/rapid-a.rc) & (swift run banal publish --json --vault "$VAULT" > /tmp/rapid-b.out 2>&1; printf "%s" $? > /tmp/rapid-b.rc) & wait; printf "A_exit="; cat /tmp/rapid-a.rc; printf " B_exit="; cat /tmp/rapid-b.rc; printf "\nA_error="; grep -m1 -F "error:" /tmp/rapid-a.out || true; printf "\nB_error="; grep -m1 -F "error:" /tmp/rapid-b.out || true; printf "\nartifacts:\n"; ls -laR "$VAULT/.banal" "$VAULT/.publish" 2>/dev/null || true' ### command output A_exit=1 B_exit=1 A_error=Sources/BANALCore/Assets/AssetManager.swift:2:8: error: no such module 'UniformTypeIdentifiers' B_error=Sources/BANALCore/Assets/AssetManager.swift:2:8: error: no such module 'UniformTypeIdentifiers' artifacts: /tmp/banal-batch-5-fixture/.banal: total 12 drwxrwxrwx 2 root root 4096 Aug 25 18:42 . drwxrwxrwx 3 root root 4096 Aug 25 18:41 .. -rw-rw-rw- 1 root root 47 Aug 25 18:42 config.json ### fallback command output $ docker exec "$CONTAINER_ID" bash -c 'swift run --skip-build banal publish --json --vault /tmp/banal-batch-5-fixture' skip_build_exit=1 error: exec error: No such file or directory (2): .build/aarch64-unknown-linux-gnu/debug/banal .build/aarch64-unknown-linux-gnu/debug/banal publish --json --vault /tmp/banal-batch-5-fixture # The native CLI did not reach the publish pipeline in this Linux container. No concurrent artifact corruption was directly observed; the race below is supported by production source inspection. ### shared-path configuration // Sources/BANALPublisher/PublishModels.swift:34-42 public static func `default`(for vault: VaultConfiguration, fileManager: FileManager = .default) -> PublishConfiguration { PublishConfiguration( siteTitle: vault.siteTitle, siteBaseURL: vault.siteBaseURL, artifactDirectory: vault.publishURL, stagingDirectory: vault.metadataURL.appendingPathComponent("stage", isDirectory: true), ### staging and compile sequence // Sources/BANALPublisher/BANALPublisher.swift:57-68 let staged = try BorisAdapter.stage( notes: compiled, configuration: configuration, assetsSource: vault.assetsURL, fileManager: fileManager ) let compile = try compiler.compile( ### destructive cleanup // Sources/BANALPublisher/BorisAdapter.swift:140-143 let staging = configuration.stagingDirectory if fileManager.fileExists(atPath: staging.path) { try fileManager.removeItem(at: staging) } // Sources/BANALPublisher/SiteCompiler.swift:27-37 let fileManager = FileManager.default if fileManager.fileExists(atPath: artifactDirectory.path) { try fileManager.removeItem(at: artifactDirectory) } try fileManager.createDirectory(at: artifactDirectory, withIntermediateDirectories: true) // Sources/BANALPublisher/SiteCompiler.swift:117-157 let relativeDist = stagingDirectory.appendingPathComponent("dist", isDirectory: true) if fileManager.fileExists(atPath: relativeDist.path) { try fileManager.removeItem(at: relativeDist) } ... process.currentDirectoryURL = stagingDirectory ... if fileManager.fileExists(atPath: artifactDirectory.path) { try fileManager.removeItem(at: artifactDirectory) } try fileManager.copyItem(at: relativeDist, to: artifactDirectory) # Both invocations resolve to the same .banal/stage and .publish locations, and those locations are removed and rebuilt without a lock, per-run directory, atomic swap, or consistency check. # final result: BF-RAPID-1 failed by code analysis after runtime execution was blocked; overlapping publishes can delete or mix each other's staging and artifact trees.