crates.sage_oracle_harness.crate.fixed_projection

Each adapter is a fixed projection into the shared model. An emitter may translate its native identities, adjustments, and deliberately deferred lifetime representation, but the projection cannot inspect the other output or erase a distinction merely because Sage does not yet match it. Missing shared vocabulary is repaired by extending the schema and both independent projections.

Read in specification context · design/crates/sage_oracle_harness/crate.sage

Implementation

Implemented crates/rust-ref/src/lib.rs:12–17

rust_ref · lib:rust_ref

#![allow(unused)]
fn main() {
// {anchor}`crates.sage_oracle_harness.crate.fixed_projection`
pub struct Crate<Def> {
    pub root: Module<Def>,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]

}

See more source ↗

Implemented crates/sage-emit/src/lib.rs:20–25

sage_emit · lib:sage_emit

#![allow(unused)]
fn main() {
// {anchor}`crates.sage_oracle_harness.crate.fixed_projection`
// {anchor}`crates.sage_oracle_harness.crate.deterministic_emission`
pub fn emit_module<'db>(db: &'db dyn Db, module: ModSymbol<'db>) -> Crate<NormalizedDef> {
    let mut emitter = Emitter::new(db);
    emitter.pre_register_mod(module);
    let root = emitter.emit_mod(module);

}

See more source ↗

Implemented crates/sage-oracle/src/emit.rs:909–914

sage_oracle::emit · lib:sage_oracle

