Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/modules/ai/mission_test.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | internal/modules/ai/mission_test.go |
| Original SHA-256 | 6ae6f1866d1001cf4b8e6c60387a5a1afddf2131c3cf4ee2207f620de9bbdd62 |
| Git blob SHA | 83564640f118aa71df4387e1191f9afa8d908345 |
| Reading-copy SHA-256 | 6ae6f1866d1001cf4b8e6c60387a5a1afddf2131c3cf4ee2207f620de9bbdd62 |
Every recorded occurrence
These 15 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 / internal/modules/ai/mission_test.go | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | vendor-intelligence | fe9796a19c261951d3f2565206c0c1b5ac294465 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
| Janady13/missionmatch / internal/modules/ai/mission_test.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
Recovered source transcript
Download complete source text ↓104 lines · 4.3 KB
package ai
import "testing"
func TestMissionFromQuestion(t *testing.T) {
cases := []struct {
name string
question string
want string
}{
{"acronym sigint", "Who has SIGINT experience and a TS clearance?", "SIGINT"},
{"spelled signals intelligence", "find candidates with signals intelligence background", "SIGINT"},
{"geoint acronym", "show me GEOINT analysts", "GEOINT"},
{"geospatial intelligence phrase", "which candidate has geospatial intelligence work", "GEOINT"},
{"humint", "list humint collectors", "HUMINT"},
{"masint", "top MASINT engineers", "MASINT"},
{"osint", "best osint researcher", "OSINT"},
{"open source intelligence phrase", "who did open source intelligence", "OSINT"},
{"satellite c2", "find satellite c2 operators", "Satellite C2"},
{"satellite command and control phrase", "candidates with satellite command and control", "Satellite C2"},
{"cross domain solution", "who built a cross domain solution", "Cross Domain Solution"},
{"comsec", "comsec custodian needed", "COMSEC"},
{"communications security phrase", "communications security specialist", "COMSEC"},
{"tempest", "tempest testing engineer", "TEMPEST"},
{"electronic warfare phrase", "electronic warfare officer", "Electronic Warfare"},
{"no mission", "who has a Secret clearance in Hawaii", ""},
{"empty", "", ""},
// A bare acronym must match on a word boundary, never inside another word.
{"no false positive inside word", "candidates in Washington with cdsa tooling", ""},
// Deterministic first match when two missions are named: mission_spine order wins (SIGINT before GEOINT).
{"deterministic first match", "needs both geoint and sigint", "SIGINT"},
// A multi word form tolerates extra whitespace or a line break between tokens.
{"phrase double space", "find satellite command and control operators", "Satellite C2"},
{"phrase newline", "candidates with open source\nintelligence", "OSINT"},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
got := MissionFromQuestion(tc.question)
if got != tc.want {
t.Fatalf("MissionFromQuestion(%q) = %q, want %q", tc.question, got, tc.want)
}
})
}
}
// TestMissionCodeForTerm pins the term to code map (the bridge from the WS6 keyword to the WS7 structured
// candidate_mission_tags.mission_code) to the mission_areas vocabulary, covering all ten terms, the multi
// word terms whose code differs from the term, and the no match case.
func TestMissionCodeForTerm(t *testing.T) {
cases := []struct {
term string
want string
}{
{"SIGINT", "SIGINT"},
{"GEOINT", "GEOINT"},
{"HUMINT", "HUMINT"},
{"MASINT", "MASINT"},
{"OSINT", "OSINT"},
{"Satellite C2", "SAT_C2"},
{"Cross Domain Solution", "CDS"},
{"COMSEC", "COMSEC"},
{"TEMPEST", "TEMPEST"},
{"Electronic Warfare", "EW"},
{"", ""},
{"not a mission", ""},
}
for _, tc := range cases {
if got := MissionCodeForTerm(tc.term); got != tc.want {
t.Fatalf("MissionCodeForTerm(%q) = %q, want %q", tc.term, got, tc.want)
}
}
// The map must cover exactly the ten missions, no more, no fewer, so it cannot silently drift from the
// mission_areas vocabulary.
if len(missionTermToCode) != 10 {
t.Fatalf("missionTermToCode has %d entries, want 10", len(missionTermToCode))
}
}
// TestMissionCodeFromQuestion proves the question to code path detects the mission exactly as the WS6
// MissionFromQuestion does and then maps to the structured code, including the multi word missions and the
// no mission case.
func TestMissionCodeFromQuestion(t *testing.T) {
cases := []struct {
question string
want string
}{
{"Who has SIGINT experience and a TS clearance?", "SIGINT"},
{"find candidates with signals intelligence background", "SIGINT"},
{"find satellite c2 operators", "SAT_C2"},
{"candidates with satellite command and control", "SAT_C2"},
{"who built a cross domain solution", "CDS"},
{"electronic warfare officer", "EW"},
{"who has a Secret clearance in Hawaii", ""},
{"", ""},
// Deterministic first match: mission_spine order wins (SIGINT before GEOINT) then maps to its code.
{"needs both geoint and sigint", "SIGINT"},
}
for _, tc := range cases {
if got := MissionCodeFromQuestion(tc.question); got != tc.want {
t.Fatalf("MissionCodeFromQuestion(%q) = %q, want %q", tc.question, got, tc.want)
}
}
}