ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/matching/engine/weights.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/matching/engine/weights.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/matching/engine/weights.go
Original SHA-25623dc41688c3ac430b4dc260395e4eaa908c50cd5e6dd4a78742813d47e6f55a4
Git blob SHA3d8dfd8cf675519adebb4ec8690f6d4460cfe7e5
Reading-copy SHA-25623dc41688c3ac430b4dc260395e4eaa908c50cd5e6dd4a78742813d47e6f55a4

Original source ↗

Every recorded occurrence

These 2 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/engine/weights.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/matching/engine/weights.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original

Recovered source transcript

package engine import ( "fmt" "github.com/shopspring/decimal" ) // GlobalDefaultProfileVersion names the weight set every tenant scores on until the Adaptive // Intelligence Optimization Engine has produced a tenant profile. It is stamped into results and // audit rows so a served score always names the exact weights that produced it. const GlobalDefaultProfileVersion = "global.default" // Weights carries the six dimension weights the scorer applies. The engine stays pure and // deterministic: weights are an INPUT, injected by the caller, decimal end to end. The fixed // package constants (WeightClearance and friends) remain the frozen global default; a tenant // profile from the AIOE layer arrives here already validated and clamped. type Weights struct { Clearance decimal.Decimal Skills decimal.Decimal Certifications decimal.Decimal CustomerExperience decimal.Decimal Experience decimal.Decimal Location decimal.Decimal } // DefaultWeights returns the frozen global default weight set (CLAUDE.md fixed weights). Scoring // with DefaultWeights is byte identical to the historical ScoreCandidate behavior; the frozen // golden tests prove it. func DefaultWeights() Weights { return Weights{ Clearance: WeightClearance, Skills: WeightSkills, Certifications: WeightCerts, CustomerExperience: WeightCustomer, Experience: WeightExperience, Location: WeightLocation, } } // Sum returns the exact decimal sum of the six weights. func (w Weights) Sum() decimal.Decimal { return w.Clearance.Add(w.Skills).Add(w.Certifications). Add(w.CustomerExperience).Add(w.Experience).Add(w.Location) } // Validate rejects any weight set that is not a well formed probability style allocation: every // dimension strictly positive, none above one, and the total exactly 1 at four decimal places. // The scorer refuses an invalid set and falls back to the global default, so a corrupt profile // can degrade a tenant to defaults but can never distort a score. func (w Weights) Validate() error { one := decimal.NewFromInt(1) for name, v := range map[string]decimal.Decimal{ "clearance": w.Clearance, "skills": w.Skills, "certifications": w.Certifications, "customer_experience": w.CustomerExperience, "experience": w.Experience, "location": w.Location, } { if !v.IsPositive() || v.GreaterThan(one) { return fmt.Errorf("engine: weight %s out of range: %s", name, v.String()) } } if !w.Sum().Round(4).Equal(one) { return fmt.Errorf("engine: weights sum to %s, not 1", w.Sum().String()) } return nil }

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