T-KWJG-learning-p5-vault-import-and-hosted
State: planning/proposed · Impact: medium · Complexity: large
Run the same product on a server and let a desktop install download books from it. This phase adds the one generic platform primitive the plugin experiment found missing, import a vault from an archive, and deploys the web build behind platform-server as a personal hosted instance.
| Location | Role today |
|---|---|
solutions/determined/crates/determined-platform/src/bin/platform-server.rs | Serves the web build and /api; one mutation token, loopback by default; no identity |
solutions/determined/crates/determined-platform/src/vault_workspace.rs | The suite roster; vaults are added by path |
solutions/determined/crates/determined-platform/src/api/v1/vault_notes.rs | Reads assets; no asset write, no archive import |
solutions/determined/apps/learning-cli/ | bundle produces the archive this phase imports |
Proposed
Section titled “Proposed”Platform-core gains import_vault_from_archive(bytes, name) as a
generic op: unpack into the durable tier, register in the roster,
return the vault id. The learning experience gains a catalog page that
lists bundles from a configured catalog URL and imports one through
that op. The hosted deploy is the books product web build served by
platform-server with the platform token, the book vaults and one
learner vault on its durable tier. Bundles are served as static files
beside it.
Approach
Section titled “Approach”- Add the import op in determined-platform beside the roster ops; size cap, path guard, zip-slip guard. Cover with a test.
- Catalog: a static
catalog.jsonthe CLI’spublishverb writes next to the bundles. - The catalog page and download flow in the experience.
- A deploy recipe for the hosted instance: build, copy vaults, run platform-server with the token, document the escape hatches.
- Decide whether
read_docneeds an embeds-inlined variant by measuring page loads over HTTP. Record the numbers on this task.
| Area | Note |
|---|---|
solutions/determined/crates/determined-platform/src/api/v1/ | The archive-import op |
solutions/determined/experiences/learning/ | Catalog page, download flow |
solutions/determined/apps/learning-cli/ | publish verb writing bundles and catalog.json |
solutions/determined/docs/hosted.md | The deploy recipe |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: A desktop install with no books downloads one from a hosted catalog and opens it.
- AC-2: Progress recorded on the hosted instance survives a restart.
- AC-3: The import op rejects a zip with a path outside its root.
- AC-4: The import op is the only new code under
solutions/determined/.
Out of scope
Section titled “Out of scope”- Multi-user identity. Recorded as a platform gap in
D-LIRI. - The embeds-inlined read. Measured here, built only if needed.
Dependencies
Section titled “Dependencies”T-ZP78so the hosted instance has something to persist.
Discovery context
Section titled “Discovery context”D-LIRI.
Depends on
Section titled “Depends on”T-ZP78