Repository navigation
test: cut slow Rust test wall time - #260
Merged
Merged
Conversation
…upt tests The two Merging-supersede run tests waited out the scheduler's hardcoded 30s running-state refresh before observing the tracker transition. SchedulerConfig now carries the cadence (default 30s) and OPENSYMPHONY_RUNNING_STATE_REFRESH_MS overrides it for opensymphony run; the tests set it to 50ms.
doctor and install tests located the real bash with `bash -lc`, which sources the developer's profile and took about 5s per lookup on macOS. A non-login shell resolves the same binary.
The contract-endpoint test persisted two 505-document fixtures to cross the 500-record atlas cap. Those scenarios use their own repository ids, so they move to a separate test with a fresh store and run in parallel.
A pull request that restored the main cache reused the duckdb build-script output, which skipped the download, while rust-cache had pruned target/duckdb-download. Linking the test binaries then failed with `unable to find library -lduckdb`.
Existing caches predate the cache-directories entry; a new key forces one cold build that saves the library alongside the target dir.
kumanday
marked this pull request as ready for review
November 8, 2026 20:39
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #259. Cuts the Rust test wall time by fixing tests that waited on clocks or shells instead of doing work. Every assertion is kept.
SchedulerConfignow carriesrunning_state_refresh_interval_ms(default 30s, unchanged for operators), andopensymphony runacceptsOPENSYMPHONY_RUNNING_STATE_REFRESH_MSas a positive-millisecond override; invalid values are ignored with a warning. The two tests set it to 50ms. The snapshot poll in their wait helpers drops from 250ms to 50ms. The "exactly one/interrupt" assertion still holds (10/10 local repeats).real_bash_path()ranbash -lc, which sources the developer's login profile (about 5s on a typical macOS setup). A non-loginbash -cresolves the same binary. CI was already fast here.gateway_code_graph_atlas_caps_and_dedupes_large_repositorieswith a fresh store and run in parallel with the endpoint checks. Total test time is unchanged, but the longest single test is shorter.maincache reused thelibduckdb-sysbuild-script output (so the download was skipped), while rust-cache had prunedtarget/duckdb-download. The test binaries then failed to link (unable to find library -lduckdb). The first run of this branch hit it.rust-testnow caches that directory and uses a new cache key so the nextmainrun saves it.Docs:
docs/operations.md,docs/configuration.md,docs/testing-and-operations.md.Not changed (production-bound)
These are slow because of production code paths, not test waits:
workspace_manager::parent_execution_root_reuses_three_repositories_and_preserves_children: about 4,600gitsubprocesses from checkout verification (for example, 152git fsckruns). It takes 9–11s on Linux CI and 85–95s on macOS, where each spawn goes through the Xcodegitshim.target_branch_index_bootstraps_and_advances_immutable_snapshotsand the other memory code-graph tests: DuckDB per-rowINSERT OR REPLACE(planned as a MERGE, about 0.8ms per statement), five stalenessUPDATEs per document, a fresh database instance plusmigrate_indexper helper call, and per-filegit cat-filespawns during indexing.prepare_cachedgave no measurable gain. Speeding these up means batching writes and sharing connections inopensymphony-memory.Evidence
CI
rust-testjob, latestmainpush run before this change vs this branch (both nextestciprofile, 4-vCPU runner):run::run_interrupts_active_codex_stdio_worker_when_tracker_reports_mergingrun::run_recovers_human_review_worker_and_interrupts_when_tracker_reports_merginggateway::gateway_serves_code_graph_contract_endpointsgateway::gateway_code_graph_atlas_caps_and_dedupes_large_repositories(split out)doctor::doctor_accepts_present_prerequisites_from_pathworkspace_manager::parent_execution_root_reuses_three_repositories_and_preserves_childrenopensymphony_memory::code_graph_tests::target_branch_index_bootstraps_and_advances_immutable_snapshotsLocal macOS (Apple Silicon, shared machine under load, so absolute times are noisy):
doctor::doctor_accepts_present_prerequisites_from_pathdoctor::doctor_bootstraps_missing_managed_local_tooling_into_explicit_configured_dirinstall::*(5 tests)Validation:
cargo nextest run --no-default-features --features duckdb-prebuilt --profile ci: 2265/2267 pass locally. The two failures are the known macOS-onlymigrationtests (/varsymlink), which fail onmaintoo. All tests pass on CI.cargo fmt --all --checkandcargo clippy-devare clean.running_state_refresh_override_accepts_only_positive_milliseconds.