ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/matching/eval/eval.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/matching/eval/eval.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision1e9249840a4302ec82e123b9c9cb6f75badea3e4
Branchmaster
Path or archive memberinternal/modules/matching/eval/eval.go
Original SHA-256ecd0c1c9658f5303bd8c0cfa6b415d6b00b2f70b60b0902e3c484a1bf8d881c7
Git blob SHAa7c88c06e7f4049e5597ae6575ed8b1c4e73e9ac
Reading-copy SHA-256ecd0c1c9658f5303bd8c0cfa6b415d6b00b2f70b60b0902e3c484a1bf8d881c7

Original source ↗

Every recorded occurrence

These 29 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/matching/eval/eval.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/modules/matching/eval/eval.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/modules/matching/eval/eval.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/modules/matching/eval/eval.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/modules/matching/eval/eval.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/modules/matching/eval/eval.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/modules/matching/eval/eval.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/modules/matching/eval/eval.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

// Package eval loads the labeled GovCon benchmark fixtures and scores them through the frozen // engine, producing a band confusion matrix and per lane pass rates. It is the regression and // fairness harness for the AEDT engine: a divergence between the domain truth band in a fixture // and the engine band is a finding to investigate, not a test failure, because the fixture labels // are independent expert judgments. With -strict the CLI exits nonzero when any mismatch is found, // enabling a future CI gate once the fixture labels are customer-validated. // // No demographic/EEO fields appear in any fixture. The engine never receives them. package eval import ( "context" "encoding/json" "fmt" "os" "path/filepath" "strings" "github.com/missionworkforce/missionmatch/internal/modules/matching/engine" ) // ---------- JSON fixture types ---------- // CandidateJSON mirrors the candidate block in fixtures.json. type CandidateJSON struct { ClearanceLevel string `json:"clearance_level"` ClearancePoly string `json:"clearance_poly"` ClearanceStatus string `json:"clearance_status"` Skills []string `json:"skills"` Certs []string `json:"certs"` CustomerAgencies []string `json:"customer_agencies"` YearsExperience int `json:"years_experience"` Location string `json:"location"` Remote bool `json:"remote"` Relocatable bool `json:"relocatable"` Available bool `json:"available"` } // RequiredSkillJSON mirrors one element of the required_skills array. type RequiredSkillJSON struct { Name string `json:"name"` Mandatory bool `json:"mandatory"` } // RequirementJSON mirrors the requirement block in fixtures.json. type RequirementJSON struct { RequiredLevel string `json:"required_level"` RequiredPoly string `json:"required_poly"` RequiredSkills []RequiredSkillJSON `json:"required_skills"` RequiredCerts []string `json:"required_certs"` CustomerAgency string `json:"customer_agency"` RequiredYears int `json:"required_years"` WorkLocation string `json:"work_location"` RemoteAllowed bool `json:"remote_allowed"` } // ExpectedJSON mirrors the expected block in fixtures.json. type ExpectedJSON struct { Band string `json:"band"` Rationale string `json:"rationale"` MandatoryGaps []string `json:"mandatory_gaps,omitempty"` } // Fixture is one benchmark case: a candidate, a requirement, and the domain truth expected band. type Fixture struct { ID string `json:"id"` Candidate CandidateJSON `json:"candidate"` Requirement RequirementJSON `json:"requirement"` Expected ExpectedJSON `json:"expected"` Lane string `json:"-"` // injected from the directory name after loading } // ---------- parsers (string codes to engine enum values) ---------- func parseClearanceLevel(s string) engine.ClearanceLevel { switch strings.ToLower(strings.TrimSpace(s)) { case "confidential": return engine.ClearanceConfidential case "secret": return engine.ClearanceSecret case "top_secret": return engine.ClearanceTopSecret case "ts_sci": return engine.ClearanceTSSCI case "none": return engine.ClearanceNone default: return engine.ClearanceUnknown } } func parsePoly(s string) engine.Polygraph { switch strings.ToLower(strings.TrimSpace(s)) { case "ci": return engine.PolyCI case "full_scope": return engine.PolyFullScope default: return engine.PolyNone } } func parseClearanceStatus(s string) engine.ClearanceStatus { switch strings.ToLower(strings.TrimSpace(s)) { case "active": return engine.StatusActive case "expired": return engine.StatusExpired case "inactive": return engine.StatusInactive default: return engine.StatusUnknown } } func parseBand(s string) engine.Band { switch strings.ToLower(strings.TrimSpace(s)) { case "green": return engine.BandGreen case "yellow": return engine.BandYellow default: return engine.BandRed } } // ---------- conversion: JSON fixture -> engine types ---------- // ToEngineCandidate converts a CandidateJSON to an engine.Candidate. The ID is the fixture ID. func ToEngineCandidate(id string, cj CandidateJSON) engine.Candidate { skills := make([]engine.CandidateSkill, len(cj.Skills)) for i, s := range cj.Skills { skills[i] = engine.CandidateSkill{Name: s} } return engine.Candidate{ ID: id, Clearance: engine.Clearance{ Level: parseClearanceLevel(cj.ClearanceLevel), Poly: parsePoly(cj.ClearancePoly), Status: parseClearanceStatus(cj.ClearanceStatus), }, Skills: skills, Certifications: cj.Certs, CustomerExperience: cj.CustomerAgencies, YearsExperience: cj.YearsExperience, Location: cj.Location, Remote: cj.Remote, Relocatable: cj.Relocatable, Available: cj.Available, } } // ToEngineRequirement converts a RequirementJSON to an engine.Requirement. func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement { required := make([]engine.RequiredSkill, len(rj.RequiredSkills)) for i, rs := range rj.RequiredSkills { required[i] = engine.RequiredSkill{Name: rs.Name, Mandatory: rs.Mandatory} } return engine.Requirement{ ID: id, RequiredLevel: parseClearanceLevel(rj.RequiredLevel), RequiredPoly: parsePoly(rj.RequiredPoly), RequiredSkills: required, RequiredCerts: rj.RequiredCerts, CustomerAgency: rj.CustomerAgency, RequiredYears: rj.RequiredYears, WorkLocation: rj.WorkLocation, RemoteAllowed: rj.RemoteAllowed, } } // ---------- result types ---------- // Mismatch records one case where the engine band differed from the domain truth band. type Mismatch struct { ID string Lane string Expected engine.Band Scored engine.Band Total string } // ConfusionMatrix is a 3x3 matrix indexed by [expected][scored], both using Band iota order // (Red=0, Yellow=1, Green=2). type ConfusionMatrix [3][3]int // Report is the output of Score. type Report struct { Matrix ConfusionMatrix Mismatches []Mismatch LaneResults map[string]LaneResult Total int Correct int } // LaneResult summarises one lane. type LaneResult struct { Total int Correct int } // BandPrecision returns precision for the given band: TP / (TP + FP). // FP = other rows scored into this band. func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 { tp := m[b][b] total := 0 for exp := 0; exp < 3; exp++ { total += m[exp][b] } if total == 0 { return 1.0 } return float64(tp) / float64(total) } // BandRecall returns recall for the given band: TP / (TP + FN). // FN = this band's cases that were scored into other bands. func (m ConfusionMatrix) BandRecall(b engine.Band) float64 { tp := m[b][b] total := 0 for scored := 0; scored < 3; scored++ { total += m[b][scored] } if total == 0 { return 1.0 } return float64(tp) / float64(total) } // ---------- loader ---------- // LoadLane reads all fixtures from <testdataDir>/<lane>/fixtures.json and sets the Lane field. func LoadLane(testdataDir, lane string) ([]Fixture, error) { path := filepath.Join(testdataDir, lane, "fixtures.json") data, err := os.ReadFile(path) if err != nil { return nil, fmt.Errorf("read %s: %w", path, err) } var fixtures []Fixture if err := json.Unmarshal(data, &fixtures); err != nil { return nil, fmt.Errorf("parse %s: %w", path, err) } for i := range fixtures { fixtures[i].Lane = lane } return fixtures, nil } // ---------- scoring ---------- // Score runs every fixture through the frozen engine (nil skill matcher, exact only), compares // each result to the expected domain truth band, and returns a Report. func Score(fixtures []Fixture) Report { r := Report{ LaneResults: make(map[string]LaneResult), } ctx := context.Background() for _, fx := range fixtures { c := ToEngineCandidate(fx.ID, fx.Candidate) req := ToEngineRequirement(fx.ID+"-req", fx.Requirement) result := engine.ScoreCandidate(ctx, c, req, nil) expected := parseBand(fx.Expected.Band) r.Matrix[expected][result.Band]++ r.Total++ lane := r.LaneResults[fx.Lane] lane.Total++ if result.Band == expected { r.Correct++ lane.Correct++ } else { r.Mismatches = append(r.Mismatches, Mismatch{ ID: fx.ID, Lane: fx.Lane, Expected: expected, Scored: result.Band, Total: result.Total.StringFixed(2), }) } r.LaneResults[fx.Lane] = lane } return r }

Mathematical records from this source

01

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

02

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

03

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

04

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

05

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

06

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

07

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

08

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

09

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

10

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

11

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

12

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

13

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

14

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

15

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

16

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

17

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

18

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

19

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

20

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

21

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

22

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

23

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

24

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

25

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

26

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

27

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

28

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

29

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

30

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

31

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

32

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

33

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

34

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

35

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

36

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

37

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

38

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

39

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

40

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

41

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

42

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

43

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement

This relation defines (Red in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement”. It specifies the displayed relationship between the…

44

func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP

This relation defines FP in the source section “func ToEngineRequirement(id string, rj RequirementJSON) engine.Requirement · FP”. It specifies the displayed relationship between…

45

func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN

This relation defines FN in the source section “func (m ConfusionMatrix) BandPrecision(b engine.Band) float64 · FN”. It specifies the displayed relationship between the named…

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