Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions docs/adr/0019-compute-primitive-literals-independently-in-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ byte-identical.

The executable shadow threshold is at least 15 complete supported records,
1,000,000 parts-per-million structured agreement, and zero semantic,
transport, or mapping differences. The tagged baseline contains 11 facts: 10
supported facts plus one named unsupported object, 50 compared roots with 50
identity matches, and 11 exact OXC mappings. Expected apparent-type truncation
and unsupported states remain visible outside the supported denominator.
transport, or unexplained mapping differences. The expanded tagged baseline
contains 28 classified facts: 20 supported, four named unsupported, one budget,
and three expected recovery-file mapping facts. It compares 29 supported graph
records and 100 roots with exact identity agreement. Twenty-five facts map to
typed OXC nodes; the three unmapped facts retain the stable `oxc-parse-error`
classification. Expected unsupported, budget, and mapping states remain visible
outside the supported denominator, and the full report must be byte-identical
across repeated runs.

This producer remains an internal shadow implementation. The Go checker stays
the semantic authority and production fallback. No TS7 producer protocol,
Expand All @@ -65,8 +69,9 @@ part of this decision.
- Primitive/literal conformance now measures independently computed Rust/OXC
semantics instead of a Go-graph projection.
- The narrow category has deterministic source-to-record and graph-identity
evidence, including contextual literals, literal unions, unsupported forms,
and budget truncation.
evidence, including declarations and expressions, widening, `as const`,
`satisfies`, contextual literals, literal unions, null-like values, imports,
enum-like values, unsupported forms, and budget truncation.
- Graph inspection continues to describe Go responses; it no longer embeds a
misleading projected Rust candidate.
- Passing this shadow gate does not itself authorize a production authority
Expand Down
5 changes: 3 additions & 2 deletions docs/porting/migration-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ fallback behavior remain Go-authoritative.
8. `./internal/oxc_reference/run-evidence.sh --output <path>` produces stable
repeated observations and passes ADR-0016's occurrence/attachment gate.
9. `./internal/oxc_reference/run-conformance.sh --output <path>` emits the
deterministic ADR-0019 report and fails on any semantic, transport, or
mapping mismatch while retaining named unsupported and budget cases.
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.

## Upstream synchronization

Expand Down
20 changes: 12 additions & 8 deletions internal/oxc_reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,21 @@ Run the deterministic Go-versus-Rust shadow conformance gate with:
--output /tmp/ts7-rust-conformance.json
```

The command runs the same corpus through the Go oracle and the version-2 Rust
primitive/literal candidate. Rust derives its records independently from the
The command runs every explicitly classified primitive/literal corpus fixture
through the Go oracle and the version-2 Rust producer using the internal
version-2 candidate schema. Rust derives its records independently from the
project source and OXC semantic nodes; the Go graph is supplied only to the
comparator. Its JSON compares fact identity, exact OXC mapping, all five roots,
response-local graph identity through a Go-to-Rust ID bijection, structured
payloads, recovery, unsupported states, and truncation. Every entry is
classified as `semantic`, `transport`, `mapping`, `unsupported`, or `budget`.
Unexplained
semantic, transport, or mapping differences fail the command; named
unsupported and budget cases remain separately reported. The gate is a shadow
comparison and does not change the producer or production routing. See
payloads, recovery, unsupported states, and truncation. Every selected fixture
contains a structured Go expectation and exactly one Rust classification:
`supported`, `unsupported`, `budget`, or `mapping`. The three recovery-file
facts remain individually visible as expected `oxc-parse-error` mapping gaps.
Unexplained semantic, transport, or mapping differences fail the command;
expected unsupported, budget, and mapping cases remain separately reported.
The wrapper executes the complete report twice and requires byte-identical
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).

The first test suite applies the Rust implementation of the portable contract
Expand Down
Loading