FrankenMining

The universal Claim

1,001 words4 subsections2 tables1 listingPlan version 0.1

On this page4
8.1 Rust sketch (DESIGN; crate fmine-claim, std-only substrate layer)8.2 Why each field exists (rationale, so later agents keep it)8.3 Guards (deterministic checks before render, export or decision use)8.4 Refusal codes

8.1 Rust sketch (DESIGN; crate fmine-claim, std-only substrate layer)

#![forbid(unsafe_code)]
pub struct Claim {
    pub id: ClaimId,                      // BLAKE3 of canonical body; append-only; supersede, never edit
    pub subject: SubjectRef,              // DepositId | TractId | BlockSetId | DomainId | PlanPeriodId | StockpileId
                                          // | StreamId | EquipmentId | WbsId | TsfModeId | EstimateId | MetricId | CrewId
    pub quantity: QuantityKind,           // ContainedMetal{metal} | Tonnage{basis: Wet|Dry} | Grade(Compositional)
                                          // | Recovery | Throughput | Count | Probability{event} | Npv{deck} | UnitCost | Ratio ...
    pub unit: UnitSpec,                   // fmine-units: t, dmt, wmt, oz_t, lb, g/t, ppm, %, kWh/t, money(ccy)
    pub support: Support,                 // Spatial{Point|Interval|Composite|Smu|Panel|Bench|Stope|Polygon|Tract|Site}
                                          // × Temporal{Instant|Shift|Day|Month|Quarter|Year|Lom}
    pub additivity: Additivity,           // Additive{by: Mass|Volume|Metal} | NonAdditive{mix_rule: RuleId|Refuse}
    pub repr: Representation,
    pub epistemic: EpistemicStatus,       // KnownKnown | KnownUnknown(KuKind) | UnmodelledBudget
    pub evidence: EvidenceClass,          // §7.1
    pub color: fs_evidence::color::Color, // COMPUTED by fmine-claim::project_color; never caller-set
    pub state: KnowledgeState,            // §7.2; computed from validity, monitors, anchor
    pub calibration: CalibrationFlag,
    pub uu: UuTerm,                       // mandatory on decision-facing claims (G-UU)
    pub validity: Validity,               // ValidityDomain + price deck + technology + valid-time window + review_by
    pub provenance: ProvenanceDag,        // input ClaimIds; transforms {code rev, params, seed}; human acts; DocRefs
    pub confidentiality: Confidentiality, // join-semilattice {Public < Internal < Venture(V) < Mnpi(Wall)}; monotone taint
    pub authority: Authority,             // Computed{module, version} | Elicited{expert, protocol} | Attested{role, person, sig, scope}
    pub forecast: Option<ForecastRegistration>, // resolvable? source, horizon, scoring rule, segment, author
    pub time: QuadTemporalStamp,          // physical_valid_time, collection_time, availability_time, record_time (§6.3, §25.4)
    pub supersedes: Option<ClaimId>,
}

pub enum Representation {
    Closed(DistSpec),                                    // distribution family + parameters (fsci-stats backed)
    Ensemble { index_space: RealizationSpaceId, artifact: ContentHash }, // shared realization index (§9.5)
    Quantiles(Vec<(f64, f64)>),
    Interval { lo: f64, hi: f64, kind: IntervalKind },   // Enclosure | Credible{lvl} | Conformal{lvl, calib} | Manski
    Category(CodeClass),                                 // e.g. "JORC Indicated": a label, NEVER mapped to a probability
    Projected { value: f64, policy: ProjectionPolicyId, of: ClaimId }, // the point a book or disclosure must carry
    Refused(Refusal),                                    // NoClaimInDomain | NotObservable | NoUsefulBound(cause)
                                                         // | MnpiBarrier | NonIdentifiable | Stale | SupportMismatch
}
pub enum KuKind { Aleatory, Parametric, Structural { set: HypothesisSetId } }
pub enum CalibrationFlag {
    Calibrated { record: CalibRecordId, n: u32, cov80: f64 },
    Uncalibrated,
    Miscalibrated { record: CalibRecordId, bias: f64, inflation: f64 },
    NotCalibratable { reason: NotCalibReason },          // horizon > ledger history; unique event
}
pub enum UuTerm {
    ReferenceClass { epsilon: f64, shape: ContaminationShape, refclass: RefClassId },
    CatchAll { set: HypothesisSetId, floor: f64, refclass: RefClassId },
    FlipMargin { flips: Vec<fs_evidence::uncertainty::FlippingUnknown>, probability: NotStated },
    NotDecisionRelevant { justification: NonEmptyString },
}

