Symptom
When using SafetyCriticalPolicy, severity 5 incidents get scores in the hundreds or thousands -- way beyond the expected 0-100 range.
Context
The scoring system uses a Template Method pattern. The base Policy class orchestrates the scoring pipeline:
baseScore()-- subclass computes initial scoreapplySeverityWeight()-- multiplies by clamped severity weight- Final rounding
The base applySeverityWeight() clamps the multiplier via Math.min(severity * 2, 10). SafetyCriticalPolicy overrides this method.
Hints
TypeScript
TypeScript ready
Test Output
▶
Click "Run Tests" to execute your code