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 | 6c56e29231ec05735927fa265c97d517499dfeaf |
| Branch | ws6-retrieval |
| Path or archive member | internal/modules/ai/mission_test.go |
| Original SHA-256 | 7f251481180bfb1d306cf1bbb5ed08b509e85bd186ef99c5eafc20fca1592171 |
| Git blob SHA | 1bf5483b784f604406b50345db59aacae75cff29 |
| Reading-copy SHA-256 | 7f251481180bfb1d306cf1bbb5ed08b509e85bd186ef99c5eafc20fca1592171 |
Recovered source transcript
Download complete source text ↓45 lines · 2.1 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)
}
})
}
}