Skip to content

Write test-to-code ratio guardrail #19

@jdelfino

Description

@jdelfino

Write the test-to-code ratio guardrail check.

File

.github/workflows/guardrail-test-ratio.yml

What

  • Trigger: PR opened or synchronized
  • Calculate ratio of test lines to implementation lines in PR diff
  • Test files identified by naming convention (test, spec, tests/)
  • Configurable threshold from config.yaml (default: 0.5)
  • Below threshold: action_required; above: success
  • Check for non-stale PR approval override

Reference

  • docs/design.md: Test-to-Code Ratio (Layer 4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskImplementation work item

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions