ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/ai/capture_readiness_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/capture_readiness_test.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/ai/capture_readiness_test.go
Original SHA-25602e7a7713e1bf6d2a55e4f429980af630cd53930899e5a023a30b522ed048908
Git blob SHAd9e0f8aaeba855cef860e7964d2f4c30da82cc8b
Reading-copy SHA-25602e7a7713e1bf6d2a55e4f429980af630cd53930899e5a023a30b522ed048908

Original source ↗

Every recorded occurrence

These 6 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/capture_readiness_test.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/ai/capture_readiness_test.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/ai/capture_readiness_test.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/ai/capture_readiness_test.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/modules/ai/capture_readiness_test.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/modules/ai/capture_readiness_test.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package ai import ( "strings" "testing" "github.com/shopspring/decimal" ) // the default seed weights, the governance chosen capture logic. func captureWeights() map[string]decimal.Decimal { return map[string]decimal.Decimal{ factorStaffingReadiness: dec("0.35"), factorMarketWinLikelihood: dec("0.30"), factorIncumbencyPosition: dec("0.20"), factorPastPerformance: dec("0.15"), } } func TestScoreCaptureReadinessIsAnExactWeightedAverage(t *testing.T) { // every factor at 1.0 and the weights summing to one => the score is exactly 1.0 (no sigmoid distortion). factors := []captureFactor{ {factorStaffingReadiness, dec("1"), ""}, {factorMarketWinLikelihood, dec("1"), ""}, {factorIncumbencyPosition, dec("1"), ""}, {factorPastPerformance, dec("1"), ""}, } score, trace := scoreCaptureReadiness(captureWeights(), factors) if !score.Equal(dec("1")) { t.Fatalf("all factors at 1.0 must score exactly 1.0, got %s", score) } if len(trace) != 4 { t.Fatalf("the trace must carry all four factors, got %d", len(trace)) } // a specific mix: staffing 0.8, market 0.5, incumbency 1.0, past 0.0 // = 0.35*0.8 + 0.30*0.5 + 0.20*1.0 + 0.15*0.0 = 0.28 + 0.15 + 0.20 + 0 = 0.63 mix := []captureFactor{ {factorStaffingReadiness, dec("0.8"), ""}, {factorMarketWinLikelihood, dec("0.5"), ""}, {factorIncumbencyPosition, dec("1.0"), ""}, {factorPastPerformance, dec("0.0"), ""}, } got, _ := scoreCaptureReadiness(captureWeights(), mix) if !got.Equal(dec("0.63")) { t.Fatalf("the weighted average must be exactly 0.63, got %s", got) } } func TestScoreCaptureReadinessMissingWeightIsZeroContribution(t *testing.T) { // a factor with no stored weight contributes nothing, the safe default. factors := []captureFactor{{"unknown_factor", dec("1"), ""}} score, _ := scoreCaptureReadiness(captureWeights(), factors) if !score.Equal(decimal.Zero) { t.Fatalf("a factor with no stored weight must contribute zero, got %s", score) } } func TestCaptureBandThresholds(t *testing.T) { cases := []struct { score string want string }{ {"0.65", "GO"}, // at the GO threshold {"0.80", "GO"}, // above {"0.64", "REVIEW"}, // just below GO {"0.45", "REVIEW"}, // at the NO_GO floor is still REVIEW {"0.55", "REVIEW"}, {"0.44", "NO_GO"}, // just below the floor {"0.10", "NO_GO"}, } for _, c := range cases { if got := captureBand(dec(c.score)); got != c.want { t.Errorf("captureBand(%s) = %q, want %q", c.score, got, c.want) } } } func TestClamp01(t *testing.T) { if !clamp01(dec("-0.2")).Equal(decimal.Zero) { t.Error("a negative value must clamp to 0") } if !clamp01(dec("1.5")).Equal(dec("1")) { t.Error("a value above one must clamp to 1") } if !clamp01(dec("0.42")).Equal(dec("0.42")) { t.Error("an in range value must pass through") } } func TestCaptureReadinessRegisteredAndGraphIntent(t *testing.T) { if _, ok := IntentByName(IntentOpportunityCaptureReadiness); !ok { t.Fatal("capture readiness must be a registered intent") } if !IsGraphIntent(IntentOpportunityCaptureReadiness) { t.Error("capture readiness must be a graph intent so Answer routes it to AnswerGraph") } if IsModelIntent(IntentOpportunityCaptureReadiness) { t.Error("capture readiness must NOT be a model intent (it is a deterministic composition)") } // It renders a GO/REVIEW/NO_GO recommendation and discloses it is not a candidate score. det := renderCaptureReadiness(dec("0.63"), "REVIEW", []Contribution{ {FeatureName: factorStaffingReadiness, Value: dec("0.8"), Coefficient: dec("0.35"), Contribution: dec("0.28"), Rationale: "x"}, }) for _, want := range []string{"REVIEW", "Capture Readiness Score", "NOT a per candidate match score", "staffing_readiness"} { if !strings.Contains(det, want) { t.Errorf("the deterministic render must contain %q, got %q", want, det) } } }

Mathematical records from this source

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