Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# self-hosted host. Everything else (in-repo branches, push, dispatch) uses the faster
# self-hosted runner with a warm cargo cache. Runner groups can't gate by trigger, so the
# split has to live here in the workflow — not in the approval setting.
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) && fromJSON('["ubuntu-latest"]') || fromJSON('["self-hosted", "dev-server"]') }}
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) && fromJSON('["ubuntu-latest"]') || fromJSON('["self-hosted", "dev-server"]') }}
if: github.event_name == 'push' || !github.event.pull_request.draft
steps:
- uses: actions/checkout@v4
Expand All @@ -50,7 +50,7 @@ jobs:
name: Test
# Fork PRs stay on GitHub-hosted (untrusted code); trusted events use self-hosted. See the
# clippy job above for the rationale.
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) && fromJSON('["ubuntu-latest"]') || fromJSON('["self-hosted", "dev-server"]') }}
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) && fromJSON('["ubuntu-latest"]') || fromJSON('["self-hosted", "dev-server"]') }}
if: github.event_name == 'push' || !github.event.pull_request.draft
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions crates/hotblocks-harness/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ is what makes the crash/restart and shutdown classes expressible at all.
cargo test -p sqd-hotblocks-harness # the harness's own unit tests (model, chain, simulator)
cargo test -p sqd-hotblocks --test ct1_happy_path # CT-1 — the Phase 0 exit criterion
cargo test -p sqd-hotblocks --test ct9_source_faults
# Explicit endurance lane (ignored by default; includes the reclaim convergence wait):
cargo test -p sqd-hotblocks --test ct7_stall_and_churn ct7_churn_soak -- --ignored
```

The CT tests live in `crates/hotblocks/tests/` because only a test inside that package gets
Expand Down Expand Up @@ -127,11 +129,10 @@ Fixed in `crates/data-client/src/reqwest/lines.rs`; pinned by a unit test there
normative CONFLICT recovery of 04 §7. What is missing is the scripts.
- **CT-5 (error taxonomy)** — `Model::predict_query` returns the outcome class for any query;
`Client::query` already classifies every response. What is missing is the request matrix.
- **CT-7 (soak/space)** — needs `OB-6`-style space accounting; the retention model transition
(`Model::retain`) is implemented but the comparator compares the first block *exactly*, which
is wrong once retention starts trimming: the service trims whole chunks, so its window may be
larger than the model's (legal under RS-3/RS-4, `P-RETENTION-SLACK`). Give the comparator that
tolerance before writing retention tests.
- **CT-7 (soak)** — the ignored S4 runner in `ct7_stall_and_churn` drives API-controlled
moving-window retention and samples `total-sst-files-size`, `estimate-live-data-size`, and
memtable bytes through the existing RocksDB property endpoint. Prometheus OB-2/3/6 series are
intentionally deferred to a separate change.
- **CT-9 (fuzz)** — `SimFaults` is the injection point.

## Known open questions
Expand Down
14 changes: 14 additions & 0 deletions crates/hotblocks-harness/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pub struct StatusData {
pub finalized_head: Option<BlockRef>
}

#[derive(Clone)]
pub struct Client {
http: reqwest::Client,
base: String,
Expand Down Expand Up @@ -178,6 +179,19 @@ impl Client {
Ok(Metrics(out))
}

/// Reads the service's existing intrinsic RocksDB diagnostic property surface.
pub async fn rocksdb_property(&self, column_family: &str, name: &str) -> Result<Option<u64>> {
let res = self
.http
.get(format!("{}/rocksdb/prop/{column_family}/{name}", self.base))
.send()
.await?;
if res.status() == reqwest::StatusCode::NOT_FOUND {
return Ok(None);
}
Ok(Some(res.error_for_status()?.text().await?.trim().parse()?))
}

pub async fn query(&self, body: &Value) -> Result<Outcome> {
self.query_at("stream", body).await
}
Expand Down
2 changes: 2 additions & 0 deletions crates/hotblocks-harness/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub mod driver;
pub mod harness;
pub mod model;
pub mod sim;
pub mod soak;
pub mod sut;
pub mod types;

Expand All @@ -56,5 +57,6 @@ pub use driver::{Client, Emitted, FollowStep, Follower, Outcome};
pub use harness::{Harness, HarnessConfig};
pub use model::{Finalize, ForkResolution, Model, Predicted};
pub use sim::{Numbering, SourceSim};
pub use soak::{ChurnSoakConfig, ChurnSoakReport, SpaceSample, StallProbe, StallReport};
pub use sut::{DatasetSpec, Retention, Sut, SutConfig};
pub use types::{Anchor, Block, BlockNumber, BlockRef};
Loading
Loading