agentleFS
MicrosoftKnown publishermicrosoft/duroxide/.github/skills/duroxide-code-coverage/SKILL.md

duroxide-code-coverage

Skill247 starsChanged 50 days agoMITView on GitHub

Measure and improve code coverage in the Duroxide durable execution runtime. Use when asked about coverage, testing coverage, running llvm-cov, or improving test coverage percentages.

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When coverage drops, focus on these files:

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

MetricTargetNotes
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 TypeLocation
Management APItests/coverage_improvement_tests.rs
Provider validationtests/sqlite_provider_validations.rs
Observabilitytests/observability_tests.rs
SQLite edge casessrc/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);
}

Provider Errors

#[tokio::test]
async fn test_error() {
    let err = ProviderError::retryable("op", "msg");
    assert!(err.is_retryable());
}

Troubleshooting

  • "no such command: llvm-cov" → cargo install cargo-llvm-cov
  • Coverage seems low → Use -p duroxide (not --workspace)
  • Stale data → cargo llvm-cov clean --workspace

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.