Expand description
Engine ranking namespace: every ranker stage callable independently.
Thin wrappers over the existing scc-context pipeline pieces — no
algorithm changes. ranking.symbols runs the FULL blend (same math as
build_surface) and returns per-item feature decomposition plus
plugin contributions; stage ops expose the raw vectors.
Plugin hooks (spec 18): seed providers, edge-weight contributors,
rank features, and rerankers chain deterministically; every
contribution is recorded in the explanation.
Structs§
- Blend
Weights - Per-feature linear blend weights.
None= SCC default. - Rank
Feature Value - Rank
Hooks - Ranker
- Score
Row - One explicit feature row for
score_entries: all eight core inputs plus the task-mode flag, keyed by id.
Functions§
- apply_
edge_ weight - apply_
quotas - default_
similarity - Default MMR similarity: same non-empty group => 1.0, else 0.0.
Groups are caller-supplied (component/path);
None/empty never match. - fold_
similarity - Fold chained similarity providers over one pair: first nonzero wins.
Falls back to
default_similaritywhen no provider fires. - group_
of2 - Group lookup for a ranked id (parallel groups vec).
- mmr_
select - resolve_
override - First-
Some-wins override resolution: providers abstain withNone; out-of-range values ([0,1] required) abstain too. Returns the value plus aprovider(N)source tag for reasons, orNonesource when every provider abstained and the default stands. - score_
entries - Pure per-entry blend (§123 intermediate
ranking.score_entries):final_importanceover each explicit row. No store, no hooks — the same mathsymbols_with_hooksblends from, exposed for audit and for callers scoring their own feature rows. - select_
with_ budget
Type Aliases§
- Candidate
Provider - Coverage
Provider - Required-coverage contributor (§124 item 26): symbol ids that MUST
count as required (criticality 1.0), unioned with the engine’s
required_idsbase. E.g. a security plugin marks tainted sinks required so task ranking never demotes them. - Criticality
Provider - Criticality override (§53 CriticalityProvider): per-symbol criticality
in [0,1], or
Noneto keep the engine default (seed/required => 1.0, else file-importance score). FirstSomein chain order wins; out-of-range values degrade to the default (never clamp silently into the blend — a contributor that cannot name a valid score abstains). - Edge
Weight Fn - Edge-weight contributor: per-edge (subject, predicate, object, base)
adjustment. Return
Some((mode, value))to alter the weight,Nonefor no change. Modes: add | multiply | replace | veto. Every applied contribution is recorded on the affected rank items’ reasons. - Novelty
Provider - Novelty override (§53 NoveltyProvider): per-symbol novelty in [0,1],
or
Noneto keep the engine default of 1.0. Same first-Some-wins and range discipline asCriticalityProvider. - Rank
Edge Provider - Rank-time edge contributor (§48):
(subject, predicate, object, weight)triples that enter diffusion without becoming canonical architecture facts. Every edge records its source (see therank-edges(N)reason); endpoint ids outside the rank universe and non-positive/non-finite weights are skipped by the ranker. - Rank
Feature Fn - Rank
Node Provider - Rank-universe node contributor (§124 item 17 RankNodeProvider):
(id, kind)pairs merged into the rank universe before edge indexing. Only rankable kinds enter (the ranker’s RANKABLE_KINDS gate); empty ids, unknown kinds, and duplicates of view nodes abstain. Rank-time only: no entity, relationship, or evidence is written. Deterministic chain order; the universe stays id-sorted regardless of provider order. - Reranker
Fn - Risk
Provider - Change-risk override (§53 RiskProvider): per-symbol change risk in
[0,1], or
Noneto keep the engine default (stale path => 1.0, else 0.0). Same first-Some-wins and range discipline asCriticalityProvider(sharedScalarOverrideProvideralias). - Scalar
Override Provider - One scalar-override provider (criticality or novelty):
Noneabstains. - Seed
Provider - Semantic
Provider - Semantic-score override (§53 SemanticProvider): per-symbol semantic
relevance in [0,1] against the goal, or
Noneto keep the engine default of 0.0 (no scorer configured). Same first-Some-wins and range discipline asCriticalityProvider. When any provider contributes, the blend keeps the documented redistribution math: the semantic share is real, so no renormalization applies. - Similarity
Fn