8.2 Why each field exists (rationale, so later agents keep it)

  • support and additivity. Most mining errors are change-of-support errors: a point assay treated as a block grade, block-average hardness treated as additive, or monthly totals scored per block. Making support part of the type turns these into compile-time or commit-time refusals (INV-014, §13.4).
  • Projected. Books and disclosures need a point (FA posts one amount; a reserve statement prints one tonnage). Projected names the policy that chose the point (mean, P50, policy-defined conservative quantile) and keeps the distribution reachable through of. A point is never naked.
  • Category. Resource and reserve categories are human classifications. Mapping "Indicated" to "±15% at 90%" would be a fabricated probability (E031). Categories are carried as labels, beside quantitative evidence, never converted.
  • authority vs evidence. NL-3.
  • forecast. Only registered forecasts can earn calibration. Unregistered model outputs are permanently Uncalibrated (NL-4).
  • uu. Without it, every probability silently assumes its model is the whole world. §9.3 restricts how the residual may be stated.

8.3 Guards (deterministic checks before render, export or decision use)

Guard Passes when On failure
G-UU A decision-facing claim has exactly one admissible UuTerm, and any ε cites a RefClass Refuse render: "unbudgeted unknowns"
G-EXEC Not Refused, not stale; calibration shown verbatim; colour shown Show the knowledge state instead of a number
G-DISC (disclosure-facing) Evidence ∈ {Measured, Derived, ModelledCalibrated}; no Assertion/Assumed in provenance; every RefClass tagged verified; a CP/QP Attested record present Block export. reserve_disclosure_claim stays false regardless (INV-002).
G-MNPI Viewer capability ≥ claim confidentiality; basis = Full never crosses a wall Serve the basis = Public twin, or Refused(MnpiBarrier)
G-ABS A negative-evidence update happens only where effort has coverage ≥ Medium and detection q ≥ q_min Treat as absence class A0/A1 (no update) or A4 (Manski bounds)
G-AOA Dissimilarity ≤ d_max for any absolute probability transferred from analogues Interval or refusal
G-SUPPORT Aggregation respects support and additivity Refused(SupportMismatch)
G-CONS Material-flow commits conserve mass and metal within tolerance Commit refused (exit 3); reconciliation case opened

8.4 Refusal codes

Refusals are typed values, not errors. They render as plain sentences with a fix hint (fs-scenario Violation{code, what, fix} pattern, crates/fs-scenario/src/scenario.rs:279).

Code family Example
FMINE-REF-1xx domain-law refusals 101 conservation; 102 support mismatch; 103 non-additive average; 104 non-identifiable attribution; 105 basis mismatch (wet/dry, metal stage); 106 unregistered or incompatible CRS; 107 undeclared unit, basis or time zone on import (§25); 108 assay-availability lookahead (AssayLagLookahead; §6.3, G-TIME-2)
FMINE-REF-2xx evidence refusals 201 no claim in domain; 202 not observable; 203 outside AOA; 204 unbudgeted unknowns; 205 calibration required for decision-grade use
FMINE-REF-3xx authorization refusals 301 MNPI wall; 302 venture wall; 303 residency; 304 missing human authority token
FMINE-REF-4xx safety-semantic refusals 401 unknown reactive ground → no ANFO plan; 402 unknown PAG → no NAF dump plan; 403 unknown moisture vs TML → no shipment release; 404 stale TSF instrumentation → no "within TARP" statement
FMINE-REF-5xx integration & sequencing refusals 501 FA refusal relayed (FA-REF-nnn); 502 stale anchor; 503 sibling capability unavailable, fallback engaged; 504 adjacent paste/cemented backfill uncured or strength-degraded (FillStrength(t) < UCS_design) → no secondary stope blast plan (§16.3)