Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/platform/missionclass/labor.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | internal/platform/missionclass/labor.go |
| Original SHA-256 | 7d5185293fe9c6cd6ff9e3b44a1a6a00cb04a5c0b45831637425ca65cfdee489 |
| Git blob SHA | 3186d1624a8f9e0f2c14ccb8e35ce6c51ac4bd73 |
| Reading-copy SHA-256 | 7d5185293fe9c6cd6ff9e3b44a1a6a00cb04a5c0b45831637425ca65cfdee489 |
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/platform/missionclass/labor.go | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | vendor-intelligence | fe9796a19c261951d3f2565206c0c1b5ac294465 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
| Janady13/missionmatch / internal/platform/missionclass/labor.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
Recovered source transcript
Download complete source text ↓107 lines · 4.2 KB
package missionclass
import (
"sort"
"strings"
)
// laborKeywords maps profile or solicitation text to Galapagos labor categories. It was lifted verbatim
// from matching/intel.go so candidates with no structured skills still surface the categories they fit,
// and so opportunities and awards can mine an incumbent labor mix from the same word list. The match is a
// lowercased SUBSTRING match (strings.Contains), preserved exactly from the original inline logic so the
// candidate intelligence output stays byte identical after the move. Extend with vetted entries only.
var laborKeywords = []struct {
lcat string
words []string
}{
{"ISSO", []string{"isso", "information system security officer", "information systems security", "security officer", "issm"}},
{"Cyber Architect", []string{"security architect", "cyber architect", "cybersecurity architect", "soc architect"}},
{"Cloud Architect", []string{"cloud architect", "solutions architect", "aws architect", "azure architect"}},
{"Systems Engineer", []string{"systems engineer", "system engineer", "software engineer", "software developer", "devops"}},
{"Cyber Engineer", []string{"cyber engineer", "cybersecurity engineer", "security engineer", "soc analyst", "network security", "penetration"}},
{"Program Manager", []string{"program manager", "project manager", "pmp", "capture manager"}},
{"Data Scientist", []string{"data scientist", "machine learning", "data engineer"}},
{"Intelligence Analyst", []string{"intelligence analyst", "all source", "sigint", "geoint", "intel analyst"}},
}
// ClassifyLabor returns the Galapagos labor categories whose keyword forms appear in text, as a stable
// sorted slice. The match is a lowercased substring match over the curated word list, the same logic the
// Candidates page used inline, so a caller can filter the result against the labor categories an org
// actually has open and reproduce the previous output exactly. Pure, no DB.
func ClassifyLabor(text string) []string {
if strings.TrimSpace(text) == "" {
return nil
}
lower := strings.ToLower(text)
cov := map[string]bool{}
for _, lk := range laborKeywords {
if containsAny(lower, lk.words) {
cov[lk.lcat] = true
}
}
if len(cov) == 0 {
return nil
}
out := make([]string, 0, len(cov))
for l := range cov {
out = append(out, l)
}
sort.Strings(out)
return out
}
// containsAny reports whether any of words is a substring of haystack. haystack is expected lowercased.
func containsAny(haystack string, words []string) bool {
for _, w := range words {
if strings.Contains(haystack, w) {
return true
}
}
return false
}
// LaborHit is one incumbent labor category mined from text, with a deterministic occurrence count and the
// first matched phrase as evidence. It feeds award_incumbent_roles so a recompete can show the incumbent
// staffing mix, each row traceable to the source text. Count is never fabricated: it is the literal total
// of matched keyword phrase occurrences in the text.
type LaborHit struct {
LCAT string
Count int
Evidence string
}
// ClassifyLaborCounts returns one LaborHit per labor category whose keyword forms appear in text, in the
// stable laborKeywords order. Count is the deterministic total occurrences of that category's matched
// keyword phrases in the lowercased text (the sum of strings.Count over every matched word), so two
// mentions of the same phrase count twice and a category mentioned through two phrases counts both.
// Evidence is the FIRST matched phrase in the curated word list order. It reuses the same laborKeywords
// list ClassifyLabor uses, so the incumbent mix and the candidate categories stay in lockstep. Pure, no DB.
func ClassifyLaborCounts(text string) []LaborHit {
if strings.TrimSpace(text) == "" {
return nil
}
lower := strings.ToLower(text)
out := make([]LaborHit, 0, len(laborKeywords))
for _, lk := range laborKeywords {
total := 0
evidence := ""
for _, w := range lk.words {
n := strings.Count(lower, w)
if n == 0 {
continue
}
if evidence == "" {
evidence = w
}
total += n
}
if total > 0 {
out = append(out, LaborHit{LCAT: lk.lcat, Count: total, Evidence: evidence})
}
}
if len(out) == 0 {
return nil
}
return out
}