Skip to content

Commit 64a0119

Browse files
committed
docs: converge post-migration product contracts
1 parent e412310 commit 64a0119

11 files changed

Lines changed: 143 additions & 113 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
exit 1
4343
}
4444
EXPECTED="${GITHUB_REF_NAME#v}"
45-
for PACKAGE in rsscript-cli reir; do
45+
for PACKAGE in rsscript-cli; do
4646
ACTUAL="$(cargo metadata --locked --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"$PACKAGE\") | .version // empty")"
4747
[ -n "$ACTUAL" ] || {
4848
echo "::error::release package $PACKAGE does not exist"
@@ -60,14 +60,6 @@ jobs:
6060
cargo clippy --locked --workspace --all-targets -- -D warnings
6161
cargo test --locked --workspace --all-targets
6262
63-
- name: Validate native JIT
64-
run: cargo nextest run --locked -p rsscript-sdk --features native-jit --no-fail-fast
65-
66-
- name: Validate generated backend parity
67-
run: |
68-
RSSCRIPT_FULL_BACKEND_PARITY=1 cargo test --locked -p rsscript-sdk --test runtime -- --test-threads=1
69-
RSSCRIPT_FULL_BACKEND_PARITY=1 cargo test --locked -p rsscript-sdk --test differential -- --test-threads=1
70-
7163
release-build:
7264
needs: [release-validation]
7365
name: Build ${{ matrix.target }}
@@ -104,10 +96,8 @@ jobs:
10496
SUFFIX: ${{ matrix.suffix }}
10597
run: |
10698
cargo build --locked --frozen --release --target "$TARGET" --bin rss -p rsscript-cli --features host-tools
107-
cargo build --locked --frozen --release --target "$TARGET" --bin reir -p reir
10899
mkdir -p dist
109100
cp "target/$TARGET/release/rss$SUFFIX" "dist/rss-$TARGET$SUFFIX"
110-
cp "target/$TARGET/release/reir$SUFFIX" "dist/reir-$TARGET$SUFFIX"
111101
PYTHON="$(command -v python3 || command -v python)" || {
112102
echo "::error::Python 3 is required to create portable checksums"
113103
exit 1
@@ -120,7 +110,6 @@ jobs:
120110
rustc -Vv
121111
} > "dist/BUILD-INFO-$TARGET.txt"
122112
"dist/rss-$TARGET$SUFFIX" --help >/dev/null
123-
"dist/reir-$TARGET$SUFFIX" --help >/dev/null
124113
"$PYTHON" - "$TARGET" "$SUFFIX" <<'PY'
125114
import hashlib
126115
import pathlib
@@ -130,7 +119,6 @@ jobs:
130119
directory = pathlib.Path("dist")
131120
names = [
132121
f"rss-{target}{suffix}",
133-
f"reir-{target}{suffix}",
134122
f"BUILD-INFO-{target}.txt",
135123
]
136124
lines = []
@@ -173,14 +161,12 @@ jobs:
173161
grep -Fx "commit=$GITHUB_SHA" "$INFO"
174162
done
175163
test "$(find . -maxdepth 1 -type f -name 'rss-*' | wc -l)" -eq 3
176-
test "$(find . -maxdepth 1 -type f -name 'reir-*' | wc -l)" -eq 3
177164
178165
- name: Attest build provenance
179166
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
180167
with:
181168
subject-path: |
182169
dist/rss-*
183-
dist/reir-*
184170
dist/BUILD-INFO-*.txt
185171
dist/SHA256SUMS-*
186172

Cargo.lock

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/rsscript-sdk/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ rsscript-build-support = { path = "../rsscript-build-support" }
7272
[dev-dependencies]
7373
base64 = "0.22"
7474
jsonschema = { version = "0.49", default-features = false }
75-
reir = { path = "../../experiments/reir" }
7675
rsscript-abi-model = { path = "../rsscript-abi-model" }
77-
rsscript-review-reir = { path = "../../experiments/rsscript-review-reir" }
7876
rsscript-mir = { path = "../rsscript-mir", features = ["conformance"] }
7977
sha1 = "0.10"
8078
proptest = "1"

crates/rsscript-sdk/tests/architecture.rs

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,29 @@ fn root_workspace_excludes_experimental_packages() {
420420
}
421421
}
422422

