Skip to content

feat(routing): add write path v1 CID-transform API#476

Merged
lthibault merged 1 commit into
masterfrom
lthibault/stage5-write-path-v1
May 20, 2026
Merged

feat(routing): add write path v1 CID-transform API#476
lthibault merged 1 commit into
masterfrom
lthibault/stage5-write-path-v1

Conversation

@lthibault
Copy link
Copy Markdown
Contributor

Summary

  • extend routing.capnp with write-path v1 operations:
    • mkdir(baseCid, path, parents) -> rootCid
    • writeFile(baseCid, path, data, createParents) -> rootCid
    • remove(baseCid, path, recursive) -> rootCid
    • publish(name, cid, expectedCurrent) -> publishedPath
  • implement host-side handlers in crates/rpc/src/routing.rs
    • CID-transform workflow via isolated MFS workspace (no hidden mutable global root)
    • explicit IPNS compare-and-set conflict check for publish
    • path normalization / traversal rejection helpers
  • wire new routing methods into shared Glia cap handlers (std/caps/src/lib.rs)
  • document mutation semantics and conflict behavior (doc/capabilities.md)

Why

Stage 5 of #468: keep read-path on WASI filesystem I/O, while adding explicit, attenuable write operations that return new CIDs and avoid implicit mutable daemon state.

Validation

  • cargo fmt --all
  • cargo check -p ww --lib --bins
  • cargo test -p ww test_publish_compare_and_set_semantics -- --nocapture
  • cargo test -p ww test_normalize_rel_path_rejects_absolute_and_parent -- --nocapture

Refs #472
Refs #468

@lthibault lthibault merged commit e85a286 into master May 20, 2026
11 checks passed
@lthibault lthibault deleted the lthibault/stage5-write-path-v1 branch May 20, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant