From 24c138ae4c7a2b9a42c1e68eb25329fbf8a3a5a9 Mon Sep 17 00:00:00 2001 From: Sebastian Werner Date: Mon, 17 Aug 2026 15:38:16 +0200 Subject: [PATCH 1/2] feat(oxc-reference): add controlled primitive rollout --- .github/workflows/ci.yml | 10 +- README.md | 10 +- ...ive-literals-shadow-only-after-dual-run.md | 84 ++++ docs/adr/README.md | 10 +- docs/evidence/README.md | 19 + docs/porting/migration-contract.md | 12 + internal/oxc_reference/README.md | 26 +- .../occurrence-consumer/src/conformance.rs | 381 +++++++++++++++++- .../occurrence-consumer/src/evidence.rs | 6 +- .../crates/occurrence-consumer/src/main.rs | 44 +- internal/oxc_reference/run-rollout.sh | 37 ++ rfcs/0001-semantic-facts-kernel.md | 23 +- 12 files changed, 624 insertions(+), 38 deletions(-) create mode 100644 docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md create mode 100755 internal/oxc_reference/run-rollout.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39afef237..b4eb81c18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,14 @@ jobs: run: cargo clippy --locked --manifest-path internal/oxc_reference/Cargo.toml --all-targets -- -D warnings - name: Test internal OXC reference consumer run: cargo test --locked --manifest-path internal/oxc_reference/Cargo.toml - - name: Gate Go versus Rust semantic conformance - run: ./internal/oxc_reference/run-conformance.sh --output go-rust-conformance.json - - name: Upload Go versus Rust conformance report + - name: Run controlled Go versus Rust primitive/literal rollout + run: ./internal/oxc_reference/run-rollout.sh --output primitive-literal-rollout.json + - name: Upload primitive/literal rollout report if: ${{ always() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: go-rust-semantic-conformance - path: go-rust-conformance.json + name: primitive-literal-go-rust-rollout + path: primitive-literal-rollout.json build: runs-on: ubuntu-latest diff --git a/README.md b/README.md index c7cf05b31..b43d02ebe 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ plus response-local symbol, alias, and declaration provenance. An isolated Rust/OXC consumer exercises that contract as a reference and migration harness; TypeScript 7's Go checker remains the semantic oracle. -The current [migration decision](docs/adr/0019-compute-primitive-literals-independently-in-rust.md) -and [measured evidence](docs/evidence/ts7-oxc-spike-2026-08-17.json) approve no -Rust semantic replacement. An independent Rust/OXC primitive/literal producer -now runs under exact differential comparison while Go remains the production -fallback and semantic authority. The +The current [migration decision](docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md) +and [controlled rollout evidence](docs/evidence/primitive-literal-rollout-2026-08-17.json) +approve no Rust semantic replacement. An independent Rust/OXC primitive/literal +producer now runs under exact differential comparison while Go remains the +production fallback and semantic authority. The compatibility boundary and current exclusions are tracked in the [migration contract](docs/porting/migration-contract.md), and durable implementation choices are recorded in [ADRs](docs/adr/README.md). diff --git a/docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md b/docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md new file mode 100644 index 000000000..9107ed31a --- /dev/null +++ b/docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md @@ -0,0 +1,84 @@ +# ADR-0020: Keep primitive/literal production shadow-only after the controlled dual-run + +- Status: accepted +- Date: 2026-08-17 +- Deciders: TypeScript Semantic Kernel maintainers +- Supersedes: — +- Superseded by: — + +## Context + +ADR-0019 established an independent Rust/OXC primitive/literal producer and an +exact differential gate against the TypeScript 7 Go checker. The expanded +corpus proves a useful semantic slice, but passing that gate alone does not show +that the category can be served, rolled back, or compared under a +production-equivalent runtime and memory boundary. + +Issue #47 requires a controlled dual-run over the same checked-out corpus, +compiler revision, request, capabilities, and budgets. The evidence must retain +semantic, transport, mapping, unsupported, and budget classifications while +also recording runtime, memory, and output size without turning noisy host +measurements into deterministic compatibility fields. + +## Decision + +`./internal/oxc_reference/run-rollout.sh --output ` builds the real Go +`tsfacts` command and the release Rust reference binary, then executes two +complete ordered dual-runs. Each run sends the same manifest-derived requests +to the pinned TypeScript compiler and independent Rust producer. Only the +comparator receives both outputs. + +The embedded conformance report is deterministic and must be byte-identical +between the two runs. It records the repository and TypeScript revisions, +request schema, project, ordered capabilities, budgets, selections, all five +roots, response-local identity, structured payloads, diagnostics, +completeness, recovery, truncation, unsupported states, mapping, and classified +differences. Unexplained semantic, transport, or mapping differences fail the +command. + +Runtime and output sizes are retained as two ordered measurement samples. +Artifact sizes and the controller's peak or current resident memory are +recorded with their measurement method and scope. These measurements are +characterization data: the Go lane includes a one-shot process and JSON Lines +transport, while Rust runs in-process, and controller RSS excludes the Go child +process. The measured fields are therefore not part of the byte-stability gate +and do not establish a performance advantage. + +The primitive/literal category is **not ready for a later authority decision**. +Rust remains shadow-only. Go remains both the serving semantic authority and +the production fallback. There is no authority switch, TS7 producer protocol +change, external consumer behavior change, or Palamedes change. + +## Remaining blockers + +- Four explicitly classified selections remain outside the supported Rust + slice. +- Three recovery selections retain the expected OXC parser/mapping gap. +- Rust is not integrated into the serving path, so production fallback, + rollback, and shadow observation at that boundary have not been exercised. +- Runtime and output-size samples do not yet use one production-equivalent + process or library boundary for both implementations. +- The evidence does not isolate peak resident memory for the Go child process, + so per-producer memory parity is not established. + +A later authority proposal must close or explicitly re-scope these blockers, +rerun the supported platform matrix, preserve Go fallback, and create a new ADR +that authorizes the category-specific switch. This record does not authorize +that proposal. + +## Consequences + +- CI now retains one structured rollout artifact containing deterministic + conformance, coverage, compatibility, mapping, runtime, memory, and output + size evidence. +- Host-dependent measurements remain reproducible through a documented command + without weakening the exact semantic gate. +- A green rollout job means that shadow comparison is healthy. It does not mean + the category is production-ready or approved to replace Go. + +## References + +- [RFC 0001](../../rfcs/0001-semantic-facts-kernel.md) +- [ADR-0019](0019-compute-primitive-literals-independently-in-rust.md) +- [Checked rollout evidence](../evidence/primitive-literal-rollout-2026-08-17.json) +- [Issue #47](https://github.com/swernerx/typescript-semantic-kernel/issues/47) diff --git a/docs/adr/README.md b/docs/adr/README.md index 7c3033827..ae00122c4 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -27,6 +27,7 @@ decision is recorded in a successor ADR that links to the record it replaces. | [0017](0017-project-primitive-literal-candidates-from-go-graph-identity.md) | Superseded | Project primitive/literal candidates from Go graph identity | | [0018](0018-gate-rust-semantics-against-the-go-oracle.md) | Superseded | Gate Rust semantics against the Go oracle | | [0019](0019-compute-primitive-literals-independently-in-rust.md) | Accepted | Compute primitive/literal candidates independently in Rust | +| [0020](0020-keep-primitive-literals-shadow-only-after-dual-run.md) | Accepted | Keep primitive/literal production shadow-only after the controlled dual-run | ## Current migration decision @@ -40,6 +41,9 @@ advantage. [ADR-0019](0019-compute-primitive-literals-independently-in-rust.md) runs an independent Rust/OXC primitive/literal producer over the tagged shared corpus and enforces exact structured agreement in shadow CI. It owns its type graph -and receives no Go semantic graph input. Passing the gate still leaves -primitive/literal construction Go-authoritative in production; no semantic -category is currently approved for replacement. +and receives no Go semantic graph input. +[ADR-0020](0020-keep-primitive-literals-shadow-only-after-dual-run.md) records +the controlled rollout evidence and the remaining unsupported, recovery, +production-integration, measurement-boundary, and memory blockers. +Primitive/literal construction remains Go-authoritative in production; no +semantic category is currently approved for replacement. diff --git a/docs/evidence/README.md b/docs/evidence/README.md index e8725e5bc..54024ee1e 100644 --- a/docs/evidence/README.md +++ b/docs/evidence/README.md @@ -32,3 +32,22 @@ answer from source and OXC semantics without receiving the Go graph. It passes an exact shadow differential gate but is not an approved production replacement. The TypeScript 7 Go checker remains authoritative and available as the production fallback. + +The checked +[`primitive-literal-rollout-2026-08-17.json`](primitive-literal-rollout-2026-08-17.json) +record is generated by: + +```sh +./internal/oxc_reference/run-rollout.sh \ + --output docs/evidence/primitive-literal-rollout-2026-08-17.json +``` + +It embeds the exact primitive/literal conformance report and requires that +stable report to be byte-identical across two complete dual-runs. Runtime, +resident memory, artifact size, and producer-output size are retained in a +separate measurement section because those values or their comparison boundary +vary by host. The report is a shadow rollout artifact, not an authority switch +or a general benchmark. + +[ADR-0020](../adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md) +records why the category is not ready for a later authority decision. diff --git a/docs/porting/migration-contract.md b/docs/porting/migration-contract.md index c93023a80..0077cb294 100644 --- a/docs/porting/migration-contract.md +++ b/docs/porting/migration-contract.md @@ -97,6 +97,14 @@ binding, symbols, inference beyond the supported contextual literals, overloads, generic instantiation, narrowing, recovery, and all production fallback behavior remain Go-authoritative. +ADR-0020 adds the controlled rollout lane. Two complete runs must share the +checked-out corpus and repository revision, TS compiler revision, request +schema, project, capabilities, budgets, and ordered selections. The stable +conformance reports must be byte-identical. Host-dependent runtime, resident +memory, artifact size, and producer-output size remain separately scoped +characterization evidence. The lane is shadow-only and does not exercise or +authorize production routing. + ## Gate ladder 1. Focused `internal/semanticfacts` and `internal/tsfacts` tests pass, including @@ -117,6 +125,10 @@ fallback behavior remain Go-authoritative. byte-stable ADR-0019 report and fails on any unexplained semantic, transport, or mapping mismatch while retaining named unsupported, budget, and expected mapping cases outside the supported denominator. +10. `./internal/oxc_reference/run-rollout.sh --output ` executes two + release-profile dual-runs, requires byte-identical embedded conformance, + records the controlled measurements in ADR-0020, and retains Go as serving + authority and production fallback. ## Upstream synchronization diff --git a/internal/oxc_reference/README.md b/internal/oxc_reference/README.md index 1143081d9..cc0a1b61b 100644 --- a/internal/oxc_reference/README.md +++ b/internal/oxc_reference/README.md @@ -77,6 +77,24 @@ files. The gate is a shadow comparison and does not change the producer or production routing. See [ADR-0019](../../docs/adr/0019-compute-primitive-literals-independently-in-rust.md). +Run the controlled rollout evidence path with release binaries: + +```sh +./internal/oxc_reference/run-rollout.sh \ + --output docs/evidence/primitive-literal-rollout-2026-08-17.json +``` + +This command executes two complete Go/Rust dual-runs over the same ordered +manifest requests and requires their embedded conformance reports to be +byte-identical. The report pins the repository and TypeScript revisions, +projects, capabilities, budgets, and selection counts. It also records two +host-dependent runtime/output-size samples, release artifact sizes, and the +Rust controller's explicitly scoped resident-memory measurement. Those +measurements characterize the one-shot Go versus in-process Rust harness; they +are not compatibility thresholds or a performance claim. Go remains the +serving authority and fallback, and Rust stays shadow-only. See +[ADR-0020](../../docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md). + The first test suite applies the Rust implementation of the portable contract to every shared JSON fixture in `internal/occurrencemap/testdata/v1` and checks its complete expected report. It separately parses those fixture sources with @@ -121,9 +139,11 @@ negotiation in Go. The intended migration sequence is: Occurrence identity and attachment plumbing is the first approved mechanical port category. Primitive/literal construction is now independently implemented for the narrow, tagged conformance corpus and satisfies the shadow threshold in -ADR-0019. This does not transfer semantic authority: the implementation is not -wired into production, Go remains the fallback, and broader TypeScript -semantics remain Go-authoritative. +ADR-0019. The controlled dual-run in ADR-0020 retains explicit unsupported, +recovery, serving-integration, measurement-boundary, and memory blockers. This +does not transfer semantic authority: the implementation is not wired into +production, Go remains the fallback, and broader TypeScript semantics remain +Go-authoritative. Adding a projection does not transfer semantic authority. New parser-boundary normalizations require a shared fixture and the versioned portable contract. diff --git a/internal/oxc_reference/crates/occurrence-consumer/src/conformance.rs b/internal/oxc_reference/crates/occurrence-consumer/src/conformance.rs index 5913275e0..0261a7c1b 100644 --- a/internal/oxc_reference/crates/occurrence-consumer/src/conformance.rs +++ b/internal/oxc_reference/crates/occurrence-consumer/src/conformance.rs @@ -4,6 +4,7 @@ use std::{ io::{BufReader, Write}, path::{Path, PathBuf}, process::{Command, Stdio}, + time::Instant, }; use serde::{Deserialize, Serialize}; @@ -15,6 +16,7 @@ use crate::{ PrimitiveLiteralCandidate, }, contract::{Occurrence, Span}, + evidence::resident_memory, facts::{ EntityState, LiteralValue, OccurrenceTypeFacts, ProducerBudgetReport, SemanticSnapshot, TypeGraph, TypeId, TypeKind, TypeViewState, TypeViewStates, @@ -25,7 +27,8 @@ use crate::{ }, }; -pub const CONFORMANCE_SCHEMA_VERSION: u32 = 3; +pub const CONFORMANCE_SCHEMA_VERSION: u32 = 4; +pub const ROLLOUT_SCHEMA_VERSION: u32 = 1; #[derive(Clone, Debug, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] @@ -34,6 +37,7 @@ pub struct ConformanceReport { pub gate_kind: &'static str, pub candidate: &'static str, pub shadow_only: bool, + pub execution: ExecutionContract, pub threshold: CompatibilityThreshold, pub corpus: CorpusCoverage, pub cases: Vec, @@ -41,6 +45,103 @@ pub struct ConformanceReport { pub passes: bool, } +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ExecutionContract { + pub repository_revision: String, + pub typescript_version: String, + pub typescript_revision: String, + pub request_schema_version: u32, + pub corpus_path: &'static str, + pub go_semantic_authority: bool, + pub rust_mode: &'static str, + pub ts7_producer_protocol_changed: bool, + pub external_consumer_behavior_changed: bool, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct RolloutReport { + pub schema_version: u32, + pub evidence_kind: &'static str, + pub command: &'static str, + pub environment: RolloutEnvironment, + pub authority: AuthorityBoundary, + pub determinism: DeterminismEvidence, + pub conformance: ConformanceReport, + pub measurements: RolloutMeasurements, + pub readiness: AuthorityReadiness, + pub passes: bool, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct RolloutEnvironment { + pub operating_system: &'static str, + pub architecture: &'static str, + pub rustc: String, + pub go: String, + pub build_profile: &'static str, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct AuthorityBoundary { + pub serving_authority: &'static str, + pub production_fallback: &'static str, + pub rust_mode: &'static str, + pub authority_switch: bool, + pub ts7_producer_protocol_changed: bool, + pub external_consumer_behavior_changed: bool, +} + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct DeterminismEvidence { + pub complete_runs: usize, + pub conformance_reports_byte_equal: bool, + pub compact_conformance_report_bytes: usize, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct RolloutMeasurements { + pub scope: &'static str, + pub samples: Vec, + pub artifacts: RolloutArtifacts, +} + +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct MeasurementSample { + pub ordinal: usize, + pub cases: usize, + pub go_oracle_nanoseconds: u64, + pub rust_producer_nanoseconds: u64, + pub rust_determinism_check_nanoseconds: u64, + pub total_nanoseconds: u64, + pub go_snapshot_bytes: usize, + pub rust_candidate_bytes: usize, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct RolloutArtifacts { + pub go_executable_bytes: u64, + pub rust_executable_bytes: u64, + pub peak_or_current_controller_resident_bytes: Option, + pub resident_measurement: String, + pub memory_scope: &'static str, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct AuthorityReadiness { + pub ready_for_later_authority_decision: bool, + pub status: &'static str, + pub blockers: Vec, +} + #[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct CorpusCoverage { @@ -66,6 +167,7 @@ pub struct CompatibilityThreshold { pub struct ConformanceCase { pub name: String, pub facts: usize, + pub request: PinnedRequestEvidence, pub repeated_rust_output_equal: bool, pub classifications: ClassificationCoverage, pub selections: Vec, @@ -80,6 +182,16 @@ pub struct ConformanceCase { pub differences: Vec, } +#[derive(Clone, Debug, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PinnedRequestEvidence { + pub schema_version: u32, + pub project: String, + pub required_capabilities: Vec, + pub budgets: ProducerBudgetRequest, + pub selections: usize, +} + #[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct ClassificationCoverage { @@ -131,9 +243,11 @@ pub struct GoOracleFactObservation { pub actual: serde_json::Value, } -#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct GoOracleEvidence { + pub typescript_version: String, + pub typescript_revision: String, pub diagnostic_count: u32, pub budgets: ProducerBudgetReport, } @@ -263,11 +377,11 @@ struct CorpusManifest { selections: Vec, } -#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize)] +#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] -struct ProducerBudgetRequest { - max_type_nodes: u32, - max_type_depth: u32, +pub struct ProducerBudgetRequest { + pub max_type_nodes: u32, + pub max_type_depth: u32, } #[derive(Clone, Debug, Deserialize)] @@ -340,10 +454,95 @@ struct ProducerSelection { end: usize, } +struct CompletedConformanceRun { + report: ConformanceReport, + measurement: MeasurementSample, +} + pub fn run_conformance( tsfacts_binary: &Path, corpus_root: &Path, ) -> Result { + run_conformance_at_revision(tsfacts_binary, corpus_root, "unrecorded") +} + +pub fn run_conformance_at_revision( + tsfacts_binary: &Path, + corpus_root: &Path, + repository_revision: &str, +) -> Result { + Ok(run_conformance_observed(tsfacts_binary, corpus_root, repository_revision)?.report) +} + +pub fn run_rollout( + tsfacts_binary: &Path, + corpus_root: &Path, + repository_revision: &str, +) -> Result { + let mut first = run_conformance_observed(tsfacts_binary, corpus_root, repository_revision)?; + let mut repeated = run_conformance_observed(tsfacts_binary, corpus_root, repository_revision)?; + first.measurement.ordinal = 1; + repeated.measurement.ordinal = 2; + let first_bytes = serde_json::to_vec(&first.report) + .map_err(|error| format!("transport: serialize first conformance report: {error}"))?; + let repeated_bytes = serde_json::to_vec(&repeated.report) + .map_err(|error| format!("transport: serialize repeated conformance report: {error}"))?; + let reports_equal = first_bytes == repeated_bytes; + let conformance_passes = first.report.passes && repeated.report.passes; + let readiness = authority_readiness(&first.report.summary); + let (resident_bytes, resident_measurement) = resident_memory(); + let rust_executable_bytes = std::env::current_exe() + .ok() + .and_then(|path| fs::metadata(path).ok()) + .map_or(0, |metadata| metadata.len()); + let go_executable_bytes = fs::metadata(tsfacts_binary).map_or(0, |metadata| metadata.len()); + + Ok(RolloutReport { + schema_version: ROLLOUT_SCHEMA_VERSION, + evidence_kind: "primitive-literal-controlled-go-rust-dual-run", + command: "./internal/oxc_reference/run-rollout.sh --output ", + environment: RolloutEnvironment { + operating_system: std::env::consts::OS, + architecture: std::env::consts::ARCH, + rustc: tool_version("rustc", &["--version"]), + go: tool_version("go", &["version"]), + build_profile: "release", + }, + authority: AuthorityBoundary { + serving_authority: "go", + production_fallback: "go", + rust_mode: "shadow-only", + authority_switch: false, + ts7_producer_protocol_changed: false, + external_consumer_behavior_changed: false, + }, + determinism: DeterminismEvidence { + complete_runs: 2, + conformance_reports_byte_equal: reports_equal, + compact_conformance_report_bytes: first_bytes.len(), + }, + conformance: first.report, + measurements: RolloutMeasurements { + scope: "one-shot Go process versus in-process Rust producer over identical ordered requests; characterization only", + samples: vec![first.measurement, repeated.measurement], + artifacts: RolloutArtifacts { + go_executable_bytes, + rust_executable_bytes, + peak_or_current_controller_resident_bytes: resident_bytes, + resident_measurement, + memory_scope: "Rust rollout controller including decoded Go snapshots; excludes child Go process RSS", + }, + }, + readiness, + passes: conformance_passes && reports_equal, + }) +} + +fn run_conformance_observed( + tsfacts_binary: &Path, + corpus_root: &Path, + repository_revision: &str, +) -> Result { let tsfacts_binary = tsfacts_binary .canonicalize() .map_err(|error| format!("transport: resolve {}: {error}", tsfacts_binary.display()))?; @@ -355,6 +554,8 @@ pub fn run_conformance( discovered_cases: case_directories.len(), ..CorpusCoverage::default() }; + let run_started = Instant::now(); + let mut measurement = MeasurementSample::default(); let mut cases = Vec::new(); for case_directory in case_directories { let manifest = read_manifest(&case_directory)?; @@ -376,7 +577,20 @@ pub fn run_conformance( } validate_expectations(&manifest)?; let request = build_request(&case_directory, &manifest)?; - let snapshot = run_go_oracle(&tsfacts_binary, &case_directory, &request)?; + let request_evidence = PinnedRequestEvidence { + schema_version: request.schema_version, + project: request.project.to_owned(), + required_capabilities: request.required_capabilities.to_vec(), + budgets: request.budgets, + selections: request.selections.len(), + }; + let go_started = Instant::now(); + let (snapshot, snapshot_bytes) = run_go_oracle(&tsfacts_binary, &case_directory, &request)?; + measurement.go_oracle_nanoseconds = measurement + .go_oracle_nanoseconds + .saturating_add(duration_nanoseconds(go_started.elapsed().as_nanos())); + measurement.go_snapshot_bytes = + measurement.go_snapshot_bytes.saturating_add(snapshot_bytes); let selections = request .selections .iter() @@ -395,8 +609,21 @@ pub fn run_conformance( let limits = PrimitiveProducerLimits { max_type_nodes: usize::try_from(manifest.budgets.max_type_nodes).unwrap_or(usize::MAX), }; + let rust_started = Instant::now(); let first = produce_primitive_literals(&case_directory, &selections, limits)?; + measurement.rust_producer_nanoseconds = measurement + .rust_producer_nanoseconds + .saturating_add(duration_nanoseconds(rust_started.elapsed().as_nanos())); + measurement.rust_candidate_bytes = measurement.rust_candidate_bytes.saturating_add( + serde_json::to_vec(&first) + .map_err(|error| format!("transport: serialize Rust candidate output: {error}"))? + .len(), + ); + let repeated_started = Instant::now(); let repeated = produce_primitive_literals(&case_directory, &selections, limits)?; + measurement.rust_determinism_check_nanoseconds = measurement + .rust_determinism_check_nanoseconds + .saturating_add(duration_nanoseconds(repeated_started.elapsed().as_nanos())); let repeated_equal = serde_json::to_vec(&first).ok() == serde_json::to_vec(&repeated).ok(); let expectations = manifest .selections @@ -420,6 +647,7 @@ pub fn run_conformance( &snapshot, first, repeated_equal, + request_evidence, &expectations, &proves, )); @@ -428,16 +656,34 @@ pub fn run_conformance( let summary = summarize(&cases); let threshold = compatibility_threshold(); let passes = threshold_passes(&summary, threshold); - Ok(ConformanceReport { + let (typescript_version, typescript_revision) = compiler_identity(&cases)?; + measurement.cases = cases.len(); + measurement.total_nanoseconds = duration_nanoseconds(run_started.elapsed().as_nanos()); + let report = ConformanceReport { schema_version: CONFORMANCE_SCHEMA_VERSION, gate_kind: "go-vs-independent-rust-semantic-conformance", candidate: "independent-primitive-literal-v2", shadow_only: true, + execution: ExecutionContract { + repository_revision: repository_revision.to_owned(), + typescript_version, + typescript_revision, + request_schema_version: 1, + corpus_path: "internal/semanticfacts/testdata/corpus/v0", + go_semantic_authority: true, + rust_mode: "shadow-only", + ts7_producer_protocol_changed: false, + external_consumer_behavior_changed: false, + }, threshold, corpus, cases, summary, passes, + }; + Ok(CompletedConformanceRun { + report, + measurement, }) } @@ -468,11 +714,62 @@ fn difference_count(summary: &ConformanceSummary, category: &str) -> usize { .unwrap_or_default() } +fn compiler_identity(cases: &[ConformanceCase]) -> Result<(String, String), String> { + let Some(first) = cases.first() else { + return Err("transport: conformance corpus selected no cases".to_owned()); + }; + let version = first.go_oracle.typescript_version.clone(); + let revision = first.go_oracle.typescript_revision.clone(); + if cases.iter().any(|case| { + case.go_oracle.typescript_version != version + || case.go_oracle.typescript_revision != revision + }) { + return Err( + "transport: selected cases did not run against one pinned TypeScript compiler revision" + .to_owned(), + ); + } + Ok((version, revision)) +} + +fn authority_readiness(summary: &ConformanceSummary) -> AuthorityReadiness { + let mut blockers = Vec::new(); + if summary.classifications.unsupported > 0 { + blockers.push(format!( + "{} explicitly classified primitive/literal selections remain unsupported", + summary.classifications.unsupported + )); + } + if summary.classifications.mapping > 0 { + blockers.push(format!( + "{} recovery selections retain expected OXC mapping gaps", + summary.classifications.mapping + )); + } + blockers.push( + "the Rust producer is not integrated into the serving path, so production fallback and rollback have not been exercised" + .to_owned(), + ); + blockers.push( + "runtime and output measurements compare a one-shot Go process with an in-process Rust shadow path; a production-equivalent boundary is not selected" + .to_owned(), + ); + blockers.push( + "controller RSS excludes the child Go process, so per-producer peak-memory parity is not established" + .to_owned(), + ); + AuthorityReadiness { + ready_for_later_authority_decision: false, + status: "not-ready", + blockers, + } +} + fn run_go_oracle( tsfacts_binary: &Path, case_directory: &Path, request: &ProducerRequest<'_>, -) -> Result { +) -> Result<(SemanticSnapshot, usize), String> { let request_json = serde_json::to_vec(request) .map_err(|error| format!("transport: encode Go oracle request: {error}"))?; let mut child = Command::new(tsfacts_binary) @@ -498,8 +795,10 @@ fn run_go_oracle( String::from_utf8_lossy(&output.stderr).trim() )); } - SemanticSnapshot::from_json_lines(BufReader::new(output.stdout.as_slice())) - .map_err(|error| format!("transport: decode Go oracle output: {error}")) + let snapshot_bytes = output.stdout.len(); + let snapshot = SemanticSnapshot::from_json_lines(BufReader::new(output.stdout.as_slice())) + .map_err(|error| format!("transport: decode Go oracle output: {error}"))?; + Ok((snapshot, snapshot_bytes)) } fn compare_case( @@ -507,6 +806,7 @@ fn compare_case( snapshot: &SemanticSnapshot, output: IndependentPrimitiveLiteralOutput, repeated_equal: bool, + request: PinnedRequestEvidence, expectations: &[SelectionExpectation], proves: &[String], ) -> ConformanceCase { @@ -524,7 +824,7 @@ fn compare_case( } comparison.compare_scoped_facts(expectations, proves); - comparison.finish(name, repeated_equal) + comparison.finish(name, repeated_equal, request) } struct Comparison<'a> { @@ -1079,15 +1379,23 @@ impl<'a> Comparison<'a> { matched } - fn finish(mut self, name: String, repeated_equal: bool) -> ConformanceCase { + fn finish( + mut self, + name: String, + repeated_equal: bool, + request: PinnedRequestEvidence, + ) -> ConformanceCase { sort_differences(&mut self.differences); ConformanceCase { name, facts: self.snapshot.facts().len(), + request, repeated_rust_output_equal: repeated_equal, classifications: self.classifications, selections: self.selections, go_oracle: GoOracleEvidence { + typescript_version: self.snapshot.typescript_version.clone(), + typescript_revision: self.snapshot.typescript_revision.clone(), diagnostic_count: self.snapshot.diagnostic_count, budgets: self.snapshot.budgets, }, @@ -1367,6 +1675,20 @@ fn ratio_ppm(numerator: usize, denominator: usize) -> u64 { } } +fn duration_nanoseconds(value: u128) -> u64 { + u64::try_from(value).unwrap_or(u64::MAX) +} + +fn tool_version(command: &str, args: &[&str]) -> String { + Command::new(command) + .args(args) + .output() + .ok() + .filter(|output| output.status.success()) + .map(|output| String::from_utf8_lossy(&output.stdout).trim().to_owned()) + .unwrap_or_else(|| "unavailable".to_owned()) +} + fn sorted_case_directories(corpus_root: &Path) -> Result, String> { let mut directories = fs::read_dir(corpus_root) .map_err(|error| format!("transport: read {}: {error}", corpus_root.display()))? @@ -1528,4 +1850,37 @@ mod tests { assert!(!bijection.bind(&go_one, &rust_two)); assert!(!bijection.bind(&go_two, &rust_one)); } + + #[test] + fn exact_shadow_conformance_does_not_imply_authority_readiness() { + let summary = ConformanceSummary { + supported_records: 29, + matched_supported_records: 29, + supported_compatibility_ppm: 1_000_000, + classifications: ClassificationCoverage { + supported: 20, + unsupported: 4, + budget: 1, + mapping: 3, + }, + ..ConformanceSummary::default() + }; + + assert!(threshold_passes(&summary, compatibility_threshold())); + let readiness = authority_readiness(&summary); + assert!(!readiness.ready_for_later_authority_decision); + assert_eq!(readiness.status, "not-ready"); + assert!( + readiness + .blockers + .iter() + .any(|blocker| blocker.starts_with("4 explicitly classified")) + ); + assert!( + readiness + .blockers + .iter() + .any(|blocker| blocker.starts_with("3 recovery selections")) + ); + } } diff --git a/internal/oxc_reference/crates/occurrence-consumer/src/evidence.rs b/internal/oxc_reference/crates/occurrence-consumer/src/evidence.rs index f70e526e8..612d907f4 100644 --- a/internal/oxc_reference/crates/occurrence-consumer/src/evidence.rs +++ b/internal/oxc_reference/crates/occurrence-consumer/src/evidence.rs @@ -749,7 +749,7 @@ fn tool_version(command: &str, args: &[&str]) -> String { .unwrap_or_else(|| "unavailable".to_owned()) } -fn resident_memory() -> (Option, String) { +pub(crate) fn resident_memory() -> (Option, String) { platform_resident_memory() } @@ -792,7 +792,9 @@ fn platform_resident_memory() -> (Option, String) { } let mut usage = Rusage::default(); - // macOS defines RUSAGE_SELF as zero and reports ru_maxrss in bytes. + // SAFETY: `usage` is a valid, aligned, writable `Rusage` for the duration of + // the call. macOS defines `RUSAGE_SELF` as zero and initializes the struct + // before returning success; no pointer is retained by `getrusage`. let result = unsafe { getrusage(0, &raw mut usage) }; let bytes = (result == 0) .then(|| u64::try_from(usage.max_resident_bytes).ok()) diff --git a/internal/oxc_reference/crates/occurrence-consumer/src/main.rs b/internal/oxc_reference/crates/occurrence-consumer/src/main.rs index 4de820081..da71d266d 100644 --- a/internal/oxc_reference/crates/occurrence-consumer/src/main.rs +++ b/internal/oxc_reference/crates/occurrence-consumer/src/main.rs @@ -2,7 +2,7 @@ use std::{collections::BTreeMap, fs, io::BufReader, sync::Arc}; use oxc_allocator::Allocator; use oxc_occurrence_consumer::{ - conformance::run_conformance, + conformance::{run_conformance, run_rollout}, contract::{Report, correlate}, evidence::run_evidence, facts::SemanticSnapshot, @@ -71,12 +71,52 @@ fn main() -> Result<(), String> { { print_conformance(tsfacts, corpus, Some(output)) } + [command, tsfacts, corpus, revision] if command == "rollout" => { + print_rollout(tsfacts, corpus, revision, None) + } + [command, tsfacts, corpus, revision, output_flag, output] + if command == "rollout" && output_flag == "--output" => + { + print_rollout(tsfacts, corpus, revision, Some(output)) + } _ => Err( - "usage: oxc-occurrence-map fixtures | inspect [logical-file] | evidence [--output ] | conformance [--output ]".to_owned(), + "usage: oxc-occurrence-map fixtures | inspect [logical-file] | evidence [--output ] | conformance [--output ] | rollout [--output ]".to_owned(), ), } } +fn print_rollout( + tsfacts: &str, + corpus: &str, + revision: &str, + output: Option<&String>, +) -> Result<(), String> { + let report = run_rollout( + std::path::Path::new(tsfacts), + std::path::Path::new(corpus), + revision, + )?; + let mut bytes = Vec::new(); + let formatter = serde_json::ser::PrettyFormatter::with_indent(b" "); + let mut serializer = serde_json::Serializer::with_formatter(&mut bytes, formatter); + report + .serialize(&mut serializer) + .map_err(|error| format!("serialize rollout report: {error}"))?; + let serialized = String::from_utf8(bytes) + .map_err(|error| format!("serialize rollout report as UTF-8: {error}"))?; + if let Some(output) = output { + fs::write(output, format!("{serialized}\n")) + .map_err(|error| format!("write rollout report {output:?}: {error}"))?; + } else { + println!("{serialized}"); + } + if report.passes { + Ok(()) + } else { + Err("rollout gate failed: conformance must pass and repeated stable reports must be byte-equal".to_owned()) + } +} + fn print_conformance(tsfacts: &str, corpus: &str, output: Option<&String>) -> Result<(), String> { let report = run_conformance(std::path::Path::new(tsfacts), std::path::Path::new(corpus))?; let mut bytes = Vec::new(); diff --git a/internal/oxc_reference/run-rollout.sh b/internal/oxc_reference/run-rollout.sh new file mode 100755 index 000000000..12ef482af --- /dev/null +++ b/internal/oxc_reference/run-rollout.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -euo pipefail + +repository_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +rollout_tmpdir="$(mktemp -d "${TMPDIR:-/tmp}/ts7-rust-rollout.XXXXXX")" +trap 'rm -rf -- "$rollout_tmpdir"' EXIT + +output_path="" +if [[ $# -gt 0 ]]; then + if [[ $# -ne 2 || $1 != "--output" ]]; then + echo "usage: $0 [--output ]" >&2 + exit 2 + fi + output_path="$2" +fi + +cd "$repository_root" +repository_revision="$(git rev-parse HEAD)" +GOCACHE="$repository_root/internal/oxc_reference/target/go-build-cache" \ + go build -trimpath -o "$rollout_tmpdir/tsfacts" ./cmd/tsfacts +cargo build --quiet --release --locked \ + --manifest-path internal/oxc_reference/Cargo.toml \ + --bin oxc-occurrence-map + +rollout_command=( + "$repository_root/internal/oxc_reference/target/release/oxc-occurrence-map" + rollout + "$rollout_tmpdir/tsfacts" + "$repository_root/internal/semanticfacts/testdata/corpus/v0" + "$repository_revision" +) + +if [[ -n "$output_path" ]]; then + "${rollout_command[@]}" --output "$output_path" +else + "${rollout_command[@]}" +fi diff --git a/rfcs/0001-semantic-facts-kernel.md b/rfcs/0001-semantic-facts-kernel.md index 90eb78b87..6a6562fa0 100644 --- a/rfcs/0001-semantic-facts-kernel.md +++ b/rfcs/0001-semantic-facts-kernel.md @@ -288,6 +288,18 @@ cases remain visible outside the 29-record supported denominator; unexplained semantic, transport, or mapping differences still block CI, and repeated full reports must be byte-identical. +Issue #47 adds the controlled release-profile rollout lane in ADR-0020. Two +complete runs pin the checked-out repository and TypeScript compiler revisions +and retain each manifest-derived project, capability set, budget, and ordered +selection count. Their stable conformance reports are byte-identical. The +structured artifact separately records two runtime and output-size samples, +release artifact sizes, and explicitly scoped controller resident memory. The +29 supported records still match exactly, but four unsupported selections, +three recovery mapping gaps, the absent serving/fallback integration, the +non-equivalent Go-process versus in-process Rust measurement boundary, and +missing isolated Go peak memory keep the category shadow-only and not ready for +a later authority decision. + ## Considered alternatives ### Prune TypeScript 7 immediately @@ -358,8 +370,9 @@ Acceptance establishes the versioned boundary, not compiler equivalence, production readiness, or a Rust performance advantage. The TypeScript 7 Go checker remains the semantic oracle. The primitive/literal candidate is now computed independently from source and OXC semantics under ADR-0019 and passes -its exact shadow threshold. It is not wired into production, and no semantic -category is approved for replacement. +its exact shadow threshold. ADR-0020 records the controlled dual-run and the +remaining blockers. It is not wired into production, and no semantic category +is approved for replacement. ## Open questions @@ -368,9 +381,8 @@ category is approved for replacement. - Is source range plus syntax category sufficient for all relevant OXC nodes? - Which portions of the type graph require exact structure in version 1, and which may initially be represented as opaque or truncated? -- What production-integration evidence and rollout boundary would be required - before independently computed primitive/literal output could leave shadow - mode while preserving Go as a fallback? +- Which production-equivalent process or library boundary should compare both + implementations before fallback and rollback can be exercised? - Should the eventual public name be `tsfacts`, `TypeScript Semantic Kernel`, or another name that avoids implying an alternate TypeScript language? @@ -384,3 +396,4 @@ category is approved for replacement. - [ADR-0017: Project primitive/literal candidates from Go graph identity](../docs/adr/0017-project-primitive-literal-candidates-from-go-graph-identity.md) - [ADR-0018: Gate Rust semantics against the Go oracle](../docs/adr/0018-gate-rust-semantics-against-the-go-oracle.md) - [ADR-0019: Compute primitive/literal candidates independently in Rust](../docs/adr/0019-compute-primitive-literals-independently-in-rust.md) +- [ADR-0020: Keep primitive/literal production shadow-only after the controlled dual-run](../docs/adr/0020-keep-primitive-literals-shadow-only-after-dual-run.md) From 822351655858dc8157d9cd9222920ea78b3ba40b Mon Sep 17 00:00:00 2001 From: Sebastian Werner Date: Mon, 17 Aug 2026 15:39:21 +0200 Subject: [PATCH 2/2] docs: record primitive rollout evidence --- .../primitive-literal-rollout-2026-08-17.json | 3983 +++++++++++++++++ 1 file changed, 3983 insertions(+) create mode 100644 docs/evidence/primitive-literal-rollout-2026-08-17.json diff --git a/docs/evidence/primitive-literal-rollout-2026-08-17.json b/docs/evidence/primitive-literal-rollout-2026-08-17.json new file mode 100644 index 000000000..98984a027 --- /dev/null +++ b/docs/evidence/primitive-literal-rollout-2026-08-17.json @@ -0,0 +1,3983 @@ +{ + "schemaVersion": 1, + "evidenceKind": "primitive-literal-controlled-go-rust-dual-run", + "command": "./internal/oxc_reference/run-rollout.sh --output ", + "environment": { + "operatingSystem": "macos", + "architecture": "aarch64", + "rustc": "rustc 1.97.1 (8bab26f4f 2026-07-14)", + "go": "go version go1.26.6 darwin/arm64", + "buildProfile": "release" + }, + "authority": { + "servingAuthority": "go", + "productionFallback": "go", + "rustMode": "shadow-only", + "authoritySwitch": false, + "ts7ProducerProtocolChanged": false, + "externalConsumerBehaviorChanged": false + }, + "determinism": { + "completeRuns": 2, + "conformanceReportsByteEqual": true, + "compactConformanceReportBytes": 52766 + }, + "conformance": { + "schemaVersion": 4, + "gateKind": "go-vs-independent-rust-semantic-conformance", + "candidate": "independent-primitive-literal-v2", + "shadowOnly": true, + "execution": { + "repositoryRevision": "24c138ae4c7a2b9a42c1e68eb25329fbf8a3a5a9", + "typescriptVersion": "7.1.0-dev", + "typescriptRevision": "1bcfa18d79a3be41772223d5c05dfe4480e614ff", + "requestSchemaVersion": 1, + "corpusPath": "internal/semanticfacts/testdata/corpus/v0", + "goSemanticAuthority": true, + "rustMode": "shadow-only", + "ts7ProducerProtocolChanged": false, + "externalConsumerBehaviorChanged": false + }, + "threshold": { + "minimumSupportedRecords": 15, + "requiredSupportedCompatibilityPpm": 1000000, + "maxUnexplainedSemanticDifferences": 0, + "maxUnexplainedTransportDifferences": 0, + "maxUnexplainedMappingDifferences": 0, + "unsupportedAndBudgetDifferencesAreExpected": true + }, + "corpus": { + "discoveredCases": 9, + "selectedCases": 4, + "selectedFacts": 28, + "excludedCases": [ + "advanced-types", + "callables-generics", + "core-graph", + "occurrence-contexts", + "vertical-slice" + ] + }, + "cases": [ + { + "name": "primitive-literal-budget", + "facts": 1, + "request": { + "schemaVersion": 1, + "project": "tsconfig.json", + "requiredCapabilities": [ + "occurrence.type-views", + "types.core-composite" + ], + "budgets": { + "maxTypeNodes": 2, + "maxTypeDepth": 16 + }, + "selections": 1 + }, + "repeatedRustOutputEqual": true, + "classifications": { + "supported": 0, + "unsupported": 0, + "budget": 1, + "mapping": 0 + }, + "selections": [ + { + "factIndex": 0, + "proves": "both producers expose a bounded literal-union response instead of hiding it", + "expectedClassification": "budget", + "expectedCode": "type-budget-exceeded", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/budget.ts", + "span": { + "start": 105, + "end": 116 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": false, + "id": "type:1", + "literal": null, + "members": [ + "type:2", + "type:3", + "type:3", + "type:3", + "type:3", + "type:3" + ], + "state": "truncated", + "truncated": true, + "typeKind": "union" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/budget.ts", + "span": { + "start": 105, + "end": 116 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 21, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:3" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:3" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:3" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:3" + } + ], + "types": [ + { + "id": "type:3", + "candidateState": "truncated", + "reasons": [ + "type-budget-exceeded" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + } + ], + "goOracle": { + "typescriptVersion": "7.1.0-dev", + "typescriptRevision": "1bcfa18d79a3be41772223d5c05dfe4480e614ff", + "diagnosticCount": 0, + "budgets": { + "limits": { + "maxTypeNodes": 2, + "maxTypeDepth": 16 + }, + "typeNodesUsed": 2, + "maxTypeDepthObserved": 1, + "truncated": true + } + }, + "rustProducer": { + "diagnosticCount": 0, + "maxTypeNodes": 2, + "typeNodesUsed": 3, + "truncated": true + }, + "roots": { + "factsWithAllFiveViews": 0, + "comparedRoots": 0, + "identityMatches": 0, + "available": 0, + "sameAsActual": 0, + "inapplicable": 0, + "unavailable": 0 + }, + "mapping": { + "facts": 1, + "mapped": 1, + "unmapped": 0, + "failedFiles": 0 + }, + "candidateStates": { + "complete": 0, + "truncated": 1, + "unsupported": 0, + "error": 0 + }, + "supportedRecords": 0, + "matchedSupportedRecords": 0, + "supportedCompatibilityPpm": 0, + "differences": [ + { + "category": "budget", + "code": "type-budget-exceeded", + "expected": true, + "factIndex": 0, + "occurrence": { + "file": "src/budget.ts", + "span": { + "start": 105, + "end": 116 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "budget", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "occurrence": { + "file": "src/budget.ts", + "span": { + "end": 116, + "start": 105 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 21, + "roots": [ + { + "state": "available", + "typeId": "type:3", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:3", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:3", + "view": "apparent" + }, + { + "state": "same-as-actual", + "typeId": "type:3", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 0, + "truncated": 1, + "unsupported": 0 + }, + "types": [ + { + "candidateState": "truncated", + "id": "type:3", + "reasons": [ + "type-budget-exceeded" + ] + } + ] + }, + "explanation": "the fixture pins explicit response-local budget truncation" + } + ] + }, + { + "name": "primitive-literal-conformance", + "facts": 13, + "request": { + "schemaVersion": 1, + "project": "tsconfig.json", + "requiredCapabilities": [ + "occurrence.type-views", + "types.core-composite" + ], + "budgets": { + "maxTypeNodes": 512, + "maxTypeDepth": 16 + }, + "selections": 13 + }, + "repeatedRustOutputEqual": true, + "classifications": { + "supported": 10, + "unsupported": 3, + "budget": 0, + "mapping": 0 + }, + "selections": [ + { + "factIndex": 0, + "proves": "literal declaration retains its annotated literal", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 587, + "end": 605 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:1", + "literal": { + "kind": "string", + "value": "declared" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 587, + "end": 605 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 84, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:1" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:1" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:1" + } + ], + "types": [ + { + "id": "type:1", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "declared" + } + }, + { + "id": "type:2", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 1, + "proves": "standalone literal expression remains a literal", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 607, + "end": 619 + }, + "syntaxKind": "KindStringLiteral" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:3", + "literal": { + "kind": "string", + "value": "expression" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 607, + "end": 619 + }, + "syntaxKind": "KindStringLiteral" + }, + "oxcNodeId": 86, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:3" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:3" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:2", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:3", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "expression" + } + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 2, + "proves": "mutable declaration widens a string literal to string", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 621, + "end": 639 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:4", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "string" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 621, + "end": 639 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 88, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:4" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:4" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:4" + } + ], + "types": [ + { + "id": "type:2", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:4", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "string" + } + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 3, + "proves": "as const prevents literal widening", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 641, + "end": 655 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:5", + "literal": { + "kind": "string", + "value": "const-asserted" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 641, + "end": 655 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 90, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:5" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:5" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:5" + } + ], + "types": [ + { + "id": "type:2", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:5", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "const-asserted" + } + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 4, + "proves": "satisfies preserves the literal while supplying string context", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 325, + "end": 336 + }, + "syntaxKind": "KindStringLiteral" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "available", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:6", + "literal": { + "kind": "string", + "value": "satisfied" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 325, + "end": 336 + }, + "syntaxKind": "KindStringLiteral" + }, + "oxcNodeId": 46, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:6" + }, + { + "view": "contextual", + "state": "available", + "typeId": "type:4" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:6" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:2", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:4", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "string" + } + }, + { + "id": "type:6", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "satisfied" + } + } + ], + "summary": { + "complete": 2, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 5, + "proves": "annotated initializer retains literal and contextual primitive views", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 388, + "end": 397 + }, + "syntaxKind": "KindStringLiteral" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "available", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:7", + "literal": { + "kind": "string", + "value": "context" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 388, + "end": 397 + }, + "syntaxKind": "KindStringLiteral" + }, + "oxcNodeId": 53, + "fact": { + "complete": false, + "recovered": false, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:7" + }, + { + "view": "contextual", + "state": "available", + "typeId": "type:4" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:7" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:2", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:4", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "string" + } + }, + { + "id": "type:7", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "context" + } + } + ], + "summary": { + "complete": 2, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 6, + "proves": "enum-like literal values remain explicitly outside the narrow Rust category", + "expectedClassification": "unsupported", + "expectedCode": "enum-literal-outside-category", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 657, + "end": 670 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "available" + }, + "actual": { + "complete": true, + "id": "type:8", + "literal": { + "kind": "enum", + "value": "ready" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 657, + "end": 670 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 92, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:8" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:8" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:8" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:8" + } + ], + "types": [ + { + "id": "type:8", + "candidateState": "unsupported", + "reasons": [ + "unsupported-expression" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 1, + "error": 0 + } + } + }, + { + "factIndex": 7, + "proves": "imported value literals are observed without pretending cross-file Rust resolution", + "expectedClassification": "unsupported", + "expectedCode": "cross-file-import-outside-category", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 672, + "end": 687 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:10", + "literal": { + "kind": "string", + "value": "imported" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 672, + "end": 687 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 94, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:9" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:9" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:9" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:9" + } + ], + "types": [ + { + "id": "type:9", + "candidateState": "unsupported", + "reasons": [ + "unsupported-type-form" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 1, + "error": 0 + } + } + }, + { + "factIndex": 8, + "proves": "imported literal aliases are observed without pretending cross-file Rust resolution", + "expectedClassification": "unsupported", + "expectedCode": "cross-file-import-outside-category", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 689, + "end": 701 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": false, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:11", + "literal": { + "kind": "string", + "value": "imported-type" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 689, + "end": 701 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 96, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:10" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:10" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:10" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:10" + } + ], + "types": [ + { + "id": "type:10", + "candidateState": "unsupported", + "reasons": [ + "unsupported-type-form" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 1, + "error": 0 + } + } + }, + { + "factIndex": 9, + "proves": "literal union retains every primitive, literal, and null-like member", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 703, + "end": 715 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": true, + "recovered": false, + "truncated": false, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:12", + "literal": null, + "members": [ + "type:13", + "type:14", + "type:15", + "type:16", + "type:17", + "type:18" + ], + "state": "complete", + "truncated": false, + "typeKind": "union" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 703, + "end": 715 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 98, + "fact": { + "complete": true, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:17" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:17" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:17" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:17" + } + ], + "types": [ + { + "id": "type:11", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "ready" + } + }, + { + "id": "type:12", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "number", + "value": "42" + } + }, + { + "id": "type:13", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "bigint", + "value": "42" + } + }, + { + "id": "type:14", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "boolean", + "value": "true" + } + }, + { + "id": "type:15", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "null" + } + }, + { + "id": "type:16", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "undefined" + } + }, + { + "id": "type:17", + "candidateState": "complete", + "semantic": { + "kind": "union", + "members": [ + "type:11", + "type:12", + "type:13", + "type:14", + "type:15", + "type:16" + ] + } + } + ], + "summary": { + "complete": 7, + "truncated": 0, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 10, + "proves": "null expression remains null-like", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 717, + "end": 721 + }, + "syntaxKind": "KindNullKeyword" + }, + "complete": true, + "recovered": false, + "truncated": false, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:17", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "null" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 717, + "end": 721 + }, + "syntaxKind": "KindNullKeyword" + }, + "oxcNodeId": 100, + "fact": { + "complete": true, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:15" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:15" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:15" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:15", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "null" + } + } + ], + "summary": { + "complete": 1, + "truncated": 0, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 11, + "proves": "undefined expression remains null-like", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 723, + "end": 732 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": true, + "recovered": false, + "truncated": false, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:18", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "undefined" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 723, + "end": 732 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 102, + "fact": { + "complete": true, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:16" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:16" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:16" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:16" + } + ], + "types": [ + { + "id": "type:16", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "undefined" + } + } + ], + "summary": { + "complete": 1, + "truncated": 0, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 12, + "proves": "void declaration remains null-like", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 734, + "end": 743 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": true, + "recovered": false, + "truncated": false, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:19", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "void" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 734, + "end": 743 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 104, + "fact": { + "complete": true, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:18" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:18" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:18" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:18" + } + ], + "types": [ + { + "id": "type:18", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "void" + } + } + ], + "summary": { + "complete": 1, + "truncated": 0, + "unsupported": 0, + "error": 0 + } + } + } + ], + "goOracle": { + "typescriptVersion": "7.1.0-dev", + "typescriptRevision": "1bcfa18d79a3be41772223d5c05dfe4480e614ff", + "diagnosticCount": 0, + "budgets": { + "limits": { + "maxTypeNodes": 512, + "maxTypeDepth": 16 + }, + "typeNodesUsed": 19, + "maxTypeDepthObserved": 1, + "truncated": false + } + }, + "rustProducer": { + "diagnosticCount": 0, + "maxTypeNodes": 512, + "typeNodesUsed": 18, + "truncated": false + }, + "roots": { + "factsWithAllFiveViews": 10, + "comparedRoots": 50, + "identityMatches": 50, + "available": 18, + "sameAsActual": 20, + "inapplicable": 4, + "unavailable": 8 + }, + "mapping": { + "facts": 13, + "mapped": 13, + "unmapped": 0, + "failedFiles": 0 + }, + "candidateStates": { + "complete": 14, + "truncated": 1, + "unsupported": 3, + "error": 0 + }, + "supportedRecords": 14, + "matchedSupportedRecords": 14, + "supportedCompatibilityPpm": 1000000, + "differences": [ + { + "category": "unsupported", + "code": "enum-literal-outside-category", + "expected": true, + "factIndex": 6, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 657, + "end": 670 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "unsupported", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "end": 670, + "start": 657 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 92, + "roots": [ + { + "state": "available", + "typeId": "type:8", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:8", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:8", + "view": "apparent" + }, + { + "state": "same-as-actual", + "typeId": "type:8", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 0, + "truncated": 0, + "unsupported": 1 + }, + "types": [ + { + "candidateState": "unsupported", + "id": "type:8", + "reasons": [ + "unsupported-expression" + ] + } + ] + }, + "explanation": "the fixture pins an out-of-category Rust observation" + }, + { + "category": "unsupported", + "code": "cross-file-import-outside-category", + "expected": true, + "factIndex": 7, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 672, + "end": 687 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "unsupported", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "end": 687, + "start": 672 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 94, + "roots": [ + { + "state": "available", + "typeId": "type:9", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:9", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:9", + "view": "apparent" + }, + { + "state": "same-as-actual", + "typeId": "type:9", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 0, + "truncated": 0, + "unsupported": 1 + }, + "types": [ + { + "candidateState": "unsupported", + "id": "type:9", + "reasons": [ + "unsupported-type-form" + ] + } + ] + }, + "explanation": "the fixture pins an out-of-category Rust observation" + }, + { + "category": "unsupported", + "code": "cross-file-import-outside-category", + "expected": true, + "factIndex": 8, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "start": 689, + "end": 701 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "unsupported", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "occurrence": { + "file": "src/matrix.ts", + "span": { + "end": 701, + "start": 689 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 96, + "roots": [ + { + "state": "available", + "typeId": "type:10", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:10", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:10", + "view": "apparent" + }, + { + "state": "same-as-actual", + "typeId": "type:10", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 0, + "truncated": 0, + "unsupported": 1 + }, + "types": [ + { + "candidateState": "unsupported", + "id": "type:10", + "reasons": [ + "unsupported-type-form" + ] + } + ] + }, + "explanation": "the fixture pins an out-of-category Rust observation" + } + ] + }, + { + "name": "primitive-literal-independent", + "facts": 11, + "request": { + "schemaVersion": 1, + "project": "tsconfig.json", + "requiredCapabilities": [ + "occurrence.type-views", + "types.core-composite" + ], + "budgets": { + "maxTypeNodes": 256, + "maxTypeDepth": 16 + }, + "selections": 11 + }, + "repeatedRustOutputEqual": true, + "classifications": { + "supported": 10, + "unsupported": 1, + "budget": 0, + "mapping": 0 + }, + "selections": [ + { + "factIndex": 0, + "proves": "literal union and response-local member identity", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 541, + "end": 553 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": false, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:1", + "literal": null, + "members": [ + "type:2", + "type:3", + "type:4", + "type:5", + "type:6", + "type:7" + ], + "state": "complete", + "truncated": false, + "typeKind": "union" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 541, + "end": 553 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 84, + "fact": { + "complete": false, + "recovered": true, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:7" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:7" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:7" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:7" + } + ], + "types": [ + { + "id": "type:1", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "ready" + } + }, + { + "id": "type:2", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "number", + "value": "42" + } + }, + { + "id": "type:3", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "bigint", + "value": "42" + } + }, + { + "id": "type:4", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "boolean", + "value": "true" + } + }, + { + "id": "type:5", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "null" + } + }, + { + "id": "type:6", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "undefined" + } + }, + { + "id": "type:7", + "candidateState": "complete", + "semantic": { + "kind": "union", + "members": [ + "type:1", + "type:2", + "type:3", + "type:4", + "type:5", + "type:6" + ] + } + } + ], + "summary": { + "complete": 7, + "truncated": 0, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 1, + "proves": "boolean primitive", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 555, + "end": 571 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:8", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "boolean" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 555, + "end": 571 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 86, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:8" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:8" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:9" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:8" + } + ], + "types": [ + { + "id": "type:8", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "boolean" + } + }, + { + "id": "type:9", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 2, + "proves": "string primitive", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 573, + "end": 588 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:10", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "string" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 573, + "end": 588 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 88, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:10" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:10" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:11" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:10" + } + ], + "types": [ + { + "id": "type:10", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "string" + } + }, + { + "id": "type:11", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 3, + "proves": "number primitive", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 590, + "end": 605 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:12", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "number" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 590, + "end": 605 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 90, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:12" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:12" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:13" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:12" + } + ], + "types": [ + { + "id": "type:12", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "number" + } + }, + { + "id": "type:13", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 4, + "proves": "bigint primitive", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 607, + "end": 622 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "available", + "declared": "same-as-actual" + }, + "actual": { + "complete": true, + "id": "type:14", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "bigint" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 607, + "end": 622 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 92, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:14" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:14" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:15" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:14" + } + ], + "types": [ + { + "id": "type:14", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "bigint" + } + }, + { + "id": "type:15", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + } + ], + "summary": { + "complete": 1, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 5, + "proves": "contextual string literal", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 379, + "end": 388 + }, + "syntaxKind": "KindStringLiteral" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "available", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:16", + "literal": { + "kind": "string", + "value": "context" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 379, + "end": 388 + }, + "syntaxKind": "KindStringLiteral" + }, + "oxcNodeId": 58, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:16" + }, + { + "view": "contextual", + "state": "available", + "typeId": "type:10" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:16" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:11" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:10", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "string" + } + }, + { + "id": "type:11", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:16", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "string", + "value": "context" + } + } + ], + "summary": { + "complete": 2, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 6, + "proves": "contextual number literal", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 423, + "end": 424 + }, + "syntaxKind": "KindNumericLiteral" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "available", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:17", + "literal": { + "kind": "number", + "value": "7" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 423, + "end": 424 + }, + "syntaxKind": "KindNumericLiteral" + }, + "oxcNodeId": 64, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:17" + }, + { + "view": "contextual", + "state": "available", + "typeId": "type:12" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:17" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:13" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:12", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "number" + } + }, + { + "id": "type:13", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:17", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "number", + "value": "7" + } + } + ], + "summary": { + "complete": 2, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 7, + "proves": "contextual boolean literal", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 461, + "end": 466 + }, + "syntaxKind": "KindFalseKeyword" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "available", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:18", + "literal": { + "kind": "boolean", + "value": "false" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 461, + "end": 466 + }, + "syntaxKind": "KindFalseKeyword" + }, + "oxcNodeId": 70, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:18" + }, + { + "view": "contextual", + "state": "available", + "typeId": "type:8" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:18" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:9" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:18", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "boolean", + "value": "false" + } + }, + { + "id": "type:8", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "boolean" + } + }, + { + "id": "type:9", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + } + ], + "summary": { + "complete": 2, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 8, + "proves": "contextual bigint literal", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 501, + "end": 503 + }, + "syntaxKind": "KindBigIntLiteral" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "available", + "widened": "same-as-actual", + "apparent": "available", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:19", + "literal": { + "kind": "bigint", + "value": "7" + }, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "literal" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 501, + "end": 503 + }, + "syntaxKind": "KindBigIntLiteral" + }, + "oxcNodeId": 76, + "fact": { + "complete": false, + "recovered": true, + "truncated": true + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:19" + }, + { + "view": "contextual", + "state": "available", + "typeId": "type:14" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:19" + }, + { + "view": "apparent", + "state": "available", + "typeId": "type:15" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:14", + "candidateState": "complete", + "semantic": { + "kind": "primitive", + "primitive": "bigint" + } + }, + { + "id": "type:15", + "candidateState": "truncated", + "reasons": [ + "apparent-type-outside-category" + ] + }, + { + "id": "type:19", + "candidateState": "complete", + "semantic": { + "kind": "literal", + "literal": "bigint", + "value": "7" + } + } + ], + "summary": { + "complete": 2, + "truncated": 1, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 9, + "proves": "contextual null-like value", + "expectedClassification": "supported", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 527, + "end": 531 + }, + "syntaxKind": "KindNullKeyword" + }, + "complete": false, + "recovered": true, + "truncated": false, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "inapplicable" + }, + "actual": { + "complete": true, + "id": "type:6", + "literal": null, + "members": [], + "state": "complete", + "truncated": false, + "typeKind": "null" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 527, + "end": 531 + }, + "syntaxKind": "KindNullKeyword" + }, + "oxcNodeId": 81, + "fact": { + "complete": false, + "recovered": true, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:5" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:5" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:5" + }, + { + "view": "declared", + "state": "inapplicable" + } + ], + "types": [ + { + "id": "type:5", + "candidateState": "complete", + "semantic": { + "kind": "null-like", + "nullLike": "null" + } + } + ], + "summary": { + "complete": 1, + "truncated": 0, + "unsupported": 0, + "error": 0 + } + } + }, + { + "factIndex": 10, + "proves": "out-of-category type remains explicit", + "expectedClassification": "unsupported", + "expectedCode": "object-outside-category", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 624, + "end": 635 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": false, + "id": "type:20", + "literal": null, + "members": [], + "state": "truncated", + "truncated": true, + "typeKind": "object" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 624, + "end": 635 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 94, + "fact": { + "complete": false, + "recovered": true, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:20" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:20" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:20" + }, + { + "view": "declared", + "state": "same-as-actual", + "typeId": "type:20" + } + ], + "types": [ + { + "id": "type:20", + "candidateState": "unsupported", + "reasons": [ + "unsupported-type-form" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 1, + "error": 0 + } + } + } + ], + "goOracle": { + "typescriptVersion": "7.1.0-dev", + "typescriptRevision": "1bcfa18d79a3be41772223d5c05dfe4480e614ff", + "diagnosticCount": 2, + "budgets": { + "limits": { + "maxTypeNodes": 256, + "maxTypeDepth": 16 + }, + "typeNodesUsed": 20, + "maxTypeDepthObserved": 1, + "truncated": false + } + }, + "rustProducer": { + "diagnosticCount": 1, + "maxTypeNodes": 256, + "typeNodesUsed": 20, + "truncated": false + }, + "roots": { + "factsWithAllFiveViews": 10, + "comparedRoots": 50, + "identityMatches": 50, + "available": 22, + "sameAsActual": 17, + "inapplicable": 5, + "unavailable": 6 + }, + "mapping": { + "facts": 11, + "mapped": 11, + "unmapped": 0, + "failedFiles": 0 + }, + "candidateStates": { + "complete": 15, + "truncated": 4, + "unsupported": 1, + "error": 0 + }, + "supportedRecords": 15, + "matchedSupportedRecords": 15, + "supportedCompatibilityPpm": 1000000, + "differences": [ + { + "category": "unsupported", + "code": "object-outside-category", + "expected": true, + "factIndex": 10, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "start": 624, + "end": 635 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "unsupported", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": true, + "truncated": false + }, + "occurrence": { + "file": "src/primitives.ts", + "span": { + "end": 635, + "start": 624 + }, + "syntaxKind": "KindIdentifier" + }, + "oxcNodeId": 94, + "roots": [ + { + "state": "available", + "typeId": "type:20", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:20", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:20", + "view": "apparent" + }, + { + "state": "same-as-actual", + "typeId": "type:20", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 0, + "truncated": 0, + "unsupported": 1 + }, + "types": [ + { + "candidateState": "unsupported", + "id": "type:20", + "reasons": [ + "unsupported-type-form" + ] + } + ] + }, + "explanation": "the fixture pins an out-of-category Rust observation" + } + ] + }, + { + "name": "recovery-budgets", + "facts": 3, + "request": { + "schemaVersion": 1, + "project": "tsconfig.json", + "requiredCapabilities": [ + "graph.references", + "limits.type-graph", + "occurrence.type-views", + "types.advanced", + "types.core-composite" + ], + "budgets": { + "maxTypeNodes": 128, + "maxTypeDepth": 2 + }, + "selections": 3 + }, + "repeatedRustOutputEqual": true, + "classifications": { + "supported": 0, + "unsupported": 0, + "budget": 0, + "mapping": 3 + }, + "selections": [ + { + "factIndex": 0, + "proves": "type-error recovery remains an explicit fact state", + "expectedClassification": "mapping", + "expectedCode": "oxc-parse-error", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 247, + "end": 256 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": false, + "id": "type:1", + "literal": null, + "members": [], + "state": "error", + "truncated": false, + "typeKind": "error" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 247, + "end": 256 + }, + "syntaxKind": "KindUnknown" + }, + "oxcNodeId": null, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:1" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:1" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:1" + }, + { + "view": "declared", + "state": "unavailable" + } + ], + "types": [ + { + "id": "type:1", + "candidateState": "error", + "reasons": [ + "oxc-parse-or-semantic-error" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 0, + "error": 1 + } + } + }, + { + "factIndex": 1, + "proves": "syntax-error recovery remains queryable", + "expectedClassification": "mapping", + "expectedCode": "oxc-parse-error", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 258, + "end": 264 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": false, + "id": "type:2", + "literal": null, + "members": [], + "state": "error", + "truncated": false, + "typeKind": "error" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 258, + "end": 264 + }, + "syntaxKind": "KindUnknown" + }, + "oxcNodeId": null, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:2" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:2" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:2" + }, + { + "view": "declared", + "state": "unavailable" + } + ], + "types": [ + { + "id": "type:2", + "candidateState": "error", + "reasons": [ + "oxc-parse-or-semantic-error" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 0, + "error": 1 + } + } + }, + { + "factIndex": 2, + "proves": "recursive advanced graph hits the configured depth budget", + "expectedClassification": "mapping", + "expectedCode": "oxc-parse-error", + "expectationMatched": true, + "goOracle": { + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 266, + "end": 270 + }, + "syntaxKind": "KindIdentifier" + }, + "complete": false, + "recovered": true, + "truncated": true, + "typeViewStates": { + "actual": "available", + "contextual": "unavailable", + "widened": "same-as-actual", + "apparent": "same-as-actual", + "declared": "same-as-actual" + }, + "actual": { + "complete": false, + "id": "type:3", + "literal": null, + "members": [], + "state": "truncated", + "truncated": true, + "typeKind": "object" + } + }, + "rustCandidate": { + "candidateVersion": 2, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 266, + "end": 270 + }, + "syntaxKind": "KindUnknown" + }, + "oxcNodeId": null, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "roots": [ + { + "view": "actual", + "state": "available", + "typeId": "type:3" + }, + { + "view": "contextual", + "state": "unavailable" + }, + { + "view": "widened", + "state": "same-as-actual", + "typeId": "type:3" + }, + { + "view": "apparent", + "state": "same-as-actual", + "typeId": "type:3" + }, + { + "view": "declared", + "state": "unavailable" + } + ], + "types": [ + { + "id": "type:3", + "candidateState": "error", + "reasons": [ + "oxc-parse-or-semantic-error" + ] + } + ], + "summary": { + "complete": 0, + "truncated": 0, + "unsupported": 0, + "error": 1 + } + } + } + ], + "goOracle": { + "typescriptVersion": "7.1.0-dev", + "typescriptRevision": "1bcfa18d79a3be41772223d5c05dfe4480e614ff", + "diagnosticCount": 2, + "budgets": { + "limits": { + "maxTypeNodes": 128, + "maxTypeDepth": 2 + }, + "typeNodesUsed": 14, + "maxTypeDepthObserved": 3, + "truncated": true + } + }, + "rustProducer": { + "diagnosticCount": 1, + "maxTypeNodes": 128, + "typeNodesUsed": 3, + "truncated": false + }, + "roots": { + "factsWithAllFiveViews": 0, + "comparedRoots": 0, + "identityMatches": 0, + "available": 0, + "sameAsActual": 0, + "inapplicable": 0, + "unavailable": 0 + }, + "mapping": { + "facts": 3, + "mapped": 0, + "unmapped": 3, + "failedFiles": 1 + }, + "candidateStates": { + "complete": 0, + "truncated": 0, + "unsupported": 0, + "error": 3 + }, + "supportedRecords": 0, + "matchedSupportedRecords": 0, + "supportedCompatibilityPpm": 0, + "differences": [ + { + "category": "mapping", + "code": "oxc-parse-error", + "expected": true, + "factIndex": 0, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 247, + "end": 256 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "mapping", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "end": 256, + "start": 247 + }, + "syntaxKind": "KindUnknown" + }, + "oxcNodeId": null, + "roots": [ + { + "state": "available", + "typeId": "type:1", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:1", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:1", + "view": "apparent" + }, + { + "state": "unavailable", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 1, + "truncated": 0, + "unsupported": 0 + }, + "types": [ + { + "candidateState": "error", + "id": "type:1", + "reasons": [ + "oxc-parse-or-semantic-error" + ] + } + ] + }, + "explanation": "the known recovery-file OXC parser gap is explicit and stable" + }, + { + "category": "mapping", + "code": "oxc-parse-error", + "expected": true, + "factIndex": 1, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 258, + "end": 264 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "mapping", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "end": 264, + "start": 258 + }, + "syntaxKind": "KindUnknown" + }, + "oxcNodeId": null, + "roots": [ + { + "state": "available", + "typeId": "type:2", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:2", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:2", + "view": "apparent" + }, + { + "state": "unavailable", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 1, + "truncated": 0, + "unsupported": 0 + }, + "types": [ + { + "candidateState": "error", + "id": "type:2", + "reasons": [ + "oxc-parse-or-semantic-error" + ] + } + ] + }, + "explanation": "the known recovery-file OXC parser gap is explicit and stable" + }, + { + "category": "mapping", + "code": "oxc-parse-error", + "expected": true, + "factIndex": 2, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "start": 266, + "end": 270 + }, + "syntaxKind": "KindIdentifier" + }, + "path": "classification", + "goOracle": "mapping", + "rustCandidate": { + "candidateVersion": 2, + "fact": { + "complete": false, + "recovered": false, + "truncated": false + }, + "occurrence": { + "file": "src/recovery.ts", + "span": { + "end": 270, + "start": 266 + }, + "syntaxKind": "KindUnknown" + }, + "oxcNodeId": null, + "roots": [ + { + "state": "available", + "typeId": "type:3", + "view": "actual" + }, + { + "state": "unavailable", + "view": "contextual" + }, + { + "state": "same-as-actual", + "typeId": "type:3", + "view": "widened" + }, + { + "state": "same-as-actual", + "typeId": "type:3", + "view": "apparent" + }, + { + "state": "unavailable", + "view": "declared" + } + ], + "summary": { + "complete": 0, + "error": 1, + "truncated": 0, + "unsupported": 0 + }, + "types": [ + { + "candidateState": "error", + "id": "type:3", + "reasons": [ + "oxc-parse-or-semantic-error" + ] + } + ] + }, + "explanation": "the known recovery-file OXC parser gap is explicit and stable" + } + ] + } + ], + "summary": { + "cases": 4, + "facts": 28, + "candidateRecords": 42, + "supportedRecords": 29, + "matchedSupportedRecords": 29, + "supportedCompatibilityPpm": 1000000, + "classifications": { + "supported": 20, + "unsupported": 4, + "budget": 1, + "mapping": 3 + }, + "differencesByCategory": { + "budget": 1, + "mapping": 3, + "semantic": 0, + "transport": 0, + "unsupported": 4 + }, + "unexplainedDifferencesByCategory": { + "budget": 0, + "mapping": 0, + "semantic": 0, + "transport": 0, + "unsupported": 0 + }, + "expectedDifferences": 8, + "blockingDifferences": 0 + }, + "passes": true + }, + "measurements": { + "scope": "one-shot Go process versus in-process Rust producer over identical ordered requests; characterization only", + "samples": [ + { + "ordinal": 1, + "cases": 4, + "goOracleNanoseconds": 486867126, + "rustProducerNanoseconds": 1284832, + "rustDeterminismCheckNanoseconds": 197668, + "totalNanoseconds": 490094084, + "goSnapshotBytes": 36799, + "rustCandidateBytes": 22615 + }, + { + "ordinal": 2, + "cases": 4, + "goOracleNanoseconds": 124067458, + "rustProducerNanoseconds": 598000, + "rustDeterminismCheckNanoseconds": 191250, + "totalNanoseconds": 125660750, + "goSnapshotBytes": 36799, + "rustCandidateBytes": 22615 + } + ], + "artifacts": { + "goExecutableBytes": 25670354, + "rustExecutableBytes": 3521008, + "peakOrCurrentControllerResidentBytes": 5226496, + "residentMeasurement": "macos-getrusage-peak", + "memoryScope": "Rust rollout controller including decoded Go snapshots; excludes child Go process RSS" + } + }, + "readiness": { + "readyForLaterAuthorityDecision": false, + "status": "not-ready", + "blockers": [ + "4 explicitly classified primitive/literal selections remain unsupported", + "3 recovery selections retain expected OXC mapping gaps", + "the Rust producer is not integrated into the serving path, so production fallback and rollback have not been exercised", + "runtime and output measurements compare a one-shot Go process with an in-process Rust shadow path; a production-equivalent boundary is not selected", + "controller RSS excludes the child Go process, so per-producer peak-memory parity is not established" + ] + }, + "passes": true +}