ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/bidoutcomes/repo.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/bidoutcomes/repo.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/bidoutcomes/repo.go
Original SHA-2564c9b3045c568289f1578dc1b4291bef082ef70c105817ca1459adb94e8d9af6c
Git blob SHAff7148a60f79f90e8c38d6684cf3a0b888950b8f
Reading-copy SHA-2564c9b3045c568289f1578dc1b4291bef082ef70c105817ca1459adb94e8d9af6c

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 / internal/modules/bidoutcomes/repo.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/modules/bidoutcomes/repo.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package bidoutcomes // repo.go holds the parameterized SQL the service runs under RunInTenantTx (RLS scoped). The statements are // raw and parameterized rather than sqlc generated so the M7 ledger is self contained and does not require // regenerating the dbgen package for one new table; this mirrors the AI graph layer, which authors its // reviewed read SQL as static constants. Every statement runs as the NOBYPASSRLS app role inside a tenant // transaction, so the organization_id is the session GUC and a row in another org is never visible or // writable (the RLS policy plus the composite FKs both hold). The app role has SELECT, INSERT, UPDATE on // bid_outcomes and no DELETE, so the ledger is never destroyed. // insertOrUpsertOutcomeSQL records a new bid outcome, or upserts an existing one keyed on its id. The // organization_id is taken from the session GUC (never a caller argument), so RLS WITH CHECK confirms the // row belongs to the caller; the ON CONFLICT update only ever touches a row already visible to this tenant. const insertOrUpsertOutcomeSQL = ` INSERT INTO bid_outcomes (id, organization_id, opportunity_id, requirement_id, slate_id, submitted_at, result, award_date, awardee_uei, notes) VALUES (COALESCE($1, gen_random_uuid()), NULLIF(current_setting('app.current_org_id', true), '')::uuid, $2, $3, $4, $5, $6, $7, $8, $9) ON CONFLICT (id) DO UPDATE SET opportunity_id = EXCLUDED.opportunity_id, requirement_id = EXCLUDED.requirement_id, slate_id = EXCLUDED.slate_id, submitted_at = EXCLUDED.submitted_at, result = EXCLUDED.result, award_date = EXCLUDED.award_date, awardee_uei = EXCLUDED.awardee_uei, notes = EXCLUDED.notes, updated_at = now() RETURNING id, opportunity_id, requirement_id, slate_id, submitted_at, result, award_date, awardee_uei, notes, created_at, updated_at` // updateOutcomeSQL updates the result and award fields of an existing outcome. COALESCE keeps the existing // submitted_at and award_date when the bind is null, so a partial update never wipes a known timestamp. The // UPDATE is RLS scoped, so a row in another org is invisible and matches zero rows (the not found path). const updateOutcomeSQL = ` UPDATE bid_outcomes SET result = $2, submitted_at = COALESCE($3, submitted_at), award_date = COALESCE($4, award_date), awardee_uei = $5, notes = $6, updated_at = now() WHERE id = $1 RETURNING id, opportunity_id, requirement_id, slate_id, submitted_at, result, award_date, awardee_uei, notes, created_at, updated_at`

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