Table of Contents

Core Branch Coverage Quality Gate

AsiBackbone.Core is the framework-neutral governance engine for the package family. A missed branch in Core policy evaluation, decision composition, capability validation, signing verification, acknowledgment, or audit flow can represent a higher regression risk than a missed adapter or sample branch.

For that reason, Core has a stricter branch-coverage expectation than the repository-wide baseline.

Quality gates

Gate Scope Coverage type Threshold Purpose
Repository-wide coverage gate Full solution Line coverage 75% minimum Keeps the overall package family from losing broad test coverage across Core, adapters, storage, telemetry, samples, and integration-oriented code.
Core branch coverage gate AsiBackbone.Core through AsiBackbone.Core.Tests Branch coverage 90% minimum Protects the framework-neutral governance path where missed branches carry the highest policy, acknowledgment, audit, signing, and capability-token regression risk.

The Core branch coverage gate does not replace the repository-wide line coverage gate. Both gates should remain active in CI.

CI output

The normal CI workflow produces two separate coverage outputs:

  • asi-backbone-coverage contains the repository-wide Cobertura report generated by the 75% line coverage gate.
  • asi-backbone-core-branch-coverage contains the Core-only Cobertura report generated by the 90% branch coverage gate.

Keeping these artifacts separate prevents the adapter and sample packages from masking branch gaps in Core, while also avoiding a premature 90% branch requirement for every package in the repository.

Published quality reports

The Publish Quality Reports workflow publishes separate report surfaces:

  • coverage/ for the repository-wide coverage report.
  • coverage/core/ for the Core-only branch coverage report.

The Core report is generated from the Core test project with the production assembly filtered to AsiBackbone.Core.

Test expectations

Core coverage should be raised through meaningful public behavior tests rather than superficial execution-only tests.

Preferred test targets include:

  • policy-evaluation allow, deny, warning, acknowledgment, defer, and escalation paths;
  • decision composition and reason-code preservation;
  • capability-token validation, expiry, scope, and failure behavior;
  • signing verification and tamper-detection boundaries;
  • acknowledgment request and response flows;
  • audit receipt construction, provenance, schema, policy-version, and metadata behavior;
  • null, blank, default, fallback, and defensive guard branches that define public contract behavior.

Avoid tests that only execute a line or branch without asserting the behavior that matters to a package consumer.

Adapter and sample boundary

The 90% branch target applies to Core only. Adapter packages, storage providers, telemetry providers, samples, scripts, and integration-oriented host code remain covered by the repository-wide gate, targeted unit/integration tests, smoke tests, mutation analysis where configured, and release-validation workflows.

A future issue may introduce package-specific gates for other high-risk surfaces, but this page records only the Core branch coverage policy introduced for issue #262.