Home /Modules/hotlink/HOTLINK.md

HOTLINK.md

lib/hotlink/HOTLINK.md · 120 line(s) · markdown

hotlink — the hot-link matrix and its backing model

Which types of class may join a running system, how they arrive, who may bring them, and what they may be connected to. The matrix is declared in XML (hotlink-matrix.xml) against an XML Schema (hotlink-matrix.xsd), and enforced by the SLeeLa model in this folder. A connection that the matrix does not declare is refused.

tools/validate_hotlink_matrix.py          # schema + cross-field rules + drift check
sleela run lib/hotlink/hotlink-demo.sleela  # 102 self-checks of the backing model

Reading the schema

Each <classType> answers five questions:

AttributeQuestionValues
codeArrivalHow does the code arrive?linked (compiled in, linked at start) · native (host-authorized plugin)
instanceArrivalMay an instance join while running?hot · cold (only from program start)
contractHow does it talk to the host?port (observer mailbox) · compartment (vertical-integration tier) · native-abi
minTrust / maxInstancesWho may bring it, and how many?trust 0 anonymous, 1 worker, 2 executive · 1..64
gatesWhich safeguards guard it?audit trust-floor instance-cap fanout-cap cycle-free quarantine hop-limit depth-cap revision-check authorizer digest-pin

plus status (verified = exercised by a passing self-check, declared = enforced but not yet exercised end to end, unverified = depends on something the committed toolchain lacks), requiresAuthorizer, digestPolicy (none · host-pinned) and, for compartments, kindFirst/kindLast, the SLIntegrationKind ordinals the type realises.

Each <link> declares one permitted connection: from → to, a mode (feed moves value, subscribe receives events, contain nests), and a maxFanout.

The standard matrix

Class typeCodeInstanceContractTrustMaxKindsStatus
observer.responderlinkedhotport114—verified
vi.nested-modellinkedhotcompartment240verified
vi.onionlinkedhotcompartment181verified
vi.engineering-baylinkedhotcompartment182verified
vi.triallinkedhotcompartment183verified
vi.newton-traylinkedhotcompartment184verified
vi.plainlinkedhotcompartment1165–16verified
native.extensionnativehotnative-abi22—unverified
extends.modulelinkedcoldport114—declared

How the types connect

native.extension ──feed──▶ observer.responder ──feed──▶ vi.plain
                                              ├─feed──▶ vi.onion
                                              ├─feed──▶ vi.engineering-bay ──feed──▶ vi.trial ──feed──▶ vi.newton-tray
                                              ├─feed──▶ vi.trial
                                              └─feed──▶ vi.newton-tray

vi.nested-model ──contain──▶ vi.nested-model (self, different instances)
                ├─contain──▶ vi.plain
                └─contain──▶ vi.engineering-bay

extends.module   (cold: no links; refused while running)

The backing model

ClassRole
SLHotLinkRowOne matrix row (data).
SLHotLinkMatrixRows and links, validated as added; standard() seeds the XML's matrix and seals it.
SLHotLinkerThe gate for instances (attach, attachModule, detach) and connections (linkPair, unlinkPair).
SLHotLinkIntegrationGrows a vertical-integration stack through the linker (expand) and moves value only along approved connections (deposit, feed).

What the linker enforces (fail closed, every refusal audited)

Vocabulary and ranges; a native row must be native-abi, require the authorizer and be host-pinned; compartment rows need a kind range that no other row covers; links join hot types only; no type-level cycle; a self-link must be contain.

Honest limits

Keeping XML and code together

SLHotLinkMatrix.standard() is the executable copy of hotlink-matrix.xml. tools/validate_hotlink_matrix.py validates the XML against the schema (xmllint, if installed), applies the cross-field rules the schema cannot express, and fails if the rows or links differ from standard().

Authoring notes

connect and sealed are reserved in SLeeLa 3.0 (a Munction built-in and a Java-style modifier), so the model uses linkPair and frozen.