Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/modules/matching/chainedresolver.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 |
| Branch | master |
| Path or archive member | internal/modules/matching/chainedresolver.go |
| Original SHA-256 | 16fa2e98f7ce097b9a73c194df4bc9520a3faac7c1ccbb03d410bb32af00baa5 |
| Git blob SHA | 22ad5e52f867a5557082e16a79e0ad252e84b411 |
| Reading-copy SHA-256 | 16fa2e98f7ce097b9a73c194df4bc9520a3faac7c1ccbb03d410bb32af00baa5 |
Every recorded occurrence
These 33 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/modules/matching/chainedresolver.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws2-alias-relationship | e4dada4601c6eb101830f9d223a9655dfa120616 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | vendor-intelligence | fe9796a19c261951d3f2565206c0c1b5ac294465 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws2-alias-relationship | e4dada4601c6eb101830f9d223a9655dfa120616 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/modules/matching/chainedresolver.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
Recovered source transcript
Download complete source text ↓51 lines · 2.1 KB
package matching
import (
"context"
"github.com/shopspring/decimal"
"github.com/missionworkforce/missionmatch/internal/modules/matching/engine"
)
// compile-time assertion that ChainedResolver satisfies engine.SkillMatcher.
var _ engine.SkillMatcher = (*ChainedResolver)(nil)
// ChainedResolver runs the deterministic alias and relationship resolver first, then the semantic
// matcher, and satisfies the engine SkillMatcher interface so the engine code is unchanged.
// The resolver is consulted first because curated ontology knowledge (an alias is an exact
// equivalence; a verified substitution has a known strength) is more precise and auditable than a
// cosine similarity. The semantic matcher runs only when the resolver finds no match.
type ChainedResolver struct {
resolver *DeterministicAliasResolver
semantic engine.SkillMatcher
}
// NewChainedResolver builds a ChainedResolver from a DeterministicAliasResolver and a semantic
// SkillMatcher. Either may be nil: a nil resolver skips the alias step, a nil semantic falls back
// to resolver only (or no match when the resolver also misses).
func NewChainedResolver(resolver *DeterministicAliasResolver, semantic engine.SkillMatcher) *ChainedResolver {
return &ChainedResolver{resolver: resolver, semantic: semantic}
}
// Match satisfies engine.SkillMatcher. It returns the best candidate skill satisfying the required
// skill. The alias resolver runs first; on a hit the result is returned immediately and the semantic
// matcher is never called. On a resolver miss, the semantic matcher runs at the given threshold.
// ctx carries the request deadline and cancellation to both the resolver and any semantic provider call.
func (c *ChainedResolver) Match(
ctx context.Context,
required engine.RequiredSkill,
cands []engine.CandidateSkill,
threshold decimal.Decimal,
) (engine.SkillMatch, bool) {
if c.resolver != nil {
if m, ok := c.resolver.ResolveAlias(ctx, required, cands); ok {
return m, true
}
}
if c.semantic == nil {
return engine.SkillMatch{}, false
}
return c.semantic.Match(ctx, required, cands, threshold)
}