Skip to content
Closed
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
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ jobs:
- '**/Cargo.toml'
- 'Cargo.lock'
- 'rust-toolchain*'
# clippy runs `cargo xtask manifest --check` against this file.
- 'MANIFEST.md'
# clippy runs `cargo xtask manifest --check` against MANIFEST.md
# and `cargo xtask verify-doc-paths` over every doc-comment
# citation, so deleting or renaming any markdown file can break a
# Rust check with no *.rs file in the change.
- '**/*.md'
# rocm-deps compiles the pins into constants, so a pin change is a
# source change even though no *.rs file moved.
- 'runtime-deps.toml'
Expand Down Expand Up @@ -738,6 +741,10 @@ jobs:
if: needs.changes.outputs.rust == 'true'
run: cargo xtask manifest --check

- name: Doc-comment paths resolve
if: needs.changes.outputs.rust == 'true'
run: cargo xtask verify-doc-paths

# Surface the cache hit rate for the clippy compile so the effect is visible
# in the logs, on the local-only path too — see build-and-test for why this
# is gated on sccache being present rather than on the remote backend being
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-collectors/src/amd_smi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! amd-smi subprocess + JSON parse.
//!
//! Field paths and the KFD pre-flight check are vendored from the TypeScript
//! `AmdSmiProvider` in instinct-dash. See `../wiki/entities/amd-smi.md`.
//! `AmdSmiProvider` in instinct-dash.

use std::ffi::OsString;
use std::io;
Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-collectors/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//!
//! Field-extraction logic is vendored from instinct-dash `DockerService.ts`
//! (HIP_VISIBLE_DEVICES → gpu_ids, `--tensor-parallel-size`/`-tp`, etc.).
//! See `../../wiki/entities/dockerode.md`.
//!
//! The async inherent methods are the public API. The `ServiceDiscovery` trait
//! impl is sync-only and returns `Unsupported`: bollard requires a tokio
Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-collectors/src/vllm_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! vLLM log slicer — verbatim port of `inspect_bench/log_slicer.py`.
//! See `../wiki/entities/log-slicer.md` and `../wiki/concepts/log-derived-metrics.md`.

use regex::Regex;

Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-collectors/src/vllm_prom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! vLLM Prometheus `/metrics` scraper.
//!
//! Field paths and the kv-cache 0..1 → 0..100 scaling are vendored from
//! instinct-dash `VllmMetricsService.ts`. See `../../wiki/entities/vllm.md`.
//! instinct-dash `VllmMetricsService.ts`.
//!
//! Sync `InstanceMetrics::fetch` returns `Unsupported` (the underlying client
//! is async); call `fetch_async` from the runner.
Expand Down
22 changes: 12 additions & 10 deletions crates/rocm-dash-core/src/bench_rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
//! it whenever the row set changes rather than relying on the upstream
//! `pass_n_of_n` / `pass_at_n` CSV columns.
//!
//! See `../wiki/concepts/benchmark-result-schema.md` and
//! `../wiki/entities/normalize-results.md`: rows are grouped by
//! `(cell, model, backend, concurrency)` and each group of N trials yields
//! two verdicts — strict (all N passed) and lenient (at least one passed).
//! Rows are grouped by `(cell, model, engine, tp, dtype, concurrency)`, and
//! each group of N trials yields two verdicts — strict (all N passed) and
//! lenient (at least one passed).

use std::collections::BTreeMap;

use crate::bench_schema::{BenchmarkRow, PassFail};

