Skip to content

feat(activity): the Activity Bundle, slice 2 — the round tracker publishes to and restores from the room's bundle - #4029

Closed
joelteply wants to merge 2 commits into
feat/the-activity-bundle-slice-1from
feat/the-activity-bundle-slice-2
Closed

joelteply wants to merge 2 commits into
feat/the-activity-bundle-slice-1from
feat/the-activity-bundle-slice-2

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Stacked on #4028 (slice 1). Card c9ddb911.

What lands

  • bench_round.rs: every persisted round change marks the round dirty for the bundle; take_dirty_bundles() serializes them under the tracker lock (DIRTY dropped before ROUNDS — the marker holds ROUNDS while taking DIRTY, never the reverse); restore_round_from_bundle() inserts a round this process does not know (own state always wins; probe activity.state.restored). The file under state/bench-rounds/ stays as the process-local fast path.
  • benchmark_resume.rs::sync_round_bundles: each reconciler pass (1) publishes dirty rounds as {round: …} to their run rooms (kind benchmark/round) through whichever resident is seated there, requeueing what it could not reach; (2) restores announced citizen rounds the tracker does not know from their room's bundle. Probe activity.state.pass {published, deferred, failed, restored, unread}.

Test: a persisted change is dirty with the room name and the serialized round; drained once; restoring a known round is a no-op; a foreign round id restores and is live; a non-round bundle is an error.

Acceptance after deploy: activity.state.pass shows published ≥ 1 within a pass of any round change; continuum reboot with state/bench-rounds/ moved aside → the working round reads activity.state.restored and benchmark/rounds lists it with its cards; a round spawned on another node with residents seated here appears the same way.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ishes every change as the room's bundle and restores rounds it never held from the room alone

Card c9ddb911. persist_round_in marks the round dirty; the reconciler's bundle pass drains the set each pass and publishes {round: <BenchRound>} as the room's activity-state (kind benchmark/round) through whichever resident is seated there; announced citizen rounds this tracker does not know are restored from their bundle (probe activity.state.restored) — a reboot with no bench-rounds/ files, or a round born on another node, comes back tracked with no hand. Own state always wins over a bundle. Lock order DIRTY-then-ROUNDS documented at the seam.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant