-- +goose Up -- v1.4.0 model registration. Two deterministic band caps are added to the engine; the six component -- weights, the band cut points (Green >= 90, Yellow >= 75), and the DefaultSemanticThreshold (0.62) -- are unchanged from v1.3.0. The Total score is never altered by the caps; only the Band can be -- lowered. Both caps are checked after bandFor(Total) and take effect in this precedence order: -- -- 1. CLEARANCE GAP: if the requirement specifies a clearance at or above Confidential AND the -- clearance component scored 0 (insufficient level, inactive or expired status, unsatisfied -- poly, or a missing required compartment), the band is capped at Red regardless of the total. -- 2. MANDATORY SKILL GAP: if any required skill marked Mandatory is unmet AND the weighted total -- produced a Green band, the band is lowered to Yellow. A Yellow or Red band is unchanged. -- -- Clearance remains a self reported indicator, never an input proxy for a protected attribute. -- The cap reasons are always appended to the Explanation field for AEDT auditability. INSERT INTO aedt_model_versions (version, weights, band_cuts, notes) VALUES ( 'v1.4.0', '{"clearance":0.25,"skills":0.25,"certifications":0.15,"customer_experience":0.15,"experience":0.10,"location_availability":0.10}', '{"green":90,"yellow":75}', 'Adds two deterministic band caps that lower the band after bandFor(Total); the Total, the six weights, the band cut points, and the 0.62 semantic threshold are unchanged from v1.3.0. Cap 1: a required clearance (RequiredLevel >= Confidential) with a zero clearance score caps the band at Red (covers insufficient level, inactive or expired status, unsatisfied poly, and a missing required compartment). Cap 2: any unmet mandatory required skill caps a Green band at Yellow (Yellow and Red are unchanged). Precedence: clearance cap wins. Cap reasons are recorded in the Explanation field for AEDT explainability. Clearance stays a self reported indicator.' ) ON CONFLICT (version) DO NOTHING; -- +goose Down DELETE FROM aedt_model_versions WHERE version = 'v1.4.0';