ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/ai/graph_loop_test.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/ai/graph_loop_test.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/ai/graph_loop_test.go
Original SHA-256cafbc69d0fc07d3815478227fdf50f9ecd4631917a7fb75f3db8dc8d323743a3
Git blob SHA1d48a2407891ecb9e191cb62ca014c7f5d5d4081
Reading-copy SHA-256cafbc69d0fc07d3815478227fdf50f9ecd4631917a7fb75f3db8dc8d323743a3

Original source ↗

Every recorded occurrence

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

Recovered source transcript

package ai import ( "strings" "testing" ) // TestRequirementSegmentSQLPassesTheReadOnlyGuard is the load bearing security assertion for G6: the segment // resolver SQL passes GuardReadOnlyQuery against the real ReadAllowlist with no error. It must be a single // read over allowlisted tables (requirements, opportunities, opportunity_records) with no set returning // function in a FROM or JOIN position, no mutating keyword, and no eeo marker, the same gate ValidateRegistry // runs at boot and ExecuteIntent would re run. It is the SQL the composition runs to resolve the segment // under RLS and the registered SQL of the composed intent. func TestRequirementSegmentSQLPassesTheReadOnlyGuard(t *testing.T) { if err := GuardReadOnlyQuery(requirementSegmentSQL, ReadAllowlist); err != nil { t.Fatalf("the requirement segment resolver SQL must pass the read only guard: %v", err) } } // TestValidateRegistryWithCaptureIntent proves the whole closed Registry, now carrying the G6 composed // capture intent alongside the TAG, G3, G1, G9, G7, G2, G5, and G4 intents, validates at boot. ValidateRegistry // runs GuardReadOnlyQuery on every intent's SQL, so the composed intent's registered SQL (the segment // resolver read) must itself pass the guard for the whole Registry to validate. This is the assertion the api // boot runs. func TestValidateRegistryWithCaptureIntent(t *testing.T) { if err := ValidateRegistry(); err != nil { t.Fatalf("ValidateRegistry must pass with the G6 capture intent registered: %v", err) } } // TestCaptureIntentIsRegistered proves capture_picture_for_requirement is in the closed Registry binding // exactly one ParamUUID requirement_id, so ValidateRegistry asserts it at boot and the bench fork can bind its // id. A missing intent or a wrong param shape means the registration regressed. func TestCaptureIntentIsRegistered(t *testing.T) { it, ok := IntentByName(IntentCapturePictureForRequirement) if !ok { t.Fatalf("intent %q must be registered in the closed Registry", IntentCapturePictureForRequirement) } if len(it.Params) != 1 { t.Fatalf("the capture intent must bind exactly one param, got %d", len(it.Params)) } if it.Params[0].Kind != ParamUUID { t.Errorf("the capture intent must bind a ParamUUID requirement id, got %q", it.Params[0].Kind) } if it.SQL != requirementSegmentSQL { t.Error("the capture intent's registered SQL must be the segment resolver read, the only guarded read it carries") } } // TestCaptureIntentIsGraphAndBenchIntent proves the composed capture intent is BOTH a graph intent (so the // Answer dispatcher routes it to AnswerGraph) AND a bench intent (so it is auth gated, rejected on the raw // ExecuteIntent path, and forked to its composition). A regression dropping it from either set would let it // route to TAG or run unsuppressed. func TestCaptureIntentIsGraphAndBenchIntent(t *testing.T) { if !IsGraphIntent(IntentCapturePictureForRequirement) { t.Error("the capture intent must be a graph intent so Answer routes it to AnswerGraph") } if !IsBenchIntent(IntentCapturePictureForRequirement) { t.Error("the capture intent reads the bench and must be a bench intent so it is auth gated and raw path rejected") } } // TestCaptureClassifierBindsOnlyOnExplicitRequirementUUID pins the conservative NL posture: a capture picture // question routes to the composed intent ONLY when it carries an explicit canonical requirement UUID, and a // capture phrasing with no UUID falls back to RAG (a nil route) rather than guessing a requirement, the same // posture as the bench gap and readiness routes. func TestCaptureClassifierBindsOnlyOnExplicitRequirementUUID(t *testing.T) { reqID := "11111111-2222-3333-4444-555555555555" gr := graphClassify(`give me the capture picture for requirement ` + reqID) if gr == nil { t.Fatal("a capture picture question carrying an explicit requirement UUID must route to the composed intent") } if gr.intent != IntentCapturePictureForRequirement { t.Errorf("the capture question must route to %q, got %q", IntentCapturePictureForRequirement, gr.intent) } if len(gr.args) != 1 || gr.args[0] != reqID { t.Errorf("the capture route must bind the explicit requirement id, got %v", gr.args) } // A capture phrasing with NO explicit requirement id falls back to RAG (nil route), never a guessed id. if got := graphClassify("can we staff this and what is the market"); got != nil { t.Errorf("a capture question with no explicit requirement id must fall back to RAG, got %+v", got) } } // TestCaptureNarrativeNamesThePriceFloorAndNeverADash pins two surfaced invariants of the deterministic // narrative: it always states the price to win honest floor verbatim (no fabricated rate), and it carries no // dash in surfaced prose (the platform writing rule). The bench legs are empty here, so the narrative is the // pure structural and floor text with no person data. func TestCaptureNarrativeNamesThePriceFloorAndNeverADash(t *testing.T) { seg := RequirementSegment{Agency: "", NAICS: "", RequiredLevel: "secret", Found: true} market := []string{"the market segment could not be bound: this requirement names no customer agency and links no opportunity."} got := captureNarrative(seg, nil, nil, market, capturePriceToWinFloor) if !strings.Contains(got, capturePriceToWinFloor) { t.Errorf("the capture narrative must state the price to win honest floor, got %q", got) } if strings.Contains(got, "-") { t.Errorf("the capture narrative must carry no dash in surfaced prose, got %q", got) } } // TestSegmentBindRules pins the honest floor discipline: the agency keyed leg runs only with a non empty // agency, the (agency, naics) keyed leg only with both, and SegmentBound (whether any market arm can run) is // the non empty agency floor. func TestSegmentBindRules(t *testing.T) { none := RequirementSegment{Found: true} if none.AgencyBound() || none.NAICSBound() || none.SegmentBound() { t.Error("an empty segment must bind no market arm") } agencyOnly := RequirementSegment{Agency: "DEPT OF THE AIR FORCE", Found: true} if !agencyOnly.AgencyBound() || agencyOnly.NAICSBound() || !agencyOnly.SegmentBound() { t.Error("an agency only segment must bind the agency arm but not the naics arm") } full := RequirementSegment{Agency: "DEPT OF THE AIR FORCE", NAICS: "541512", Found: true} if !full.AgencyBound() || !full.NAICSBound() || !full.SegmentBound() { t.Error("a full segment must bind both market arms") } }

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