feat: packages and places — library, load-as-push, save-as-pull (M3)#72
Draft
Yona-Appletree wants to merge 1 commit into
Draft
feat: packages and places — library, load-as-push, save-as-pull (M3)#72Yona-Appletree wants to merge 1 commit into
Yona-Appletree wants to merge 1 commit into
Conversation
The library becomes the source of truth and the simulator an ephemeral place (roadmap D19/D20). Reload persistence is now real: the demo seeds into the library exactly once, opening pushes the library head to the sim (hash-verified), and every committed save pulls changed files back into the library with an lpc-history snapshot + Saved event. lpa-studio-core: - app/library: LibraryStore (list/create/duplicate-as-fork/rename/ delete/open) over any LpFs, uid-minting manifest patcher with canonical key order (the slot codec streams kind-first; serde_json maps are alphabetical), /.lp/meta.json provenance sidecar, slugs, zip import/export (fresh uid + ImportedZip provenance on import). - app/places: Place trait (kind/capacity), library + runtime places, connect-classify helper, device registry (/registry.json) and /.lp/device.json identity conventions (M5 wires the flows). - ProjectController: seed-once demo, open_seeded_demo_from_library (replace_and_load + hash verify + version probe), save-as-pull hook after successful commits (empty pulls record nothing; failures warn and retry next save — the user's save never fails on library sync). - StudioCommand::AttachLibrary rides the command queue from the web shell once the store mounts, before the connect action. lpc-model: ProjectDef gains the authored `uid` slot (the pre-staged ProjectConfig adoption) — schemas regenerated. Without it the slot codec hard-rejects library manifests as unknown-field typos, and the server's LoadProject failure mode for that is silence (no response), which cost this change its longest debugging session; a fw-browser regression test now covers uid'd + sidecar'd project loads. lpa-client: replace_and_load_project composite (StopAll → clear → chunked writes → LoadProject). Verified live in Chrome against real OPFS: seed-once (reload never reseeds), hash-verified load-as-push, save hook, and the history log gaining events — with the studio driven over the BrowserWorker transport. Note: hidden-tab timer throttling makes the polling transport crawl (existing M7 event-driven-receive note); the fw-browser worker sidecar must be rebuilt when wire/model crates change. Plan: Planning/lp2025/2026-07-06-packages-and-places (roadmap M3) Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Summary
Stacked on #70 (M2b) — merge that first; this diff then shows only M3.
Roadmap M3: the library becomes the source of truth and the sim an ephemeral place (D19/D20). Reload persistence is now real: the demo seeds into the library exactly once, opening pushes the library head to the sim (hash-verified, then a version probe baselines save-as-pull), and every committed save pulls the changed files back into the library with an
lpc-historysnapshot +Savedevent.lpa-studio-core/app/library:LibraryStore(list / create / duplicate-as-fork / rename / delete / open) over anyLpFs, uid-minting manifest patcher with canonical key order,/.lp/meta.jsonprovenance sidecar, slugs, zip import/export (fresh uid +ImportedZipprovenance on import — shared zips can't collide identities).lpa-studio-core/app/places:Placetrait (kind/capacity), library + runtime places, connect-classify helper, device registry (/registry.json) +/.lp/device.jsonidentity conventions for M5.ProjectController: seed-once,open_seeded_demo_from_library, and the save-as-pull hook (empty pulls record nothing; a library-sync failure warns and retries next save — never fails the user's save).StudioCommand::AttachLibrarydelivers the mounted store from the web shell before the connect action.lpc-model:ProjectDefgains the authoreduidslot (the pre-stagedProjectConfigadoption) + schema regen. Worth reviewer attention: without it, the slot codec hard-rejects library manifests as unknown-field typos — and the server's LoadProject failure mode for a root parse error is silence (no response at all), which made this the longest debugging session of the roadmap. A fw-browser regression test now covers uid'd + sidecar'd loads; the silent-failure server bug is filed separately.lpa-client:replace_and_load_projectcomposite.Test plan
load_project_tolerates_library_artifactsA/B regression (plain / uid / sidecar / both)just build-ci/just testgreen; story baselines unchanged (532 + 14 tolerance); schema gen clean; clippy clean on all touched crates (just checkstill red on main's pre-existing lps-builtins issue)The P6 review gate remains yours: the full edit→Save→reload demo in your own browser (note: pick a persisted edit — value edits, not the optional-enable toggles, which commit as transient).
🤖 Generated with Claude Code