mod catalog_policy

module catalog_policy

Pure cooperative-catalog policy and target-free proposals. Pure cooperative-catalog decisions and target-free proposal primitives.

Modules

Variables

const LOCAL_CENSUS_LEAVE: u64

Exact local visit count that classifies one occupied basin as exhausted.

const LOCAL_STALL_LEAVE: u32

Consecutive nondeepening slices that classify one occupied basin as stalled.

Enums

enum ActiveCatalogRelation

Relation between a replica’s local state and the active catalog.

Empty

No active representative is available.

Incumbent

The replica occupies the catalog incumbent basin.

SameBasin

The replica occupies a nonincumbent active basin.

Unrelated

Active representatives belong to other basins.

lower_energy_anchor: bool

A validated lower-energy representative is admissible for exploitation.

enum PolicyAction

Selectable action for one cooperative search slice.

ContinueLocal

Preserve the replica’s independent local trajectory.

Exploit

Adopt a validated active representative.

win_only: bool

Require an energy improvement over the local quench.

Explore

Request a target-free descriptor-space exploration proposal.

Leave

Leave the related exhausted basin through a descriptor-space hole.

enum PolicyInputError

Invalid aggregate-work input.

ZeroAggregateBudget

An ensemble must declare a positive charged-work budget.

ChargedExceedsBudget

Charged work cannot exceed its declared budget.

charged: u64

Observed aggregate charged work.

budget: u64

Declared aggregate budget.

ImpossibleCensusCounts

Exact census components cannot exceed the global visit total.

total_visits: u64

Exact global visit total.

singleton_basins: u64

Reported singleton-basin count.

local_basin_visits: u64

Reported local-basin visit count.

enum PolicyReason

Stable reason attached to every policy action.

ValidationRejected

Catalog evidence failed validation.

EmptyCatalog

No active entry is available.

IncumbentLocalSearch

The incumbent replica retains local search responsibility.

LocalDescent

A deeper local quench is not replaced in the same slice.

LocalCensusExhausted

Exact visits exhaust the related census basin.

LocalStall

The related basin has not deepened for the declared slice count.

RemoteAnchorOpen

A remote lower-energy anchor is available during open progress.

RemoteAnchorClosed

A remote lower-energy anchor is available during closed progress.

GlobalCensusSaturatedExplore

Globally saturated evidence requests exploration, not unrelated leave.

UnrelatedCatalogExplore

An unrelated catalog without an improving anchor requests exploration.

SameBasinExplore

A related but unexhausted basin requests exploration.

InterfaceCrossed

A TIS extra reached its leftover-SOAP interface. Shoot from the path that got there rather than keep walking the packing.

OccupiedPackingLeave

A FamilyExtra of a crowded packing Leaves it. The champion stays.

ExploreCollapsed

Explore-role chains have mixed; they must leave rather than keep exploring.

IsomerWalk

The packing champion walks isomers of the occupied family.

CertifiedAttractor

The incumbent attractor won the occupancy contest and stays occupied.

HyperbandPruned

Successive halving discarded a crowded-family walk at a rung.

Implementations

impl PolicyReason

Functions

const fn code(self) -> &'static str

Stable event-stream code.

enum ValidationState

Validation state of the catalog evidence visible to the policy.

Validated

Signature, geometry, quench, and fresh-engine checks succeeded.

Rejected

At least one required validation check failed.

Structs and Unions

struct AggregateProgress

Aggregate charged work relative to the declared ensemble budget.

Implementations

impl AggregateProgress

Functions

fn charged(self) -> u64

Exact aggregate charged work.

fn new(charged: u64, budget: u64) -> Result<Self, PolicyInputError>

Construct checked aggregate progress.

fn win_only(self) -> bool

Whether at least half of aggregate charged work has been consumed.

struct CatalogPolicy

Stateless cooperative catalog policy.

Implementations

impl CatalogPolicy

Functions

fn decide(input: CatalogPolicyInput) -> PolicyDecision

Decide one action without consulting energy-height or mutable global state.

A lower catalog energy is taken before a same-packing leave. The incumbent of a known well leaves once it stalls, so the ensemble does not keep relaxing one funnel for the rest of the budget.

While leftover SOAP is unsaturated every replica Walks: Marks is a long hop, not a census Leave or a remote yank. After leftover dwell, a FamilyExtra of a crowded packing Leaves it. The champion stays and walks isomers. Collapse also forces extras of the occupied packing to Leave. A walk rematched to a different DECAF family is not collapse: yanking it would abandon the second funnel. Surplus extras are pruned at occupancy rungs and reseed. A better isomer of the occupied packing may be taken when the ensemble is not collapsed. A certified incumbent stays.

struct CatalogPolicyInput

Complete pure input for one cooperative policy decision.

validation: ValidationState

Validation state of the catalog evidence.

relation: ActiveCatalogRelation

Relation of the local state to active catalog entries.

census: CensusEvidence

Exact fixed-census evidence.

progress: AggregateProgress

Aggregate charged-work progress.

local_stall_slices: u32

Consecutive slices without a deeper local quench.

local_deepened: bool

Whether the replica deepened its own basin in this slice.

mixing: MixingEvidence

Inverted Gelman–Rubin evidence for the live ensemble.

leftover_lambda: f64

Leftover-SOAP (lambda) posted through the catalog RPC.

interface_rank: u32

TIS interface rank. u32::MAX is the occupied-packing champion.

interface_threshold: f64

Threshold (lambda_i) this extra must reach on Leave.

occupied_family_count: usize

Landfold communities on the sparsified book. OtherFamily requires two; DECAF isomer bins of one packing are ArchiveHole.

packing_saturated: bool

DECAF-family Good–Turing: unseen packing mass is small.

leftover_dwell: bool

Consecutive leftover-SOAP occupancy_gt records under the ceiling.

ei_exhausted: bool

FunnelModel Jones EI on seen packings is at most the model noise.

min_families: usize

Measured Fiedler-and-DECAF family floor for this hop graph.

on_published_prize: bool

Published-energy score. Work selection does not read it.

struct CensusEvidence

Good–Turing and local-basin counts copied only from an exact census.

Implementations

impl CensusEvidence

Functions

fn from_census(census: &BasinCensus, local_basin: Option<BasinId>) -> Self

Read policy evidence from the append-only census and an optional local basin.

fn from_exact_counts(total_visits: u64, singleton_basins: u64, local_basin_visits: u64, globally_saturated: bool) -> Result<Self, PolicyInputError>

Construct checked evidence from exact coordinator counts.

fn globally_saturated(self) -> bool

Whether the fixed-census production saturation rule is satisfied.

fn local_basin_visits(self) -> u64

Exact visits assigned to the replica’s local census basin.

fn singleton_basins(self) -> u64

Exact number of singleton census basins.

fn total_visits(self) -> u64

Exact number of validated census observations.

struct PolicyDecision

Action and stable trace reason from the pure policy.

action: PolicyAction

Selected cooperative action.

reason: PolicyReason

Stable explanation recorded in the event stream.