Repository navigation
Conversation
Keep legacy lease decisions and JSON behavior intact while making the shared records usable without HTTP or SQLite. Define a strict typed v2 boundary with exact uint64 and sealed-byte round trips across Go and JavaScript before consensus code depends on it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Give the fault simulator an ownership, vault and revocation model that cannot inherit defects from production apply functions. Keep candidate history states independent and pin observed-take and displaced-write behavior before the history checker is added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Native and WASI members must use the same reviewed election seam and protobuf wire implementation. Retain upstream source and notices, record the narrow patch and source hashes, and expose only these dependency directories through the existing ignore rule. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Wrap RawNode in a seeded single-threaded input and effect contract so hosts cannot release dependent messages or authority reads before persistence and application. Bound read contexts, reject peer-injected control messages, stop on storage or schema failures, and pin election replay with focused quorum and transfer smoke tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… Go core. Keep consensus synchronous behind owned binary buffers and explicit durability completions. Bound frames and handles, audit the WASI runtime imports, and exercise real lease rules over immutable paged rows without adding a production writer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…on it. Compare native and wasm effects through real commit and ReadIndex exchanges, restart disk-backed workerd storage, and measure the complete package and a grandfathered-size fixture. Run consensus and bulk memory phases serially so the proof fits the shared laptop budget without changing the Worker workload. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep each member in its own FULL-synchronous SQLite WAL store so votes, conflicting suffixes and application results survive restart. Refuse corrupt authoritative state and commit rows, dedup results, configuration and the applied index together. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cut subprocesses at every transaction boundary and observe actual WAL flushes before acknowledgment. Exercise production cores with three real stores so leader loss, joint configuration and dropped application completions recover without losing committed results. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Stream complete application snapshots, retain two checked generations and atomically install their state before acknowledging Raft persistence. Compact only covered applied history so a disconnected learner catches up without pinning the log. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Preserve ABI-1 effects while adding checkpoint completion and maintenance queries. Pin the snapshot schema and source hash in the Worker bundle so native and hosted adapters share the same format. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep timed-out operations as unknown outcomes and retain session results and tombstones so the oracle can detect stale reads, double takes and duplicate execution without sharing production rules. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…etwork faults. Drive explicit write, flush, application and reply boundaries through seeded virtual-time schedules, preserve portable snapshots across recovery and compare the disk model with native SQLite. Keep replayable counterexamples and require broken fence, read and flush controls to fail. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…aigns. A lost proposal can still be uncommitted after draining messages, and randomized elections can split votes beyond a fixed 25-tick wait. Preserve exact replay regressions, check each election timeout separately, and run 500 seeds by default with an explicit larger-soak count. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… displace voter traffic. Bind relay exchanges to committed identity and member generations, preserve signed opaque bytes across reconnects, and reserve bounded inbox capacity for voters and snapshots. Publish a shared native and JavaScript wire vector. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…production host assembly. Mount the peer handler through the relay host boundary and drive three durable native members through election, committed application, ReadIndex, restart and absent-learner progress without inbound member listeners. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Expose bounded protobuf inspection, streaming hashes and portable snapshot pointers so hosted storage can persist consensus without a second application writer. Exercise the same protocol through native SQLite proof peers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Serialize each actor across durability waits, authenticate bounded peer inboxes and stream retained snapshots through the shared reactor. Add the local compiled-module entry and independent object binding while leaving the directory cutover to a later change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drive signed mixed-runtime commits, quorum reads, both snapshot directions and joint-state restarts in local workerd. Bound admission, retained state and co-resident memory before the directory adapter uses these actors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…achine. Verify committed enrollment and signed requests at application, retain exact sequence results, and expose bounded dependency evaluation through the same native and WASI ABI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…cation. Adapt every Client verb to the consensus boundary, assemble immutable native read-sets and atomic write-sets, and prove the public directory and HTTP doors with real stores and the independent ownership model. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep JavaScript limited to dependency bytes and durable writes, expose the migration-ready facade, and prove signed hosted decisions with native ABI parity while preserving the earlier workerd mechanism fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e delivering grants. Keep effect signing separate from personal authority, bind approvals to authenticated request keys, and retain exact outbox outcomes across crashes. Preserve original v1 upload ordering while requiring evidence for v2 publication. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reserve each public request for one cluster, commit its device authorization before exposing the sealed grant, and repair interrupted uploads and delivery acknowledgements without deleting content. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…story. Keep the source irrevocably gated, preserve its complete rows and watch evidence, and resume the same three-voter genesis after interruption so old and new writers cannot overlap. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drain admitted legacy effects before freezing, fence incomplete member activation, and compare the hosted genesis with native storage so eviction and retries retain the original authority and content. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…uorum. Keep admission separate from applied configuration, retain every retired node ID, and complete authorized joins after the requester sleeps. Replay configuration at each log position so follower batching cannot change policy. Prove bounded churn, snapshot catch-up, exact retries and restart with the production core and native stores. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ts cannot restore retired nodes. Page registry policy through the shared Go reactor and use the applied join barrier before reporting readiness. Preserve the source-provisioned three-anchor bootstrap, isolate the old mechanism seam in its test fixture, and exercise real workerd restarts with a dead learner. Document enrollment limits and refusals with the implementation. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…back. Use committed owner intents and explicit joint consensus for personal leadership, require a fresh quorum read for completion and retain it to prevent automatic regain. Rank randomized election windows from the immutable provisioned anchor manifest while preserving quorum and vote rules and exact versioned replay. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ors. Recover the committed anchor order through registry and import snapshots in both runtimes. Serialize readiness and control effects, recheck current authorization, persist original request retries and document the actual commands, refusals and fallback limits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Retain every original split-vote seed and all joint crash cases, measure every seeded conditional acquire and preserve old exact replay. Exercise native process death, WASI promotion, snapshot restoration and minority refusal under the existing laptop resource ceilings. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Use complete local HTTP replies and a smaller inspector client, omit unused services, and bound background compilation caches. Reap completed native hosts while keeping every hosted actor and the whole-run combined memory measurement. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pages. The coordination pages add enough text to the chat manual that "is there a newer version" fell out of its answer's top results, behind a short Windows handoff section that mentions a newer engine. The update section now says the asker's words in its body as well as in its heading, so the question reaches the section that answers it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The relay now keeps its directory in a replicated log that the native relay, the hosted relay and a joined computer share. The architecture guide names the packages a contributor starts from for that work, beside the remote session row, and points at the relay guide and the manual page that explain the behaviour people see. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…es remain. A large request from an older client is staged as raw body pages beside the join requests in the same namespace. When such a request is cut short, its pages wait for the next request to replace them, and the maintenance turn that looks for undelivered join decisions decoded every row it scanned, failed on the raw pages and skipped the rest of its idle work. It now reads only join requests, as the delivery replay already does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The row probe's summary and the hosted smoke test's assertion message now say what they observe about snapshots instead of naming internal planning steps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Preserve complete older records with lossless encoding and retain their original sources. Reserve bounded initialization and retry bookkeeping so full directories can finish upgrading and persist capacity refusals without stopping committed work. Share the storage accounting between native and hosted relays while keeping content and protocol limits unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sleeping groups free their reservations so other households can activate. Busy groups keep their reservations and admission pressure returns a retryable refusal. The next operation recovers durable followers and establishes a fresh majority. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Freeze the retained tables and install durable write guards in one transaction so older relay code cannot acknowledge divergent changes. Keep the frozen source readable for import and recovery, and document the older relay refusal. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Hosted requests retain the configured prefix with the original signed URI so every member interprets the same operation when a joined computer leads. Directory changes, enrollment and large rotation requests use that exact prefix. Native creates and publishes treat an empty frame array like an omitted or null plan while retaining the original actor and operation binding. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Finished, cancelled and reassigned work frees claim retry records so later assignments and personal leadership requests retain session capacity. Retained assignment receipts keep retries idempotent and prevent old requests from acquiring work again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sharing the existing cycle avoids one replicated renewal per presence ping. Each bounded batch still requires fresh evidence for the exact holder and fence, and receipts remain available only after durable commitment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The coordination core now adds 3,379,200 bytes to the stripped linux/amd64 binary: 75,755,785 bytes on the current dev base and 79,134,985 with the core linked. The size cap moves by the same amount, from dev's 75,811,848 to 79,191,048, so the build keeps the 56,063 bytes of headroom the base has. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The entry lists what a reader of dev now believes wrongly. Problems that existed only while this feature was being built never reached dev, so their lines go, and the upgrade line now says what an operator sees when an older relay is started on an upgraded store. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The entry was renamed for this pull request, but its pr field still said 0, which the change-entry check rejects. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…and. A hosted relay under a prefix commits that prefix beside the signed URI, and members now route the proof by it. The maximum-command proof captured its request on the client without the prefix, so its size probe could no longer translate the request at all. It now carries the request's prefix, measuring exactly the command the relay commits; the boundary and delivery assertions are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pen. A joined home's Home took presence from its local learner, which counted any computer holding an unexpired chat lease as online. A computer that stopped without goodbye therefore stayed online until its 90-second lease lapsed, and the other computer could not offer to continue its chat for over a minute. Home now takes online and offline only from the relay watch, with the usual fifteen-second offline debounce, while versions, device news and directory reads still come from the local learner. Lease expiry stays the authority for ownership decisions and never for the display. New tests stop the holding process without goodbye and require the offer within 30 seconds while the lease is still valid, on the native relay and the hosted Worker. The open-home idle tests now allow Home's watch socket its platform ping and pong, bounded per ten minutes from the ping interval, and still require zero HTTP requests, client attempts, peer and forward frames, recurring alarms and presence-driven coordination wakes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The manual and the change entry described a joined Home with no remote presence viewer. Home keeps its relay watch with ten-second pings, so a stopped computer appears offline within 30 seconds and its chat can be continued elsewhere. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The holder runs in a re-executed test process, which did not mark the cell engine available the way the test's other homes are prepared. On a computer without an installed engine binary the holder could not open its home and exited at once, so the proof depended on the machine it ran on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Linking the client tests can take minutes on a busy disk. Doing it inside the timed test let the link consume the proof's own limit, as the other hosted client launchers already avoid by linking first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AbirAbbas
marked this pull request as ready for review
October 26, 2026 11:22
This was referenced Oct 26, 2026
AbirAbbas
added a commit
that referenced
this pull request
Oct 26, 2026
…urrow v0.3.4 Brings the workspace-ownership branch up to dev cf282dd, which adds the Raft relay (#1950), the two-computer fixes (#1967), #1972, #1974 and #1976. - directory record types are now clusterstate aliases, so frame hints move into the replicated state machine: FrameHint and the frame_hints field on Cell, CellInit and Publish, bounded deterministically in the shared rules, dropped from listings and kept on single-cell reads. Signed v1 publishes with hints are accepted; unknown fields are still refused; existing canonical bytes are unchanged and no schema or protocol version moves. - every take path records the send lease, including the workspace-set and identity-adopting restores; an already-held chat keeps its hold when the record fails. - a removed computer cannot take through the folder-mapping road either, and unsent words and the pending send survive the root chooser. - the seal refuses a folder holding home before taking the checkpoint lock. - furrow pin follows dev at v0.3.4, which contains v0.3.2's non-mutating SQLite capture. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
What this changes
Until now one relay process was the single writer for each identity's chat records. That process decided who holds a chat, accepted every save and could not be replaced. This PR turns the relay into a small Raft group per identity, so coordination no longer depends on one writer:
codeaf relay --storeruns three local anchors. A change counts only after a majority commits it, and ownership reads are fresh majority reads. Losing one voter is fine. Losing two refuses coordination and keeps saved chats; it never creates a writable minority.codeaf cluster statusshows committed membership and the current leader.codeaf cluster leadswaps one anchor's vote to this computer through joint consensus, transfers leadership to it and returns an elected read receipt. The relay then forwards requests to that leader.This is the coordination layer for the scenario where a phone leads and serverless dev boxes do the work. Both are follow-ups and neither is built here: there is no phone app yet, and no dev-box provisioning or headless worker loop. The manual says so plainly.
How it is built
go.etcd.io/raft/v3v3.7.0RawNode, inside a deterministic wrapper (internal/raftcore). It is vendored underthird_party/raftwith a single patch: per-node election randomness, so replays are exact.codeaf relayand as a WASI reactor inside the hosted Worker'sRaftMemberDO. A small JS shim supplies storage, alarms and transport. The hosted bundle is 2.47 MiB compressed, against Cloudflare's 3 MiB limit.internal/clusterstate), and both runtimes apply the same logic.codeaf: directory upgraded; use a current relay build.Numbers
bin/codeafgrows by 3,379,200 bytes, mostly the protobuf code upstream Raft needs. The size cap moves by exactly that measured weight, and PERF.md records it.Known limits
How it was checked
make pr-ready, and the touched legs on CI;internal/syncsetupin 590 s;cluster status,cluster lead, the leader stopping (anchors coordinate after 40 s native and 46 s hosted, with no hand-back when it returns), revoke and a fresh install.Owner steps after merge
The hosted relay is not deployed by this PR. Its deployment configuration needs the
RAFT_MEMBERSbinding, thev3-raft-membersmigration and the new worker entry, all declared inrelay/hosted/wrangler.toml. Deploy to staging first and run the two-computer journey there before production.🤖 Generated with Claude Code