refactor(calibration): PR #71 review follow-ups — trust settings type, flag enums in models, config cross-validation #78
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#78
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code quality
TrustSettingsmodel. Deduplicating their defaults across DDL, repository, schema and the HTML inputs is #74's single-source-of-defaults work. Do them together.score_cycle_flagsstill checks"FLAG_INGESTION_GAP"/"FLAG_INGESTION_STALLED"as strings. AddCalibrationAnomalyFlag.is_ingestion()next tois_data_quality()/is_low_activity().AutomaticCalibrationSampleusestrust_status: strandanomaly_flags: list[str]. UseCalibrationTrustStatus/CalibrationAnomalyFlag, and replace the new literal compares (row.trust_status != "TRUSTED", SQL'AUTO_EXCLUDED').record_calibration_log.database.pyhas three ALTER loops with two tuple shapes. Unify them.multiplier_provenancedefaults differ:COMPUTEDinCREATE,LEGACY_UNKNOWNinALTER(deliberate: upgraded rows are classified at startup). Add a comment at both sites.Behaviour
trust_ratio_min > trust_ratio_maxis accepted, andtrust_spike_min_samples > trust_spike_windowsilently disables the relative spike rule.computed_exit_multiplier DEFAULT 1.0(no table rebuild). Latent: every insert passes the value explicitly today.Acceptance criteria
Related: #34, #33, PR #71, #74.