Repository navigation
feat(adapters): human-readable frame v2 with fenced verbatim envelope (#105) - #109
Merged
Merged
Conversation
…#105) Delivered messages now render a header (from/to/thread/expectsReply), the body, and the machine envelope in a fenced code block. The envelope bytes stay verbatim inside the frame, so envelope extraction works across mixed-version stands and legacy flat frames keep parsing. - frameEnvelope/extractEnvelope in reference.ts; frameMessage becomes v2 - findMatchingVisibleTurns matches on the envelope, not the full frame, so v1-admitted history reconciles after upgrade (both directions) - compact delivery instructions replace the instruction wall (locales en/ru in sync); '+N more pending' backlog hint preserved - provenance contract asserts envelope preservation via extraction
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.
Fixes #105.
What
Frame formatting v2 per arch's brief (PROPOSAL 26a7fb8c), on all hosts (frameMessage is the shared builder):
<synloq project from message thread [registration]>…verbatim…
frameEnvelopeproduces the exact pre-v1 string; v2 embeds it byte-identical inside the fence.extractEnvelopepulls it back out of any variant.findMatchingVisibleTurnsnow matches on the envelope, not the full frame — a new build reconciles history admitted by an old build and vice versa (both directions pinned by tests). The OpenCode admission equality check is same-process and self-consistent.+N more pendingbacklog hint preserved.Deploy note (CTO point 2)
The visible frame changes only for deliveries made by new-dist channels. Plan with the operator: after deploying, re-init the stand's channels (regenerate plugin/config so every channel runs the new dist) — mixed-format stands work by design, but a single-format stand needs one re-init pass. This item goes into the deploy checklist; I will schedule the window with the operator after merge.
Verification
extractEnvelope(was exact-equality on the flat frame).pnpm verify: 108 files / 953 tests PASS.Review
Author: dev. Optional dev2 glance welcome (wire-format change); CTO final after.