Sley

Sley 2 Technical Brief

Sley 2 Technical Brief

Typed machine-native program state for machines, with human governance, deterministic identity, and proposal-validated transactions. Active pre-release 2.0.0-alpha.0 - no GA, no tag, no package is claimed.

What Sley 2 is

Typed machine-native program state - not canonical human source

Sley 2 programs are created, stored, changed, executed, tested, versioned, and exchanged as typed semantic state. The canonical program form is SSMC1, the canonical encoding is SCB1, and the designated machine-interface lineage is SMP1 (architecturally frozen, not claimed implemented). Machines construct and validate state mutations; humans govern through projections, inspection, policy, evidence, objectives, and acceptance - without requiring the canonical machine representation itself to be comfortable human source code.

Thesis: Machines do not write source. They mutate verified program state. Machine Native. Human Governed.

  • No human-readable canonical source, no source parser, no canonical text format, no conventional formatter, no conventional LSP, no Sley 1.x compatibility - intentionally.
  • Human-readable projections, diagnostics, receipts, evidence capsules, and inspection surfaces exist - but they are derived, not canonical.

Representation - SSMC1 / SCB1

SSMC1 is the canonical typed entity/opcode schema (frozen by S20-200). SCB1 is the only canonical byte encoding for objects, roots, transactions, candidates, receipts, packs, and declared protocol payloads - strict, minimal, domain-separated via BLAKE3, with independent oracle conformance (S20-130).

  • 18 entity kinds and 16 primitive classes generate 179 immutable mutation descriptors (exact-manifest codegen, S20-340).
  • All 16 ConstData variants, five terminators, and sixteen mutation classes are exercised by independent value/candidate corpora (170 accepted + 22 rejected values; 1 accepted + 14 rejected candidates).
  • Low-level ScbValueCursor exposes the frozen primitive decoder without selecting schema or mutation type.

Identity and storage

Immutable object storage with typed identifiers, schema epochs, deterministic state roots, and uncompressed repository object/root packs (M1 complete: S20-100 through S20-170).

  • Immutable write/verify/promote, tamper detection, and exact root reconstruction independent of binding order.
  • Round-trip import preflights the complete pack before promotion; refs/transactions remain separate until S20-540 clone-equivalent exchange.
  • Retention snapshots, dry-run reports, and exclusive-guarded GC preserve all roots/leases (S20-180).

Change lifecycle - proposal → validation → transaction

State → Proposal → Validation → Transaction → Verified State

  1. State: begin from a verified deterministic StateRoot.
  2. Proposal: construct a proposal-only SLEYCAN1 candidate from closed host values - 179 discriminants, contiguous ordinals, deterministic creation IDs, frozen validation-profile ID, digest trailer.
  3. Validation: fourteen-phase restricted validator owns every outcome (pure apply, reference, type, CFG, effect, policy, capability, contract, test, root judgments).
  4. Transaction: durable atomic commit with fresh revalidation, 19-field parent-bound transaction, 9-field receipt, object/receipt-before-head ordering, and fixed-head compare-and-swap.
  5. Verified State: new StateRoot with deterministic ancestry and maintenance-coordinated refs.

Semantic operation entities are explicitly not yet analyzed - candidates within the restricted executable-operation-free subset pass; others fail closed by design.

Semantic checks - the restricted validation profile

  • Deterministic core type checking (S20-210), bounded CFG + value-use validation (S20-220), exact least-fixed-point effect closure + static scope typing (S20-230).
  • Restricted epoch-1 contract/test profile with deterministic policy-incomplete planning (S20-240) - six unmodeled entity bodies remain a full-GA blocker.
  • Deterministic TypeDef/Function fingerprints, canonical value hash, and exact impact relationships for 12 modeled kinds (S20-250).
  • Five-realm rejection and stale-preimage/digest matrices are pinned; Rust consumes Python-produced bytes and exact error codes.

Execution - restricted deterministic VM

Sley 2 already contains a bounded deterministic execution path for the implemented semantic subset - not a complete runtime.

  • Restricted O0 lowering for all five terminators and three validated Boolean opcodes with exact derived bytes and root/profile-bound cache key (S20-260).
  • Deterministic execution with exact Boolean semantics, bounded fuel/value/output/cancellation, and canonical observation digest (S20-270).
  • Eight restricted request-owned reference adapter fixtures with exact identity/state/replay/limit/atomicity/transcript rules (S20-280); VM adapter opcodes and live host access remain gaps.
  • Restricted execution/test report envelopes that verify observations without claiming persistence, policy finality, or M2 exit (S20-290).

Authority - policy roots and capability tokens

  • Protected policy root: separately registry-authorized, with opaque principals, principal-specific grants, protected entity bindings, and mandatory test/contract finalization (S20-370). No self-authorization.
  • Local capability tokens: exact root/effect/scope/adapter/budget binding, keyed BLAKE3 authentication, caller-owned replay/budget ledger (S20-380).
  • Authorized reference-adapter wrapper enforces fixture atomicity; VM adapter opcodes, candidate admission, and live-runtime authority remain blocked.
  • Deterministic authority checks are explicit - no live provider/shell/network/deployment authority is implied.

Versioned state - native branch refs and ancestry

Native S20-500 refs are landed - not future work. Inspect crate code, tests, and docs/WORK_PACKAGES.md as authority over prose.

  • Immutable branch origins, lowercase-ASCII names, digest-keyed confined layout, idempotent create, verified mutable refs.
  • Compare-and-swap advancement only from direct parent, with exact stale/parent/workspace errors; deterministic bounded ancestry.
  • Shared/exclusive GC maintenance ownership with owned-stage recovery and fan-out retries.
  • Explicitly not implemented: merge, force-reset, rename, symbolic refs, tags, branch deletion, pack-exchange clone, named-branch candidate commit.

Evidence: 28 focused native ref tests + 5 verified-revision tests, 64 repository tests, 19 active transaction tests, plus ancestry convergence/cycle/limit adversarial and create/advance & GC races.

Human governance - projections, diagnostics, receipts, evidence

  • Restricted queries: SLEYIDX1 snapshot + four typed queries over freshly derived snapshots, exact QueryId/response records, hard-fail on omission (S20-310). Nineteen root-backed classes remain blocked.
  • Evidence capsule: restricted complete-query capsule with raw-ID dictionaries and direct-edge tables, fixed no-omission/no-truncation/no-continuation (S20-320). Not the master ContextCapsule.
  • Readable projections, diagnostics, receipts, observation digests, and deterministic error behavior - engineering evidence, not formal proof of correctness.
  • Independent oracle/conformance fixtures, persistent libFuzzer targets, malformed-input testing, and fail-closed public-safety checks across concerns.

Current completion boundary

What is implemented · restricted · unfinished · release-blocking

Implemented (bounded)

  • SCB1, SSMC1 schema, identifiers, independent oracle, immutable store, deterministic roots, packs, retention/GC coordination
  • Type, CFG, value-use, effect closure, restricted contracts, fingerprints, lowering/VM subset, adapters (fixtures), report envelopes, snapshot/queries/capsules
  • Proposal-only candidate construction, 14-phase validator, atomic transactions + receipts, protected policy, capability tokens, native branches

Restricted-profile

  • Execution limited to Boolean/terminator subset; contracts limited to epoch-1; queries limited to four complete types over opaque snapshots
  • Adapter fixtures only (no live host); policy is registry-authorized but not live-transitioned; transactions are for the operation-free subset
  • Branches are native refs without merge/clone/production recovery

Unfinished · release-blocking

  • 52 opcode families, generics, VM adapter opcodes, live authority, provider/shell/network, SMP1 framing, JSON bridge, CLI protocol
  • Complete semantic-operation analysis, full query/capsule surface, production crash-matrix implementation (S20-530: 100-row contract frozen, not implemented)
  • S20-710: operator-approved proprietary license text, standards SBOM, release provenance, re-anchored scan, Argus/Vulcan dispositions
  • Benchmarks, S20-610 raw-baseline trials, and M6 GA gates - `make v2` remains the authoritative full gate

For exact package detail, see docs/WORK_PACKAGES.md and ARCHITECTURE.md. Do not trust prose that disagrees with landed crate code.

Status: M0 complete · M1 core complete · M2 actively advancing · later release/GA work incomplete. Active pre-release engineering - substantial running implementation, not a research idea; not a released production language.