423+
#[test]
424+
fn sdk_development_closure_does_not_compile_experimental_integrations() {
425+
let root = workspace_root();
426+
let manifest = read(&root.join("crates/rsscript-sdk/Cargo.toml"));
427+
let lockfile = read(&root.join("Cargo.lock"));
428+
let dev_dependencies = manifest
429+
.split("[dev-dependencies]")
430+
.nth(1)
431+
.and_then(|section| section.split("[[test]]").next())
432+
.expect("SDK manifest must contain a bounded dev-dependency section");
433+
434+
assert!(
435+
!dev_dependencies.contains("../../experiments/"),
436+
"the SDK test closure must not pull experiments; integration tests belong to the experiments workspace"
437+
);
438+
for package in ["name = \"reir\"", "name = \"rsscript-review-reir\""] {
439+
assert!(
440+
!lockfile.contains(package),
441+
"Core lockfile must not retain SDK-only experimental package `{package}`"
442+
);
443+
}
444+
}
445+
423446
#[test]
424447
fn research_fixtures_are_owned_by_the_experiments_boundary() {
425448
let root = workspace_root();
@@ -2147,24 +2170,18 @@ fn native_package_dependency_model_is_not_owned_by_aot_lowering() {
21472170
.contains("rsscript_package_review::package_sources_with_dependency_interfaces"),
21482171
"compiler source-list compatibility must delegate presentation to the package-review boundary"
21492172
);
2150-
let mut remaining_compiler_package_files = std::fs::read_dir(
2151-
root.join("crates/rsscript-compiler/src/package"),
2152-
)
2153-
.expect("compiler package directory")
2154-
.map(|entry| {
2155-
entry
2156-
.expect("compiler package entry")
2157-
.file_name()
2158-
.into_string()
2159-
.expect("UTF-8 compiler package filename")
2160-
})
2161-
.collect::<Vec<_>>();
2162-
remaining_compiler_package_files.sort();
2163-
assert_eq!(
2164-
remaining_compiler_package_files,
2165-
vec!["authorization.rs", "metadata.rs", "native.rs"],
2166-
"compiler package compatibility may retain only authorization, legacy lowering metadata, and trusted native-wrapper adapters"
2167-
);
2173+
for forbidden in [
2174+
"package::review",
2175+
"package::policy",
2176+
"package::source_set",
2177+
"package::graph",
2178+
"package::lock",
2179+
] {
2180+
assert!(
2181+
!package_module.contains(forbidden),
2182+
"compiler package compatibility must not expose retired `{forbidden}` behavior"
2183+
);
2184+
}
21682185
for removed in ["mod policy;", "mod review;", "mod source_set;"] {
21692186
assert!(
21702187
!package_module.contains(removed),
@@ -5797,8 +5814,12 @@ fn github_workflows_follow_current_workspace_boundaries() {
57975814
}
57985815

57995816
let release = read(&workflow_dir.join("release.yml"));
5800-
assert!(release.contains("for PACKAGE in rsscript-cli reir"));
5801-
assert!(!release.contains("for PACKAGE in rsscript reir"));
5817+
assert!(release.contains("for PACKAGE in rsscript-cli; do"));
5818+
assert!(!release.contains("for PACKAGE in rsscript-cli reir"));
5819+
assert!(
5820+
!release.contains("Validate native JIT") && !release.contains("--bin reir -p reir"),
5821+
"the Core release path must not validate or package experimental backends"
5822+
);
58025823
for target in [
58035824
"x86_64-unknown-linux-gnu",
58045825
"aarch64-apple-darwin",

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When documents disagree, use this order:
2626
| [releasing.md](releasing.md) | Multi-platform binaries, dry-run, provenance, and SDK distribution |
2727
| [package.md](package.md) | Implemented package artifacts, commands, review model, and trust boundary |
2828
| [architecture/ARCHITECTURE.md](architecture/ARCHITECTURE.md) | Module ownership and dependency rules |
29-
| [architecture/migration-baseline.md](architecture/migration-baseline.md) | Review convergence TODO, migration invariants, and mechanical exit criteria |
29+
| [architecture/migration-baseline.md](architecture/migration-baseline.md) | Historical migration evidence and retained regression fixtures |
3030
| [development/DEVELOPMENT.md](development/DEVELOPMENT.md) | Local development and verification |
3131
| [development/DOCKER.md](development/DOCKER.md) | Containerized development |
3232
| [self-hosting.md](self-hosting.md) | Experimental self-hosting goal, current coverage, and validation contract |
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ADR 0226: Post-migration product contracts
2+
3+
- Status: Accepted
4+
- Date: 2026-08-16
5+
6+
## Context
7+
8+
The compiler-purity migration is complete. Keeping migration adapters, two
9+
bytecode directions, and experimental backends indefinitely in the normal
10+
product path would make every future change pay compatibility and backend costs
11+
that ordinary embedders do not need.
12+
13+
## Decisions
14+
15+
1. The Core product path is immutable capture, frontend validation, typed MIR,
16+
`rsscript.bytecode.v1`, verification, host admission, Provider linking, and
17+
bounded VM or isolated-runner execution.
18+
2. `rsscript.bytecode.v2` is a bounded numeric verifier prototype. It has no VM
19+
execution path, writer, or public deployment promise until a follow-up ADR
20+
defines its complete cutover: emitter, verifier, VM decoder, SDK/CLI use,
21+
v1 read-only fixtures, and v1 writer removal.
22+
3. The runner profile is a host-owned deployment object. It selects installed
23+
Providers, limits, admission, and isolation controls. It does not take part
24+
in parsing, type checking, lowering, or Artifact identity. Its non-secret
25+
identity and descriptor digest are execution evidence.
26+
4. Artifact digests establish content integrity and provenance binding. Origin
27+
authentication remains an optional `ArtifactAdmissionPolicy` responsibility;
28+
no signing hierarchy or language-level authorization system is introduced.
29+
5. AOT, JIT, REIR, native plugins, and self-hosting are external experimental,
30+
integration, or research consumers. They may depend on stable Core contracts
31+
but must not be selected by default SDK, VM, CLI, or release validation.
32+
6. Compatibility APIs are transitional. New code uses canonical SDK modules and
33+
`WireValue`; compatibility stays explicitly feature-gated while the removal
34+
corpus is migrated.
35+
36+
## Consequences
37+
38+
The active engineering goal is contraction: remove compatibility call paths and
39+
experimental reverse dependencies before adding syntax, providers, bytecode
40+
formats, or backends. The completed migration checklist remains historical
41+
evidence; durable invariants belong in architecture tests and ADRs.

docs/compatibility.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
RSScript publishes four independent versioned contracts. Compatibility is
44
checked before Provider linking or execution.
55

6+
The language specification filename is a document revision, not a fifth runtime
7+
version. `RSScript_v0.7_Spec.md` is currently the normative text for the
8+
`0.1.x` language-semantics line below; Artifact, runtime, and Provider versions
9+
remain independent compatibility contracts.
10+
611
| Contract | Current line | Compatibility rule |
712
| --- | --- | --- |
813
| Language | `0.1.x` | A compiler/runtime accepts only its own pre-1.0 minor line. |

docs/development/DEVELOPMENT.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Development Rules
22

3-
RSScript development is spec-first and self-hosted-validation-driven. The goal is not to
4-
accumulate many small fixtures; the goal is to make the language capable of
5-
reviewing and eventually implementing its own core tooling.
3+
RSScript development is spec-first and product-contract-driven. The goal is not
4+
to accumulate fixtures or backend experiments; it is to keep one small,
5+
deterministic compilation and execution path correct and auditable.
66

77
## Implementation Discipline
88

@@ -13,12 +13,12 @@ reviewing and eventually implementing its own core tooling.
1313
the feature. Do not encode a one-off lowering shortcut, fixture-only bypass,
1414
or runtime fallback that preserves a different language model.
1515

16-
2. Treat self-hosted validation and implementation as one loop.
16+
2. Treat self-hosted validation as Research evidence, not as a product driver.
1717

18-
A useful self-hosted validation file should model a real RSScript tool concern: review-map
19-
classification, diagnostics, package contract review, source-map remapping,
20-
lowering facts, or package risk. If self-hosted validation reveals an unsupported shape, fix
21-
the parser/checker/lowering/runtime layer that is actually missing.
18+
A useful self-hosted validation file may model a real RSScript tool concern:
19+
diagnostics, source-map remapping, lowering facts, or package analysis. It
20+
must not expand source syntax, Core ABI, or the formal release path merely to
21+
improve self-host parity.
2222

2323
3. Do not treat unknown as safe.
2424

@@ -64,10 +64,9 @@ reviewing and eventually implementing its own core tooling.
6464
semantic boundaries.
6565
3. Rust lowering, source maps, and rustc diagnostic remapping for already
6666
supported source constructs.
67-
4. Self-hosted validation programs that implement RSScript review/package/diagnostic logic in
68-
RSScript and keep review-map unknown low.
69-
5. Review map and semantic diff quality.
70-
6. Package manager surface area after the underlying language behavior is hard.
67+
4. Semantic-fact and execution-report quality.
68+
5. Provider conformance and isolated-runner boundary hardening.
69+
6. Research validation only when it protects an existing Core invariant.
7170

7271
## Testing Loop
7372

@@ -80,7 +79,7 @@ set process-wide JIT configuration.
8079
docker compose run --rm dev cargo test -p rsscript-compiler --no-run
8180
docker compose run --rm dev cargo test -p rsscript-compiler
8281
docker compose run --rm dev cargo clippy -p rsscript-sdk --tests -- -D warnings
83-
docker compose run --rm dev cargo test -p rsscript-compiler --features native-jit --no-run
82+
docker compose run --rm dev cargo test --manifest-path experiments/Cargo.toml -p vm-jit --no-run
8483
```
8584

8685
If a broad target fails, run the specific failing test while editing. After the
@@ -114,7 +113,7 @@ Before committing a semantic change, run the full local gate:
114113

115114
```sh
116115
docker compose run --rm dev cargo clippy -p rsscript-sdk --tests -- -D warnings
117-
docker compose run --rm dev cargo test -p rsscript-compiler --features native-jit --no-run
116+
docker compose run --rm dev cargo test --manifest-path experiments/Cargo.toml -p vm-jit --no-run
118117
docker compose run --rm dev cargo test -p rsscript-compiler
119118
git diff --check
120119
```

docs/releasing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Supported binary targets are:
1111

1212
| Target | Runner | Assets |
1313
| --- | --- | --- |
14-
| `x86_64-unknown-linux-gnu` | Ubuntu 24.04 | `rss`, `reir` |
15-
| `aarch64-apple-darwin` | macOS 14 | `rss`, `reir` |
16-
| `x86_64-pc-windows-msvc` | Windows 2025 | `rss.exe`, `reir.exe` |
14+
| `x86_64-unknown-linux-gnu` | Ubuntu 24.04 | `rss` |
15+
| `aarch64-apple-darwin` | macOS 14 | `rss` |
16+
| `x86_64-pc-windows-msvc` | Windows 2025 | `rss.exe` |
1717

18-
Tags must exactly match the `rsscript-cli` and `reir` Cargo versions. Accepted
18+
Tags must exactly match the `rsscript-cli` Cargo version. Accepted
1919
forms are `vX.Y.Z`, `vX.Y.Z-alpha.N`, `vX.Y.Z-beta.N`, and `vX.Y.Z-rc.N`.
2020
Pre-release tags are marked as GitHub pre-releases and never become `latest`.
2121

docs/roadmap.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,28 @@ language specification and tests remain authoritative for existing behavior.
2727
Cargo metadata tests now reject any VM dependency on compiler, syntax,
2828
semantics, or lowering internals.
2929

30-
## Current priority: conformance and boundary hardening
31-
32-
The checked migration baseline and package maturity inventory live in
33-
[`architecture/migration-baseline.md`](architecture/migration-baseline.md) and
34-
[`architecture/workspace-tiers.toml`](architecture/workspace-tiers.toml).
35-
The baseline's **Review convergence TODO** is the authoritative itemized
36-
checklist and defines the mechanical completion criteria for this migration.
37-
38-
1. Preserve the checked diagnostics, Artifact, execution, cancellation, and
39-
Provider baselines while responsibilities move.
40-
2. Move remaining ownership/resource/call checks behind the semantic query
41-
boundary. Immutable snapshots, `SemanticDatabase`, `AnalysisResult`, and
42-
`ValidatedProgram` are now owned by `rsscript-semantics`.
43-
3. Continue reducing compatibility-crate API and crate-wide lint exceptions.
44-
4. Extend the query-level language-service cache only with measured editor
45-
workloads; formatting, lint, symbols, dependency discovery, and semantic
46-
diagnostics now invalidate independently.
47-
5. Use the exact reachable-value live-memory metric and cumulative allocation
48-
quota together in workload tuning; extend the model only when a new VM-owned
49-
value kind is introduced. Provider-owned memory remains Provider telemetry.
50-
6. Promote a feature only through the maturity matrix; do not add syntax while a
51-
Core row remains partial.
30+
## Current priority: product-contract convergence
31+
32+
The compiler-purity migration is complete. Its checked baseline is retained as
33+
historical evidence, not as the active roadmap. The active work is to make the
34+
existing Core path smaller, explicit, and usable without exposing migration
35+
adapters.
36+
37+
1. Retire compatibility-only SDK and Provider paths behind an announced,
38+
tested removal plan. New embedding and Provider examples must use canonical
39+
`WireValue` APIs only.
40+
2. Keep experiments one-way consumers of Core contracts. AOT, JIT, REIR, and
41+
self-hosting must not become default SDK, VM, CLI, or release dependencies.
42+
3. Make one bytecode contract executable at a time. `rsscript.bytecode.v2` is a
43+
verifier-only prototype until an ADR-defined VM cutover; v1 remains the sole
44+
deployed execution schema.
45+
4. Keep host deployment choices outside language validity and Artifact identity.
46+
The runner's host-selected profile performs admission, Provider installation,
47+
limits, and isolation; its non-secret identity is recorded in the response.
48+
5. Maintain a short golden path: capture, build, verify, inspect, default
49+
isolated run, and machine-readable execution report.
50+
6. Promote any feature only through the maturity matrix and measured workloads;
51+
do not add syntax while a Core row remains partial.
5252

5353
## Frozen scope
5454

0 commit comments

Comments
 (0)