Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / db/queries/governance.sql |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 1675031db74316e100782d063e9eda1a597fe3a1 |
| Branch | workstream-a-opportunity-intelligence |
| Path or archive member | db/queries/governance.sql |
| Original SHA-256 | 6d717fca9a64c65508f174907a4edbec856585505ef766bb53332de650c2ea7d |
| Git blob SHA | ff538e3a0145f136839acd4b8a82bbe866276fbe |
| Reading-copy SHA-256 | 6d717fca9a64c65508f174907a4edbec856585505ef766bb53332de650c2ea7d |
Every recorded occurrence
These 9 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/queries/governance.sql | workstream-a-opportunity-intelligence | 1675031db74316e100782d063e9eda1a597fe3a1 | Open original |
| Janady13/missionmatch / db/queries/governance.sql | workstream-d-command-center | 255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9 | Open original |
| Janady13/missionmatch / db/queries/governance.sql | w0-aedt-compliance | 39df94f92b2a33f852481fe1954dabed841524bb | Open original |
| Janady13/missionmatch / db/queries/governance.sql | workstream-e-commercial-stubs | 4437da660539284a400ee380b9b427a300c369ee | Open original |
| Janady13/missionmatch / db/queries/governance.sql | workstream-b-sam-contract-awards | d5101cceb98e70000cebb31d3e7ac73d747d3a6d | Open original |
| Janady13/missionmatch / db/queries/governance.sql | workstream-d-command-center | 255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9 | Open original |
| Janady13/missionmatch / db/queries/governance.sql | workstream-a-opportunity-intelligence | 1675031db74316e100782d063e9eda1a597fe3a1 | Open original |
| Janady13/missionmatch / db/queries/governance.sql | workstream-e-commercial-stubs | 4437da660539284a400ee380b9b427a300c369ee | Open original |
| Janady13/missionmatch / db/queries/governance.sql | w0-aedt-compliance | 39df94f92b2a33f852481fe1954dabed841524bb | Open original |
Recovered source transcript
Download complete source text ↓41 lines · 1.7 KB
-- AEDT governance: model version registry, the org AEDT inventory, candidate notices, and the
-- retention sweep. All on the app pool under RLS (the eeo schema is reached only by the compliance
-- pool, never here).
-- name: ListModelVersions :many
SELECT version, weights, band_cuts, notes, effective_from, created_at
FROM aedt_model_versions
ORDER BY effective_from DESC;
-- name: ListAedtInventory :many
SELECT * FROM aedt_inventory ORDER BY created_at DESC;
-- name: UpsertAedtInventory :one
INSERT INTO aedt_inventory (organization_id, tool_key, display_name, purpose, model_version)
VALUES (NULLIF(current_setting('app.current_org_id', true), '')::uuid, $1, $2, $3, $4)
ON CONFLICT (organization_id, tool_key) DO UPDATE
SET display_name = EXCLUDED.display_name,
purpose = EXCLUDED.purpose,
model_version = EXCLUDED.model_version,
updated_at = now()
RETURNING *;
-- name: InsertCandidateNotice :one
INSERT INTO aedt_candidate_notices (organization_id, candidate_id, notice_version, data_categories, retention_days, disclosed_by)
VALUES (NULLIF(current_setting('app.current_org_id', true), '')::uuid, $1, $2, $3, $4, $5)
RETURNING *;
-- name: RetentionDueCandidates :many
-- Candidates whose most recent recorded decision is older than the retention window and whose PII is
-- not yet anonymized. The de identified slate_members outcomes are retained; only the candidate PII is
-- wiped (by AnonymizeCandidate). RLS scopes this to the caller's org.
SELECT c.id
FROM candidates c
WHERE c.anonymized_at IS NULL
AND (
SELECT max(sm.decided_at)
FROM slate_members sm
WHERE sm.candidate_id = c.id AND sm.decided_at IS NOT NULL
) < now() - make_interval(days => $1::int)
LIMIT 500;