Ports JellyTau's traceability tooling to Rust, carrying across the bug it was repaired for. That gate divided a traced count by frozen literal denominators; the requirements file outgrew them and it reported 158% coverage, so it could never fail its own threshold. Two rules, both enforced by the extractor's own tests: - denominators parsed from docs/requirements.md at run time - coverage is |traced ∩ defined| / |defined|, never a raw traced count The gate additionally fails hard on a misconfigured run — zero requirements parsed or zero files scanned — rather than reporting a plausible 0%, and on any orphan tag naming a requirement that does not exist. Adapted for DarkRoom: IDs are FR-CAT-1 / NFR-P13 / FR-DEV-3a shapes rather than JellyTau's fixed three digits, and decisions (D), spikes (S), milestone items (M) and test ids remain taggable while being excluded from the denominator — counting them inflated it by 25. Also adds dr-sync: the RemoteBackend trait and capability model, so the Nextcloud connector is one implementation rather than the only shape the engine understands. No mature Nextcloud crate exists (reqwest_dav is too thin), so the connector will be hand-rolled over reqwest per D7. Gitea workflows follow the same style: containerised, commented with the reasoning, desktop and Android on every push, plus a CI check that no core/ crate depends on the UI toolkit (ARCH §6.5a). Coverage today: 13.3% (19/143). 50 tests passing.
25 lines
760 B
Rust
25 lines
760 B
Rust
/// TRACES: NFR-R7 | NFR-R8
|
|
/// Failures from the GPU layer.
|
|
///
|
|
/// `DeviceLost` is deliberately a distinct variant rather than folded into a
|
|
/// generic error: it is an expected event on Android (ARCH §6.10), not an
|
|
/// exceptional one, and callers recover from it by rebuilding the device and
|
|
/// re-driving from the edit graph.
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum GpuError {
|
|
#[error("no suitable GPU adapter found")]
|
|
NoAdapter,
|
|
|
|
#[error("failed to request device: {0}")]
|
|
DeviceRequest(String),
|
|
|
|
#[error("GPU device lost — recreate and re-render from the edit graph")]
|
|
DeviceLost,
|
|
|
|
#[error("shader compilation failed: {0}")]
|
|
ShaderCompilation(String),
|
|
|
|
#[error("readback failed: {0}")]
|
|
Readback(String),
|
|
}
|