Summary
Implement Toyota Way / Poka-yoke validation in AprWriter to prevent malformed models from being written.
Background
During WAPR-TRANS-001, a missing Slaney-normalized filterbank caused 89.4% mel divergence (sign flip). The model was created without embedded filterbank, falling back to broken computation.
Requirements
Gate Checks (Jidoka - stop the line)
- Filterbank Required: If model uses mel spectrogram, filterbank MUST be embedded
- Filterbank Scale Check:
filterbank.max() < 0.1 (Slaney-normalized range)
- Smoke Test: Silence input must produce negative mel mean
API
impl AprWriter {
/// Validate model before write. Returns error if gates fail.
pub fn validate(&self) -> Result<(), ValidationError>;
/// Write with mandatory validation (Jidoka)
pub fn write_validated(&self) -> Result<Vec<u8>, WhisperError>;
}
Acceptance Criteria
References
- APR-VERIFY-001 Case Study (Section 11)
- Toyota Production System: Poka-yoke (mistake-proofing)
Summary
Implement Toyota Way / Poka-yoke validation in
AprWriterto prevent malformed models from being written.Background
During WAPR-TRANS-001, a missing Slaney-normalized filterbank caused 89.4% mel divergence (sign flip). The model was created without embedded filterbank, falling back to broken computation.
Requirements
Gate Checks (Jidoka - stop the line)
filterbank.max() < 0.1(Slaney-normalized range)API
Acceptance Criteria
AprWriter::write()callsvalidate()by defaultReferences