#![allow(unused)]
fn main() {
// {anchor}`crates.sage_oracle_harness.crate.fixed_projection`
// {anchor}`crates.sage_oracle_harness.crate.deterministic_emission`
pub fn emit_crate(tcx: TyCtxt<'_>) -> Result<Crate<NormalizedDef>, OracleError> {
    if tcx.dcx().has_errors().is_some() {
        return Err(OracleError::CompileError(
            "input file has compilation errors".to_string(),

}

See more source ↗

Tests and review

Indexed tests and the implementation-completeness and test-adequacy review; no test run is implied.

TODO sage_meta::todo::crates_sage_oracle_harness_crate_fixed_projection

crates/sage-meta/tests/service_spec.rs · test:service_spec

#![allow(unused)]
fn main() {
#[test]
    #[sage::test(crates.sage_oracle_harness.crate.fixed_projection)]
    fn crates_sage_oracle_harness_crate_fixed_projection() {
        // TODO: Associate and review the complete evidence for Adapter-focused tests cover native
        // definition kinds, substitutions, receiver adjustments, overloadable operator calls,
        // lifetimes, and unsupported constructs; adversarial fixtures prove that one emitter's
        // omission or wrong classification remains an exact mismatch rather than being normalized
        // away.
    }
}

See more source ↗

Review: Accepted · final_quality.

Reviewed three implementation entries and the sole associated TODO test against fixed_projection. Requirements are independent fixed native-to-shared adapters, permitted identity/adjustment/deferred-lifetime adaptations, no paired-output inspection or erasure merely to achieve agreement, and schema extension rather than loss of required distinctions. Scope is the shared model and emitter adapters; authored expr.rs checking behavior was not evaluated or approved.

rust-ref::Crate defines the shared serialized vocabulary: explicit native-normalized definition targets, semantic external path kinds, ADT/alias arguments, distinct alias kinds, reference mutability, call dispatch with trait target and Self, owner versus method substitutions, fields by owner/index, literals with value, and explicit Ref/Deref/NeverToAny nodes. The omission of lifetime distinctions matches the documented deferred lifetime representation, not an output-dependent normalization pass.

sage_emit::emit_module consumes only Sage Db/module state, preregisters identities, and translates the completed representation. ResolvedCall projection preserves selected target, dispatch, substitutions and arguments. Alias projection preserves kind/target/arguments; references preserve mutability and referenced type while omitting intentionally deferred lifetimes. sage_oracle::emit_crate consumes only TyCtxt and returns a compile error on rustc errors; its emitter independently obtains types, definition paths, substitutions, and adjustments. The oracle splits type substitutions using native generic ownership, translates builtin dereference/autoborrow/NeverToAny adjustments into shared nodes, and converts overloadable operators through native recorded targets or lang-item methods and native operand types; lazy booleans remain BinaryOp. These are fixed documented adaptations, not inspection of Sage output. External path projection on each side retains definition kinds rather than inferring them from namespace. Captured crate manifests corroborate that the oracle depends on the shared schema rather than Sage's checker/emitter.

Captured comparator source performs independent serialization and exact text comparison. Structural diff is diagnostic-only after inequality; it cannot repair omissions or wrong classification. This establishes absence of comparator repair, not completeness of every producer. In particular, both emitter files still contain unsupported expression fallbacks and debug type fallbacks, and the schema is deliberately narrower than all Rust. Captured independent_coverage.rs records the existing ignored paired-unsupported regression and explicit TODO for generic independent source inventories/coverage validation. This is a known deferred limitation: paired unsupported output is not certified as semantically faithful by this review. Required missing vocabulary still needs schema and both-projection work as functionality is added; no evidence here establishes universal rejection of unsupported output.

The only associated test, service_spec::todo::crates_sage_oracle_harness_crate_fixed_projection, has no behavioral assertions. It explicitly retains the full adapter matrix for native definition kinds, substitutions, receiver adjustments, operator calls, lifetimes, unsupported constructs, and adversarial omission/classification mismatches. Prerequisites are adapter-focused fixtures with independently specified schema observations and the generic independent coverage/inventory work already recorded for unsupported cases. Current source inspection supports independence and the represented mappings; it does not discharge this test matrix or promote fallback behavior to complete projection. No Rust edits or tests executed for this review. Commands were fresh review start/read and source inspection before recording. No additional requested edits beyond the existing explicit deferred work; coordinator was notified of the captured known unsupported-output limitation.

Browse crates anchors

139 anchors

Specification anchors and declared coverage
AnchorImplementationTests
crates (139)114 Implemented37 TODO2 N/A74 Implemented107 TODO
crates.sage_inspector (15)13 Implemented1 TODO2 N/A3 Implemented15 TODO
crates.sage_inspector.inspection (15)13 Implemented1 TODO2 N/A3 Implemented15 TODO
balanced_tracesImplementedTODO
canonical_ownershipImplementedImplementedTODO
derive_reflectionImplementedImplementedTODO
detail_free_indexImplementedTODO
deterministic_traceImplementedTODO
durable_navigationN/ATODO
generic_browserN/ATODO
owned_reflectionImplementedImplementedTODO
product_availabilityImplementedTODO
revision_and_demandImplementedTODO
semantic_phase_boundaryImplementedTODO
source_evidenceImplementedTODO
typed_serviceImplementedTODO
unknown_workImplementedTODOTODO
workspace_actorImplementedTODO
crates.sage_ir (90)67 Implemented34 TODO40 Implemented88 TODO
crates.sage_ir.checking (12)12 Implemented3 TODO5 Implemented12 TODO
crates.sage_ir.checking.body (5)5 Implemented2 TODO3 Implemented5 TODO
elaborationImplementedImplementedTODO
expected_typesImplementedTODOTODO
interface_dependenciesImplementedImplementedTODO
isolated_completionImplementedImplementedTODO
operator_callsImplementedTODOTODO
identity_mintingImplementedTODO
owned_productsImplementedImplementedTODO
crates.sage_ir.checking.signature (4)4 Implemented1 TODO1 Implemented4 TODO
body_independenceImplementedTODO
narrow_detailImplementedTODOTODO
owner_binderImplementedImplementedTODO
storageImplementedTODO
symbol_keyed_interfacesImplementedTODO
crates.sage_ir.crate (9)9 TODO9 TODO
explicit_restrictionsTODOTODO
identity_before_detailTODOTODO
incremental_evidenceTODOTODO
narrow_demandsTODOTODO
reexecution_and_invalidationTODOTODO
represented_completenessTODOTODO
restrictions_and_gapsTODOTODO
semantic_query_boundariesTODOTODO
terminal_incompletenessTODOTODO
crates.sage_ir.inference (8)8 Implemented6 Implemented8 TODO
atomic_checkingImplementedImplementedTODO
body_local_quiescenceImplementedImplementedTODO
canonical_boundaryImplementedImplementedTODO
completed_body_boundaryImplementedTODO
numeric_domainsImplementedImplementedTODO
subtyping_and_coercionImplementedImplementedTODO
terminal_obligationsImplementedTODO
transaction_isolationImplementedImplementedTODO
crates.sage_ir.metadata (4)4 Implemented1 TODO4 TODO
explicit_incompletenessImplementedTODO
keyed_reuseImplementedTODOTODO
product_boundariesImplementedTODO
provider_authorityImplementedTODO
crates.sage_ir.modules (8)7 Implemented1 TODO4 Implemented8 TODO
crates.sage_ir.modules.expand (4)4 Implemented2 Implemented4 TODO
completenessImplementedImplementedTODO
dependenciesImplementedTODO
direct_membersImplementedTODO
recursion_and_fixpointImplementedImplementedTODO
crates.sage_ir.modules.parse (4)3 Implemented1 TODO2 Implemented4 TODO
dependenciesImplementedTODO
detail_firewallImplementedImplementedTODO
recovery_completenessTODOTODO
syntax_identitiesImplementedImplementedTODO
crates.sage_ir.resolution (5)5 Implemented1 TODO3 Implemented4 TODO
crates.sage_ir.resolution.lookup (5)5 Implemented1 TODO3 Implemented4 TODO
completenessImplementedTODOImplementedTODO
dependenciesImplementedTODO
expansion_import_ambiguityImplementedImplemented
identity_onlyImplementedTODO
precedenceImplementedImplementedTODO
crates.sage_ir.solver (9)7 Implemented7 TODO5 Implemented9 TODO
alternative_isolationImplementedTODOImplementedTODO
bounded_completenessImplementedTODOTODO
candidate_completenessImplementedTODO
canonical_cyclesTODOTODO
canonical_outputsImplementedImplementedTODO
local_index_firewallTODOTODO
normalization_demandImplementedTODOImplementedTODO
schedule_independenceImplementedTODOImplementedTODO
shared_final_resultImplementedTODOImplementedTODO
crates.sage_ir.symbols (8)8 Implemented4 Implemented7 TODO
associated_identityImplementedImplemented
associated_interfacesImplementedTODO
body_interfacesImplementedImplementedTODO
definition_identityImplementedTODO
external_fact_queriesImplementedTODO
external_identityImplementedTODO
kind_wrappersImplementedImplementedTODO
local_identityImplementedImplementedTODO
crates.sage_ir.types (27)16 Implemented12 TODO13 Implemented27 TODO
crates.sage_ir.types.aliases (2)1 Implemented1 TODO1 Implemented2 TODO
identityImplementedImplementedTODO
revelationTODOTODO
crates.sage_ir.types.binder (1)1 Implemented1 TODO1 Implemented1 TODO
owner_parametersImplementedTODOImplementedTODO
crates.sage_ir.types.body (13)4 Implemented9 TODO3 Implemented13 TODO
awaitTODOTODO
closuresTODOTODO
conditional_patternsTODOTODO
coroutinesTODOTODO
diagnosed_recoveryImplementedImplementedTODO
elaboratedTODOImplementedTODO
for_iterationTODOTODO
indexingTODOTODO
macro_expansionTODOTODO
no_inferenceImplementedImplementedTODO
resolved_referencesImplementedTODO
try_residualTODOTODO
typed_provenanceImplementedTODO
crates.sage_ir.types.calls (2)1 Implemented1 TODO1 Implemented2 TODO
dispatch_familiesTODOTODO
selected_semanticsImplementedImplementedTODO
crates.sage_ir.types.lifetimes (2)2 Implemented2 Implemented2 TODO
dummyImplementedImplementedTODO
unchecked_borrowsImplementedImplementedTODO
crates.sage_ir.types.operators (2)2 Implemented1 Implemented2 TODO
lazy_control_flowImplementedTODO
trait_callsImplementedImplementedTODO
scoped_identitiesImplementedTODO
crates.sage_ir.types.spans (4)4 Implemented4 Implemented4 TODO
generated_identityImplementedImplementedTODO
item_originImplementedImplementedTODO
offset_reuseImplementedImplementedTODO
relative_compositionImplementedImplementedTODO
crates.sage_oracle_harness (4)4 Implemented2 TODO1 Implemented4 TODO
crates.sage_oracle_harness.crate (4)4 Implemented2 TODO1 Implemented4 TODO
deterministic_emissionImplementedTODO
exact_comparisonImplementedTODOImplementedTODO
fixed_projectionImplementedTODO
independent_coverageImplementedTODOTODO
crates.sage_stash (5)5 Implemented5 Implemented
crates.sage_stash.storage (5)5 Implemented5 Implemented
handle_ownershipImplementedImplemented
immutable_entriesImplementedImplemented
query_valueImplementedImplemented
rooted_equalityImplementedImplemented
typed_interningImplementedImplemented
crates.sage_test_harness (25)25 Implemented25 Implemented
crates.sage_test_harness.compile_tests (25)25 Implemented25 Implemented
annotation_validationImplementedImplemented
blessing_gateImplementedImplemented
callsite_updatesImplementedImplemented
checking_scopeImplementedImplemented
compiler_conditionsImplementedImplemented
completed_typesImplementedImplemented
coordinatesImplementedImplemented
dependenciesImplementedImplemented
diagnostic_countsImplementedImplemented
diagnostic_locationsImplementedImplemented
editionImplementedImplemented
fixturesImplementedImplemented
grouped_observationsImplementedImplemented
invocationImplementedImplemented
production_executionImplementedImplemented
project_isolationImplementedImplemented
query_captureImplementedImplemented
query_projectionImplementedImplemented
renderingImplementedImplemented
resolved_symbolsImplementedImplemented
review_visibilityImplementedImplemented
rustc_executionImplementedImplemented
rustc_lintsImplementedImplemented
starting_expressionsImplementedImplemented
target_lineImplementedImplemented