/// Effective verdict for one row: prefer the rolled-up `pass_fail`, fall back
/// Effective verdict for one row.
///
/// to the judge verdict when the rollup is `Unknown`. A row that is `Unknown`
/// under both returns `Unknown` and never counts as a pass.
/// Prefers the rolled-up `pass_fail`, falling back to the judge verdict when the
/// rollup is `Unknown`. A row that is `Unknown` under both returns `Unknown` and
/// never counts as a pass.
#[must_use]
pub const fn row_verdict(row: &BenchmarkRow) -> PassFail {
match row.pass_fail {
Expand All @@ -29,9 +29,11 @@ pub const fn row_verdict(row: &BenchmarkRow) -> PassFail {
}
}

/// Grouping key for a trial set. Trials within a group differ only by `run`
/// (and `trial_index`); everything that defines the backend config is held
/// fixed so Pass^N / Pass@N compare like-for-like.
/// Grouping key for a trial set: the fields Pass^N / Pass@N compare over.
///
/// Rows differing only in `run` and `trial_index` fall into the same group.
/// Columns outside the key do not split one either: rows that differ in, say,
/// `input_len` or `attention_backend` are folded into the same trial set.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
struct RollupKey {
cell: String,
Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/bench_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! Benchmark row schema, vendored from instinct-agent-bench.
//! See `../wiki/concepts/benchmark-result-schema.md` and `../wiki/entities/csv-emitter.md`.

use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-core/src/efficiency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Pure efficiency derivations (tokens-per-watt). No I/O, no rendering.
//!
//! This is the join that turns vLLM throughput + amd-smi power into a
//! per-instance capacity number. See `../wiki/concepts/metric-registry.md`.
//! per-instance capacity number.

use crate::metrics::GpuMetrics;

Expand Down
4 changes: 3 additions & 1 deletion crates/rocm-dash-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//! Pure types, traits, schemas, and the reducer for rocm-dash.
//! No rendering deps. No async deps at the type boundary.
//!
//! See `../wiki/concepts/tea-reducer-pattern.md` for the architectural pattern.
//! The reducer is Elm-style: `state::State::apply` folds a `StateEvent` into
//! `State` and returns the `SideEffect`s the async layer performs, so every
//! state transition stays pure and testable.

pub mod bench_rollup;
pub mod bench_schema;
Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! Live metric types. snake_case + units encoded in field names.
//! See `../wiki/concepts/metric-registry.md` and `../wiki/data/metric-field-index.md`.

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-core/src/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! GPU partition mode enums. See `../wiki/concepts/gpu-partition-modes.md`.
//! GPU partition mode enums.

use serde::{Deserialize, Serialize};

Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! NDJSON command/event protocol between rocmdashd and rocmdash.
//! See `../wiki/comparisons/ctux-vs-rocm-dash.md` (resolved decisions).

use serde::{Deserialize, Serialize};

Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! Pure reducer. `State::apply(StateEvent) -> Vec<SideEffect>`.
//! See `../wiki/concepts/tea-reducer-pattern.md`.

use std::collections::{HashMap, VecDeque};
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-core/src/vram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//!
//! Graceful degradation: an instance that matches nothing (empty `gpu_ids`,
//! no container entry — e.g. Lemonade) resolves to `(0, 0)`, never a panic and
//! never a confidently-wrong number. See `../wiki/concepts/metric-registry.md`.
//! never a confidently-wrong number.

use std::collections::HashMap;

Expand Down
4 changes: 2 additions & 2 deletions crates/rocm-dash-daemon/tests/telemetry_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ async fn counter_reset_invalidates_baseline_immediately() {
/// event on the next discovery tick and the instance is absent from subsequent
/// Snapshots.
///
/// GREEN: runner.rs:446-460 computes `known_services.difference(&disc.seen)`
/// and fires `InstanceGone` for each absent id.
/// GREEN: `runner.rs` computes `known_services.difference(&disc.seen)` and
/// fires `InstanceGone` for each absent id.
#[tokio::test]
async fn service_removal_fires_instance_gone() {
let tmp = tempfile::TempDir::new().unwrap();
Expand Down
5 changes: 2 additions & 3 deletions crates/rocm-dash-tui/src/ui/approval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
//!
//! This is a **render + event seam ONLY**. The decision *logic* — what an
//! approval actually does (run a CLI command, enable full access, approve a
//! proposal) — stays CLI-side per the working agreement
//! (`rocm-cli-unification-working-agreements.md` §1). This module renders an
//! proposal) — stays CLI-side by design. This module renders an
//! [`ApprovalRequest`] and reports the user's [`ApprovalVerdict`]; the caller
//! maps the verdict onto a CLI-side action.
//!
//! It must never gain a mutating capability and never touches the read-only
//! chat seam (`agent.rs:59-62`).
//! chat seam in `agent.rs`.
//!
//! Keymap mirrors the frozen rocm-cli `pending_approval` screen: Up/Down/Tab
//! move the cursor; `y` approves; `n` denies; Esc cancels; Enter performs the
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! sourced from each project's published palette. Theme catalogue
//! inspired by [ansicolor.com](https://ansicolor.com/).
//!
//! Pattern borrowed from ctux (see `../../../wiki/sources/ctux.md`).
//! Pattern borrowed from ctux.

use ratatui::style::{Color, Modifier, Style};

Expand Down
Loading
Loading