Skip to content

test: raise line coverage above 95 percent #14

Description

@araujof

Description

COVERAGE_FLOOR is at 95 and the ratchet is closed.

Going past 95 means the tail the earlier effort deliberately deferred:

  • crates/ppe-apl-core/src/parser.rs, roughly 90 separate error-return sites, each needing its own bad-input case. Policy text is operator input, so these are real paths, not defensive filler.
  • crates/ppe-core/src/engine.rs production error paths, including the load_config_yaml visitor-failure arms.
  • builtins/session/valkey/src/store.rs, which needs a Valkey endpoint in CI via VALKEY_TEST_URL to reach the last lines.

About 25 production lines are provably unreachable guards annotated in the source. cargo-llvm-cov cannot exclude lines on stable, so they cap the achievable number. Pick the new target with that in mind rather than aiming at 100.

Two rules carried forward from the last effort. Do not collapse the parser's panic arms or the engine's named mock plugins to lift the metric; the names and messages are what make a failure diagnosable. And check that each new negative test still fails when its setup is broken. The last audit found four tests that passed regardless of what the code did.

Acceptance criteria

  • Line coverage lands above 95, with a specific new floor chosen and defended.
  • COVERAGE_FLOOR is raised to that number and make coverage passes at it.
  • The parser's error-return sites are covered, or the ones left uncovered are listed with a reason.
  • The coverage plan doc reflects where things actually stand, or is deleted.
  • No test asserts something that holds whichever way the code behaves.

Metadata

Metadata

Assignees

Labels

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions