From 38411324972447c1518ca49af3ed843e774c995d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 13:39:51 +0000 Subject: [PATCH 1/7] ci: cut test job time with shared caches, nextest, and a Windows Dev Drive PR CI never restored a usable cache: CI ran only on pull_request, and a PR can only read caches from its own ref or the base branch. Every PR built cold, and the Windows job then spent 21 minutes compressing a multi-GB target/ only to fail to save it. - Run CI on push to dev so dev seeds the caches PRs restore. - Replace actions/cache with Swatinem/rust-cache (dependency builds only), saved only from dev. - Cancel superseded PR runs. - Test job: line-tables-only debug info, cargo-nextest so test binaries run concurrently, doctests via `cargo test --doc`. - Windows: put target/ and TMP on a ReFS Dev Drive; atomic_repository unit tests took 11m there vs 54s on Linux. nextest runs each test in its own process, which the in-process #[serial] lock does not cover. Switch every #[serial] to #[file_serial] (serial_test's file_locks feature) so tests that touch shared state such as redb stay mutually exclusive across processes and test binaries. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- .config/nextest.toml | 12 +++ .github/workflows/ci.yml | 107 +++++++++++++---------- Cargo.lock | 11 +++ Cargo.toml | 2 +- atomic-agent/src/integrations/install.rs | 46 +++++----- atomic-cli/src/commands/add.rs | 36 ++++---- atomic-cli/src/commands/change/tests.rs | 18 ++-- atomic-cli/src/commands/delegation.rs | 28 +++--- atomic-cli/src/commands/diff/tests.rs | 32 +++---- atomic-cli/src/commands/git/import.rs | 18 ++-- atomic-cli/src/commands/init.rs | 6 +- atomic-cli/src/commands/log/tests.rs | 28 +++--- atomic-cli/src/commands/org/set.rs | 16 ++-- atomic-cli/src/commands/query/mod.rs | 2 +- atomic-cli/src/commands/record/tests.rs | 24 ++--- atomic-cli/src/commands/status.rs | 16 ++-- atomic-cli/src/commands/tag/create.rs | 10 +-- atomic-cli/src/commands/tag/delete.rs | 8 +- atomic-cli/src/commands/tag/list.rs | 10 +-- atomic-cli/src/commands/tag/show.rs | 8 +- atomic-cli/src/commands/view/delete.rs | 10 +-- atomic-cli/src/commands/view/list.rs | 12 +-- atomic-cli/src/commands/view/new.rs | 14 +-- atomic-cli/src/commands/view/switch.rs | 12 +-- atomic-cli/src/commands/workspace/set.rs | 16 ++-- atomic-cli/tests/provenance_rpc_sink.rs | 8 +- 26 files changed, 274 insertions(+), 236 deletions(-) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 00000000..cf77061a --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,12 @@ +# cargo-nextest configuration. CI runs `cargo nextest run --profile ci`. +# +# nextest runs every test in its own process, so tests in different binaries +# run concurrently. Tests that must not overlap use `#[file_serial]`, whose +# lock is a file shared by every process, not the in-process `#[serial]`. + +[profile.ci] +# Report every failing test instead of stopping at the first. +fail-fast = false +# Name long-running tests in the log so they can be tracked down. +slow-timeout = { period = "60s" } +failure-output = "immediate-final" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98866349..a90211a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,17 @@ on: paths-ignore: - '**.md' - '**.markdown' + # Pull requests can only restore caches saved by their own ref or by the base + # branch, so `dev` has to run CI to seed the caches every PR starts from. + push: + branches: [dev] + paths-ignore: + - '**.md' + - '**.markdown' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: CARGO_TERM_COLOR: always @@ -20,16 +31,10 @@ jobs: - uses: dtolnay/rust-toolchain@stable - - name: Cache cargo registry and build - uses: actions/cache@v4 + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-check- + save-if: ${{ github.ref == 'refs/heads/dev' }} - name: cargo check run: cargo check --workspace @@ -41,9 +46,34 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + env: + # Line tables keep file:line in backtraces but link far faster and keep + # target/ (and the cache) much smaller than full debug info. + CARGO_PROFILE_DEV_DEBUG: line-tables-only + CARGO_PROFILE_TEST_DEBUG: line-tables-only steps: - uses: actions/checkout@v4 + # Filesystem-heavy tests run ~12x slower on Windows than on Linux + # (atomic_repository unit tests: 11m vs 54s). A ReFS Dev Drive skips + # NTFS overhead and runs Defender in performance mode, so the build + # and the tests' temp directories live there. + - name: Set up Dev Drive + if: runner.os == 'Windows' + uses: samypr100/setup-dev-drive@v4 + with: + drive-size: 14GB + mount-path: ${{ runner.workspace }}/devdrive + env-mapping: | + CARGO_TARGET_DIR,{{ DEV_DRIVE }}/target + TMP,{{ DEV_DRIVE }}/tmp + TEMP,{{ DEV_DRIVE }}/tmp + + - name: Create Dev Drive temp directory + if: runner.os == 'Windows' + shell: pwsh + run: New-Item -ItemType Directory -Force -Path $env:TMP | Out-Null + - uses: dtolnay/rust-toolchain@stable - uses: actions/setup-node@v4 @@ -53,23 +83,26 @@ jobs: - name: Test native runtime packaging run: node --test libatomic/scripts/package-runtime.test.mjs - - name: Cache cargo registry and build - uses: actions/cache@v4 + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-test- + workspaces: ${{ runner.os == 'Windows' && '. -> ../devdrive/target' || '. -> target' }} + save-if: ${{ github.ref == 'refs/heads/dev' }} + + - uses: taiki-e/install-action@v2 + with: + tool: cargo-nextest - name: Run tests # Temporary PR #207 policy: Git shim integration suites are Unix-only # (cfg(unix)); Linux/macOS still run them. Keep Windows native tests on. # Re-enable the shim suites after Windows support is defined and its # path/mode/locking behavior is validated; see the RFC platform policy. - run: cargo test --workspace --features atomic-cli/adoption-test-injection --no-fail-fast + run: cargo nextest run --workspace --features atomic-cli/adoption-test-injection --profile ci + + # nextest does not run doctests. + - name: Run doctests + run: cargo test --workspace --doc --features atomic-cli/adoption-test-injection --no-fail-fast - name: Run CLI semantic diff harness if: matrix.os == 'ubuntu-latest' @@ -104,16 +137,10 @@ jobs: with: components: clippy - - name: Cache cargo registry and build - uses: actions/cache@v4 + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-clippy- + save-if: ${{ github.ref == 'refs/heads/dev' }} - name: cargo clippy run: cargo clippy --workspace -- -D warnings @@ -126,16 +153,10 @@ jobs: - uses: dtolnay/rust-toolchain@stable - - name: Cache cargo registry and build - uses: actions/cache@v4 + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-doc- + save-if: ${{ github.ref == 'refs/heads/dev' }} - name: cargo doc run: cargo doc --workspace --no-deps @@ -150,16 +171,10 @@ jobs: - uses: dtolnay/rust-toolchain@1.90 - - name: Cache cargo registry and build - uses: actions/cache@v4 + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-msrv- + save-if: ${{ github.ref == 'refs/heads/dev' }} - name: cargo check (shared library MSRV) run: cargo check --workspace --exclude atomic-cli --exclude atomic-shacl --locked diff --git a/Cargo.lock b/Cargo.lock index b210dc7d..561cfba3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1412,6 +1412,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fslock" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "futures" version = "0.1.31" @@ -3743,6 +3753,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "699f4197115b8a7e7ff19c9a315a4bd6fffec26cc4626ef45ecaea389e081c6d" dependencies = [ + "fslock", "futures-executor", "futures-util", "log", diff --git a/Cargo.toml b/Cargo.toml index 8cf50050..9ab35e97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -146,7 +146,7 @@ git2 = { version = "0.19", features = ["vendored-openssl"] } # Testing quickcheck = "1.0" quickcheck_macros = "1.0" -serial_test = "3.1" +serial_test = { version = "3.1", features = ["file_locks"] } [profile.release] lto = true diff --git a/atomic-agent/src/integrations/install.rs b/atomic-agent/src/integrations/install.rs index a025f4d5..256424b1 100644 --- a/atomic-agent/src/integrations/install.rs +++ b/atomic-agent/src/integrations/install.rs @@ -715,7 +715,7 @@ fn reject_parent_traversal(agent: &str, src: &str) -> AgentResult<()> { mod tests { use super::*; use crate::integrations::MANIFEST_FILE; - use serial_test::serial; + use serial_test::file_serial; /// Render a filesystem path for embedding in a TOML basic (double-quoted) /// string. On Windows, paths contain backslashes, which TOML treats as @@ -791,7 +791,7 @@ manifest = "hooks/hooks.json" } #[test] - #[serial] + #[file_serial] fn installs_files_and_settings_and_receipt() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -828,7 +828,7 @@ manifest = "hooks/hooks.json" } #[test] - #[serial] + #[file_serial] fn reinstall_refreshes_ours_but_skips_foreign_and_modified() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -877,7 +877,7 @@ manifest = "hooks/hooks.json" } #[test] - #[serial] + #[file_serial] fn force_overwrites_foreign_files() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -897,7 +897,7 @@ manifest = "hooks/hooks.json" } #[test] - #[serial] + #[file_serial] fn uninstall_removes_ours_keeps_modified_and_strips_hooks() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -937,7 +937,7 @@ manifest = "hooks/hooks.json" } #[test] - #[serial] + #[file_serial] fn agent_mismatch_rejected() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -950,7 +950,7 @@ manifest = "hooks/hooks.json" } #[test] - #[serial] + #[file_serial] fn parent_traversal_src_rejected() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1051,7 +1051,7 @@ dst = "{0}/skills/atomic-vault/SKILL.md" } #[test] - #[serial] + #[file_serial] fn installs_skills_from_cache() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1074,7 +1074,7 @@ dst = "{0}/skills/atomic-vault/SKILL.md" } #[test] - #[serial] + #[file_serial] fn skills_without_cache_errors() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1087,7 +1087,7 @@ dst = "{0}/skills/atomic-vault/SKILL.md" } #[test] - #[serial] + #[file_serial] fn installs_repo_file_into_repo_root() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1127,7 +1127,7 @@ dst = "AGENTS.md" } #[test] - #[serial] + #[file_serial] fn repo_file_skipped_without_repo_root() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1163,7 +1163,7 @@ dst = "AGENTS.md" } #[test] - #[serial] + #[file_serial] fn repo_file_rejects_absolute_dst() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1199,7 +1199,7 @@ dst = "/etc/passwd" } #[test] - #[serial] + #[file_serial] fn repo_file_rejects_traversal_dst() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1233,7 +1233,7 @@ dst = "../escape.md" } #[test] - #[serial] + #[file_serial] fn stitches_agent_definition_at_install() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1287,7 +1287,7 @@ slot = "{0}/agents/atomic.md" } #[test] - #[serial] + #[file_serial] fn agent_definition_without_cache_errors() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1324,7 +1324,7 @@ slot = "{0}/agents/atomic.md" } #[test] - #[serial] + #[file_serial] fn repo_file_uninstall_removes_from_repo() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1363,7 +1363,7 @@ dst = "AGENTS.md" } #[test] - #[serial] + #[file_serial] fn repo_file_merges_with_existing_user_file() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1414,7 +1414,7 @@ dst = "AGENTS.md" } #[test] - #[serial] + #[file_serial] fn repo_file_refreshes_when_atomic_marker_present() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1460,7 +1460,7 @@ dst = "AGENTS.md" } #[test] - #[serial] + #[file_serial] fn repo_file_force_clobbers_user_file() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1503,7 +1503,7 @@ dst = "AGENTS.md" } #[test] - #[serial] + #[file_serial] fn skills_glob_installs_all_from_cache() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1547,7 +1547,7 @@ dst_pattern = "{0}/skills/{{name}}/SKILL.md" } #[test] - #[serial] + #[file_serial] fn skills_glob_flat_pattern() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1589,7 +1589,7 @@ dst_pattern = "{0}/workflows/{{name}}.md" } #[test] - #[serial] + #[file_serial] fn skills_glob_picks_up_new_skill_automatically() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); @@ -1645,7 +1645,7 @@ dst_pattern = "{0}/skills/{{name}}/SKILL.md" } #[test] - #[serial] + #[file_serial] fn skills_glob_errors_without_name_placeholder() { let home = tempfile::tempdir().unwrap(); std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path()); diff --git a/atomic-cli/src/commands/add.rs b/atomic-cli/src/commands/add.rs index fdb06858..780f1f1d 100644 --- a/atomic-cli/src/commands/add.rs +++ b/atomic-cli/src/commands/add.rs @@ -703,7 +703,7 @@ fn format_count(count: usize, singular: &str, plural: &str) -> String { #[cfg(test)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; use std::path::{Path, PathBuf}; // Add Command Construction Tests @@ -913,7 +913,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_outside_repository() { let _guard = DirGuard::new(); @@ -928,7 +928,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_file_not_found() { let _guard = DirGuard::new(); @@ -950,7 +950,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_single_file() { let _guard = DirGuard::new(); @@ -974,7 +974,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_multiple_files() { let _guard = DirGuard::new(); @@ -999,7 +999,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_directory() { let _guard = DirGuard::new(); @@ -1026,7 +1026,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_dry_run() { let _guard = DirGuard::new(); @@ -1056,7 +1056,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_already_tracked() { let _guard = DirGuard::new(); @@ -1085,7 +1085,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_with_force() { let _guard = DirGuard::new(); @@ -1109,7 +1109,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_non_recursive() { let _guard = DirGuard::new(); @@ -1139,7 +1139,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_all_untracked() { let _guard = DirGuard::new(); @@ -1164,7 +1164,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_all_no_untracked() { let _guard = DirGuard::new(); @@ -1190,7 +1190,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_run_nested_directory() { let _guard = DirGuard::new(); @@ -1221,7 +1221,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_cannot_add_atomic_dir() { let _guard = DirGuard::new(); @@ -1299,7 +1299,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_with_path_containing_spaces() { let _guard = DirGuard::new(); @@ -1327,7 +1327,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_with_unicode_filename() { let _guard = DirGuard::new(); @@ -1355,7 +1355,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_verify_tracking_after_add() { let _guard = DirGuard::new(); @@ -1384,7 +1384,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_add_dry_run_does_not_track() { let _guard = DirGuard::new(); diff --git a/atomic-cli/src/commands/change/tests.rs b/atomic-cli/src/commands/change/tests.rs index f9ec7525..d158e95b 100644 --- a/atomic-cli/src/commands/change/tests.rs +++ b/atomic-cli/src/commands/change/tests.rs @@ -546,7 +546,7 @@ mod tests { // Integration Tests - use serial_test::serial; + use serial_test::file_serial; use std::env; use tempfile::TempDir; @@ -574,7 +574,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_outside_repository() { let _guard = TestGuard::new(); @@ -590,7 +590,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_empty_repository() { let _guard = TestGuard::new(); @@ -605,7 +605,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_invalid_sequence() { let _guard = TestGuard::new(); @@ -619,7 +619,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_nonexistent_view() { let _guard = TestGuard::new(); @@ -634,7 +634,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_json_format() { let _guard = TestGuard::new(); @@ -648,7 +648,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_short_format() { let _guard = TestGuard::new(); @@ -662,7 +662,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_with_show_deps() { let _guard = TestGuard::new(); @@ -676,7 +676,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_change_run_with_show_hunks() { let _guard = TestGuard::new(); diff --git a/atomic-cli/src/commands/delegation.rs b/atomic-cli/src/commands/delegation.rs index 64711131..aff59629 100644 --- a/atomic-cli/src/commands/delegation.rs +++ b/atomic-cli/src/commands/delegation.rs @@ -351,7 +351,7 @@ mod tests { /// The automation path: a runner is handed a grant in the environment and /// needs nothing installed. #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn a_grant_in_the_environment_is_used() { let f = fixture(); let terms = Delegation::new(&f.human, &f.agent, scope_for("https://atomic.storage")) @@ -371,7 +371,7 @@ mod tests { /// A grant issued to someone else must not be usable just because it is in /// the environment. #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn a_grant_for_another_agent_is_refused() { let f = fixture(); let other = Identity::builder("alice+gemini") @@ -394,7 +394,7 @@ mod tests { /// the store — silently using a different grant than the one asked for is /// how an agent ends up with a scope nobody intended. #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn a_broken_environment_grant_does_not_fall_back() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -412,7 +412,7 @@ mod tests { /// An empty variable is treated as unset, so `ATOMIC_DELEGATION=` in a /// shell profile does not break an otherwise working setup. #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn an_empty_environment_variable_is_ignored() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -425,7 +425,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn finds_the_certificate_for_this_agent() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -436,7 +436,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn ignores_certificates_belonging_to_another_agent() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -451,7 +451,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn no_certificate_says_how_to_issue_one() { let f = fixture(); let err = active_for(&f.store, &f.agent, None).unwrap_err(); @@ -461,7 +461,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn an_expired_certificate_says_renew_not_issue() { let f = fixture(); // expires_in with a negative duration puts expiry in the past. @@ -474,7 +474,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn a_locally_revoked_certificate_is_refused() { let f = fixture(); let id = issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -485,7 +485,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn a_certificate_for_another_server_is_refused_with_the_scope_shown() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -500,7 +500,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn a_tampered_certificate_is_skipped_not_trusted() { let f = fixture(); let id = issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -517,7 +517,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn permission_check_names_the_missing_permission() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -544,7 +544,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn permission_check_names_the_out_of_scope_project() { let f = fixture(); issue(&f, scope_for("https://atomic.storage"), Duration::days(30)); @@ -563,7 +563,7 @@ mod tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn the_freshest_certificate_wins() { let f = fixture(); issue(&f, DelegationScope::read_only(), Duration::days(30)); diff --git a/atomic-cli/src/commands/diff/tests.rs b/atomic-cli/src/commands/diff/tests.rs index 775d91a2..4340a806 100644 --- a/atomic-cli/src/commands/diff/tests.rs +++ b/atomic-cli/src/commands/diff/tests.rs @@ -1183,7 +1183,7 @@ mod tests { // Integration Tests (require temp directories) - use serial_test::serial; + use serial_test::file_serial; /// Guard that restores the current directory when dropped. struct DirGuard { @@ -1205,7 +1205,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_run_outside_repository() { let _guard = DirGuard::new(); @@ -1220,7 +1220,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_run_no_changes() { let _guard = DirGuard::new(); @@ -1242,7 +1242,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_run_with_untracked_file() { let _guard = DirGuard::new(); @@ -1266,7 +1266,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_short_flag() { let _guard = DirGuard::new(); @@ -1291,7 +1291,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_untracked_flag() { let _guard = DirGuard::new(); @@ -1325,7 +1325,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_run_with_added_file() { let _guard = DirGuard::new(); @@ -1351,7 +1351,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_run_name_only_format() { let _guard = DirGuard::new(); @@ -1376,7 +1376,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_run_stat_format() { let _guard = DirGuard::new(); @@ -1401,7 +1401,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_end_to_end_modified_file() { let _guard = DirGuard::new(); @@ -1475,7 +1475,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_end_to_end_multiple_files() { let _guard = DirGuard::new(); @@ -1672,7 +1672,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_with_specific_file() { let _guard = DirGuard::new(); @@ -1701,7 +1701,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_patience_algorithm() { let _guard = DirGuard::new(); @@ -1727,7 +1727,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_no_color() { let _guard = DirGuard::new(); @@ -1752,7 +1752,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_word_diff_enabled() { let _guard = DirGuard::new(); @@ -1794,7 +1794,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_diff_custom_context_lines() { let _guard = DirGuard::new(); diff --git a/atomic-cli/src/commands/git/import.rs b/atomic-cli/src/commands/git/import.rs index bc393183..31c882fd 100644 --- a/atomic-cli/src/commands/git/import.rs +++ b/atomic-cli/src/commands/git/import.rs @@ -1488,7 +1488,7 @@ mod tests { use std::process::Command as ProcessCommand; use atomic_core::types::Base32; - use serial_test::serial; + use serial_test::file_serial; use super::*; @@ -1538,7 +1538,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn forged_self_push_header_is_rejected_without_atomic_mutation() { let root = tempfile::tempdir().unwrap(); init_git(root.path()); @@ -1560,7 +1560,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn forged_squash_header_is_rejected_without_atomic_mutation() { let root = tempfile::tempdir().unwrap(); init_git(root.path()); @@ -1581,7 +1581,7 @@ mod tests { #[cfg(unix)] #[test] - #[serial] + #[file_serial] fn stale_mode_link_and_empty_projection_is_rejected_without_atomic_mutation() { use std::os::unix::fs::{symlink, PermissionsExt}; @@ -1617,7 +1617,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn required_filter_failure_rejects_incremental_import_without_view_mutation() { let _dir_guard = DirGuard::new(); let root = tempfile::tempdir().unwrap(); @@ -1691,7 +1691,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -1769,7 +1769,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -1808,7 +1808,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -1853,7 +1853,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" diff --git a/atomic-cli/src/commands/init.rs b/atomic-cli/src/commands/init.rs index d0951169..8087d786 100644 --- a/atomic-cli/src/commands/init.rs +++ b/atomic-cli/src/commands/init.rs @@ -780,7 +780,7 @@ fn add_vault_files_recursive(repo: &Repository, dir: &std::path::Path) -> CliRes #[cfg(test)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; use tempfile::TempDir; // ------------------------------------------------------------------------- @@ -1154,7 +1154,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_resolve_path_relative() { let temp = TempDir::new().unwrap(); let original_dir = std::env::current_dir().unwrap(); @@ -1170,7 +1170,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_resolve_path_dot() { let temp = TempDir::new().unwrap(); let original_dir = std::env::current_dir().unwrap(); diff --git a/atomic-cli/src/commands/log/tests.rs b/atomic-cli/src/commands/log/tests.rs index 15a10f66..655d3eed 100644 --- a/atomic-cli/src/commands/log/tests.rs +++ b/atomic-cli/src/commands/log/tests.rs @@ -656,7 +656,7 @@ mod tests { // Integration Tests (Repository) - use serial_test::serial; + use serial_test::file_serial; use std::env; use std::fs; use tempfile::TempDir; @@ -686,7 +686,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_outside_repository() { let _guard = TestGuard::new(); @@ -703,7 +703,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_empty_repository() { let _guard = TestGuard::new(); @@ -718,7 +718,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_with_nonexistent_view() { let _guard = TestGuard::new(); @@ -738,7 +738,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_json_empty() { let _guard = TestGuard::new(); @@ -752,7 +752,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_short_format_empty() { let _guard = TestGuard::new(); @@ -766,7 +766,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_oneline_format_empty() { let _guard = TestGuard::new(); @@ -780,7 +780,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_with_count() { let _guard = TestGuard::new(); @@ -794,7 +794,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_with_reverse() { let _guard = TestGuard::new(); @@ -808,7 +808,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_with_from_sequence() { let _guard = TestGuard::new(); @@ -824,7 +824,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_with_tags_only() { let _guard = TestGuard::new(); @@ -838,7 +838,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_with_full_hash() { let _guard = TestGuard::new(); @@ -852,7 +852,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_combined_options() { let _guard = TestGuard::new(); @@ -870,7 +870,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_log_run_in_subdirectory() { let _guard = TestGuard::new(); diff --git a/atomic-cli/src/commands/org/set.rs b/atomic-cli/src/commands/org/set.rs index 899df4a4..e55fbc49 100644 --- a/atomic-cli/src/commands/org/set.rs +++ b/atomic-cli/src/commands/org/set.rs @@ -231,10 +231,10 @@ mod tests { // save steps in future refactors. // // Tests touch HOME to redirect `GlobalConfig::{load,save}` at an - // isolated config dir, so `#[serial]` is required. + // isolated config dir, so `#[file_serial]` is required. // ----------------------------------------------------------------- - use serial_test::serial; + use serial_test::file_serial; /// Redirect `ATOMIC_CONFIG_DIR` to a tempdir for the lifetime of the guard, /// isolating `GlobalConfig` load/save from the real user config. Restores @@ -252,8 +252,8 @@ mod tests { let tmp = tempfile::tempdir().unwrap(); let original = std::env::var_os("ATOMIC_CONFIG_DIR"); // SAFETY: env mutation is technically UB under concurrent access. - // `#[serial]` serializes these tests, and no other test reads - // ATOMIC_CONFIG_DIR outside its own `#[serial]` block. + // `#[file_serial]` serializes these tests, and no other test reads + // ATOMIC_CONFIG_DIR outside its own `#[file_serial]` block. unsafe { std::env::set_var("ATOMIC_CONFIG_DIR", tmp.path()); } @@ -283,7 +283,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn config_unchanged_when_verifier_fails() { let _guard = HomeGuard::new(); seed_config("old-org"); @@ -312,7 +312,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn writes_to_active_named_profile_not_legacy_block() { // Regression for the "org set doesn't pass through" bug: when a named // profile is active (default_server set), `org set` must mutate that @@ -355,7 +355,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn config_written_when_verifier_succeeds() { let _guard = HomeGuard::new(); seed_config("old-org"); @@ -373,7 +373,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn no_verify_skips_verifier_entirely() { let _guard = HomeGuard::new(); seed_config("old-org"); diff --git a/atomic-cli/src/commands/query/mod.rs b/atomic-cli/src/commands/query/mod.rs index d2ff3807..edc627b6 100644 --- a/atomic-cli/src/commands/query/mod.rs +++ b/atomic-cli/src/commands/query/mod.rs @@ -1658,7 +1658,7 @@ mod enrich_tests { } #[test] - #[serial_test::serial] + #[serial_test::file_serial] fn targeted_enrichment_materializes_a_change_recorded_without_kg_work() { let _guard = DirGuard::new(); let temp = tempfile::tempdir().unwrap(); diff --git a/atomic-cli/src/commands/record/tests.rs b/atomic-cli/src/commands/record/tests.rs index 982cd816..4a839ac6 100644 --- a/atomic-cli/src/commands/record/tests.rs +++ b/atomic-cli/src/commands/record/tests.rs @@ -7,7 +7,7 @@ use atomic_core::change::{AITool, AIVendor, SuggestionType}; #[allow(clippy::module_inception)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; use std::ffi::OsString; use std::path::PathBuf; @@ -381,7 +381,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_record_run_outside_repository() { let _guard = DirGuard::new(); @@ -396,7 +396,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_record_run_nothing_to_record() { let _guard = DirGuard::new(); @@ -418,7 +418,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_record_dry_run_shows_changes() { let _guard = DirGuard::new(); @@ -445,7 +445,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_record_with_message_and_file() { let _guard = DirGuard::new(); @@ -473,7 +473,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_record_with_specific_files() { let _guard = DirGuard::new(); @@ -505,7 +505,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_record_all_includes_untracked() { let _guard = DirGuard::new(); @@ -683,7 +683,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_build_provenance_disabled() { let _env = AiEnvGuard::clear(); let record = Record::new(); @@ -692,7 +692,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_build_provenance_enabled_without_provider() { let _env = AiEnvGuard::clear(); let record = Record::new().with_ai_assisted(true); @@ -840,7 +840,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_build_options_without_provenance() { let _env = AiEnvGuard::clear(); let record = Record::new(); @@ -850,7 +850,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_build_provenance_from_env_var() { let _env = AiEnvGuard::clear(); // Set environment variables @@ -873,7 +873,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_build_provenance_cli_overrides_env() { let _env = AiEnvGuard::clear(); // Set environment variables diff --git a/atomic-cli/src/commands/status.rs b/atomic-cli/src/commands/status.rs index d5cdee38..16316178 100644 --- a/atomic-cli/src/commands/status.rs +++ b/atomic-cli/src/commands/status.rs @@ -1387,7 +1387,7 @@ mod tests { use super::*; use atomic_core::types::Merkle; use atomic_repository::status::{FileStatus, FileStatusEntry}; - use serial_test::serial; + use serial_test::file_serial; use std::path::PathBuf; // Status Command Construction Tests @@ -1817,7 +1817,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_run_outside_repository() { let _guard = DirGuard::new(); @@ -1833,7 +1833,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_run_in_repository() { let _guard = DirGuard::new(); @@ -1863,7 +1863,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_run_short_format() { let _guard = DirGuard::new(); @@ -1894,7 +1894,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_run_no_untracked() { let _guard = DirGuard::new(); @@ -1928,7 +1928,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_run_with_path_filter() { let _guard = DirGuard::new(); @@ -1963,7 +1963,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_in_subdirectory() { let _guard = DirGuard::new(); @@ -1999,7 +1999,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_status_with_multiple_file_types() { let _guard = DirGuard::new(); diff --git a/atomic-cli/src/commands/tag/create.rs b/atomic-cli/src/commands/tag/create.rs index a2ca3363..aa9519bf 100644 --- a/atomic-cli/src/commands/tag/create.rs +++ b/atomic-cli/src/commands/tag/create.rs @@ -310,7 +310,7 @@ fn project_tag_to_git_if_colocated( #[cfg(test)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Author Parsing Tests @@ -436,7 +436,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_create_lightweight_tag() { use tempfile::tempdir; @@ -465,7 +465,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_create_annotated_tag() { use tempfile::tempdir; @@ -495,7 +495,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_create_duplicate_tag_fails() { use tempfile::tempdir; @@ -519,7 +519,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_create_with_force_overwrites() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/tag/delete.rs b/atomic-cli/src/commands/tag/delete.rs index dc2be547..945e550f 100644 --- a/atomic-cli/src/commands/tag/delete.rs +++ b/atomic-cli/src/commands/tag/delete.rs @@ -110,7 +110,7 @@ impl Command for Delete { mod tests { use super::*; use atomic_repository::TagKind; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Command Builder Tests @@ -172,7 +172,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_delete_existing_tag() { use tempfile::tempdir; @@ -201,7 +201,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_delete_nonexistent_tag() { use tempfile::tempdir; @@ -224,7 +224,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_delete_preserves_other_tags() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/tag/list.rs b/atomic-cli/src/commands/tag/list.rs index a449d621..1e2b8ac1 100644 --- a/atomic-cli/src/commands/tag/list.rs +++ b/atomic-cli/src/commands/tag/list.rs @@ -209,7 +209,7 @@ impl Command for List { mod tests { use super::*; use atomic_repository::TagKind; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Command Builder Tests @@ -281,7 +281,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_list_empty() { use tempfile::tempdir; @@ -304,7 +304,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_with_tags() { use tempfile::tempdir; @@ -329,7 +329,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_verbose() { use tempfile::tempdir; @@ -353,7 +353,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_annotated_only() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/tag/show.rs b/atomic-cli/src/commands/tag/show.rs index 0438c656..25d56138 100644 --- a/atomic-cli/src/commands/tag/show.rs +++ b/atomic-cli/src/commands/tag/show.rs @@ -289,7 +289,7 @@ pub(crate) fn render_review_gate_records( mod tests { use super::*; use atomic_repository::TagKind; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Command Builder Tests @@ -351,7 +351,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_show_existing_tag() { use tempfile::tempdir; @@ -375,7 +375,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_show_annotated_tag() { use tempfile::tempdir; @@ -400,7 +400,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_show_nonexistent_tag() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/view/delete.rs b/atomic-cli/src/commands/view/delete.rs index 7fdf0b73..5e691297 100644 --- a/atomic-cli/src/commands/view/delete.rs +++ b/atomic-cli/src/commands/view/delete.rs @@ -291,7 +291,7 @@ impl Delete { #[cfg(test)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; fn orphan_repo() -> (tempfile::TempDir, Repository, atomic_core::types::Hash) { use atomic_core::pristine::{MutTxnT, ViewScope, ViewTxnT}; @@ -450,7 +450,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_delete_existing_view() { use tempfile::tempdir; @@ -488,7 +488,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_delete_nonexistent_view() { use tempfile::tempdir; @@ -521,7 +521,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_delete_current_view() { use tempfile::tempdir; @@ -555,7 +555,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_delete_with_force_integration() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/view/list.rs b/atomic-cli/src/commands/view/list.rs index c2b99866..7b9b2b2c 100644 --- a/atomic-cli/src/commands/view/list.rs +++ b/atomic-cli/src/commands/view/list.rs @@ -789,7 +789,7 @@ pub(crate) fn print_local_json(views: &[JsonView], current_view: Option) #[cfg(test)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Directory Guard for Safe Current Dir Changes @@ -1098,7 +1098,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_list_default_view() { use tempfile::tempdir; @@ -1121,7 +1121,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_multiple_views() { use tempfile::tempdir; @@ -1147,7 +1147,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_verbose() { use tempfile::tempdir; @@ -1171,7 +1171,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_shows_current_marker() { use tempfile::tempdir; @@ -1197,7 +1197,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_list_after_switch() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/view/new.rs b/atomic-cli/src/commands/view/new.rs index 75a10cdc..bf66a46d 100644 --- a/atomic-cli/src/commands/view/new.rs +++ b/atomic-cli/src/commands/view/new.rs @@ -503,7 +503,7 @@ pub fn resolve_overlay_creation( #[cfg(test)] mod tests { use super::*; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Directory Guard for Safe Current Dir Changes @@ -668,7 +668,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_run_creates_view_forked_from_current() { use tempfile::tempdir; @@ -701,7 +701,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_run_creates_empty_view_with_flag() { use tempfile::tempdir; @@ -731,7 +731,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_run_with_switch() { use tempfile::tempdir; @@ -757,7 +757,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_run_duplicate_view() { use tempfile::tempdir; @@ -794,7 +794,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_run_with_explicit_from() { use tempfile::tempdir; @@ -821,7 +821,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_run_from_nonexistent_view_fails() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/view/switch.rs b/atomic-cli/src/commands/view/switch.rs index 13634076..25e6674a 100644 --- a/atomic-cli/src/commands/view/switch.rs +++ b/atomic-cli/src/commands/view/switch.rs @@ -332,7 +332,7 @@ mod tests { use std::process::Command as ProcessCommand; use super::*; - use serial_test::serial; + use serial_test::file_serial; // ------------------------------------------------------------------------- // Directory Guard for Safe Current Dir Changes @@ -438,7 +438,7 @@ mod tests { // ------------------------------------------------------------------------- #[test] - #[serial] + #[file_serial] fn test_switch_to_existing_view() { use tempfile::tempdir; @@ -470,7 +470,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -590,7 +590,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -696,7 +696,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_switch_to_nonexistent_view() { use tempfile::tempdir; @@ -729,7 +729,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn test_switch_to_current_view() { use tempfile::tempdir; diff --git a/atomic-cli/src/commands/workspace/set.rs b/atomic-cli/src/commands/workspace/set.rs index bc36b530..66cf202d 100644 --- a/atomic-cli/src/commands/workspace/set.rs +++ b/atomic-cli/src/commands/workspace/set.rs @@ -258,10 +258,10 @@ mod tests { // future refactors. // // Tests redirect `ATOMIC_CONFIG_DIR` to isolate `GlobalConfig::{load,save}` - // at a tempdir, so `#[serial]` is required. + // at a tempdir, so `#[file_serial]` is required. // ----------------------------------------------------------------- - use serial_test::serial; + use serial_test::file_serial; /// Redirect `ATOMIC_CONFIG_DIR` to a tempdir for the lifetime of the guard, /// isolating `GlobalConfig` from the real user config. `ATOMIC_CONFIG_DIR` @@ -277,8 +277,8 @@ mod tests { let tmp = tempfile::tempdir().unwrap(); let original = std::env::var_os("ATOMIC_CONFIG_DIR"); // SAFETY: env mutation is technically UB under concurrent access. - // `#[serial]` serializes these tests, and no other test reads - // ATOMIC_CONFIG_DIR outside its own `#[serial]` block. + // `#[file_serial]` serializes these tests, and no other test reads + // ATOMIC_CONFIG_DIR outside its own `#[file_serial]` block. unsafe { std::env::set_var("ATOMIC_CONFIG_DIR", tmp.path()); } @@ -313,7 +313,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn config_unchanged_when_verifier_fails() { let _guard = HomeGuard::new(); seed_config("acme", Some(("acme", "old-ws"))); @@ -343,7 +343,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn config_written_when_verifier_succeeds() { let _guard = HomeGuard::new(); seed_config("acme", Some(("acme", "old-ws"))); @@ -365,7 +365,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn no_verify_skips_verifier_entirely() { let _guard = HomeGuard::new(); seed_config("acme", None); @@ -389,7 +389,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn explicit_org_overrides_default_for_target() { // Side-benefit test: writing to a non-default org leaves the // default org's workspace alone. diff --git a/atomic-cli/tests/provenance_rpc_sink.rs b/atomic-cli/tests/provenance_rpc_sink.rs index 61a94017..d31cbda0 100644 --- a/atomic-cli/tests/provenance_rpc_sink.rs +++ b/atomic-cli/tests/provenance_rpc_sink.rs @@ -19,7 +19,7 @@ use std::process::{Child, Command, Stdio}; use std::time::{Duration, Instant}; use atomic_repository::Repository; -use serial_test::serial; +use serial_test::file_serial; use tempfile::TempDir; /// Kills the spawned daemon when dropped — a panic in the test must not @@ -237,7 +237,7 @@ fn run_atomic(args: &[&str], current_dir: &Path, stdin: Option<&[u8]>) -> std::p #[cfg(unix)] #[tokio::test(flavor = "multi_thread", worker_threads = 2)] -#[serial] +#[file_serial] async fn rpc_sink_drives_the_full_trait_flow_over_the_socket() { use libatomic::atomic::{ daemon_service_server::DaemonServiceServer, @@ -360,7 +360,7 @@ async fn rpc_sink_drives_the_full_trait_flow_over_the_socket() { } #[test] -#[serial] +#[file_serial] fn hooks_prefer_the_rpc_journal_sink_when_the_daemon_is_reachable() { if !daemon_binary().is_some_and(|daemon| daemon.exists()) { skip_without_reactor("hooks_prefer_the_rpc_journal_sink_when_the_daemon_is_reachable"); @@ -422,7 +422,7 @@ fn hooks_prefer_the_rpc_journal_sink_when_the_daemon_is_reachable() { } #[test] -#[serial] +#[file_serial] fn hooks_start_the_daemon_when_none_is_running() { if !daemon_binary().is_some_and(|daemon| daemon.exists()) { skip_without_reactor("hooks_start_the_daemon_when_none_is_running"); From 262e69143225963cd1e88489f5210623e83397de Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 13:54:47 +0000 Subject: [PATCH 2/7] ci: give the Windows Dev Drive room for the test binaries 14GB filled up while linking (LNK1180: insufficient disk space). The VHDX is dynamic, so a larger cap only uses what target/ needs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a90211a7..90aa9d54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,9 @@ jobs: if: runner.os == 'Windows' uses: samypr100/setup-dev-drive@v4 with: - drive-size: 14GB + # Dynamic VHDX on the runner's D: disk: it only uses what target/ needs. + # 14GB ran out while linking the test binaries. + drive-size: 60GB mount-path: ${{ runner.workspace }}/devdrive env-mapping: | CARGO_TARGET_DIR,{{ DEV_DRIVE }}/target From 5b4a038f9e27f4ab14f783edc6fa77225a163fd1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 14:05:19 +0000 Subject: [PATCH 3/7] test: build atomic-cli and atomic-repository integration tests as one binary each Each file in tests/ was its own test binary linking the whole workspace: 77 in atomic-cli and 36 in atomic-repository. Most of the CI compile time on Windows (and over half on Linux) was building and linking those. Move them unchanged into tests/it/ as modules of a single `it` binary per crate. Only paths resolved relative to the source file change (include_bytes!/include_str! and one #[path]), since files moved one directory deeper; fixtures stay in tests/fixtures. For atomic-repository locally, a rebuild after touching atomic-core drops from 28s to 12s and target/ from 9.4GB to 3.8GB. Under plain `cargo test` the merged files now share one process, which surfaced two dependencies on being a separate binary: - database_lock_exclusivity_test re-executes itself with `--exact `; the name now carries the module path, so derive it from module_path!(). - provenance_rpc_sink sets ATOMIC_SERVICE and ATOMIC_DAEMON_SOCKET on its own process, which every `atomic` subprocess spawned by a concurrent test would inherit. It is the only integration test that mutates process env, so it stays its own binary. nextest still runs every test in its own process, and the #[file_serial] tests stay mutually exclusive across processes, so redb and cwd isolation is unchanged. Run one former binary with `cargo test -p --test it ::`. The harness scripts and docs that named individual binaries now use that form; 46_database_locking.sh also referred to database_consolidation_bridge_test, which was renamed to database_consolidation_shim_test in #267. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- atomic-cli/README.md | 2 +- .../{ => it}/adaptation_regression_test.rs | 0 .../agent_capture_oracle_cb12a_test.rs | 0 .../{ => it}/agent_error_integration_test.rs | 0 .../tests/{ => it}/agent_repair_cb12a_test.rs | 0 .../bridge_agent_workflow_regression_test.rs | 0 .../build_version_integration_test.rs | 2 +- .../change_ledger_integration_test.rs | 0 atomic-cli/tests/{ => it}/change_tree_test.rs | 0 .../{ => it}/cli_surface_integration_test.rs | 0 .../clone_sidecar_integration_test.rs | 0 .../compact_service_integration_test.rs | 0 .../{ => it}/concurrent_intent_reads_test.rs | 0 .../{ => it}/cross_stream_matrix_test.rs | 0 .../tests/{ => it}/git_adoption_cb7b_test.rs | 0 .../tests/{ => it}/git_anchor_cb7a_test.rs | 0 .../tests/{ => it}/git_binding_cb6a_test.rs | 0 .../tests/{ => it}/git_binding_cb6b_test.rs | 0 .../tests/{ => it}/git_binding_cb6c_test.rs | 0 ..._bridge_reconcile_preserved_delete_test.rs | 0 .../tests/{ => it}/git_cutover_cb13b_test.rs | 0 .../tests/{ => it}/git_guard_cb0c_test.rs | 0 .../git_import_bypass_cycle_regression.rs | 0 .../tests/{ => it}/git_import_cb9a_test.rs | 0 .../tests/{ => it}/git_import_cb9b_test.rs | 0 .../tests/{ => it}/git_import_cb9c_test.rs | 0 .../git_import_corpus_regression_test.rs | 0 .../git_import_generated_modify_test.rs | 6 +- .../{ => it}/git_import_path_audit_test.rs | 0 .../git_import_sibling_closure_regression.rs | 0 ...it_import_sibling_leg_modify_regression.rs | 0 .../git_import_tracked_vault_regression.rs | 0 .../{ => it}/git_observation_cb0a_test.rs | 0 .../{ => it}/git_projection_cb8a_test.rs | 0 .../tests/{ => it}/git_push_cb4b_test.rs | 0 .../tests/{ => it}/git_shim_cb0d_test.rs | 0 .../tests/{ => it}/git_shim_cb10a_test.rs | 0 .../tests/{ => it}/git_shim_cb13d_test.rs | 0 .../tests/{ => it}/git_shim_logging_test.rs | 0 .../tests/{ => it}/git_shim_opt_in_test.rs | 0 .../tests/{ => it}/git_shim_workspace_test.rs | 0 .../{ => it}/git_transport_cb10b_test.rs | 0 .../tests/{ => it}/git_wip_cb0b_test.rs | 2 +- .../{ => it}/graph_only_export_cb9b_test.rs | 0 .../{ => it}/hook_health_integration_test.rs | 0 .../{ => it}/ide_json_integration_test.rs | 0 .../{ => it}/import_budget_100k_bench.rs | 2 +- .../insert_promote_integration_test.rs | 0 .../intent_attest_external_signer_test.rs | 0 .../tests/{ => it}/intent_graph_test.rs | 2 +- .../{ => it}/intent_turn_binding_test.rs | 0 .../{ => it}/kg_service_integration_test.rs | 0 .../{ => it}/logging_integration_test.rs | 0 atomic-cli/tests/it/main.rs | 84 +++++++++++++++++++ .../{ => it}/memory_compatibility_test.rs | 0 .../native_index_doctor_integration_test.rs | 0 ...ve_view_materialization_regression_test.rs | 0 .../operation_cli_integration_test.rs | 0 .../{ => it}/provenance_integration_test.rs | 0 .../tests/{ => it}/push_integration_test.rs | 0 .../{ => it}/record_rename_attributes_test.rs | 0 .../record_stale_conflict_cleanup_test.rs | 0 .../{ => it}/remote_sandbox_client_test.rs | 0 .../{ => it}/remove_recorded_path_test.rs | 0 .../repository_discovery_integration_test.rs | 0 .../{ => it}/restore_integration_test.rs | 0 .../tests/{ => it}/routing_parity_test.rs | 0 .../{ => it}/session_integration_test.rs | 0 .../tests/{ => it}/shim_census_cb13a_test.rs | 0 .../tests/{ => it}/status_git_cb11a_test.rs | 0 .../{ => it}/unrecord_integration_test.rs | 0 .../vault_context_integration_test.rs | 0 .../view_confirmation_integration_test.rs | 0 .../working_copy_preservation_test.rs | 0 .../working_copy_service_adaptation_test.rs | 0 .../workspace_txn_boundaries_cb5c_test.rs | 0 .../workspace_txn_routing_cb5b_test.rs | 0 .../workspace_txn_routing_cb5c_test.rs | 0 .../{ => it}/causal_file_identity_test.rs | 0 .../tests/{ => it}/cb_n6_merge_rubric_test.rs | 0 .../tests/{ => it}/change_signing_test.rs | 0 .../content_roundtrip_fidelity_test.rs | 8 +- .../database_consolidation_shim_test.rs | 0 .../database_lock_exclusivity_test.rs | 10 ++- .../tests/{ => it}/database_open_wait_test.rs | 0 .../tests/{ => it}/effective_history_test.rs | 0 .../{ => it}/effective_projection_3b_test.rs | 0 .../tests/{ => it}/equivalence_cb4b_test.rs | 0 .../{ => it}/implementation_declaration.rs | 0 .../tests/{ => it}/intent_graph.rs | 0 .../tests/{ => it}/kg_change_availability.rs | 0 .../tests/{ => it}/kg_projection.rs | 0 .../tests/{ => it}/kg_recorded_impact.rs | 0 .../{ => it}/legacy_database_merge_test.rs | 0 atomic-repository/tests/it/main.rs | 40 +++++++++ .../{ => it}/materialize_view_entries_test.rs | 0 .../tests/{ => it}/migration_recovery_test.rs | 0 .../tests/{ => it}/patch_evidence.rs | 0 .../tests/{ => it}/project_identity.rs | 0 .../{ => it}/project_identity_transport.rs | 0 .../tests/{ => it}/project_tree_cb4a_test.rs | 0 .../{ => it}/provenance_checkpoint_test.rs | 0 .../{ => it}/remote_cache_parity_test.rs | 0 .../{ => it}/revise_content_regression.rs | 0 .../tests/{ => it}/schema_guard_test.rs | 0 .../tests/{ => it}/staging_cb11a_test.rs | 0 .../tests/{ => it}/stash_attributes_test.rs | 0 .../tests/{ => it}/state_based_diff_test.rs | 0 .../tests/{ => it}/unrecord_safety_test.rs | 0 .../tests/{ => it}/view_delete_test.rs | 0 .../tests/{ => it}/view_manifest_test.rs | 0 .../tests/{ => it}/view_setid_test.rs | 0 .../tests/{ => it}/view_split_test.rs | 0 .../tests/{ => it}/whole_file_diff_test.rs | 0 .../tests/{ => it}/workflow_usage.rs | 0 docs/intent-graph.md | 2 +- docs/provenance-pagination.md | 4 +- docs/record-status-name-conflict.md | 2 +- tests/harness/46_database_locking.sh | 16 ++-- tests/harness/46_knowledge_graph_closure.sh | 4 +- 120 files changed, 159 insertions(+), 27 deletions(-) rename atomic-cli/tests/{ => it}/adaptation_regression_test.rs (100%) rename atomic-cli/tests/{ => it}/agent_capture_oracle_cb12a_test.rs (100%) rename atomic-cli/tests/{ => it}/agent_error_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/agent_repair_cb12a_test.rs (100%) rename atomic-cli/tests/{ => it}/bridge_agent_workflow_regression_test.rs (100%) rename atomic-cli/tests/{ => it}/build_version_integration_test.rs (98%) rename atomic-cli/tests/{ => it}/change_ledger_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/change_tree_test.rs (100%) rename atomic-cli/tests/{ => it}/cli_surface_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/clone_sidecar_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/compact_service_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/concurrent_intent_reads_test.rs (100%) rename atomic-cli/tests/{ => it}/cross_stream_matrix_test.rs (100%) rename atomic-cli/tests/{ => it}/git_adoption_cb7b_test.rs (100%) rename atomic-cli/tests/{ => it}/git_anchor_cb7a_test.rs (100%) rename atomic-cli/tests/{ => it}/git_binding_cb6a_test.rs (100%) rename atomic-cli/tests/{ => it}/git_binding_cb6b_test.rs (100%) rename atomic-cli/tests/{ => it}/git_binding_cb6c_test.rs (100%) rename atomic-cli/tests/{ => it}/git_bridge_reconcile_preserved_delete_test.rs (100%) rename atomic-cli/tests/{ => it}/git_cutover_cb13b_test.rs (100%) rename atomic-cli/tests/{ => it}/git_guard_cb0c_test.rs (100%) rename atomic-cli/tests/{ => it}/git_import_bypass_cycle_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_import_cb9a_test.rs (100%) rename atomic-cli/tests/{ => it}/git_import_cb9b_test.rs (100%) rename atomic-cli/tests/{ => it}/git_import_cb9c_test.rs (100%) rename atomic-cli/tests/{ => it}/git_import_corpus_regression_test.rs (100%) rename atomic-cli/tests/{ => it}/git_import_generated_modify_test.rs (97%) rename atomic-cli/tests/{ => it}/git_import_path_audit_test.rs (100%) rename atomic-cli/tests/{ => it}/git_import_sibling_closure_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_import_sibling_leg_modify_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_import_tracked_vault_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_observation_cb0a_test.rs (100%) rename atomic-cli/tests/{ => it}/git_projection_cb8a_test.rs (100%) rename atomic-cli/tests/{ => it}/git_push_cb4b_test.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_cb0d_test.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_cb10a_test.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_cb13d_test.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_logging_test.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_opt_in_test.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_workspace_test.rs (100%) rename atomic-cli/tests/{ => it}/git_transport_cb10b_test.rs (100%) rename atomic-cli/tests/{ => it}/git_wip_cb0b_test.rs (99%) rename atomic-cli/tests/{ => it}/graph_only_export_cb9b_test.rs (100%) rename atomic-cli/tests/{ => it}/hook_health_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/ide_json_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/import_budget_100k_bench.rs (99%) rename atomic-cli/tests/{ => it}/insert_promote_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/intent_attest_external_signer_test.rs (100%) rename atomic-cli/tests/{ => it}/intent_graph_test.rs (99%) rename atomic-cli/tests/{ => it}/intent_turn_binding_test.rs (100%) rename atomic-cli/tests/{ => it}/kg_service_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/logging_integration_test.rs (100%) create mode 100644 atomic-cli/tests/it/main.rs rename atomic-cli/tests/{ => it}/memory_compatibility_test.rs (100%) rename atomic-cli/tests/{ => it}/native_index_doctor_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/native_view_materialization_regression_test.rs (100%) rename atomic-cli/tests/{ => it}/operation_cli_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/provenance_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/push_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/record_rename_attributes_test.rs (100%) rename atomic-cli/tests/{ => it}/record_stale_conflict_cleanup_test.rs (100%) rename atomic-cli/tests/{ => it}/remote_sandbox_client_test.rs (100%) rename atomic-cli/tests/{ => it}/remove_recorded_path_test.rs (100%) rename atomic-cli/tests/{ => it}/repository_discovery_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/restore_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/routing_parity_test.rs (100%) rename atomic-cli/tests/{ => it}/session_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/shim_census_cb13a_test.rs (100%) rename atomic-cli/tests/{ => it}/status_git_cb11a_test.rs (100%) rename atomic-cli/tests/{ => it}/unrecord_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/vault_context_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/view_confirmation_integration_test.rs (100%) rename atomic-cli/tests/{ => it}/working_copy_preservation_test.rs (100%) rename atomic-cli/tests/{ => it}/working_copy_service_adaptation_test.rs (100%) rename atomic-cli/tests/{ => it}/workspace_txn_boundaries_cb5c_test.rs (100%) rename atomic-cli/tests/{ => it}/workspace_txn_routing_cb5b_test.rs (100%) rename atomic-cli/tests/{ => it}/workspace_txn_routing_cb5c_test.rs (100%) rename atomic-repository/tests/{ => it}/causal_file_identity_test.rs (100%) rename atomic-repository/tests/{ => it}/cb_n6_merge_rubric_test.rs (100%) rename atomic-repository/tests/{ => it}/change_signing_test.rs (100%) rename atomic-repository/tests/{ => it}/content_roundtrip_fidelity_test.rs (99%) rename atomic-repository/tests/{ => it}/database_consolidation_shim_test.rs (100%) rename atomic-repository/tests/{ => it}/database_lock_exclusivity_test.rs (93%) rename atomic-repository/tests/{ => it}/database_open_wait_test.rs (100%) rename atomic-repository/tests/{ => it}/effective_history_test.rs (100%) rename atomic-repository/tests/{ => it}/effective_projection_3b_test.rs (100%) rename atomic-repository/tests/{ => it}/equivalence_cb4b_test.rs (100%) rename atomic-repository/tests/{ => it}/implementation_declaration.rs (100%) rename atomic-repository/tests/{ => it}/intent_graph.rs (100%) rename atomic-repository/tests/{ => it}/kg_change_availability.rs (100%) rename atomic-repository/tests/{ => it}/kg_projection.rs (100%) rename atomic-repository/tests/{ => it}/kg_recorded_impact.rs (100%) rename atomic-repository/tests/{ => it}/legacy_database_merge_test.rs (100%) create mode 100644 atomic-repository/tests/it/main.rs rename atomic-repository/tests/{ => it}/materialize_view_entries_test.rs (100%) rename atomic-repository/tests/{ => it}/migration_recovery_test.rs (100%) rename atomic-repository/tests/{ => it}/patch_evidence.rs (100%) rename atomic-repository/tests/{ => it}/project_identity.rs (100%) rename atomic-repository/tests/{ => it}/project_identity_transport.rs (100%) rename atomic-repository/tests/{ => it}/project_tree_cb4a_test.rs (100%) rename atomic-repository/tests/{ => it}/provenance_checkpoint_test.rs (100%) rename atomic-repository/tests/{ => it}/remote_cache_parity_test.rs (100%) rename atomic-repository/tests/{ => it}/revise_content_regression.rs (100%) rename atomic-repository/tests/{ => it}/schema_guard_test.rs (100%) rename atomic-repository/tests/{ => it}/staging_cb11a_test.rs (100%) rename atomic-repository/tests/{ => it}/stash_attributes_test.rs (100%) rename atomic-repository/tests/{ => it}/state_based_diff_test.rs (100%) rename atomic-repository/tests/{ => it}/unrecord_safety_test.rs (100%) rename atomic-repository/tests/{ => it}/view_delete_test.rs (100%) rename atomic-repository/tests/{ => it}/view_manifest_test.rs (100%) rename atomic-repository/tests/{ => it}/view_setid_test.rs (100%) rename atomic-repository/tests/{ => it}/view_split_test.rs (100%) rename atomic-repository/tests/{ => it}/whole_file_diff_test.rs (100%) rename atomic-repository/tests/{ => it}/workflow_usage.rs (100%) diff --git a/atomic-cli/README.md b/atomic-cli/README.md index 4c2963f1..23b48039 100644 --- a/atomic-cli/README.md +++ b/atomic-cli/README.md @@ -940,7 +940,7 @@ Global identity configuration is stored in `~/.config/atomic/` (or platform equi cargo test -p atomic-cli # Validate that every public command path renders help -cargo test -p atomic-cli --test cli_surface_integration_test +cargo test -p atomic-cli --test it -- cli_surface_integration_test:: # Run the black-box CLI harness against a freshly built binary cargo build -p atomic-cli diff --git a/atomic-cli/tests/adaptation_regression_test.rs b/atomic-cli/tests/it/adaptation_regression_test.rs similarity index 100% rename from atomic-cli/tests/adaptation_regression_test.rs rename to atomic-cli/tests/it/adaptation_regression_test.rs diff --git a/atomic-cli/tests/agent_capture_oracle_cb12a_test.rs b/atomic-cli/tests/it/agent_capture_oracle_cb12a_test.rs similarity index 100% rename from atomic-cli/tests/agent_capture_oracle_cb12a_test.rs rename to atomic-cli/tests/it/agent_capture_oracle_cb12a_test.rs diff --git a/atomic-cli/tests/agent_error_integration_test.rs b/atomic-cli/tests/it/agent_error_integration_test.rs similarity index 100% rename from atomic-cli/tests/agent_error_integration_test.rs rename to atomic-cli/tests/it/agent_error_integration_test.rs diff --git a/atomic-cli/tests/agent_repair_cb12a_test.rs b/atomic-cli/tests/it/agent_repair_cb12a_test.rs similarity index 100% rename from atomic-cli/tests/agent_repair_cb12a_test.rs rename to atomic-cli/tests/it/agent_repair_cb12a_test.rs diff --git a/atomic-cli/tests/bridge_agent_workflow_regression_test.rs b/atomic-cli/tests/it/bridge_agent_workflow_regression_test.rs similarity index 100% rename from atomic-cli/tests/bridge_agent_workflow_regression_test.rs rename to atomic-cli/tests/it/bridge_agent_workflow_regression_test.rs diff --git a/atomic-cli/tests/build_version_integration_test.rs b/atomic-cli/tests/it/build_version_integration_test.rs similarity index 98% rename from atomic-cli/tests/build_version_integration_test.rs rename to atomic-cli/tests/it/build_version_integration_test.rs index e31804df..99ec2cb4 100644 --- a/atomic-cli/tests/build_version_integration_test.rs +++ b/atomic-cli/tests/it/build_version_integration_test.rs @@ -52,7 +52,7 @@ impl Fixture { "[package]\nname = \"version-fixture\"\nversion = \"0.19.1\"\nedition = \"2021\"\n", ) .unwrap(); - fs::write(source.join("build.rs"), include_str!("../build.rs")).unwrap(); + fs::write(source.join("build.rs"), include_str!("../../build.rs")).unwrap(); fs::write( source.join("src/main.rs"), "fn main() { println!(\"{}\", env!(\"ATOMIC_CLI_VERSION\")); }\n", diff --git a/atomic-cli/tests/change_ledger_integration_test.rs b/atomic-cli/tests/it/change_ledger_integration_test.rs similarity index 100% rename from atomic-cli/tests/change_ledger_integration_test.rs rename to atomic-cli/tests/it/change_ledger_integration_test.rs diff --git a/atomic-cli/tests/change_tree_test.rs b/atomic-cli/tests/it/change_tree_test.rs similarity index 100% rename from atomic-cli/tests/change_tree_test.rs rename to atomic-cli/tests/it/change_tree_test.rs diff --git a/atomic-cli/tests/cli_surface_integration_test.rs b/atomic-cli/tests/it/cli_surface_integration_test.rs similarity index 100% rename from atomic-cli/tests/cli_surface_integration_test.rs rename to atomic-cli/tests/it/cli_surface_integration_test.rs diff --git a/atomic-cli/tests/clone_sidecar_integration_test.rs b/atomic-cli/tests/it/clone_sidecar_integration_test.rs similarity index 100% rename from atomic-cli/tests/clone_sidecar_integration_test.rs rename to atomic-cli/tests/it/clone_sidecar_integration_test.rs diff --git a/atomic-cli/tests/compact_service_integration_test.rs b/atomic-cli/tests/it/compact_service_integration_test.rs similarity index 100% rename from atomic-cli/tests/compact_service_integration_test.rs rename to atomic-cli/tests/it/compact_service_integration_test.rs diff --git a/atomic-cli/tests/concurrent_intent_reads_test.rs b/atomic-cli/tests/it/concurrent_intent_reads_test.rs similarity index 100% rename from atomic-cli/tests/concurrent_intent_reads_test.rs rename to atomic-cli/tests/it/concurrent_intent_reads_test.rs diff --git a/atomic-cli/tests/cross_stream_matrix_test.rs b/atomic-cli/tests/it/cross_stream_matrix_test.rs similarity index 100% rename from atomic-cli/tests/cross_stream_matrix_test.rs rename to atomic-cli/tests/it/cross_stream_matrix_test.rs diff --git a/atomic-cli/tests/git_adoption_cb7b_test.rs b/atomic-cli/tests/it/git_adoption_cb7b_test.rs similarity index 100% rename from atomic-cli/tests/git_adoption_cb7b_test.rs rename to atomic-cli/tests/it/git_adoption_cb7b_test.rs diff --git a/atomic-cli/tests/git_anchor_cb7a_test.rs b/atomic-cli/tests/it/git_anchor_cb7a_test.rs similarity index 100% rename from atomic-cli/tests/git_anchor_cb7a_test.rs rename to atomic-cli/tests/it/git_anchor_cb7a_test.rs diff --git a/atomic-cli/tests/git_binding_cb6a_test.rs b/atomic-cli/tests/it/git_binding_cb6a_test.rs similarity index 100% rename from atomic-cli/tests/git_binding_cb6a_test.rs rename to atomic-cli/tests/it/git_binding_cb6a_test.rs diff --git a/atomic-cli/tests/git_binding_cb6b_test.rs b/atomic-cli/tests/it/git_binding_cb6b_test.rs similarity index 100% rename from atomic-cli/tests/git_binding_cb6b_test.rs rename to atomic-cli/tests/it/git_binding_cb6b_test.rs diff --git a/atomic-cli/tests/git_binding_cb6c_test.rs b/atomic-cli/tests/it/git_binding_cb6c_test.rs similarity index 100% rename from atomic-cli/tests/git_binding_cb6c_test.rs rename to atomic-cli/tests/it/git_binding_cb6c_test.rs diff --git a/atomic-cli/tests/git_bridge_reconcile_preserved_delete_test.rs b/atomic-cli/tests/it/git_bridge_reconcile_preserved_delete_test.rs similarity index 100% rename from atomic-cli/tests/git_bridge_reconcile_preserved_delete_test.rs rename to atomic-cli/tests/it/git_bridge_reconcile_preserved_delete_test.rs diff --git a/atomic-cli/tests/git_cutover_cb13b_test.rs b/atomic-cli/tests/it/git_cutover_cb13b_test.rs similarity index 100% rename from atomic-cli/tests/git_cutover_cb13b_test.rs rename to atomic-cli/tests/it/git_cutover_cb13b_test.rs diff --git a/atomic-cli/tests/git_guard_cb0c_test.rs b/atomic-cli/tests/it/git_guard_cb0c_test.rs similarity index 100% rename from atomic-cli/tests/git_guard_cb0c_test.rs rename to atomic-cli/tests/it/git_guard_cb0c_test.rs diff --git a/atomic-cli/tests/git_import_bypass_cycle_regression.rs b/atomic-cli/tests/it/git_import_bypass_cycle_regression.rs similarity index 100% rename from atomic-cli/tests/git_import_bypass_cycle_regression.rs rename to atomic-cli/tests/it/git_import_bypass_cycle_regression.rs diff --git a/atomic-cli/tests/git_import_cb9a_test.rs b/atomic-cli/tests/it/git_import_cb9a_test.rs similarity index 100% rename from atomic-cli/tests/git_import_cb9a_test.rs rename to atomic-cli/tests/it/git_import_cb9a_test.rs diff --git a/atomic-cli/tests/git_import_cb9b_test.rs b/atomic-cli/tests/it/git_import_cb9b_test.rs similarity index 100% rename from atomic-cli/tests/git_import_cb9b_test.rs rename to atomic-cli/tests/it/git_import_cb9b_test.rs diff --git a/atomic-cli/tests/git_import_cb9c_test.rs b/atomic-cli/tests/it/git_import_cb9c_test.rs similarity index 100% rename from atomic-cli/tests/git_import_cb9c_test.rs rename to atomic-cli/tests/it/git_import_cb9c_test.rs diff --git a/atomic-cli/tests/git_import_corpus_regression_test.rs b/atomic-cli/tests/it/git_import_corpus_regression_test.rs similarity index 100% rename from atomic-cli/tests/git_import_corpus_regression_test.rs rename to atomic-cli/tests/it/git_import_corpus_regression_test.rs diff --git a/atomic-cli/tests/git_import_generated_modify_test.rs b/atomic-cli/tests/it/git_import_generated_modify_test.rs similarity index 97% rename from atomic-cli/tests/git_import_generated_modify_test.rs rename to atomic-cli/tests/it/git_import_generated_modify_test.rs index 5288cb82..a63977a1 100644 --- a/atomic-cli/tests/git_import_generated_modify_test.rs +++ b/atomic-cli/tests/it/git_import_generated_modify_test.rs @@ -143,9 +143,9 @@ fn git_import_records_the_real_helpers_history_with_exact_content() { // import failed with "staged path // 'atomic-cli/src/commands/push/helpers.rs' renders 27472 byte(s) but // the commit tree expects 23819 byte(s)". - let c1 = include_bytes!("fixtures/helpers_c1.rs"); - let c5 = include_bytes!("fixtures/helpers_c5.rs"); - let c6 = include_bytes!("fixtures/helpers_c6.rs"); + let c1 = include_bytes!("../fixtures/helpers_c1.rs"); + let c5 = include_bytes!("../fixtures/helpers_c5.rs"); + let c6 = include_bytes!("../fixtures/helpers_c6.rs"); let root = tempfile::tempdir().unwrap().keep(); let home = tempfile::tempdir().unwrap().keep(); diff --git a/atomic-cli/tests/git_import_path_audit_test.rs b/atomic-cli/tests/it/git_import_path_audit_test.rs similarity index 100% rename from atomic-cli/tests/git_import_path_audit_test.rs rename to atomic-cli/tests/it/git_import_path_audit_test.rs diff --git a/atomic-cli/tests/git_import_sibling_closure_regression.rs b/atomic-cli/tests/it/git_import_sibling_closure_regression.rs similarity index 100% rename from atomic-cli/tests/git_import_sibling_closure_regression.rs rename to atomic-cli/tests/it/git_import_sibling_closure_regression.rs diff --git a/atomic-cli/tests/git_import_sibling_leg_modify_regression.rs b/atomic-cli/tests/it/git_import_sibling_leg_modify_regression.rs similarity index 100% rename from atomic-cli/tests/git_import_sibling_leg_modify_regression.rs rename to atomic-cli/tests/it/git_import_sibling_leg_modify_regression.rs diff --git a/atomic-cli/tests/git_import_tracked_vault_regression.rs b/atomic-cli/tests/it/git_import_tracked_vault_regression.rs similarity index 100% rename from atomic-cli/tests/git_import_tracked_vault_regression.rs rename to atomic-cli/tests/it/git_import_tracked_vault_regression.rs diff --git a/atomic-cli/tests/git_observation_cb0a_test.rs b/atomic-cli/tests/it/git_observation_cb0a_test.rs similarity index 100% rename from atomic-cli/tests/git_observation_cb0a_test.rs rename to atomic-cli/tests/it/git_observation_cb0a_test.rs diff --git a/atomic-cli/tests/git_projection_cb8a_test.rs b/atomic-cli/tests/it/git_projection_cb8a_test.rs similarity index 100% rename from atomic-cli/tests/git_projection_cb8a_test.rs rename to atomic-cli/tests/it/git_projection_cb8a_test.rs diff --git a/atomic-cli/tests/git_push_cb4b_test.rs b/atomic-cli/tests/it/git_push_cb4b_test.rs similarity index 100% rename from atomic-cli/tests/git_push_cb4b_test.rs rename to atomic-cli/tests/it/git_push_cb4b_test.rs diff --git a/atomic-cli/tests/git_shim_cb0d_test.rs b/atomic-cli/tests/it/git_shim_cb0d_test.rs similarity index 100% rename from atomic-cli/tests/git_shim_cb0d_test.rs rename to atomic-cli/tests/it/git_shim_cb0d_test.rs diff --git a/atomic-cli/tests/git_shim_cb10a_test.rs b/atomic-cli/tests/it/git_shim_cb10a_test.rs similarity index 100% rename from atomic-cli/tests/git_shim_cb10a_test.rs rename to atomic-cli/tests/it/git_shim_cb10a_test.rs diff --git a/atomic-cli/tests/git_shim_cb13d_test.rs b/atomic-cli/tests/it/git_shim_cb13d_test.rs similarity index 100% rename from atomic-cli/tests/git_shim_cb13d_test.rs rename to atomic-cli/tests/it/git_shim_cb13d_test.rs diff --git a/atomic-cli/tests/git_shim_logging_test.rs b/atomic-cli/tests/it/git_shim_logging_test.rs similarity index 100% rename from atomic-cli/tests/git_shim_logging_test.rs rename to atomic-cli/tests/it/git_shim_logging_test.rs diff --git a/atomic-cli/tests/git_shim_opt_in_test.rs b/atomic-cli/tests/it/git_shim_opt_in_test.rs similarity index 100% rename from atomic-cli/tests/git_shim_opt_in_test.rs rename to atomic-cli/tests/it/git_shim_opt_in_test.rs diff --git a/atomic-cli/tests/git_shim_workspace_test.rs b/atomic-cli/tests/it/git_shim_workspace_test.rs similarity index 100% rename from atomic-cli/tests/git_shim_workspace_test.rs rename to atomic-cli/tests/it/git_shim_workspace_test.rs diff --git a/atomic-cli/tests/git_transport_cb10b_test.rs b/atomic-cli/tests/it/git_transport_cb10b_test.rs similarity index 100% rename from atomic-cli/tests/git_transport_cb10b_test.rs rename to atomic-cli/tests/it/git_transport_cb10b_test.rs diff --git a/atomic-cli/tests/git_wip_cb0b_test.rs b/atomic-cli/tests/it/git_wip_cb0b_test.rs similarity index 99% rename from atomic-cli/tests/git_wip_cb0b_test.rs rename to atomic-cli/tests/it/git_wip_cb0b_test.rs index e52209dc..f001fa02 100644 --- a/atomic-cli/tests/git_wip_cb0b_test.rs +++ b/atomic-cli/tests/it/git_wip_cb0b_test.rs @@ -1,4 +1,4 @@ -#[path = "../src/commands/git/wip.rs"] +#[path = "../../src/commands/git/wip.rs"] mod wip; use std::collections::BTreeSet; diff --git a/atomic-cli/tests/graph_only_export_cb9b_test.rs b/atomic-cli/tests/it/graph_only_export_cb9b_test.rs similarity index 100% rename from atomic-cli/tests/graph_only_export_cb9b_test.rs rename to atomic-cli/tests/it/graph_only_export_cb9b_test.rs diff --git a/atomic-cli/tests/hook_health_integration_test.rs b/atomic-cli/tests/it/hook_health_integration_test.rs similarity index 100% rename from atomic-cli/tests/hook_health_integration_test.rs rename to atomic-cli/tests/it/hook_health_integration_test.rs diff --git a/atomic-cli/tests/ide_json_integration_test.rs b/atomic-cli/tests/it/ide_json_integration_test.rs similarity index 100% rename from atomic-cli/tests/ide_json_integration_test.rs rename to atomic-cli/tests/it/ide_json_integration_test.rs diff --git a/atomic-cli/tests/import_budget_100k_bench.rs b/atomic-cli/tests/it/import_budget_100k_bench.rs similarity index 99% rename from atomic-cli/tests/import_budget_100k_bench.rs rename to atomic-cli/tests/it/import_budget_100k_bench.rs index 3be56fca..1c64992e 100644 --- a/atomic-cli/tests/import_budget_100k_bench.rs +++ b/atomic-cli/tests/it/import_budget_100k_bench.rs @@ -10,7 +10,7 @@ //! ```text //! TMPDIR=/home/aaron/code/work/atomic/target/bench-tmp \ //! cargo test -p atomic-cli --release \ -//! --test import_budget_100k_bench -- --ignored --nocapture +//! --test it -- import_budget_100k_bench:: --ignored --nocapture //! ``` //! //! The run prints the measured wall-clock numbers and the environment diff --git a/atomic-cli/tests/insert_promote_integration_test.rs b/atomic-cli/tests/it/insert_promote_integration_test.rs similarity index 100% rename from atomic-cli/tests/insert_promote_integration_test.rs rename to atomic-cli/tests/it/insert_promote_integration_test.rs diff --git a/atomic-cli/tests/intent_attest_external_signer_test.rs b/atomic-cli/tests/it/intent_attest_external_signer_test.rs similarity index 100% rename from atomic-cli/tests/intent_attest_external_signer_test.rs rename to atomic-cli/tests/it/intent_attest_external_signer_test.rs diff --git a/atomic-cli/tests/intent_graph_test.rs b/atomic-cli/tests/it/intent_graph_test.rs similarity index 99% rename from atomic-cli/tests/intent_graph_test.rs rename to atomic-cli/tests/it/intent_graph_test.rs index 07c16a93..8fd2733d 100644 --- a/atomic-cli/tests/intent_graph_test.rs +++ b/atomic-cli/tests/it/intent_graph_test.rs @@ -249,7 +249,7 @@ fn exported_graph_canvas_selection_drag_zoom_and_responsive_layout() { "", &format!( "", - include_str!("fixtures/graph_canvas_test.js") + include_str!("../fixtures/graph_canvas_test.js") ), ); let path = directory.path().join("canvas-inspector.html"); diff --git a/atomic-cli/tests/intent_turn_binding_test.rs b/atomic-cli/tests/it/intent_turn_binding_test.rs similarity index 100% rename from atomic-cli/tests/intent_turn_binding_test.rs rename to atomic-cli/tests/it/intent_turn_binding_test.rs diff --git a/atomic-cli/tests/kg_service_integration_test.rs b/atomic-cli/tests/it/kg_service_integration_test.rs similarity index 100% rename from atomic-cli/tests/kg_service_integration_test.rs rename to atomic-cli/tests/it/kg_service_integration_test.rs diff --git a/atomic-cli/tests/logging_integration_test.rs b/atomic-cli/tests/it/logging_integration_test.rs similarity index 100% rename from atomic-cli/tests/logging_integration_test.rs rename to atomic-cli/tests/it/logging_integration_test.rs diff --git a/atomic-cli/tests/it/main.rs b/atomic-cli/tests/it/main.rs new file mode 100644 index 00000000..3bfd4116 --- /dev/null +++ b/atomic-cli/tests/it/main.rs @@ -0,0 +1,84 @@ +//! All atomic-cli integration tests, built as one binary so the workspace is +//! linked once instead of once per file. Each module is a former +//! `tests/.rs`; run one with `cargo test -p atomic-cli --test it ::`. +//! +//! `provenance_rpc_sink` stays its own binary: it sets process env vars +//! (`ATOMIC_SERVICE`, `ATOMIC_DAEMON_SOCKET`) that every `atomic` subprocess +//! spawned by a concurrently running test in this binary would inherit. + +mod adaptation_regression_test; +mod agent_capture_oracle_cb12a_test; +mod agent_error_integration_test; +mod agent_repair_cb12a_test; +mod bridge_agent_workflow_regression_test; +mod build_version_integration_test; +mod change_ledger_integration_test; +mod change_tree_test; +mod cli_surface_integration_test; +mod clone_sidecar_integration_test; +mod compact_service_integration_test; +mod concurrent_intent_reads_test; +mod cross_stream_matrix_test; +mod git_adoption_cb7b_test; +mod git_anchor_cb7a_test; +mod git_binding_cb6a_test; +mod git_binding_cb6b_test; +mod git_binding_cb6c_test; +mod git_bridge_reconcile_preserved_delete_test; +mod git_cutover_cb13b_test; +mod git_guard_cb0c_test; +mod git_import_bypass_cycle_regression; +mod git_import_cb9a_test; +mod git_import_cb9b_test; +mod git_import_cb9c_test; +mod git_import_corpus_regression_test; +mod git_import_generated_modify_test; +mod git_import_path_audit_test; +mod git_import_sibling_closure_regression; +mod git_import_sibling_leg_modify_regression; +mod git_import_tracked_vault_regression; +mod git_observation_cb0a_test; +mod git_projection_cb8a_test; +mod git_push_cb4b_test; +mod git_shim_cb0d_test; +mod git_shim_cb10a_test; +mod git_shim_cb13d_test; +mod git_shim_logging_test; +mod git_shim_opt_in_test; +mod git_shim_workspace_test; +mod git_transport_cb10b_test; +mod git_wip_cb0b_test; +mod graph_only_export_cb9b_test; +mod hook_health_integration_test; +mod ide_json_integration_test; +mod import_budget_100k_bench; +mod insert_promote_integration_test; +mod intent_attest_external_signer_test; +mod intent_graph_test; +mod intent_turn_binding_test; +mod kg_service_integration_test; +mod logging_integration_test; +mod memory_compatibility_test; +mod native_index_doctor_integration_test; +mod native_view_materialization_regression_test; +mod operation_cli_integration_test; +mod provenance_integration_test; +mod push_integration_test; +mod record_rename_attributes_test; +mod record_stale_conflict_cleanup_test; +mod remote_sandbox_client_test; +mod remove_recorded_path_test; +mod repository_discovery_integration_test; +mod restore_integration_test; +mod routing_parity_test; +mod session_integration_test; +mod shim_census_cb13a_test; +mod status_git_cb11a_test; +mod unrecord_integration_test; +mod vault_context_integration_test; +mod view_confirmation_integration_test; +mod working_copy_preservation_test; +mod working_copy_service_adaptation_test; +mod workspace_txn_boundaries_cb5c_test; +mod workspace_txn_routing_cb5b_test; +mod workspace_txn_routing_cb5c_test; diff --git a/atomic-cli/tests/memory_compatibility_test.rs b/atomic-cli/tests/it/memory_compatibility_test.rs similarity index 100% rename from atomic-cli/tests/memory_compatibility_test.rs rename to atomic-cli/tests/it/memory_compatibility_test.rs diff --git a/atomic-cli/tests/native_index_doctor_integration_test.rs b/atomic-cli/tests/it/native_index_doctor_integration_test.rs similarity index 100% rename from atomic-cli/tests/native_index_doctor_integration_test.rs rename to atomic-cli/tests/it/native_index_doctor_integration_test.rs diff --git a/atomic-cli/tests/native_view_materialization_regression_test.rs b/atomic-cli/tests/it/native_view_materialization_regression_test.rs similarity index 100% rename from atomic-cli/tests/native_view_materialization_regression_test.rs rename to atomic-cli/tests/it/native_view_materialization_regression_test.rs diff --git a/atomic-cli/tests/operation_cli_integration_test.rs b/atomic-cli/tests/it/operation_cli_integration_test.rs similarity index 100% rename from atomic-cli/tests/operation_cli_integration_test.rs rename to atomic-cli/tests/it/operation_cli_integration_test.rs diff --git a/atomic-cli/tests/provenance_integration_test.rs b/atomic-cli/tests/it/provenance_integration_test.rs similarity index 100% rename from atomic-cli/tests/provenance_integration_test.rs rename to atomic-cli/tests/it/provenance_integration_test.rs diff --git a/atomic-cli/tests/push_integration_test.rs b/atomic-cli/tests/it/push_integration_test.rs similarity index 100% rename from atomic-cli/tests/push_integration_test.rs rename to atomic-cli/tests/it/push_integration_test.rs diff --git a/atomic-cli/tests/record_rename_attributes_test.rs b/atomic-cli/tests/it/record_rename_attributes_test.rs similarity index 100% rename from atomic-cli/tests/record_rename_attributes_test.rs rename to atomic-cli/tests/it/record_rename_attributes_test.rs diff --git a/atomic-cli/tests/record_stale_conflict_cleanup_test.rs b/atomic-cli/tests/it/record_stale_conflict_cleanup_test.rs similarity index 100% rename from atomic-cli/tests/record_stale_conflict_cleanup_test.rs rename to atomic-cli/tests/it/record_stale_conflict_cleanup_test.rs diff --git a/atomic-cli/tests/remote_sandbox_client_test.rs b/atomic-cli/tests/it/remote_sandbox_client_test.rs similarity index 100% rename from atomic-cli/tests/remote_sandbox_client_test.rs rename to atomic-cli/tests/it/remote_sandbox_client_test.rs diff --git a/atomic-cli/tests/remove_recorded_path_test.rs b/atomic-cli/tests/it/remove_recorded_path_test.rs similarity index 100% rename from atomic-cli/tests/remove_recorded_path_test.rs rename to atomic-cli/tests/it/remove_recorded_path_test.rs diff --git a/atomic-cli/tests/repository_discovery_integration_test.rs b/atomic-cli/tests/it/repository_discovery_integration_test.rs similarity index 100% rename from atomic-cli/tests/repository_discovery_integration_test.rs rename to atomic-cli/tests/it/repository_discovery_integration_test.rs diff --git a/atomic-cli/tests/restore_integration_test.rs b/atomic-cli/tests/it/restore_integration_test.rs similarity index 100% rename from atomic-cli/tests/restore_integration_test.rs rename to atomic-cli/tests/it/restore_integration_test.rs diff --git a/atomic-cli/tests/routing_parity_test.rs b/atomic-cli/tests/it/routing_parity_test.rs similarity index 100% rename from atomic-cli/tests/routing_parity_test.rs rename to atomic-cli/tests/it/routing_parity_test.rs diff --git a/atomic-cli/tests/session_integration_test.rs b/atomic-cli/tests/it/session_integration_test.rs similarity index 100% rename from atomic-cli/tests/session_integration_test.rs rename to atomic-cli/tests/it/session_integration_test.rs diff --git a/atomic-cli/tests/shim_census_cb13a_test.rs b/atomic-cli/tests/it/shim_census_cb13a_test.rs similarity index 100% rename from atomic-cli/tests/shim_census_cb13a_test.rs rename to atomic-cli/tests/it/shim_census_cb13a_test.rs diff --git a/atomic-cli/tests/status_git_cb11a_test.rs b/atomic-cli/tests/it/status_git_cb11a_test.rs similarity index 100% rename from atomic-cli/tests/status_git_cb11a_test.rs rename to atomic-cli/tests/it/status_git_cb11a_test.rs diff --git a/atomic-cli/tests/unrecord_integration_test.rs b/atomic-cli/tests/it/unrecord_integration_test.rs similarity index 100% rename from atomic-cli/tests/unrecord_integration_test.rs rename to atomic-cli/tests/it/unrecord_integration_test.rs diff --git a/atomic-cli/tests/vault_context_integration_test.rs b/atomic-cli/tests/it/vault_context_integration_test.rs similarity index 100% rename from atomic-cli/tests/vault_context_integration_test.rs rename to atomic-cli/tests/it/vault_context_integration_test.rs diff --git a/atomic-cli/tests/view_confirmation_integration_test.rs b/atomic-cli/tests/it/view_confirmation_integration_test.rs similarity index 100% rename from atomic-cli/tests/view_confirmation_integration_test.rs rename to atomic-cli/tests/it/view_confirmation_integration_test.rs diff --git a/atomic-cli/tests/working_copy_preservation_test.rs b/atomic-cli/tests/it/working_copy_preservation_test.rs similarity index 100% rename from atomic-cli/tests/working_copy_preservation_test.rs rename to atomic-cli/tests/it/working_copy_preservation_test.rs diff --git a/atomic-cli/tests/working_copy_service_adaptation_test.rs b/atomic-cli/tests/it/working_copy_service_adaptation_test.rs similarity index 100% rename from atomic-cli/tests/working_copy_service_adaptation_test.rs rename to atomic-cli/tests/it/working_copy_service_adaptation_test.rs diff --git a/atomic-cli/tests/workspace_txn_boundaries_cb5c_test.rs b/atomic-cli/tests/it/workspace_txn_boundaries_cb5c_test.rs similarity index 100% rename from atomic-cli/tests/workspace_txn_boundaries_cb5c_test.rs rename to atomic-cli/tests/it/workspace_txn_boundaries_cb5c_test.rs diff --git a/atomic-cli/tests/workspace_txn_routing_cb5b_test.rs b/atomic-cli/tests/it/workspace_txn_routing_cb5b_test.rs similarity index 100% rename from atomic-cli/tests/workspace_txn_routing_cb5b_test.rs rename to atomic-cli/tests/it/workspace_txn_routing_cb5b_test.rs diff --git a/atomic-cli/tests/workspace_txn_routing_cb5c_test.rs b/atomic-cli/tests/it/workspace_txn_routing_cb5c_test.rs similarity index 100% rename from atomic-cli/tests/workspace_txn_routing_cb5c_test.rs rename to atomic-cli/tests/it/workspace_txn_routing_cb5c_test.rs diff --git a/atomic-repository/tests/causal_file_identity_test.rs b/atomic-repository/tests/it/causal_file_identity_test.rs similarity index 100% rename from atomic-repository/tests/causal_file_identity_test.rs rename to atomic-repository/tests/it/causal_file_identity_test.rs diff --git a/atomic-repository/tests/cb_n6_merge_rubric_test.rs b/atomic-repository/tests/it/cb_n6_merge_rubric_test.rs similarity index 100% rename from atomic-repository/tests/cb_n6_merge_rubric_test.rs rename to atomic-repository/tests/it/cb_n6_merge_rubric_test.rs diff --git a/atomic-repository/tests/change_signing_test.rs b/atomic-repository/tests/it/change_signing_test.rs similarity index 100% rename from atomic-repository/tests/change_signing_test.rs rename to atomic-repository/tests/it/change_signing_test.rs diff --git a/atomic-repository/tests/content_roundtrip_fidelity_test.rs b/atomic-repository/tests/it/content_roundtrip_fidelity_test.rs similarity index 99% rename from atomic-repository/tests/content_roundtrip_fidelity_test.rs rename to atomic-repository/tests/it/content_roundtrip_fidelity_test.rs index 2e35fad3..60d4d9b1 100644 --- a/atomic-repository/tests/content_roundtrip_fidelity_test.rs +++ b/atomic-repository/tests/it/content_roundtrip_fidelity_test.rs @@ -1422,19 +1422,19 @@ fn hyperfine_fixture_versions() -> [(&'static str, &'static [u8]); 4] { [ ( "a658ab8c", - include_bytes!("fixtures/hyperfine/a658ab8c_main.rs"), + include_bytes!("../fixtures/hyperfine/a658ab8c_main.rs"), ), ( "d4ebdd7b", - include_bytes!("fixtures/hyperfine/d4ebdd7b_main.rs"), + include_bytes!("../fixtures/hyperfine/d4ebdd7b_main.rs"), ), ( "197f9fb", - include_bytes!("fixtures/hyperfine/197f9fb_main.rs"), + include_bytes!("../fixtures/hyperfine/197f9fb_main.rs"), ), ( "68fdc2c", - include_bytes!("fixtures/hyperfine/68fdc2c_main.rs"), + include_bytes!("../fixtures/hyperfine/68fdc2c_main.rs"), ), ] } diff --git a/atomic-repository/tests/database_consolidation_shim_test.rs b/atomic-repository/tests/it/database_consolidation_shim_test.rs similarity index 100% rename from atomic-repository/tests/database_consolidation_shim_test.rs rename to atomic-repository/tests/it/database_consolidation_shim_test.rs diff --git a/atomic-repository/tests/database_lock_exclusivity_test.rs b/atomic-repository/tests/it/database_lock_exclusivity_test.rs similarity index 93% rename from atomic-repository/tests/database_lock_exclusivity_test.rs rename to atomic-repository/tests/it/database_lock_exclusivity_test.rs index 27d8d3c0..d32c3b7c 100644 --- a/atomic-repository/tests/database_lock_exclusivity_test.rs +++ b/atomic-repository/tests/it/database_lock_exclusivity_test.rs @@ -12,6 +12,14 @@ const CHILD_ROOT: &str = "ATOMIC_DATABASE_LOCK_ROOT"; const CHILD_REPORT: &str = "ATOMIC_DATABASE_LOCK_REPORT"; const CHILD_TEST: &str = "database_handles_exclude_incompatible_opens_across_processes"; +/// libtest's name for the child test: its module path without the crate name. +fn child_test_name() -> String { + match module_path!().split_once("::") { + Some((_, module)) => format!("{module}::{CHILD_TEST}"), + None => CHILD_TEST.to_string(), + } +} + fn probe(root: &Path) -> String { let readonly = match Repository::open_readonly_wait(root, Duration::ZERO) { Ok(_) => "readonly-ok".to_string(), @@ -39,7 +47,7 @@ fn probe(root: &Path) -> String { fn child_probe(root: &Path, report_path: &Path) -> String { let mut child = Command::new(std::env::current_exe().expect("test binary path")) - .args(["--exact", CHILD_TEST, "--test-threads=1"]) + .args(["--exact", &child_test_name(), "--test-threads=1"]) .env(CHILD_ROOT, root) .env(CHILD_REPORT, report_path) .stdout(Stdio::piped()) diff --git a/atomic-repository/tests/database_open_wait_test.rs b/atomic-repository/tests/it/database_open_wait_test.rs similarity index 100% rename from atomic-repository/tests/database_open_wait_test.rs rename to atomic-repository/tests/it/database_open_wait_test.rs diff --git a/atomic-repository/tests/effective_history_test.rs b/atomic-repository/tests/it/effective_history_test.rs similarity index 100% rename from atomic-repository/tests/effective_history_test.rs rename to atomic-repository/tests/it/effective_history_test.rs diff --git a/atomic-repository/tests/effective_projection_3b_test.rs b/atomic-repository/tests/it/effective_projection_3b_test.rs similarity index 100% rename from atomic-repository/tests/effective_projection_3b_test.rs rename to atomic-repository/tests/it/effective_projection_3b_test.rs diff --git a/atomic-repository/tests/equivalence_cb4b_test.rs b/atomic-repository/tests/it/equivalence_cb4b_test.rs similarity index 100% rename from atomic-repository/tests/equivalence_cb4b_test.rs rename to atomic-repository/tests/it/equivalence_cb4b_test.rs diff --git a/atomic-repository/tests/implementation_declaration.rs b/atomic-repository/tests/it/implementation_declaration.rs similarity index 100% rename from atomic-repository/tests/implementation_declaration.rs rename to atomic-repository/tests/it/implementation_declaration.rs diff --git a/atomic-repository/tests/intent_graph.rs b/atomic-repository/tests/it/intent_graph.rs similarity index 100% rename from atomic-repository/tests/intent_graph.rs rename to atomic-repository/tests/it/intent_graph.rs diff --git a/atomic-repository/tests/kg_change_availability.rs b/atomic-repository/tests/it/kg_change_availability.rs similarity index 100% rename from atomic-repository/tests/kg_change_availability.rs rename to atomic-repository/tests/it/kg_change_availability.rs diff --git a/atomic-repository/tests/kg_projection.rs b/atomic-repository/tests/it/kg_projection.rs similarity index 100% rename from atomic-repository/tests/kg_projection.rs rename to atomic-repository/tests/it/kg_projection.rs diff --git a/atomic-repository/tests/kg_recorded_impact.rs b/atomic-repository/tests/it/kg_recorded_impact.rs similarity index 100% rename from atomic-repository/tests/kg_recorded_impact.rs rename to atomic-repository/tests/it/kg_recorded_impact.rs diff --git a/atomic-repository/tests/legacy_database_merge_test.rs b/atomic-repository/tests/it/legacy_database_merge_test.rs similarity index 100% rename from atomic-repository/tests/legacy_database_merge_test.rs rename to atomic-repository/tests/it/legacy_database_merge_test.rs diff --git a/atomic-repository/tests/it/main.rs b/atomic-repository/tests/it/main.rs new file mode 100644 index 00000000..4352846a --- /dev/null +++ b/atomic-repository/tests/it/main.rs @@ -0,0 +1,40 @@ +//! All atomic-repository integration tests, built as one binary so the workspace is +//! linked once instead of once per file. Each module is a former +//! `tests/.rs`; run one with `cargo test -p atomic-repository --test it ::`. + +mod causal_file_identity_test; +mod cb_n6_merge_rubric_test; +mod change_signing_test; +mod content_roundtrip_fidelity_test; +mod database_consolidation_shim_test; +mod database_lock_exclusivity_test; +mod database_open_wait_test; +mod effective_history_test; +mod effective_projection_3b_test; +mod equivalence_cb4b_test; +mod implementation_declaration; +mod intent_graph; +mod kg_change_availability; +mod kg_projection; +mod kg_recorded_impact; +mod legacy_database_merge_test; +mod materialize_view_entries_test; +mod migration_recovery_test; +mod patch_evidence; +mod project_identity; +mod project_identity_transport; +mod project_tree_cb4a_test; +mod provenance_checkpoint_test; +mod remote_cache_parity_test; +mod revise_content_regression; +mod schema_guard_test; +mod staging_cb11a_test; +mod stash_attributes_test; +mod state_based_diff_test; +mod unrecord_safety_test; +mod view_delete_test; +mod view_manifest_test; +mod view_setid_test; +mod view_split_test; +mod whole_file_diff_test; +mod workflow_usage; diff --git a/atomic-repository/tests/materialize_view_entries_test.rs b/atomic-repository/tests/it/materialize_view_entries_test.rs similarity index 100% rename from atomic-repository/tests/materialize_view_entries_test.rs rename to atomic-repository/tests/it/materialize_view_entries_test.rs diff --git a/atomic-repository/tests/migration_recovery_test.rs b/atomic-repository/tests/it/migration_recovery_test.rs similarity index 100% rename from atomic-repository/tests/migration_recovery_test.rs rename to atomic-repository/tests/it/migration_recovery_test.rs diff --git a/atomic-repository/tests/patch_evidence.rs b/atomic-repository/tests/it/patch_evidence.rs similarity index 100% rename from atomic-repository/tests/patch_evidence.rs rename to atomic-repository/tests/it/patch_evidence.rs diff --git a/atomic-repository/tests/project_identity.rs b/atomic-repository/tests/it/project_identity.rs similarity index 100% rename from atomic-repository/tests/project_identity.rs rename to atomic-repository/tests/it/project_identity.rs diff --git a/atomic-repository/tests/project_identity_transport.rs b/atomic-repository/tests/it/project_identity_transport.rs similarity index 100% rename from atomic-repository/tests/project_identity_transport.rs rename to atomic-repository/tests/it/project_identity_transport.rs diff --git a/atomic-repository/tests/project_tree_cb4a_test.rs b/atomic-repository/tests/it/project_tree_cb4a_test.rs similarity index 100% rename from atomic-repository/tests/project_tree_cb4a_test.rs rename to atomic-repository/tests/it/project_tree_cb4a_test.rs diff --git a/atomic-repository/tests/provenance_checkpoint_test.rs b/atomic-repository/tests/it/provenance_checkpoint_test.rs similarity index 100% rename from atomic-repository/tests/provenance_checkpoint_test.rs rename to atomic-repository/tests/it/provenance_checkpoint_test.rs diff --git a/atomic-repository/tests/remote_cache_parity_test.rs b/atomic-repository/tests/it/remote_cache_parity_test.rs similarity index 100% rename from atomic-repository/tests/remote_cache_parity_test.rs rename to atomic-repository/tests/it/remote_cache_parity_test.rs diff --git a/atomic-repository/tests/revise_content_regression.rs b/atomic-repository/tests/it/revise_content_regression.rs similarity index 100% rename from atomic-repository/tests/revise_content_regression.rs rename to atomic-repository/tests/it/revise_content_regression.rs diff --git a/atomic-repository/tests/schema_guard_test.rs b/atomic-repository/tests/it/schema_guard_test.rs similarity index 100% rename from atomic-repository/tests/schema_guard_test.rs rename to atomic-repository/tests/it/schema_guard_test.rs diff --git a/atomic-repository/tests/staging_cb11a_test.rs b/atomic-repository/tests/it/staging_cb11a_test.rs similarity index 100% rename from atomic-repository/tests/staging_cb11a_test.rs rename to atomic-repository/tests/it/staging_cb11a_test.rs diff --git a/atomic-repository/tests/stash_attributes_test.rs b/atomic-repository/tests/it/stash_attributes_test.rs similarity index 100% rename from atomic-repository/tests/stash_attributes_test.rs rename to atomic-repository/tests/it/stash_attributes_test.rs diff --git a/atomic-repository/tests/state_based_diff_test.rs b/atomic-repository/tests/it/state_based_diff_test.rs similarity index 100% rename from atomic-repository/tests/state_based_diff_test.rs rename to atomic-repository/tests/it/state_based_diff_test.rs diff --git a/atomic-repository/tests/unrecord_safety_test.rs b/atomic-repository/tests/it/unrecord_safety_test.rs similarity index 100% rename from atomic-repository/tests/unrecord_safety_test.rs rename to atomic-repository/tests/it/unrecord_safety_test.rs diff --git a/atomic-repository/tests/view_delete_test.rs b/atomic-repository/tests/it/view_delete_test.rs similarity index 100% rename from atomic-repository/tests/view_delete_test.rs rename to atomic-repository/tests/it/view_delete_test.rs diff --git a/atomic-repository/tests/view_manifest_test.rs b/atomic-repository/tests/it/view_manifest_test.rs similarity index 100% rename from atomic-repository/tests/view_manifest_test.rs rename to atomic-repository/tests/it/view_manifest_test.rs diff --git a/atomic-repository/tests/view_setid_test.rs b/atomic-repository/tests/it/view_setid_test.rs similarity index 100% rename from atomic-repository/tests/view_setid_test.rs rename to atomic-repository/tests/it/view_setid_test.rs diff --git a/atomic-repository/tests/view_split_test.rs b/atomic-repository/tests/it/view_split_test.rs similarity index 100% rename from atomic-repository/tests/view_split_test.rs rename to atomic-repository/tests/it/view_split_test.rs diff --git a/atomic-repository/tests/whole_file_diff_test.rs b/atomic-repository/tests/it/whole_file_diff_test.rs similarity index 100% rename from atomic-repository/tests/whole_file_diff_test.rs rename to atomic-repository/tests/it/whole_file_diff_test.rs diff --git a/atomic-repository/tests/workflow_usage.rs b/atomic-repository/tests/it/workflow_usage.rs similarity index 100% rename from atomic-repository/tests/workflow_usage.rs rename to atomic-repository/tests/it/workflow_usage.rs diff --git a/docs/intent-graph.md b/docs/intent-graph.md index abc02da9..579f81b6 100644 --- a/docs/intent-graph.md +++ b/docs/intent-graph.md @@ -86,7 +86,7 @@ Browser interaction regressions can be run explicitly with Chrome/Chromium: ```sh ATOMIC_TEST_CHROME=/path/to/chrome \ - cargo test -p atomic-cli --test intent_graph_test -- --ignored + cargo test -p atomic-cli --test it -- intent_graph_test:: --ignored ``` Set `ATOMIC_TEST_D3=/path/to/d3.min.js` to use a local D3 v7 bundle for the canvas diff --git a/docs/provenance-pagination.md b/docs/provenance-pagination.md index 11161e7c..9c8b7545 100644 --- a/docs/provenance-pagination.md +++ b/docs/provenance-pagination.md @@ -50,8 +50,8 @@ multiple pages. ```sh cargo test -p atomic-cli --bin atomic commands::agent::owner::tests -cargo test -p atomic-repository --test provenance_checkpoint_test -cargo test -p atomic-cli --test database_owner_integration_test +cargo test -p atomic-repository --test it -- provenance_checkpoint_test:: +cargo test -p atomic-cli --test it -- database_owner_integration_test:: cargo test --workspace ``` diff --git a/docs/record-status-name-conflict.md b/docs/record-status-name-conflict.md index f40ea4eb..fcb6c201 100644 --- a/docs/record-status-name-conflict.md +++ b/docs/record-status-name-conflict.md @@ -107,7 +107,7 @@ inode. Removing and re-adding the file is unnecessary. cargo build -p atomic-cli --release ATOMIC_BIN="$PWD/target/release/atomic" bash tests/harness/run_all.sh 39 41 cargo test -p atomic-core -p atomic-repository --lib -cargo test -p atomic-repository --test causal_file_identity_test +cargo test -p atomic-repository --test it -- causal_file_identity_test:: ``` Suite 39 is the unchanged prior view-switch regression. Suite 41 adds the diff --git a/tests/harness/46_database_locking.sh b/tests/harness/46_database_locking.sh index 06165edc..06c5be79 100755 --- a/tests/harness/46_database_locking.sh +++ b/tests/harness/46_database_locking.sh @@ -79,21 +79,21 @@ run_check dependencies cargo tree --locked -p atomic-core --depth 1 if [[ "$full" -eq 1 ]]; then run_check pristine cargo test --locked -p atomic-core --lib pristine:: -- --test-threads=4 - run_check storage cargo test --locked -p atomic-core --test merge_test \ - -p atomic-repository --test database_lock_exclusivity_test \ - --test database_open_wait_test --test database_consolidation_bridge_test \ - --test legacy_database_merge_test --test schema_guard_test \ - --test provenance_checkpoint_test + run_check storage-core cargo test --locked -p atomic-core --test merge_test + run_check storage cargo test --locked -p atomic-repository --test it -- \ + database_lock_exclusivity_test:: database_open_wait_test:: \ + database_consolidation_shim_test:: legacy_database_merge_test:: \ + schema_guard_test:: provenance_checkpoint_test:: run_check libatomic cargo check --locked -p libatomic else run_check snapshots cargo test --locked -p atomic-core --lib \ pristine::txn::pristine::snapshot::tests run_check exclusion cargo test --locked -p atomic-repository \ - --test database_lock_exclusivity_test + --test it -- database_lock_exclusivity_test:: run_check lock-waits cargo test --locked -p atomic-repository \ - --test database_open_wait_test + --test it -- database_open_wait_test:: run_check provenance cargo test --locked -p atomic-repository \ - --test provenance_checkpoint_test + --test it -- provenance_checkpoint_test:: fi printf '\nChecks: %s passed, %s failed\nSummary: %s\n' "$passed" "$failed" "$summary" diff --git a/tests/harness/46_knowledge_graph_closure.sh b/tests/harness/46_knowledge_graph_closure.sh index 674b7315..4d928b3f 100644 --- a/tests/harness/46_knowledge_graph_closure.sh +++ b/tests/harness/46_knowledge_graph_closure.sh @@ -7,7 +7,7 @@ source "$HARNESS_DIR/helpers.sh" python3 "$HARNESS_DIR/kg_closure_e2e.py" --binary "$ATOMIC_BIN" python3 "$HARNESS_DIR/kg_closure_baseline.py" --binary "$ATOMIC_BIN" --check cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-core --test kg_ontology --test kg_iri --test kg_vocabulary_lint --quiet -cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-repository --test project_identity --test kg_projection --quiet +cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-repository --test it --quiet -- project_identity:: kg_projection:: cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-shacl --quiet cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p libatomic --test signer_refresh --quiet -cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-cli --test kg_service_integration_test --quiet +cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-cli --test it --quiet -- kg_service_integration_test:: From fa8b080944082b0e88e1f447a17df80d14010906 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 15:22:07 +0000 Subject: [PATCH 4/7] test: fold the integration tests added on dev into the `it` binaries dev added four atomic-cli and one atomic-repository integration test file at the top of tests/; move them into tests/it/ with the rest, and point docs/shim-review-testing.md's suite commands at `--test it`. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- ..._import_stale_edge_dead_walk_regression.rs | 0 .../git_import_tree_shape_regression.rs | 0 .../git_shim_branch_reconcile_regression.rs | 0 .../git_shim_daily_workflow_regression.rs | 0 atomic-cli/tests/it/main.rs | 4 +++ atomic-repository/tests/it/main.rs | 1 + .../zero_length_vertex_regression_test.rs | 0 docs/shim-review-testing.md | 28 +++++++++---------- 8 files changed, 19 insertions(+), 14 deletions(-) rename atomic-cli/tests/{ => it}/git_import_stale_edge_dead_walk_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_import_tree_shape_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_branch_reconcile_regression.rs (100%) rename atomic-cli/tests/{ => it}/git_shim_daily_workflow_regression.rs (100%) rename atomic-repository/tests/{ => it}/zero_length_vertex_regression_test.rs (100%) diff --git a/atomic-cli/tests/git_import_stale_edge_dead_walk_regression.rs b/atomic-cli/tests/it/git_import_stale_edge_dead_walk_regression.rs similarity index 100% rename from atomic-cli/tests/git_import_stale_edge_dead_walk_regression.rs rename to atomic-cli/tests/it/git_import_stale_edge_dead_walk_regression.rs diff --git a/atomic-cli/tests/git_import_tree_shape_regression.rs b/atomic-cli/tests/it/git_import_tree_shape_regression.rs similarity index 100% rename from atomic-cli/tests/git_import_tree_shape_regression.rs rename to atomic-cli/tests/it/git_import_tree_shape_regression.rs diff --git a/atomic-cli/tests/git_shim_branch_reconcile_regression.rs b/atomic-cli/tests/it/git_shim_branch_reconcile_regression.rs similarity index 100% rename from atomic-cli/tests/git_shim_branch_reconcile_regression.rs rename to atomic-cli/tests/it/git_shim_branch_reconcile_regression.rs diff --git a/atomic-cli/tests/git_shim_daily_workflow_regression.rs b/atomic-cli/tests/it/git_shim_daily_workflow_regression.rs similarity index 100% rename from atomic-cli/tests/git_shim_daily_workflow_regression.rs rename to atomic-cli/tests/it/git_shim_daily_workflow_regression.rs diff --git a/atomic-cli/tests/it/main.rs b/atomic-cli/tests/it/main.rs index 3bfd4116..2dbc5a1e 100644 --- a/atomic-cli/tests/it/main.rs +++ b/atomic-cli/tests/it/main.rs @@ -36,13 +36,17 @@ mod git_import_generated_modify_test; mod git_import_path_audit_test; mod git_import_sibling_closure_regression; mod git_import_sibling_leg_modify_regression; +mod git_import_stale_edge_dead_walk_regression; mod git_import_tracked_vault_regression; +mod git_import_tree_shape_regression; mod git_observation_cb0a_test; mod git_projection_cb8a_test; mod git_push_cb4b_test; +mod git_shim_branch_reconcile_regression; mod git_shim_cb0d_test; mod git_shim_cb10a_test; mod git_shim_cb13d_test; +mod git_shim_daily_workflow_regression; mod git_shim_logging_test; mod git_shim_opt_in_test; mod git_shim_workspace_test; diff --git a/atomic-repository/tests/it/main.rs b/atomic-repository/tests/it/main.rs index 4352846a..52c04f26 100644 --- a/atomic-repository/tests/it/main.rs +++ b/atomic-repository/tests/it/main.rs @@ -38,3 +38,4 @@ mod view_setid_test; mod view_split_test; mod whole_file_diff_test; mod workflow_usage; +mod zero_length_vertex_regression_test; diff --git a/atomic-repository/tests/zero_length_vertex_regression_test.rs b/atomic-repository/tests/it/zero_length_vertex_regression_test.rs similarity index 100% rename from atomic-repository/tests/zero_length_vertex_regression_test.rs rename to atomic-repository/tests/it/zero_length_vertex_regression_test.rs diff --git a/docs/shim-review-testing.md b/docs/shim-review-testing.md index 228f817a..1f1e4f83 100644 --- a/docs/shim-review-testing.md +++ b/docs/shim-review-testing.md @@ -204,25 +204,25 @@ Check failures and skipped tests in the output. ```sh cd "$ATOMIC_REVIEW_SOURCE" -cargo test --locked -p atomic-cli \ - --test adaptation_regression_test \ - --test git_shim_opt_in_test \ - --test git_shim_workspace_test \ - --test bridge_agent_workflow_regression_test \ - --test git_shim_logging_test - -cargo test --locked -p atomic-cli \ - --test working_copy_service_adaptation_test \ - --test compact_service_integration_test +cargo test --locked -p atomic-cli --test it -- \ + adaptation_regression_test:: \ + git_shim_opt_in_test:: \ + git_shim_workspace_test:: \ + bridge_agent_workflow_regression_test:: \ + git_shim_logging_test:: + +cargo test --locked -p atomic-cli --test it -- \ + working_copy_service_adaptation_test:: \ + compact_service_integration_test:: cargo test --locked -p libatomic \ --test record_service_test --test status_service_test --test sandbox_service_test -cargo test --locked -p atomic-repository \ - --test database_consolidation_shim_test --test migration_recovery_test +cargo test --locked -p atomic-repository --test it -- \ + database_consolidation_shim_test:: migration_recovery_test:: cargo test --locked -p atomic-cli \ - --features adoption-test-injection \ - --test git_shim_cb13d_test --test git_cutover_cb13b_test + --features adoption-test-injection --test it -- \ + git_shim_cb13d_test:: git_cutover_cb13b_test:: ``` `working_copy_service_adaptation_test` starts a real RPC server using this From cd11b7f78969c30da2606db8a896ad54a68ec57e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 15:35:01 +0000 Subject: [PATCH 5/7] fix(test): use file_serial for the git import tests added alongside #294 #292 added five #[serial] tests to git/import.rs while #294 switched the module's import to serial_test::file_serial, so dev no longer compiles atomic-cli's tests (cannot find attribute `serial`). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- atomic-cli/src/commands/git/import.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/atomic-cli/src/commands/git/import.rs b/atomic-cli/src/commands/git/import.rs index 77a80037..74abacd1 100644 --- a/atomic-cli/src/commands/git/import.rs +++ b/atomic-cli/src/commands/git/import.rs @@ -1825,7 +1825,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -1905,7 +1905,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg_attr( not(unix), ignore = "the Git shim projection requires lossless unix paths (ProjectTreeError::UnsupportedPlatformPath)" @@ -1944,7 +1944,7 @@ mod tests { #[cfg(not(unix))] #[test] - #[serial] + #[file_serial] fn stream_refuses_unsupported_native_paths_before_initialization() { let temp = tempfile::tempdir().unwrap(); init_git(temp.path()); @@ -1967,7 +1967,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] #[cfg(unix)] fn stream_flag_imports_spaces_unicode_percent_and_symlinks() { let temp = tempfile::tempdir().unwrap(); @@ -2051,7 +2051,7 @@ mod tests { } #[test] - #[serial] + #[file_serial] fn unsupported_stream_boundary_rejects_before_atomic_or_git_exclude_writes() { let temp = tempfile::tempdir().unwrap(); init_git(temp.path()); From 0ff604b230f182ba42f506f4b1c229eb4ea5ec03 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 15:35:44 +0000 Subject: [PATCH 6/7] ci: don't rebuild the crate graph for the knowledge graph harness's cargo tests The harness ended with five `cargo test -p ...` runs whose package and feature selection differs from the workspace test step, so on Ubuntu each rebuilt atomic-core..atomic-cli: about 5.5 of the step's 6 minutes, to rerun about 30 tests nextest had just run. CI now sets ATOMIC_HARNESS_SKIP_CARGO_TESTS=1 so the harness runs only its end-to-end checks; locally it still runs everything. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- .github/workflows/ci.yml | 3 +++ tests/harness/46_knowledge_graph_closure.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90aa9d54..0431d762 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,6 +114,9 @@ jobs: - name: Run knowledge graph closure harness if: matrix.os == 'ubuntu-latest' shell: bash + # The harness's own cargo test suites already ran under nextest above. + env: + ATOMIC_HARNESS_SKIP_CARGO_TESTS: 1 run: ATOMIC_BIN="$PWD/target/debug/atomic" bash tests/harness/46_knowledge_graph_closure.sh fmt: diff --git a/tests/harness/46_knowledge_graph_closure.sh b/tests/harness/46_knowledge_graph_closure.sh index 4d928b3f..4a8d0c2e 100644 --- a/tests/harness/46_knowledge_graph_closure.sh +++ b/tests/harness/46_knowledge_graph_closure.sh @@ -6,6 +6,11 @@ HARNESS_DIR="$(cd "$(dirname "$0")" && pwd)" source "$HARNESS_DIR/helpers.sh" python3 "$HARNESS_DIR/kg_closure_e2e.py" --binary "$ATOMIC_BIN" python3 "$HARNESS_DIR/kg_closure_baseline.py" --binary "$ATOMIC_BIN" --check +# CI already runs these suites in its workspace test step, and invoking them +# here with a different package/feature set rebuilds the crate graph. +if [[ "${ATOMIC_HARNESS_SKIP_CARGO_TESTS:-0}" == 1 ]]; then + exit 0 +fi cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-core --test kg_ontology --test kg_iri --test kg_vocabulary_lint --quiet cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-repository --test it --quiet -- project_identity:: kg_projection:: cargo test --manifest-path "$HARNESS_DIR/../../Cargo.toml" -p atomic-shacl --quiet From 6f05db6479502fbca5209e8167bed4cf7baf6936 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 15:55:17 +0000 Subject: [PATCH 7/7] ci: stop the doctest step from rebuilding the workspace With CARGO_PROFILE_{DEV,TEST}_DEBUG=line-tables-only, a crate that is both a build-script dependency and a normal dependency gets line tables, while build-only dependencies keep no debug info. shlex is in the first group in the full nextest build but only a build dependency in the lib-only doctest build, so its hash changed and cargo rebuilt cc, every crate whose build script uses it (ring, openssl-src, blake3, zstd-sys, libgit2-sys, the tree-sitter grammars), and everything above them: 46 crates, about 2.5 minutes per job. Give build-override the same debug setting so both builds share one unit graph. Locally the doctest step now compiles nothing and finishes in 59s. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7Qtv4d7qvSRuAvEB5Bpha --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0431d762..013c2fd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,14 @@ jobs: # target/ (and the cache) much smaller than full debug info. CARGO_PROFILE_DEV_DEBUG: line-tables-only CARGO_PROFILE_TEST_DEBUG: line-tables-only + # Build-script dependencies default to no debug info, except crates that + # are also normal dependencies, which take the line above. Which crates + # those are differs between the nextest build and the lib-only doctest + # build (shlex, which cc depends on), so without this the doctest step + # rebuilt cc, every crate whose build script uses it, and everything + # above them. + CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG: line-tables-only + CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG: line-tables-only steps: - uses: actions/checkout@v4