@startuml
title After: Manifest-anchored provision SQL + Docker preflight guard
skinparam backgroundColor #FAFAFA
skinparam componentStyle rectangle
skinparam defaultFontName Consolas

package "Builder image" #E8FFF0 {
  component "COPY Cargo/crates/src/scripts" as copyCode
  component "COPY sql/" as copySql
  component "RUN test -f /app/sql/provision.sql" as verifySql
  component "cargo build --release --bin server --features server" as build
}

package "Compile step" #E8F1FF {
  component "server.rs\ninclude_str!(concat!(env!(\"CARGO_MANIFEST_DIR\"), \"/sql/provision.sql\"))" as includeManifest
}

artifact "/app/sql/provision.sql" as provision

copyCode --> build
copySql --> verifySql
verifySql --> build : preflight pass
build --> includeManifest
includeManifest --> provision : compile-time read

note right of verifySql
Fast failure if file is absent
before Rust compilation starts.
end note

note right of includeManifest
Path resolves from package root,
not source-file traversal.
end note
@enduml
