Grade Thresholds

Quality scores map to letter grades.

Grade Scale

GradeScoreDescription
A90-100Excellent
A-85-89Very Good
B+80-84Good
B75-79Above Average
B-70-74Average
C+65-69Below Average
C60-64Needs Work
D50-59Poor
F0-49Failing

Production Requirements

Minimum: B+ (80+)

# Gate check enforces minimum grade
make tier2

# Fails if score < 80

Grade Calculation

fn grade_from_score(score: u8) -> Grade {
    match score {
        90..=100 => Grade::A,
        85..=89 => Grade::AMinus,
        80..=84 => Grade::BPlus,
        75..=79 => Grade::B,
        70..=74 => Grade::BMinus,
        65..=69 => Grade::CPlus,
        60..=64 => Grade::C,
        50..=59 => Grade::D,
        _ => Grade::F,
    }
}

Grade Components

Each component can block deployment:

ComponentMinimumBlocker
Test Coverage85%< 70% blocks
PerformanceFrame < 16ms> 32ms blocks
Accessibility0 criticalAny critical blocks
Clippy0 warningsAny warning blocks

Verified Test

#[test]
fn test_grade_thresholds() {
    use presentar_test::Grade;

    assert_eq!(Grade::from_score(95), Grade::A);
    assert_eq!(Grade::from_score(82), Grade::BPlus);
    assert_eq!(Grade::from_score(45), Grade::F);
}