ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sql

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sql
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberdb/migrations_eeo/0002_fairness_snapshots.sql
Original SHA-256f4d4e45e304cf12072e2ee5127819b724bedf4698aa77899927b130ae1fd4eea
Git blob SHAedcabcb61d18d6641919ff4facc2f8ab0d1def71
Reading-copy SHA-256f4d4e45e304cf12072e2ee5127819b724bedf4698aa77899927b130ae1fd4eea

Original source ↗

Every recorded occurrence

These 12 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlfeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlcollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlm5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlmaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlmag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqltime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlgraphrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlpresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlvendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlphase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlfeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / db/migrations_eeo/0002_fairness_snapshots.sqlcapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

-- +goose Up -- Continuous adverse impact (four fifths / NYC LL144 / OFCCP) time series. -- -- This migration lives in db/migrations_eeo/ (NOT db/migrations/), the SECOND migration set applied by -- the migrator role, so no sqlc model for this table is ever generated into the shared dbgen package the -- matching and AI code import. It extends the segregated eeo schema with an APPEND ONLY snapshot table. -- -- Purpose: today the platform computes a single point in time adverse impact report. This table records -- that report on a schedule so a best in world AEDT tool can PROVE on every release that it is not -- drifting into disparate impact. Each row is one demographic GROUP bucket's selection rate and four -- fifths impact ratio at one moment, exactly as the existing AdverseImpact report already labels it. -- -- Privilege boundary, mirrored from 0001: ONLY missionmatch_compliance may touch the eeo schema. The -- matching runtime role (missionmatch_app) is granted NOTHING here; an accidental query from matching or -- the AI path fails with permission denied at the database. RLS is keyed to app.current_org_id exactly -- like eeo.candidate_demographics, so a snapshot read or write is scoped to the caller's org. -- -- This is GROUP LEVEL AGGREGATE data only. It is never per person, it is never joined to candidates, and -- it is NEVER an input to matching. Append only: the compliance role may SELECT and INSERT, never UPDATE -- or DELETE (a correction is a new snapshot; snapshot_at orders the series). CREATE TABLE eeo.fairness_snapshots ( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), organization_id uuid NOT NULL, snapshot_at timestamptz NOT NULL DEFAULT now(), decision_context text NOT NULL DEFAULT '', -- the selection event the rates are over, mirrors AdverseImpact group_label text NOT NULL, -- the demographic group bucket as the Report already labels it selected int NOT NULL, -- the count selected behind the rate total int NOT NULL, -- the count considered behind the rate selection_rate numeric(7,6) NOT NULL, -- selected over total impact_ratio numeric(7,6), -- this group's rate over the highest group's rate; the reference passes at 1.0, null only for an n/a row (unknown group or a cut with fewer than two known groups) below_threshold boolean NOT NULL DEFAULT false, -- impact_ratio < 0.80 model_version text NOT NULL DEFAULT '' -- the aedt_model_versions version in force at snapshot time ); CREATE INDEX idx_eeo_fairness_org_time ON eeo.fairness_snapshots (organization_id, snapshot_at DESC); ALTER TABLE eeo.fairness_snapshots ENABLE ROW LEVEL SECURITY; ALTER TABLE eeo.fairness_snapshots FORCE ROW LEVEL SECURITY; CREATE POLICY eeo_fairness_tenant_isolation ON eeo.fairness_snapshots USING (organization_id = NULLIF(current_setting('app.current_org_id', true), '')::uuid) WITH CHECK (organization_id = NULLIF(current_setting('app.current_org_id', true), '')::uuid); -- Compliance role ONLY; append only (no UPDATE/DELETE). App role intentionally absent. GRANT SELECT, INSERT ON eeo.fairness_snapshots TO missionmatch_compliance; REVOKE ALL ON eeo.fairness_snapshots FROM PUBLIC; -- +goose Down DROP TABLE IF EXISTS eeo.fairness_snapshots;

Search equations, builds, manuscript text, and recovered sources.