feat(ocapn): add baggage seams and op:resume-session handshake#3175
Draft
feat(ocapn): add baggage seams and op:resume-session handshake#3175
Conversation
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
|
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
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.
Refs: N/A
Description
This PR now includes the durable-client scaffolding plus follow-on implementation to tighten resume semantics and persist additional session/table state through baggage.
Core
@endo/ocapnupdatesop:start-sessionremains full introduction handshake (captpVersion, key, location, location signature).op:resume-sessionis now resume-specific and minimal:sessionIdsessionIdSignatureop:resume-sessionis validated against baggage-backed session recordsmakeClient({ tryResumeSession: true })now requires an explicitly supplied baggage instance.ocapn:resumeSessionsByLocationIdocapn:resumeSessionsByIdprovideFromBaggage()now returns the value read back from baggage after initialization, allowing baggage implementations to provide wrapped/persistent map-like stores.referenceKitnow reads/writes optional table methods:getNextExportPosition()setNextExportPosition()Durable package
@endo/ocapn-durable-clientmakeFsDurableBaggage) with recursive encoding/decoding support for baggage entries and map-like values.localSlotsnextExportPositionpackages/ocapn-durable-client/docs/baggage-schema.mdmakeExostyle), not ephemeralFarrefs.Restart coverage
packages/ocapn-durable-client/test/restart.test.jsnow verify:tryResumeSessionis enabled.Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Executed:
In
packages/ocapn:corepack yarn lintcorepack yarn testcorepack yarn test:update-snapshots test/codecs/operations.test.jsIn
packages/ocapn-durable-client:corepack yarn lintcorepack yarn testCompatibility Considerations
op:start-sessionremains default for fresh sessions.op:resume-sessionwire format changed to resume-specific fields.Upgrade Considerations