refactor(compiler)!: migrate SDK to minimal storage ISA
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good

Replace retired guards and publication opcodes with SDK checks, neutral TRAP and sequential List/Linked mutations with explicit failure phases. Preserve snapshot cursors and import schema 2 metadata with the delivered provider pin.

Include common/source/installed conformance, debug and release evidence, synchronized specs and the consolidated lesson. Runtime checkout remains unchanged.
This commit is contained in:
2026-10-24 01:35:42 +01:00
parent 77aada6259
commit 632ba6d0d6
51 changed files with 2688 additions and 711 deletions
@@ -44,10 +44,11 @@ references. Producer checks validate proven carrier facts; runtime admission
and execution remain authoritative for reference identity, session ownership,
platform availability and traps. Unsupported carrier tokens MUST fail explicitly.
Static intrinsic String facts MUST follow the provider verifier's String-only
mask: a proven null is rejected at load time. The dispatcher's acceptance of
null for the String ABI does not broaden that static rule. Random's static
reference mask includes null; native handle validity is still checked at runtime.
Intrinsic arguments MUST use each schema-2 entry's ordered nullable mask.
A proven null is admitted for hash.string's String slot; older String entries
remain non-nullable. Random nullable reference admission does not remove runtime
receiver/provenance checks. Do not infer nullable admission from carrier width,
name, determinism or a different entry using the same ABI atom.
Determinism MUST NOT be interpreted as purity. In particular, all Random calls
mutate guest state. Reachable calls cannot be removed, merged or reordered in a
@@ -57,6 +58,30 @@ base cost 4, cost 8 per attempt and a maximum of 64 attempts in the selected
contract. The runtime performs charging; Java metadata does not implement a
second scheduler or random algorithm.
## Schema 2 invocation and cost metadata
Every entry MUST preserve all 25 CSV columns, including schema_version=2,
arg_nullable, invocation_model, scratch_model, context_access, cost_arg_index and
cost_per_byte in addition to the original 18 fields. Nullable bits are lowercase
booleans in flattened argument order, exactly one per slot; zero arguments use
an empty mask. Numeric carriers cannot be nullable.
Supported coherent profiles are host_buffered_v1/existing_contract_v1/host,
vm_owned_v1/existing_contract_v1/vm_state and borrowed_inline_v1/none/none.
The borrowed profile requires its separately declared deterministic/nonallocating/
nonmutating effects; existing Host/VM entries do not acquire borrowed semantics.
Unsupported schemas, models, profiles and incoherent layouts, masks, indices or
cost parameters MUST fail explicitly.
Fixed costs have no argument index, zero per-byte/attempt cost and zero attempts.
random_rejection_v1 retains base 4, attempt cost 8 and at most 64 draws with the
VM-owned profile. argument_utf8_bytes_v1 selects String argument zero with the
borrowed profile, base 8, one cycle per UTF-8 byte and zero attempt fields. Empty
or null String costs base 8 and remains subject to that entry's nullable mask.
No consumer-side scheduler or hash implementation is added by importing metadata.
All 108 provider entries, including hash.i64/hash.float/hash.string, are represented;
metadata parity does not declare PBS hashing facades delivered.
## Constants
Builtin constants have their own lookup identity `(target, name, version)` and