diff --git a/.github/test-suite-registry.json b/.github/test-suite-registry.json index 090c537885..6fd842828c 100644 --- a/.github/test-suite-registry.json +++ b/.github/test-suite-registry.json @@ -976,10 +976,15 @@ "pkgs/atlas-search/crates/**/src/**" ], "invocation": "cd pkgs/atlas-search && cargo test --workspace --all-targets", - "venue": null, - "status": "uncovered", + "venue": { + "workflow": ".github/workflows/atlas-search-pr.yml", + "job_step": "atlas-search / Test atlas-search, Test atlas-core, Test atlas-proto, Test atlas-embed", + "state": "active", + "dispatchable": true + }, + "status": "mapped", "phase2_issue": 6185, - "reason": "Flake checks.default exists, but no workflow invocation was confirmed; Phase 2 follow-up must be filed." + "reason": "Wired by #7825: atlas-search-pr.yml runs all four crates with --all-targets on pull_request, push to main, and workflow_dispatch. gate_a's model test remains #[ignore]d (requires ATLAS_ORT_LIB and the pinned model snapshot)." }, { "id": "fleet.rust", diff --git a/.github/workflows/atlas-search-pr.yml b/.github/workflows/atlas-search-pr.yml index 81c8035394..590f5889cd 100644 --- a/.github/workflows/atlas-search-pr.yml +++ b/.github/workflows/atlas-search-pr.yml @@ -11,19 +11,28 @@ on: paths: - "pkgs/atlas-search/**" - ".github/workflows/atlas-search-pr.yml" + push: + branches: [main] + paths: + - "pkgs/atlas-search/**" + - ".github/workflows/atlas-search-pr.yml" + workflow_dispatch: permissions: contents: read concurrency: - group: atlas-search-${{ github.ref }} + # Push-to-main runs are keyed by run_id so every merged tree gets its + # own completed run (the scripts-test/nix-ci contract); pull-request + # runs share a per-ref group so a new push supersedes the stale one. + group: atlas-search-${{ github.event_name == 'push' && github.run_id || github.ref }} cancel-in-progress: true jobs: atlas-search: name: "basic: atlas-search Rust checks" runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 30 steps: - uses: actions/checkout@v7 @@ -31,7 +40,16 @@ jobs: run: rustup toolchain install 1.99.0 --profile minimal - name: Test atlas-search - run: cargo +1.99.0 test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-search + run: cargo +1.99.0 test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-search --all-targets - name: Test atlas-core - run: cargo +1.99.0 test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-core + run: cargo +1.99.0 test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-core --all-targets + + - name: Test atlas-proto + run: cargo +1.99.0 test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-proto --all-targets + + # gate_a's model test stays #[ignore]d here: it requires + # ATLAS_ORT_LIB and the pinned model snapshot (see the test's + # file docs) — the venue runs the crate's remaining targets. + - name: Test atlas-embed + run: cargo +1.99.0 test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-embed --all-targets diff --git a/pkgs/atlas-search/crates/atlas-search/tests/cli_parity.rs b/pkgs/atlas-search/crates/atlas-search/tests/cli_parity.rs index 2cbdf860ac..4544e3455e 100644 --- a/pkgs/atlas-search/crates/atlas-search/tests/cli_parity.rs +++ b/pkgs/atlas-search/crates/atlas-search/tests/cli_parity.rs @@ -61,10 +61,21 @@ fn build_fixture_db(tag: &str) -> PathBuf { } fn qvec_file() -> PathBuf { - let exp = expectations(); - let p = std::env::temp_dir().join(format!("atlas-cli-qvec-{}.json", std::process::id())); - std::fs::write(&p, serde_json::to_string(&exp["qvec_raw"]).unwrap()).expect("write qvec"); - p + // Written once per test-binary run. The path is named by pid and + // shared by every test in this binary, and the tests run in + // parallel: rewriting the file on every call let one test's CLI + // read it mid-truncate from another test's rewrite and fail with + // an empty-JSON error (seen under `cargo test --all-targets`, + // where the extra load widens the race window). The content is + // the shared golden fixture, identical for every caller. + static QVEC: std::sync::OnceLock = std::sync::OnceLock::new(); + QVEC.get_or_init(|| { + let exp = expectations(); + let p = std::env::temp_dir().join(format!("atlas-cli-qvec-{}.json", std::process::id())); + std::fs::write(&p, serde_json::to_string(&exp["qvec_raw"]).unwrap()).expect("write qvec"); + p + }) + .clone() } fn run_bin(db: &Path, args: &[&str]) -> std::process::Output {