ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/integration/federal_signal_integration_test.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/integration/federal_signal_integration_test.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/integration/federal_signal_integration_test.go
Original SHA-256eb374d5af681e262f82a66d4e5315c9de53f16a1a6a13ce250f4fa7b8fd403b3
Git blob SHAb3e5fc7a78afa6d2ae7538dc41cc2b702787c5db
Reading-copy SHA-256eb374d5af681e262f82a66d4e5315c9de53f16a1a6a13ce250f4fa7b8fd403b3

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

Recovered source transcript

//go:build integration // WS7 Phase 6 Command Center surfacing: the federal signal panel. Proves the two additive, read only // views populate from the global catalogs and carry their provenance, the WS7 acceptance criterion that // every inference is traceable to its source text. OpenByMission returns only the solicitation tagged to // the requested mission code and never an untagged one; IncumbentMix returns the incumbent labor mix on a // recompete relevant award with the evidence phrase. Mission tags are never a scoring input and never // reach the eeo schema; this test only exercises the surfacing. package integration import ( "context" "testing" "time" "github.com/jackc/pgx/v5/pgtype" "github.com/shopspring/decimal" "github.com/missionworkforce/missionmatch/internal/modules/commandcenter" "github.com/missionworkforce/missionmatch/internal/platform/database/dbgen" ) func TestFederalSignalOpenByMission(t *testing.T) { ctx := context.Background() org := seedOrg(t) // Seed two active solicitations through the migrator (the global catalog is migrator written). One is // tagged SIGINT, the other is left untagged so the filter must exclude it. stamp := time.Now().UTC().Format("20060102150405.000000") taggedSrc := "FS-TAG-" + stamp untaggedSrc := "FS-UNTAG-" + stamp // A very soon response deadline so the seeded solicitation sorts to the front of the soonest closing // first panel and stays inside the LIMIT 25 even as the global SIGINT catalog grows past 25 future // deadline solicitations (the daily sync accrues real ones). A null deadline sorts last and would fall // out of the panel once the catalog is large, which is a test fragility, not a product issue. soon := time.Now().UTC().Add(time.Hour) for _, src := range []string{taggedSrc, untaggedSrc} { if err := dbgen.New(migrator).UpsertOpportunityRecord(ctx, dbgen.UpsertOpportunityRecordParams{ SourceName: "SAM.gov", SourceRecordID: src, DedupeKey: src, RecordKind: "active_solicitation", Title: "Cyber support " + src, Agency: "DEPT OF DEFENSE", Naics: "541512", PopState: "HI", ValueSource: "operator", IsPlanning: false, PostedDate: pgtype.Date{Time: time.Now().UTC(), Valid: true}, FetchedAt: time.Now().UTC(), ResponseDeadline: &soon, RawObjectKey: "opportunity_records/sam.gov/" + src + ".json", RawSha256: "deadbeef", }); err != nil { t.Fatalf("seed solicitation %s: %v", src, err) } } // Resolve the generated uuid for the tagged record and write a SIGINT federal_mission_tag (global, // migrator owned). federal_mission_tags keys on record_id as the text form of the uuid. var taggedID, untaggedID string if err := migrator.QueryRow(ctx, "SELECT id::text FROM opportunity_records WHERE source_record_id=$1", taggedSrc).Scan(&taggedID); err != nil { t.Fatalf("resolve tagged id: %v", err) } if err := migrator.QueryRow(ctx, "SELECT id::text FROM opportunity_records WHERE source_record_id=$1", untaggedSrc).Scan(&untaggedID); err != nil { t.Fatalf("resolve untagged id: %v", err) } if err := dbgen.New(migrator).UpsertFederalMissionTag(ctx, dbgen.UpsertFederalMissionTagParams{ RecordTable: "opportunity_records", RecordID: taggedID, MissionCode: "SIGINT", Mechanism: "keyword", Evidence: "signals intelligence", Confidence: decimal.RequireFromString("1.00"), }); err != nil { t.Fatalf("write federal mission tag: %v", err) } svc := commandcenter.NewService(appDB) v, err := svc.FederalSignal(ctxOrg(org), "SIGINT") if err != nil { t.Fatalf("FederalSignal SIGINT: %v", err) } sawTagged, sawUntagged := false, false for _, o := range v.OpenByMission { if o.RecordID == taggedID { sawTagged = true if o.MissionCode != "SIGINT" || o.MissionMechanism != "keyword" || o.MissionEvidence != "signals intelligence" { t.Fatalf("tagged solicitation missing provenance: %+v", o) } } if o.RecordID == untaggedID { sawUntagged = true } } if !sawTagged { t.Fatal("OpenByMission(SIGINT) must return the SIGINT tagged solicitation") } if sawUntagged { t.Fatal("OpenByMission(SIGINT) must NOT return the untagged solicitation") } // An unknown mission code is rejected, never silently returning everything. if _, err := svc.FederalSignal(ctxOrg(org), "NOPE"); err == nil { t.Fatal("FederalSignal must reject an unknown mission code") } } func TestFederalSignalIncumbentMix(t *testing.T) { ctx := context.Background() org := seedOrg(t) // Seed a USASpending award with a period of performance that is ending (the recompete signal) and one // incumbent labor role with an evidence phrase. The award catalog and the role table are global and // migrator written. awardID := "FS-AWD-" + time.Now().UTC().Format("20060102150405.000000") amt := decimal.RequireFromString("3200000.00") if _, err := migrator.Exec(ctx, `INSERT INTO usaspending_awards (generated_internal_id, recipient_name, awarding_agency, naics_code, award_amount, pop_end_date, raw) VALUES ($1, $2, $3, $4, $5, $6, '{}'::jsonb)`, awardID, "Acme Defense LLC", "DEPT OF THE AIR FORCE", "541512", amt, time.Now().UTC().AddDate(0, 3, 0)); err != nil { t.Fatalf("seed award: %v", err) } if err := dbgen.New(migrator).UpsertAwardIncumbentRole(ctx, dbgen.UpsertAwardIncumbentRoleParams{ RecordTable: "usaspending_awards", RecordID: awardID, LaborCategory: "SIGINT Analyst", RoleCount: 3, Evidence: "SIGINT Analyst x3", }); err != nil { t.Fatalf("write incumbent role: %v", err) } svc := commandcenter.NewService(appDB) v, err := svc.FederalSignal(ctxOrg(org), "") if err != nil { t.Fatalf("FederalSignal incumbent mix: %v", err) } found := false for _, a := range v.IncumbentMix { if a.RecordID != awardID { continue } found = true if a.RecipientName != "Acme Defense LLC" || a.Source != "USASpending" { t.Fatalf("award identity wrong: %+v", a) } if a.AwardValue == nil || *a.AwardValue != "3200000.00" { t.Fatalf("award value not rendered: %v", a.AwardValue) } if len(a.Roles) != 1 || a.Roles[0].LaborCategory != "SIGINT Analyst" || a.Roles[0].RoleCount != 3 || a.Roles[0].Evidence != "SIGINT Analyst x3" { t.Fatalf("incumbent role or evidence wrong: %+v", a.Roles) } } if !found { t.Fatal("IncumbentMix must return the seeded recompete relevant award with its incumbent role") } }

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