Repository navigation
octoscript-ui-l0: bounded host state snapshots for InstanceStore - #51
Merged
Merged
Conversation
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.
Lets a host persist a Card's L0 instance state across restarts.
InstanceStore::snapshot_bytes()writes a versioned (schema: 1) JSON snapshot of the cells, their value origins, schemas and shapes.InstanceStore::from_snapshot_bytes()reads only that schema and refuses unknown fields.ValueOriginserialises in snake_case so a restoreduser_inputcell keeps its origin.octoscript-ui-l0gains aserdedependency (derive).serde_jsonwas already a dependency; thearbitrary_precisionguard foroctoscript-schema/-capabilities/-workflowis unaffected.Consumers: the Card event runtime (OctoSense-org/OctoScript-Makepad#62) locks
76032ed4on this branch, and App Hub's store foundations use it to restore Card state.Checked locally on
76032ed4:cargo fmt --check,cargo clippy --workspace --all-targets --all-features -- -D warnings: cleancargo test --workspace --all-features: 1302 passed, 0 failed (includingtests/state_snapshot.rs)cargo test -p octoscript-schema -p octoscript-capabilities -p octoscript-workflowand thearbitrary_precisiontree check: pass0fa8693adds only theserdeline tofuzz/Cargo.lock, which the first CI run caught:RUSTFLAGS='--cfg fuzzing' cargo +nightly check --locked --manifest-path fuzz/Cargo.tomland the fuzzfmt --checknow pass locallyMerge with a merge commit so
76032ed4stays onmainfor the runtime's lock.