Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / db/migrations/0023_clearance_reference.sql |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | db/migrations/0023_clearance_reference.sql |
| Original SHA-256 | fe2d3c98a4309a91fa550a7aaa3a8f074ea6d1fd8018936c9870f5eb895f74cf |
| Git blob SHA | 1a05e6036eaec15f066923b7bf8ec9ee62fd0c8f |
| Reading-copy SHA-256 | fe2d3c98a4309a91fa550a7aaa3a8f074ea6d1fd8018936c9870f5eb895f74cf |
Every recorded occurrence
These 18 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | vendor-intelligence | fe9796a19c261951d3f2565206c0c1b5ac294465 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
| Janady13/missionmatch / db/migrations/0023_clearance_reference.sql | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
Recovered source transcript
Download complete source text ↓81 lines · 4.6 KB
-- +goose Up
-- WS3 clearance reference layer. Four GLOBAL reference tables (no organization_id, outside RLS, app
-- SELECT only, migrator writes), FK enforced on the candidate and requirement clearance columns. Adds
-- compartment array columns to candidates and requirements for additive compartment aware scoring. The
-- six component weights, the bands, and the 0.62 threshold are unchanged; this registers ModelVersion
-- v1.3.0 for the new compartment match dimension.
CREATE TABLE clearance_levels (
code text PRIMARY KEY,
rank int NOT NULL UNIQUE,
requires_polygraph boolean NOT NULL DEFAULT false,
label text NOT NULL
);
INSERT INTO clearance_levels (code, rank, label) VALUES
('unknown',0,'Unknown'),('none',1,'None or Public Trust'),('confidential',2,'Confidential'),
('secret',3,'Secret'),('top_secret',4,'Top Secret'),('ts_sci',5,'Top Secret SCI');
CREATE TABLE polygraph_types (
code text PRIMARY KEY,
rank int NOT NULL UNIQUE,
label text NOT NULL
);
INSERT INTO polygraph_types (code, rank, label) VALUES
('none',0,'None'),('ci',1,'Counterintelligence'),('full_scope',2,'Full Scope');
CREATE TABLE clearance_compartments (
code text PRIMARY KEY,
kind text NOT NULL CHECK (kind IN ('sci','sap')),
label text NOT NULL
);
-- Publicly documented SCI control systems plus generic markers. A SAP is named per program; SAP here is
-- the generic marker, specific programs are added by the customer.
INSERT INTO clearance_compartments (code, kind, label) VALUES
('SCI','sci','Sensitive Compartmented Information (generic)'),
('SI','sci','Special Intelligence (SIGINT)'),
('TK','sci','Talent Keyhole (overhead collection)'),
('HCS','sci','HUMINT Control System'),
('SAP','sap','Special Access Program (generic)');
-- Stub for future non rank reciprocity exceptions (agency specific). The engine uses the rank ladder
-- today; this table documents and will later carry exceptions. Seeded empty.
CREATE TABLE clearance_reciprocity (
held_code text NOT NULL REFERENCES clearance_levels(code),
required_code text NOT NULL REFERENCES clearance_levels(code),
satisfies boolean NOT NULL,
source text NOT NULL DEFAULT '',
PRIMARY KEY (held_code, required_code)
);
ALTER TABLE candidates ADD COLUMN clearance_compartments text[] NOT NULL DEFAULT '{}';
ALTER TABLE requirements ADD COLUMN required_compartments text[] NOT NULL DEFAULT '{}';
-- FK enforce the clearance codes against the reference tables (the existing CHECK constraints already
-- bound the values to exactly these codes, so the FKs are satisfiable on existing rows).
ALTER TABLE candidates ADD CONSTRAINT candidates_clearance_level_fk FOREIGN KEY (clearance_level) REFERENCES clearance_levels(code);
ALTER TABLE candidates ADD CONSTRAINT candidates_clearance_poly_fk FOREIGN KEY (clearance_poly) REFERENCES polygraph_types(code);
ALTER TABLE requirements ADD CONSTRAINT requirements_required_level_fk FOREIGN KEY (required_level) REFERENCES clearance_levels(code);
ALTER TABLE requirements ADD CONSTRAINT requirements_required_poly_fk FOREIGN KEY (required_poly) REFERENCES polygraph_types(code);
GRANT SELECT ON clearance_levels, polygraph_types, clearance_compartments, clearance_reciprocity TO missionmatch_app;
INSERT INTO aedt_model_versions (version, weights, band_cuts, notes) VALUES (
'v1.3.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 an additive compartment dimension to the clearance component, and makes clearance levels, polygraph types, and compartments FK enforced reference data. A requirement that lists compartments is met only by a held clearance carrying them all. The level and poly logic, the binary 0 or 100 clearance score, the six weights, the bands, and the 0.62 threshold are unchanged from v1.2.0. Clearance remains a self reported indicator, never an input proxy for a protected attribute.'
) ON CONFLICT (version) DO NOTHING;
-- +goose Down
DELETE FROM aedt_model_versions WHERE version = 'v1.3.0';
ALTER TABLE requirements DROP CONSTRAINT requirements_required_poly_fk;
ALTER TABLE requirements DROP CONSTRAINT requirements_required_level_fk;
ALTER TABLE candidates DROP CONSTRAINT candidates_clearance_poly_fk;
ALTER TABLE candidates DROP CONSTRAINT candidates_clearance_level_fk;
ALTER TABLE requirements DROP COLUMN required_compartments;
ALTER TABLE candidates DROP COLUMN clearance_compartments;
DROP TABLE clearance_reciprocity;
DROP TABLE clearance_compartments;
DROP TABLE polygraph_types;
DROP TABLE clearance_levels;