Skip to content

feat(adaptive): demonstrate the storage relay — device-master over a wire - #62

Open
sanil-23 wants to merge 2 commits into
tinyhumansai:mainfrom
sanil-23:feat/device-master-vault-relay
Open

feat(adaptive): demonstrate the storage relay — device-master over a wire#62
sanil-23 wants to merge 2 commits into
tinyhumansai:mainfrom
sanil-23:feat/device-master-vault-relay

Conversation

@sanil-23

Copy link
Copy Markdown
Contributor

The execution relay (RunRequest/RunReport + ChannelRelay) had a worked example; the storage half of the remote topology did not — and it is the half that makes the device master: the device's own store is the durable workflow home, and the service never holds a workflow durably (a Snapshot in memory during the episode, nothing after).

examples/service.rs now demonstrates both relays end to end:

  • VaultFrame — the wire: load / records / put / remove / ack, wire ids minted service-side so a late reply can never resolve the wrong waiter (same discipline as the run relay).
  • DeviceVault — the service's stateless Vault adapter over that wire: a sender, a deadline, a counter — never a record. A timeout reports the consequence out loud: the record was NOT stored.
  • The device side — one task, the whole obligation: deserialize, apply to ITS store, reply. In production that store is the device's real tinyflows store, where its own workflow surfaces list what arrives.

The demo run shows the full arc: episode start loads the catalogue from the device; run 1 authors, satisfies, and the success gate flushes the kept record across the wire (→ VaultPut← device stored it in ITS store); run 2 selects what the device now holds; the final listing reads the device store directly as proof the service kept nothing.

Also fixes the example's scripted author, stale since the recipe surface (#60) — it still replied with a full graph, so the example compiled but panicked at run time.

🤖 Generated with Claude Code

…wire

The execution relay had a worked example; the storage half of the
topology did not, and it is the half that makes the device master: the
device's own store is the durable workflow home, and the service holds
no workflow durably — a Snapshot in memory during the episode, nothing
after.

The example now carries both relays. VaultFrame is the wire (load /
records / put / remove / ack, ids minted service-side so a late reply
cannot resolve the wrong waiter); DeviceVault is the service's stateless
adapter implementing Vault over it, with the run relay's own deadline
discipline — and a timeout that says the consequence out loud: the
record was NOT stored, and nothing pretends it was. The device side is
deliberately the whole obligation in one task: deserialize, apply to
ITS store, reply.

Episode start loads the catalogue FROM the device; the success gate
flushes each kept record back across the wire; the run-2 selection
reuses what the DEVICE now holds, listed from its store directly as
proof the service kept nothing.

Also updates the example's scripted author to the recipe surface —
stale since the surface landed, compiling but failing at run time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tinysweeper

tinysweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown

How this change flows

2 changed behaviours across 10 relationships. 6 surrounding behaviours are shown (57 graph nodes walked). 43 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["main<br/>changed"]:::changed
  n1["run_goal<br/>changed"]:::changed
  n2["shelf"]:::impacted
  n3["MemoryLedger"]:::impacted
  n4["Remote"]:::impacted
  n5["Goal"]:::impacted
  n6["new"]:::impacted
  n7["permissive"]:::impacted
  n0 -->|calls| n1
  n0 -->|calls| n2
  n0 -->|calls| n6
  n0 -->|calls| n7
  n1 -->|uses| n3
  n1 -->|uses| n4
  n1 -->|uses| n5
  n1 -->|calls| n6
  n1 -->|calls| n7
  n7 -->|calls| n6
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sanil-23, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 13a4f778-3081-4c9d-a84c-0832d9b5fdf8

📥 Commits

Reviewing files that changed from the base of the PR and between 8f63a27 and a1b139c.

📒 Files selected for processing (1)
  • crates/adaptive/examples/service.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

clippy large_enum_variant: a WorkflowRecord dwarfs every sibling
variant, and frames travel through queues sized for the small ones.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant