Makefile.toml
Rama main · réplica de lectura del repositorio original.
[tasks.build]
description = "Build all shardline workspace crates"
workspace = false
command = "cargo"
args = ["build", "--workspace", "--all-features", "${@}"]
dependencies = ["clean"]
[tasks.format-rust]
description = "Format Rust code using rustfmt"
workspace = false
command = "cargo"
args = ["fmt", "--all"]
[tasks.format-docs]
description = "Format Markdown docs using flowmark"
workspace = false
install_crate = "flowmark"
install_crate_args = ["--locked"]
command = "flowmark"
args = ["-i", "--nobackup", "-s", "-c", "docs", "README.md", "docs"]
[tasks.format]
description = "Format Rust code and Markdown docs"
workspace = false
dependencies = ["format-rust", "format-docs"]
[tasks.format-check]
description = "Verify code formatting with rustfmt"
workspace = false
command = "cargo"
args = ["fmt", "--check", "--all"]
[tasks.clean]
description = "Remove build artifacts"
workspace = false
command = "cargo"
args = ["clean", "${@}"]
[tasks.bacon]
description = "Live code checking with bacon"
workspace = false
install_crate = "bacon"
command = "bacon"
args = ["${@}", "check-all"]
[tasks.audit]
description = "Security audit for dependencies"
workspace = false
command = "cargo"
args = ["audit", "${@}"]
[tasks.build-prod]
description = "Build optimized release binaries"
workspace = false
command = "cargo"
args = ["build", "--workspace", "--release", "--all-features", "${@}"]
dependencies = ["clean"]
[tasks.check]
description = "Quick compilation check without building"
workspace = false
command = "cargo"
args = ["check", "--workspace", "--all-targets", "--all-features", "${@}"]
[tasks.test]
description = "Run workspace lib tests (fast, no external infrastructure needed)"
workspace = false
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "cargo"
args = ["nextest", "run", "--workspace", "--lib", "${@}"]
[tasks.test-integration]
description = "Run integration tests (requires Docker: Postgres, MinIO, Redis)"
workspace = false
dependencies = ["build-reliability-runtime-fixture"]
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "cargo"
# Nextest unions multiple -E expressions. Select all integration binaries once,
# including Xet format contracts, without rerunning library tests in this gate.
args = ["nextest", "run", "--locked", "--workspace", "--exclude", "shardline-fuzz", "--all-features", "-E", "kind(test)", "${@}"]
[tasks.test-reliability-contracts]
description = "Verify historical evidence, native profiles and durable task recovery without external services"
workspace = false
dependencies = ["build-reliability-runtime-fixture"]
command = "cargo"
args = ["test", "-p", "shardline-reliability", "--all-features", "--locked", "--test", "deployment_compatibility", "--test", "native_profiles", "--test", "task_journal", "--test", "process_runtime", "--test", "task_artifact", "--test", "released_public_api", "${@}"]
[tasks.build-reliability-runtime-fixture]
description = "Build the real child-process fixture for reliability runtime contracts"
workspace = false
command = "cargo"
# Runtime identity hashes the entire executable. Keep debug sections out of this
# fixture, as in shipped binaries, so hashing them cannot consume its task budget.
# The controller tests retain debug information and the runtime limits stay intact.
args = ["rustc", "-p", "shardline-reliability", "--features", "process-runtime", "--locked", "--example", "process_test_worker", "--", "-C", "strip=debuginfo"]
[tasks.test-postgres]
description = "Run Postgres-gated tests (requires DATABASE_URL env var)"
workspace = false
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "bash"
args = ["scripts/test-postgres.sh"]
[tasks.test-postgres-process-cuts]
description = "Verify owned PostgreSQL process cuts against the pinned released compatibility baseline"
workspace = false
command = "bash"
args = ["scripts/shardline/run_postgres_process_cut_gate.sh", "${@}"]
[tasks.test-distributed-integrity]
description = "Verify distributed integrity under real deployment faults and mixed-version operation"
workspace = false
command = "bash"
args = ["scripts/shardline/run_distributed_integrity_gate.sh", "${@}"]
[tasks.test-disk-pressure]
description = "Verify stock Xet and S3 recovery after real bounded disk exhaustion (Linux/Docker)"
workspace = false
command = "python3"
args = ["scripts/shardline/verify_disk_pressure.py", "${@}"]
[tasks.test-e2e]
description = "Run e2e integration tests from the e2e/ folder"
workspace = false
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "cargo"
args = ["nextest", "run", "--locked", "--all-features", "${@}"]
cwd = "e2e"
[tasks.test-docker]
description = "Run Docker-backed server integration and end-to-end tests"
workspace = false
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "bash"
args = ["-c", "docker version >/dev/null && cargo nextest run --locked -p shardline-server --features docker && (cd e2e && cargo nextest run --locked --all-features)"]
[tasks.test-kubernetes]
description = "Run the disposable kind deployment smoke test"
workspace = false
command = "bash"
args = ["scripts/k8s/kind-smoke.sh"]
[tasks.test-infrastructure]
description = "Run Docker-backed tests followed by the disposable Kubernetes smoke test"
workspace = false
command = "bash"
args = ["-c", "cargo make test-docker && cargo make test-kubernetes"]
[tasks.verify-release-binary]
description = "Build the release shardline binary and smoke-test the packaged entrypoint"
workspace = false
command = "bash"
args = ["scripts/verify-release-binary.sh"]
[tasks.test-maintenance-contracts]
description = "Exercise durable maintenance, native proofs and interrupted-worker fencing using the release executable"
workspace = false
command = "cargo"
args = ["test", "--release", "-p", "shardline", "--test", "maintenance_e2e", "--test", "legacy_cli_api", "--locked", "${@}"]
[tasks.publish-order]
description = "Print the derived crates.io publish order (bottom-up, from cargo metadata)"
workspace = false
command = "python3"
args = ["scripts/publish-order.py"]
[tasks.clippy]
description = "Run clippy with strict rules on the shardline workspace"
workspace = false
command = "cargo"
args = ["clippy", "--workspace", "--all-targets", "--all-features", "--locked", "--exclude", "shardline-xet-core", "--", "-D", "warnings", "${@}"]
[tasks.udeps]
description = "Find unused dependencies (requires nightly)"
workspace = false
install_crate = "cargo-udeps"
command = "cargo"
args = ["+nightly", "udeps"]
[tasks.bloat]
description = "Analyze binary size and bloat"
workspace = false
install_crate = "cargo-bloat"
command = "cargo"
args = ["bloat", "--release", "${@}"]
[tasks.expand]
description = "Expand macros to see generated code"
workspace = false
install_crate = "cargo-expand"
command = "cargo"
args = ["expand", "${@}"]
[tasks.shardline-bench-protocol]
description = "Run shardline protocol microbenchmarks"
workspace = false
command = "cargo"
args = ["bench", "-p", "shardline-protocol", "--bench", "protocol_core", "--", "--noplot", "${@}"]
[tasks.shardline-bench-local-backend]
description = "Run shardline local-backend microbenchmarks"
workspace = false
command = "cargo"
args = ["bench", "-p", "shardline-server", "--bench", "local_backend", "--", "--noplot", "${@}"]
[tasks.shardline-bench-e2e]
description = "Run the shardline deterministic end-to-end benchmark suite"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "e2e", "${@}"]
[tasks.shardline-bench-matrix]
description = "Record the reproducible concurrency benchmark matrix"
workspace = false
command = "bash"
args = ["scripts/benchmark-matrix.sh", "${@}"]
[tasks.shardline-bench-ingest]
description = "Run the shardline zero-storage ingest benchmark suite"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "e2e", "--mode", "ingest", "${@}"]
[tasks.minio-up]
description = "Ensure the local MinIO service and bucket bootstrap (shardline) are running"
workspace = false
command = "bash"
args = ["-c", "docker compose up -d minio minio-init"]
[tasks.shardline-bench-s3]
description = "Run the S3 I/O performance baseline (put/get + multipart) against local MinIO"
workspace = false
dependencies = ["minio-up"]
command = "cargo"
args = ["bench", "-p", "shardline-bench", "--bench", "s3_io", "--", "--noplot", "${@}"]
[tasks.shardline-bench-reconstruction]
description = "Run the shardline reconstruction throughput baseline"
workspace = false
command = "cargo"
args = ["bench", "-p", "shardline-bench", "--bench", "reconstruction", "--", "--noplot", "${@}"]
[tasks.shardline-bench-baseline]
description = "Run the full performance baseline (reconstruction + S3 I/O)"
workspace = false
dependencies = ["shardline-bench-reconstruction", "shardline-bench-s3"]
[tasks.shardline-bench-duckdb]
description = "Compare bounded Hub queries with external DuckDB scans"
workspace = false
command = "bash"
args = ["scripts/benchmark-duckdb-query.sh", "${@}"]
[tasks.shardline-perf-e2e]
description = "Record a perf profile for the optimized shardline end-to-end benchmark suite"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "perf-e2e", "${@}"]
[tasks.shardline-perf-ingest]
description = "Record a perf profile for the optimized shardline zero-storage ingest benchmark suite"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "perf-e2e", "--mode", "ingest", "${@}"]
[tasks.shardline-perf-upload]
description = "Record a perf profile for the shardline initial upload hot path"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "perf-e2e", "--scenario", "initial-upload", "${@}"]
[tasks.shardline-perf-reconstruction]
description = "Record a perf profile for the shardline latest reconstruction hot path"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "perf-e2e", "--scenario", "latest-download", "${@}"]
[tasks.shardline-perf-range]
description = "Record a perf profile for the shardline ranged reconstruction planning hot path"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "perf-e2e", "--scenario", "ranged-reconstruction", "${@}"]
[tasks.shardline-perf-dedupe]
description = "Record a perf profile for the shardline cross-repository dedupe upload hot path"
workspace = false
command = "bash"
args = ["scripts/shardline/perf.sh", "perf-e2e", "--scenario", "cross-repository-upload", "${@}"]
[tasks.shardline-fuzz-list]
description = "List shardline fuzz targets"
workspace = false
command = "bash"
args = ["scripts/shardline/fuzz.sh", "list"]
[tasks.shardline-fuzz]
description = "Run a shardline fuzz target from the repository root"
workspace = false
command = "bash"
args = ["scripts/shardline/fuzz.sh", "run", "${@}"]
[tasks.shardline-fuzz-smoke]
description = "Run bounded shardline fuzz passes across every shardline target"
workspace = false
command = "bash"
args = ["scripts/shardline/fuzz.sh", "smoke", "${@}"]
[tasks.shardline-fuzz-regression]
description = "Replay each checked-in Shardline fuzz corpus"
workspace = false
command = "bash"
args = ["scripts/shardline/fuzz.sh", "regression", "${@}"]
[tasks.shardline-fuzz-reliability]
description = "Run StateChronicle/Penelope reliability fuzz campaigns"
workspace = false
command = "bash"
args = ["scripts/shardline/fuzz.sh", "reliability", "${@}"]
[tasks.shardline-fuzz-reliability-list]
description = "List StateChronicle/Penelope reliability fuzz targets"
workspace = false
command = "bash"
args = ["scripts/shardline/fuzz.sh", "reliability-list"]
[tasks.deny]
description = "Check licenses and security advisories"
workspace = false
install_crate = "cargo-deny"
command = "cargo"
args = ["deny", "check"]
[tasks.deny-e2e]
description = "Check the separate E2E dependency graph against the repository security policy"
workspace = false
command = "cargo"
# Both supported cargo-deny CLI layouts discover the repository policy above
# the E2E manifest; --config moved between command levels in newer releases.
args = ["deny", "--manifest-path", "e2e/Cargo.toml", "check"]
[tasks.check-dependency-exceptions]
description = "Fail CI when a dependency-security exception lacks ownership or has expired"
workspace = false
command = "bash"
args = ["scripts/check_dependency_exceptions.sh"]
[tasks.coverage]
description = "Print LLVM source-based workspace coverage summary"
workspace = false
install_crate = "cargo-llvm-cov"
install_crate_args = ["--locked"]
command = "cargo"
args = ["llvm-cov", "--workspace", "--all-features", "--exclude", "shardline-fuzz", "--summary-only", "${@}"]
[tasks.coverage-html]
description = "Generate an LLVM source-based HTML coverage report"
workspace = false
install_crate = "cargo-llvm-cov"
install_crate_args = ["--locked"]
command = "cargo"
args = ["llvm-cov", "--workspace", "--all-features", "--exclude", "shardline-fuzz", "--html", "${@}"]
[tasks.coverage-json]
description = "Write workspace and database-gated LLVM coverage to target/coverage.json"
workspace = false
command = "bash"
args = ["scripts/run_coverage_json.sh", "${@}"]
[tasks.coverage-check]
description = "Generate coverage and enforce the checked-in line-coverage ratchet"
workspace = false
dependencies = ["coverage-json"]
command = "bash"
args = ["scripts/check_coverage_ratchet.sh"]
[tasks.ci]
description = "Run the core contributor CI checks"
workspace = false
dependencies = ["format-check", "clippy", "check-dependency-exceptions", "deny", "deny-e2e", "test", "test-reliability-contracts", "test-maintenance-contracts", "verify-release-binary", "check-migration-sync"]
[tasks.ci-full]
description = "Run contributor CI plus dependency policy checks"
workspace = false
dependencies = ["ci"]
[tasks.ci-hardening]
description = "Run full CI plus hardening checks (overflow detection, MIRI, ASan, loom)"
workspace = false
dependencies = ["ci-full", "test-overflow", "test-miri", "test-asan", "test-loom"]
[tasks.test-loom]
description = "Run Loom concurrency model-checking tests"
workspace = false
command = "bash"
args = ["-c", "RUSTFLAGS='--cfg loom' cargo nextest run -p shardline-loom-tests"]
[tasks.test-overflow]
description = "Run tests with integer overflow detection enabled"
workspace = false
command = "cargo"
args = ["test", "--workspace", "--all-features", "--exclude", "shardline-fuzz", "--lib"]
env = { RUSTFLAGS = "-C overflow-checks=on" }
[tasks.test-miri]
description = "Run MIRI on crates with unsafe code to detect undefined behavior"
workspace = false
install_crate = "cargo-miri"
command = "bash"
args = ["-c", "echo 'MIRI: checking config/secrets.rs unsafe blocks...' && cargo +nightly miri test -p shardline-server --lib -- config::secrets 2>&1 || { if [ \"${CI:-}\" = \"true\" ]; then exit 1; else echo 'MIRI skipped (requires nightly + specific target)'; fi; }"]
[tasks.test-asan]
description = "Run tests with AddressSanitizer to detect memory errors"
workspace = false
command = "bash"
args = ["-c", "echo 'ASan: checking server-core validation...' && RUSTFLAGS='-Zsanitizer=address' cargo +nightly test -p shardline-server-core --lib -Zbuild-std --target x86_64-unknown-linux-gnu -- validation 2>&1 || { if [ \"${CI:-}\" = \"true\" ]; then exit 1; else echo 'ASan skipped (requires nightly + build-std + target)'; fi; }"]
[tasks.check-migration-sync]
description = "Verify Postgres and SQLite migration versions are in sync"
workspace = false
command = "bash"
args = ["scripts/check_migration_sync.sh"]
[tasks.sqlx]
description = "Run raw SQLx CLI commands"
workspace = false
install_crate = "sqlx-cli"
command = "sqlx"
args = ["${@}"]
[tasks.chaos-test]
description = "Run the deterministic chaos-testing orchestrator (fault injection + invariant checks)"
workspace = false
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "cargo"
args = ["nextest", "run", "-p", "shardline-server", "--test", "chaos_runner", "${@}"]
[tasks.chaos-deployment]
description = "Boot the shardline-chaos stack, migrate, and run real-deployment chaos drills"
workspace = false
install_crate = "cargo-nextest@0.9.123"
install_crate_args = ["--locked", "--force"]
command = "bash"
args = [
"-c",
"cargo build -p shardline && docker compose -f docker-compose.chaos.yml -p shardline-chaos up -d && bash scripts/shardline/wait_for_chaos_stack.sh && target/debug/shardline db migrate up --database-url postgres://shardline:shardline-dev-password@127.0.0.1:15432/shardline && cargo nextest run -p shardline-server --features docker --test deployment_chaos --no-fail-fast && cargo nextest run -p shardline-server --features docker --test fault_drills -E 'test(drill3)' && cargo nextest run -p shardline-server --features docker --test fault_drills_extreme -E 'test(drill_extreme_4)'",
]