Home /Modules/softlisten/SOFTLISTEN.md

SOFTLISTEN.md

lib/softlisten/SOFTLISTEN.md · 100 line(s) · markdown

softlisten — soft offers and soft listeners

People offer things to a running system: a document edit, an observer module, a vertical-integration tier. The consuming model has not agreed to them yet — maybe they are malicious, maybe they claim ties that do not exist, maybe the loader would refuse them today. A soft offer waits at a desk, changes nothing, and is ascertained by soft listeners until the consuming model agrees, declines, or the offerer withdraws.

sleela run lib/softlisten/softlisten-demo.sleela     # 81 self-checks

The lifecycle of an offer

begin() ──▶ fill in ──▶ submit() ──▶ assessed (waiting) ──▶ agree()    ──▶ applied through the observer / linker
                                          │  ▲                decline()  ──▶ closed
                                          │  └── reassess()   withdraw() ──▶ closed (offerer only)
                                          └── a document change re-checks every open offer (the desk is a listener)

agree() always re-assesses first, then applies. Nothing an offer says about itself is trusted at agreement time.

Offer kindApplied by agreement as
0 insert / 1 replace / 2 delete a lineSLDocumentObserver.edit(...) (the observer can still refuse)
3 moduleSLHotLinker.attachModule(...), then each claimed tie that names a live instance is linked for real; a failed tie detaches the instance
4 tierSLHotLinkIntegration.expand(...), then its ties

Findings and severity

SeverityMeaningAgreement
0 infosomething ran and was fine (preflight-ok)allowed
1 warnsuspicious but not disqualifyingonly if the agreer acknowledges warnings
2 holdnot agreeable yet; may clear when the world changesrefused
3 blockneverrefused

A hold is the "soft" part: the offer is neither good nor bad, it is not agreed for some reason, and the reason is recorded. Examples of holds that clear: a tie to an anchor the host has not registered yet, a full instance cap, a conflict with a line that has since changed, an unverified type the host has not permitted. A block does not clear.

The soft listeners (nested in SLSoftOfferDesk)

ListenerAscertainsFindings
Malicecontent that should not be agreeddeny-line, deny-token, reserved-offerer, empty-text, duplicate-offer, offer-flood, tokens-clipped
Tiesfalse tiesfalse-tie (names nothing known, hold), dead-tie (names a detached instance, block), undeclared-tie (the hot-link matrix does not declare that connection, block), self-tie, duplicate-tie, empty-tie, ties-clipped
Loaderloader issues, by a dry run of SLHotLinker.preflightunknown-type, wrong-contract, no-type-for-kind, no-port, port-name-mismatch, port-not-fresh, loader-permanent (block), loader-transient (hold), stack-full, preflight-ok
use-model (the desk itself)fit with the live documentconflict (the line changed since the offer was made), out-of-range, no-text

preflight is the same code attach runs, so the dry run cannot disagree with the real thing. It classifies a refusal as transient (cap reached, authorizer or digest not yet provided, unverified type not yet permitted) or permanent.

Soft listeners have a lifecycle too

Each can be paused, resumed, altered (level) and retired (final), like observer listeners:

LevelEffect
0 lenienta block is downgraded to a hold
1 normalas declared
2 stricta warn is upgraded to a hold

Fail closed: while a soft listener is paused or retired, every assessment carries a listener-unavailable hold, so an offer can never look clean merely because its checker was switched off. The deny lists can be extended at run time (addDenyToken, addDenyLine) and take effect on the next assessment.

Desk safety

Honest limits