duroxide-code-coverage

Instructions for measuring and improving test coverage in the Duroxide durable-execution runtime. Test coverage shows which parts of the code are exercised by automated tests.

In plain words
What is it for?
Use it to run coverage summaries or HTML reports, inspect per-file gaps, install the coverage tool, and add tests for under-covered Duroxide components.
Why use it?
It helps identify untested code and check whether changes improve or reduce coverage in this specific Rust codebase.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/affandar/duroxide/duroxide-code-coverage
Any agent
npx skills add affandar/duroxide --skill duroxide-code-coverage
Clone the repo
git clone --depth 1 https://github.com/affandar/duroxide

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.00697
Opus 5 $0.00021 $0.00349
Sonnet 5 $0.00008 $0.00139
Haiku 4.5 $0.00004 $0.00070

Measured 2d ago against content hash 84a415306095, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

duroxide-code-coverage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/duroxide-code-coverage/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Duroxide Code Coverage

Guidance for measuring and improving code coverage in the Duroxide codebase.

Quick Commands

# Summary (recommended for quick checks)
cargo llvm-cov nextest -p duroxide --all-features --summary-only

# Detailed per-file report
cargo llvm-cov nextest -p duroxide --all-features

# HTML report (opens in browser)
cargo llvm-cov nextest -p duroxide --all-features --html --open

# Install llvm-cov if needed
cargo install cargo-llvm-cov

Coverage Targets

Metric Target Notes
Lines >90% Primary metric
Regions >85% Branch coverage
Functions >80% Often lower due to unused helpers

Priority Files

When coverage drops, focus on these files:

  1. src/providers/error.rs - Target 100%, error classification
  2. src/runtime/observability.rs - Target 90%, metrics correctness
  3. src/providers/sqlite.rs - Target 85%, reference implementation
  4. src/providers/instrumented.rs - Target 75%, observability wrapper
  5. src/providers/management.rs - Note: default trait impls inflate gaps

Adding Tests

Gap Type Location
Management API tests/coverage_improvement_tests.rs
Provider validation tests/sqlite_provider_validations.rs
Observability tests/observability_tests.rs
SQLite edge cases src/providers/sqlite.rs (inline tests)

Test Patterns

Management API

#[tokio::test]
async fn test_management() {
    let store = Arc::new(SqliteProvider::new_in_memory().await.unwrap());
    let mgmt = store.as_management_capability().unwrap();
    assert!(mgmt.list_instances().await.is_ok());
}

Metrics

#[tokio::test]
async fn test_metrics() {
    use duroxide::runtime::observability::{MetricsProvider, ObservabilityConfig};
    let metrics = MetricsProvider::new(&ObservabilityConfig::default()).unwrap();
    metrics.record_orchestration_failure("Orch", "1.0", "app_error", "cat");
    assert_eq!(metrics.snapshot().orch_application_errors, 1);
}

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 94 lines · 42 tokens per session scan A 84a415306095

Subscribe to this mod's changes

duroxide-code-coverage is a skill published in the GitHub repository affandar/duroxide (20 stars, last pushed 6mo ago), licensed MIT. It adds 42 tokens to every session and 697 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories