From 7365b4e1df3165554d97a0dd8bbc8a3846d468e4 Mon Sep 17 00:00:00 2001 From: Jens Holdgaard Pedersen Date: Mon, 6 Jul 2026 13:00:27 +0200 Subject: [PATCH] =?UTF-8?q?test(miner):=20rfc=200028=20slice=202e=20?= =?UTF-8?q?=E2=80=94=203=20test=20binaries=20fold=20into=20one=20harness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pure moves (incl. the proptest-regressions sidecar) + the harness main.rs; the weekly deep-run's miner line retargets in the same commit (RFC0028.5). Four binaries stay dedicated (RFC0028.2): each installs the process-global OTel meter provider for one telemetry arm — reasons in tests/README.md. Co-Authored-By: Claude Fable 5 --- .github/workflows/rfc0024-deep-run.yml | 2 +- crates/ourios-miner/tests/README.md | 18 ++++++++++++++++++ crates/ourios-miner/tests/it/main.rs | 14 ++++++++++++++ .../{ => it}/rfc0004_configuration_policy.rs | 0 .../tests/{ => it}/rfc0017_template_created.rs | 0 .../rfc0024_properties.proptest-regressions | 0 .../tests/{ => it}/rfc0024_properties.rs | 0 7 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 crates/ourios-miner/tests/README.md create mode 100644 crates/ourios-miner/tests/it/main.rs rename crates/ourios-miner/tests/{ => it}/rfc0004_configuration_policy.rs (100%) rename crates/ourios-miner/tests/{ => it}/rfc0017_template_created.rs (100%) rename crates/ourios-miner/tests/{ => it}/rfc0024_properties.proptest-regressions (100%) rename crates/ourios-miner/tests/{ => it}/rfc0024_properties.rs (100%) diff --git a/.github/workflows/rfc0024-deep-run.yml b/.github/workflows/rfc0024-deep-run.yml index 714175cf..eb1b7d41 100644 --- a/.github/workflows/rfc0024-deep-run.yml +++ b/.github/workflows/rfc0024-deep-run.yml @@ -38,7 +38,7 @@ jobs: PROPTEST_CASES: "512" run: | cargo test -p ourios-testgen --release - cargo test -p ourios-miner --release --test rfc0024_properties + cargo test -p ourios-miner --release --test it rfc0024_properties cargo test -p ourios-parquet --release --test it rfc0024_properties cargo test -p ourios-querier --release --test it rfc0024_properties cargo test -p ourios-bench --release --test rfc0024_calibration diff --git a/crates/ourios-miner/tests/README.md b/crates/ourios-miner/tests/README.md new file mode 100644 index 00000000..4a6c9a6c --- /dev/null +++ b/crates/ourios-miner/tests/README.md @@ -0,0 +1,18 @@ +# Integration-test layout (RFC 0028 slice 2) + +`it/` is the consolidated harness — one compiled binary for this crate's +integration tests (RFC 0028 §3.1; the per-binary link cost dominated +`cargo test` wall time). New integration tests go in `it/.rs` plus a +`mod` line in `it/main.rs`, unless they belong on the exempt list below. + +## Harness-exempt binaries (RFC0028.2) + +Each of these installs the **process-global** OTel meter provider +(`ourios_telemetry::init_in_memory`) for one telemetry arm. OpenTelemetry +cannot restore a replaced global, so two installers in one process race +each other; they stay one-per-binary: + +- `invariants.rs` — the §6.5 param-overflow metrics arm. +- `hazards.rs` — the per-service overflow-rate alert-threshold arm. +- `rfc0023_bounded_memory.rs` — the template-ceiling/eviction metrics arm. +- `rfc_internal.rs` — the confidence-gauge quantile arm. diff --git a/crates/ourios-miner/tests/it/main.rs b/crates/ourios-miner/tests/it/main.rs new file mode 100644 index 00000000..815ffa95 --- /dev/null +++ b/crates/ourios-miner/tests/it/main.rs @@ -0,0 +1,14 @@ +//! The consolidated miner integration-test harness (RFC 0028 slice 2). +//! +//! Three binaries fold here (RFC 0028 §1 / epic #382 — per-binary link +//! cost dominates `cargo test` wall time); files moved verbatim from +//! `tests/*.rs`, test names gaining only this harness's module-path +//! prefix (RFC0028.1). Four binaries stay dedicated (RFC0028.2): +//! `invariants.rs`, `hazards.rs`, `rfc0023_bounded_memory.rs`, and +//! `rfc_internal.rs` each install the process-global `OTel` meter +//! provider (`init_in_memory`) for one telemetry arm, and two installers +//! in one process race — see `tests/README.md`. + +mod rfc0004_configuration_policy; +mod rfc0017_template_created; +mod rfc0024_properties; diff --git a/crates/ourios-miner/tests/rfc0004_configuration_policy.rs b/crates/ourios-miner/tests/it/rfc0004_configuration_policy.rs similarity index 100% rename from crates/ourios-miner/tests/rfc0004_configuration_policy.rs rename to crates/ourios-miner/tests/it/rfc0004_configuration_policy.rs diff --git a/crates/ourios-miner/tests/rfc0017_template_created.rs b/crates/ourios-miner/tests/it/rfc0017_template_created.rs similarity index 100% rename from crates/ourios-miner/tests/rfc0017_template_created.rs rename to crates/ourios-miner/tests/it/rfc0017_template_created.rs diff --git a/crates/ourios-miner/tests/rfc0024_properties.proptest-regressions b/crates/ourios-miner/tests/it/rfc0024_properties.proptest-regressions similarity index 100% rename from crates/ourios-miner/tests/rfc0024_properties.proptest-regressions rename to crates/ourios-miner/tests/it/rfc0024_properties.proptest-regressions diff --git a/crates/ourios-miner/tests/rfc0024_properties.rs b/crates/ourios-miner/tests/it/rfc0024_properties.rs similarity index 100% rename from crates/ourios-miner/tests/rfc0024_properties.rs rename to crates/ourios-miner/tests/it/rfc0024_properties.rs