Skip to content

chore(lync): split engines floor to true core floor + emit inspectable loss-free trial artifact - #9

Merged
deepfates merged 1 commit into
mainfrom
chore/engines-and-trial-artifact
Jul 14, 2026
Merged

chore(lync): split engines floor to true core floor + emit inspectable loss-free trial artifact#9
deepfates merged 1 commit into
mainfrom
chore/engines-and-trial-artifact

Conversation

@deepfates

Copy link
Copy Markdown
Owner

EXHALE housekeeping — two charter-remnant debts. Does NOT touch the presence lane (PR #8).

(1) Split the engines floor — dee-oc37 / charter PR#5 item 4

package.json declared a monolithic engines.node ">=22" for the whole package, forcing every consumer onto Node 22 solely for the WebSocket helper.

  • Audit: the browser-safe core (parse / store / views / looms / indexes / client) uses no node: module and no WebSocket — its highest runtime requirement is the Web Crypto global (globalThis.crypto in uuid.ts, crypto.randomUUID() in memory.ts and indexes/memory.ts), unflagged since Node 19. That is the true floor.
  • Relaxed engines.node to >=19.
  • Pinned the strict requirement where it applies, not on the whole package: the ws sync transport (createWebSocketTransport) and lync sync reach for the built-in WebSocket global, unflagged only on Node >=21 (per synced-store.ts:17). Documented per-surface in the README (Library / Live sync / Command), on the createWebSocketTransport docblock, and in cli/sync.ts — which also had an imprecise "global since Node 22" comment, now corrected to 21.
  • Consumers on Node <21 can still use the transport by passing options.WebSocketImpl.

(2) Emit an inspectable artifact from the loss-free trial

The milestone-6 loss-free trial (dee-i1wc) proved durable sync but left only a green vitest run. It now writes a person-readable docs/trials/loss-free-trial.json — parity with golarion's dee-3fxq trial artifact — recording:

  • every appended id, per client;
  • where each landed — each client's store AND the relay's on-disk .lync;
  • every surfaced failure (persist-failed, generation-changed), deduped per client;
  • the three legs (disconnect, storage failure, restart) and what each surfaced.

The test asserts the artifact describes an actually loss-free, nothing-hidden run before it is trusted. 'Done' is no longer quietly 'tests pass'.

Proof

  • pnpm verify green: 111 tests / 18 files pass, typecheck clean, README examples pass.
  • Artifact generated at docs/trials/loss-free-trial.json (committed snapshot).

Do NOT merge / publish — coordinator's key.

Two charter-remnant housekeeping debts (EXHALE).

(1) engines split (dee-oc37, charter PR#5 item 4): the browser-safe core
(parse/store/views/looms/indexes/client) needs only the Web Crypto global,
unflagged since Node 19 — its true floor. The monolithic engines.node ">=22"
required Node 22 of every consumer solely for the WebSocket helper. Relax the
package engines to >=19 and pin the stricter runtime where it applies: the ws
sync transport and `lync sync` reach for the global WebSocket, unflagged only
on Node >=21. Documented per-surface (README, synced-store, cli/sync) instead
of on the whole package. Also corrects cli/sync's "since Node 22" to 21.

(2) inspectable trial artifact: the milestone-6 loss-free trial left only a
green vitest run. It now writes docs/trials/loss-free-trial.json — every
appended id, where it landed (each client's store + the relay's on-disk .lync),
and every surfaced failure — parity with golarion's dee-3fxq artifact, so
'done' is not quietly 'tests pass'.

Full suite green (111 tests), typecheck clean, README examples pass.
@deepfates
deepfates merged commit 69136f9 into main Jul 14, 2026
2 checks passed
@deepfates
deepfates deleted the chore/engines-and-trial-artifact branch July 14, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant