-
Notifications
You must be signed in to change notification settings - Fork 1
0024 universal LE binary codec + 0025 sessions design (design-only) #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
77bcae6
docs: add 0024 universal LE binary codec design doc
flyingrobots 8471e5a
feat(codec): add i32, f32, bool, option, list primitives (Phase 2)
flyingrobots a1251a7
feat(echo-wesley-gen): emit LE binary Encode/Decode impls (Phase 4)
flyingrobots 09f3e2c
test(codec): rope cross-boundary LE binary fixture proofs
flyingrobots f24b110
test(envelope): EINT cross-boundary fixture proof for jedit
flyingrobots dded4e0
test(emit): pin rope op id outputs in stable_op_id_pinned
flyingrobots cf2b4cd
docs(backlog): capture PLATFORM bad-code and cool-ideas from 0024 work
flyingrobots bb257dd
docs(backlog): no published umbrella for the WARP optics ecosystem
flyingrobots 5a73a3f
docs(design): 0025 sessions as causal contexts (Phase 1 design)
flyingrobots 8a21f04
docs(design): revise 0025 to integrate with existing warp-core primit…
flyingrobots a53cac9
docs(design): 0025 pre-RED cleanup patch
flyingrobots 34e4984
docs(design): 0025 pre-RED clarifications
flyingrobots 473d830
docs(handoff): 0025 Phase 2 handoff note
flyingrobots 499ad99
docs(design): reconcile 0025 internal consistency post-review
flyingrobots 7468488
Fix: canonicalize floats on decode + bound list pre-allocation
flyingrobots 8ef2fc9
Fix: wesley-gen nullable lists, no_std ID encoding, and list-decoder …
flyingrobots f25e07a
Fix: address PR #382 review threads (10 fixes across wesley-gen, code…
flyingrobots File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
489 changes: 489 additions & 0 deletions
489
crates/echo-wasm-abi/tests/jedit_rope_cross_boundary.rs
Large diffs are not rendered by default.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
crates/echo-wasm-abi/tests/jedit_rope_cross_boundary_eint.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> | ||
| #![allow(clippy::unwrap_used, clippy::expect_used)] | ||
| //! Cross-boundary fixture proofs for the EINT envelope. | ||
| //! | ||
| //! These tests assert that `echo_wasm_abi::pack_intent_v1` produces byte | ||
| //! sequences that are bytewise identical to the literal hex vectors asserted | ||
| //! by `jedit/spec/eint.spec.mjs`. The hex literals here MUST stay in lockstep | ||
| //! with that TS spec — they are the cross-boundary contract for the EINT | ||
| //! envelope itself (the wrapper that carries LE-binary vars across the WASM | ||
| //! boundary). | ||
|
|
||
| use echo_wasm_abi::pack_intent_v1; | ||
|
|
||
| #[test] | ||
| fn pack_intent_v1_op1_three_byte_vars_matches_ts_spec() { | ||
| let bytes = pack_intent_v1(1, &[0x01, 0x02, 0x03]).unwrap(); | ||
| let expected: Vec<u8> = vec![ | ||
| 0x45, 0x49, 0x4e, 0x54, // "EINT" | ||
| 0x01, 0x00, 0x00, 0x00, // op_id = 1, u32 LE | ||
| 0x03, 0x00, 0x00, 0x00, // vars_len = 3 | ||
| 0x01, 0x02, 0x03, // vars | ||
| ]; | ||
| assert_eq!(bytes, expected); | ||
| } | ||
|
|
||
| #[test] | ||
| fn pack_intent_v1_deadbeef_empty_vars_matches_ts_spec() { | ||
| let bytes = pack_intent_v1(0xdead_beef, &[]).unwrap(); | ||
| let expected: Vec<u8> = vec![ | ||
| 0x45, 0x49, 0x4e, 0x54, // "EINT" | ||
| 0xef, 0xbe, 0xad, 0xde, // op_id = 0xdeadbeef LE | ||
| 0x00, 0x00, 0x00, 0x00, // vars_len = 0 | ||
| ]; | ||
| assert_eq!(bytes, expected); | ||
| } | ||
|
|
||
| #[test] | ||
| fn pack_intent_v1_op_one_empty_vars_matches_ts_spec() { | ||
| let bytes = pack_intent_v1(1, &[]).unwrap(); | ||
| let expected: Vec<u8> = vec![ | ||
| 0x45, 0x49, 0x4e, 0x54, // "EINT" | ||
| 0x01, 0x00, 0x00, 0x00, // op_id = 1 | ||
| 0x00, 0x00, 0x00, 0x00, // vars_len = 0 | ||
| ]; | ||
| assert_eq!(bytes, expected); | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/echo-wesley-gen/tests/fixtures/toy-counter/echo-ir-v1.json
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.