feat(profiles): seal builtin import provenance and expose read-only editor imports

Retain the evaluated JSON launch entrypoint, seal observed builtin source bytes and digests as verified provenance, and fail on missing/corrupt dependencies without Runtime builtin reevaluation. Cover real HTTP commits and launch resolution, including worker mode and Workspace Config feature composition.

Expose read-only builtin import completions/diagnostics in the editor and rebuild wasm32 release assets with wasm-bindgen 0.2.117. Document public paths, ordinary composition, limits, resave semantics, and the lazy-cycle incident.

Validation: worker-runtime 344 library + 34 integration tests; workspace-server 609 library + 11 binary tests plus final builtin HTTP/launch tests (2); archive tests (16); native WASM tests (2); real-WASM/web tests (37), editor component tests (10); root cargo check, cargo fmt --all -- --check and git diff --check HEAD pass.
This commit is contained in:
2026-10-07 03:38:49 +09:00
parent 4343be86c1
commit f086cf3375
12 changed files with 986 additions and 29 deletions
@@ -89,6 +89,31 @@ Deno.test("completion starts only after non-whitespace typing", () => {
);
});
Deno.test("toolchain preserves read-only builtin import completion detail", () => {
const result = toCodeMirrorCompletion({
from: 8,
items: [{
label: "$builtin/profiles/companion.dcdl",
kind: "file",
detail: "read-only builtin Decodal source",
priority: 0,
}],
});
assert(result !== null, "builtin completion should be available");
assert(
result.options[0].label === "$builtin/profiles/companion.dcdl",
"builtin namespace must not become a workspace path",
);
assert(
result.options[0].detail === "read-only builtin Decodal source",
"CodeMirror must display the read-only completion detail",
);
assert(
result.options[0].type === "file",
"builtin imports remain file completions",
);
});
Deno.test("toolchain preserves WASM UTF-16 completion ranges for CodeMirror", () => {
const result = toCodeMirrorCompletion({
from: "let 名 = ".length,