Skip to content

Conversation

@mojoatomic
Copy link
Owner

Adds tests for #214 (and supports #203):

Unit

  • lib/utils/health.computeHealth: 100s at zero density, 0 at perK=10, rounding at partial densities

Integration

  • Threshold semantics: pass when score == threshold (>=)
  • gateOn selection: structural pass vs semantic fail on same inputs
  • intentOverrides: fail at default floor, pass with --intent=refactoring
  • bypass: HEALTH_BYPASS env and commitToken in last commit message

Refactor

  • Extracted computeHealth to lib/utils/health.js for testability (ratchet requires it via __dirname)

Notes

  • Keeps deltas=0 in gating-focused tests to isolate health gate behavior from classic ratchet.

Closes #214.

@mojoatomic mojoatomic merged commit 13c5591 into main Nov 11, 2025
5 checks passed
@mojoatomic mojoatomic deleted the tests/health-gating-214 branch November 11, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests: health gating computeHealth unit and gating/bypass integration (#203 follow-up)

2 participants