feat!: implement vine forwarding core + all five transports (e2e) - #2
Open
cldmv-bot[bot] wants to merge 3 commits into
Open
feat!: implement vine forwarding core + all five transports (e2e)#2cldmv-bot[bot] wants to merge 3 commits into
cldmv-bot[bot] wants to merge 3 commits into
Conversation
Shinrai
force-pushed
the
feat/forwarding
branch
from
August 24, 2026 11:24
d4a61d1 to
c75ac1e
Compare
The package is now functional end to end, not a scaffold. Implements the
docs/DESIGN.md v1 contract: per-leaf forwarding stubs mounted at identical paths
(permission-gated by slothlet itself), async callId correlation, settle-once,
per-call budget timers, and remote-death force-settle — over an injected Channel
seam the core never imports a transport for.
Core:
- src/lib/{errors,frame,link}.mjs — VineError/VineRemoteError taxonomy (remote
VINE_* codes remapped to VINE_REMOTE so a far side cannot spoof link-state),
total junk-tolerant frame parsing with prototype-pollution-safe path guards,
and the settle-once correlation table.
- src/serve.mjs / src/grow.mjs — serve exposes an instance's leaves (hard-excludes
slothlet.**, filters by paths, reports excluded); grow mounts one stub per leaf,
ownership-scoped teardown, handshake deadline so a silent peer can't hang.
Transports (each self-contained, drop-in, conformance-harnessed + full 6-point
e2e over its REAL boundary):
- loopback (in-process pair), post-message (Worker/MessagePort surface),
worker-threads (real Worker, death via terminate), process (real fork,
serialization:advanced, death via kill), websocket (real ws server, ephemeral
port, death via socket close). ws is an optional peer dep imported only by its
module.
Uniform send-failure policy across all transports: a medium-refused frame
rethrows -> that one call settles VINE_BAD_FRAME (link survives); a dead channel
fires onClose -> VINE_GONE; a close race is a no-op. Locked in by
tests/regression-send-failure.test.vitest.mjs across all four real transports.
Reusable Channel conformance harness at @cldmv/slothlet-vine/testing so consumer
transports self-verify. 330 tests, 97.6% stmts / 93.6% branch, lint clean.
Adversarially reviewed twice (core, then cross-transport); all findings fixed.
Three genuine slothlet bugs found and filed upstream (CLDMV/slothlet#302 proto
pollution via add() path, #303 colon-moduleID ownership, #304 .apply record
corruption); vine defends against all three internally.
BREAKING CHANGE: establishes the stable v1 public API. grow/serve, the
Channel transport contract, the wire frame protocol, and the VineError/
VineRemoteError taxonomy are now the committed 1.0 surface. The pre-release
stubs that threw NOT_IMPLEMENTED are replaced by working implementations, so
any code written against the throwing scaffold now behaves entirely differently.
Shinrai
force-pushed
the
feat/forwarding
branch
from
August 24, 2026 11:36
c75ac1e to
84e6fc0
Compare
Without a files field npm would ship all 64 repo files (tests, fixtures, .github, .configs, docs — 417kB) as the 1.0.0 debut. Restrict to src + schemas + README + LICENSE: 16 files, 150kB unpacked.
… keepers The three slothlet bugs found while building vine now have fix PRs (CLDMV/slothlet#305/#306/#307 for issues #302/#303/#304). Update the code comments to reference them — but the guards STAY, and the comments now say why: - frame.mjs UNSAFE_SEGMENTS is security (validating untrusted REMOTE surface paths at vine's boundary), not a bug workaround — independent of the slothlet version. - grow.mjs hyphen moduleID is zero-cost and works on patched + unpatched slothlet. - serve.mjs Reflect.apply is idiomatic and shadow-proof — better than leaf.apply even once #307 lands. No behavior change; 330 tests green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
✨ Features
🐛 Bug Fixes
No bug fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
👥 Contributors