Keep a durable history lineage at each room writer. Ordinary rebinding preserves it; a full restore installs a fresh lineage in the same storage transaction. Scope reader positions to that lineage and keep passive queued projections from replacing another tab's saved reading progress.
Private Domain protocol 47, SQLite 10 and Browser room IDB 8 replace the prior internal formats. Room archives and App wire are unchanged. Validated with the Rust/Web-WASM/protocol gate, real Browser writer restore and cross-tab read-marker controls. Local reading hints remain best-effort when a lagging tab is actively read across successive restores.
Integrate the revised canon and proposed ADR-0017 from the cross-review queue. Preserve current instruction authority and limit a design hold to its dependent change. Correct the research scope for UDP collision probabilities and distinguish existing revocation from a proposed heartbeat lease.
The public-contract ADR remains proposed. Implemented strict room commits and terminal-result validation have their own code commits and verification. Continuous topology improvement remains design work, supported by the existing stay/switch, idle-pair and voice controls.
The owner confirmed four wording points raised in review (quality before savings as a priority, no registration, entry by the room's own policy, never disturbing what works) and asked that the canon stay a statement of principle and not an analysis of cases. Every statement is tightened and none is added.
ADR-0017 took the implementer's nine outcomes after the disputed facts were checked against the code. Five contracts are settled before the first public release, each with the reason it is costly to change later, and four wait for a consumer. The blanket claim that none could be corrected after release is gone.
The design review corrects its description of the tree: the routing shape, the fanout range, the existing control-plane tests, the room writer written twice with no reachable difference, and the scope of the three NAT measurements. A full history page is 101 signed replies, which conversation.rs asserts.
The instruction file keeps the implementer's corrected precedence and gives the canon its place in the first layer. Below that layer a standard governs what it owns, so a principle that seems to contradict one is a reason to propose a change and not to set the standard aside.
Give each ADR-0017 proposal a scoped outcome from actual reader, storage, routing and WASM measurements. Preserve the shared-load and direct-path product goals while distinguishing them from an unproved mechanism. Track restored-history lineage, browser commit durability and unknown terminal results at the existing TODO owner.
The concrete current batch passed the full corrected npm check with 2324 Web tests. Architecture proposals in the other branch remain proposed until the reply and factual corrections converge.
From the owner: light data is handled by the authority of the channel or room and heavy data by the activity that originates it; activities share a connection pool and an encoding pool that serve from what exists and improve slowly; and the levels are subsets from the channel down but are built from demand upward.
The design for quiet topology improvement has to settle how dense the pool's standby connections are and what shape voice takes, because both decide which candidates the planner can improve with.
State the existing direct-source sharing scope at selection: authorized room members receive the video link, and App delivery uses the sharer upload. The source website controls the lifetime of that link. This clarifies the accepted source model without changing media grants or forwarding policy.
The owner clarified the statement: WebRTC and other mature implementations carry as much as they can, because their tuning was hard won and rebuilding it costs more and is harder to debug. Building a part ourselves is the exception, judged case by case.
The owner asked for one place that holds the core design ideas, extracted from the existing records and stated generally, so that a founding idea is not read with the same weight as a default or a dated decision beside it.
docs/canon.md states them, as extracted from every ADR, standard and 3.0 design document and corrected by the owner statement by statement. AGENTS.md puts the canon in the first layer beside the invariants and links it from Product in place of the sentences it repeated. The design review's dated list of decisions becomes a pointer to the canon. TODO gains the two pieces of work this leaves: a design for quiet topology improvement, and separating the canon from derived design in the documents.
Judge the complete review queue, record the identical fresh-model calibration outcomes and the scoped authority/recovery wording, and return the accepted interaction, storage and update corrections. Keep current private schema checks distinct from the first public compatibility decision. Remove only the completed interaction outcome from TODO.
The design review left four questions with the owner. All are answered: the
tunnel stays and IPv6 and port mapping are used alongside it; a Browser may
relay by re-encoding under the present pool design, only when needed, by the
same rule as every node; the room link is not end-to-end encrypted now,
because the signed opaque payload lets it be added later behind a
capability; and the desktop shell uses the system web view where it has
WebRTC and the system browser otherwise, as the tree already does.
Also record what the exchange established: P2P-first and keeping load off a
single machine are founding decisions, and a change at that level is
confirmed with the owner before anything else changes.
Integrate the reviewed interaction follow-up with exact subscription correlation. Unknown and late replies cannot close or activate another owner. Delivery failures preserve the logical reaction request and nonce, including retries, while a signed writer rejection retains its distinct meaning.
Accept the instruction layering with scoped corrections: current user authorization remains authoritative within system/developer bounds, failure recovery is distinct from feature state, and Core extraction must reduce ownership cost. Fresh old/new policy evaluations chose the same six outcomes; this supports clarity, not a claim that the prior rules caused over-handling.
Validation: two new counterexamples failed on the incoming interaction commit; the corrected client suites and wire metadata control passed 640 tests and TypeScript. Policy and documentation checks run through the repository hook.
The owner stated the purpose behind P2P-first: Piik is meant to be
decentralized and usable by anyone, and no single machine should have to
carry a room. AGENTS.md now says so in its product section, so that a relay
is read as the fallback and effort on difficult NATs as part of the product.
The review said all three clean-room designs rejected port prediction and
left the decision open. Reading the designs again, none argued that
prediction is unreliable. Each relied on a forwarder always being reachable,
and the brief they were given allowed the site to forward without stating
the decentralization goal. The review now says that, gives the measurements
for the cases the techniques target (carrier-grade NAT port allocation from
Richter et al., prediction success from Guha and Francis, search odds from
Tailscale's analysis), and records the owner's decision. What it keeps from
the designs is the shape: a found address is a candidate for the one ICE
agent.
3.0 is unpublished, so a wire or storage shape can still be replaced without
aliases or migrations. Two defects contradict what versioning promises and
cannot be corrected once an App or a room store is in the field: Join
requires one exact protocol number while readers reject unknown fields, and
a room store opens only at one exact schema version with no upgrade path.
ADR-0017 proposes nine decisions: a compatibility rule of matching major
plus additions behind capabilities with tolerant readers, one schema source
with generated declarations, one reply shape that tells a rejection from an
unknown outcome, a state revision, commands addressed by scope with one
activity envelope, storage versions with forward migrations, a room store's
epoch and change sequence, one set of history rules with a durable Browser
commit, and one encoding for bytes. It leaves the serialization format,
SQLite in the Browser and the client engine's place to later decisions.
The evidence is recorded as research: three designs written from the
requirements alone, none of which saw the repository, set beside three
audits of the tree. The review also records where the tree knows more than
the designs, chiefly how a home-run site behind carrier-grade NAT is
reached, and four product decisions that stay with the owner.
The project said when to handle an edge case in about seven places: two
bullets in AGENTS.md, several implementation rules here, and Ponytail and
Stop That Shit. None gave a test. AGENTS.md required agreement before adding
a mechanism for a speculative race, then exempted "reachable defects", so
anything that could be shown to happen in principle counted as required.
A sample of 105 commits from the active line whose subjects named keeping,
preserving, recovering or racing shows where the weight comes from. 77 were
already the smallest correct response, and 36 of those were a currency
check, an ordering fix or a deleted limit with a median of one or two lines
and no later repair. Every repair chain found, ten of them, began at a
commit that introduced new state, a timer or a fallback. Four of the 105
cite an observation; the reasoned-only ones were the largest.
So the rule sorts by mechanism, not by "edge case". A condition with a
specified outcome is behaviour. One without stops where it is detected and
its owner recovers by the path it has. Cheap responses need no reason. New
state, a timer, a retry, a fallback, a queue or a second copy of a rule
needs one of five named reasons, and reachability is not one of them. It
rests on Armstrong's thesis (handle an error where it can be corrected, do
not program defensively), the end-to-end argument (one layer owns
recovery) and fail fast.
Removes the bullet "When a transition fails again", which the new section
covers, and points Ponytail at the section instead of restating it.
Accept the existing-owner reply proposal with room-scoped correlation, return the completed launcher and webpage-lifetime findings, and narrow the remaining Browser interaction work to its actual pending owner. Retain the JS connection decoder after the measured crossing cost; no new participant or decoding layer is assumed.
Reply to the latest Claude queue, retire completed admission and picture-in-picture work, and keep Native probe behavior and reply correlation as separate measured design questions. Correct the current parameterless-command reader description from actual Core parsing.
Evidence includes the new Native/Server regressions, Windows WebView controls, shared storage samples, Browser content-hint and SDK probe controls. Unverified business delivery through the prepared-socket experiment remains open; no public compatibility or release claim changes.
Record local snapshot serialization reuse, remaining WASM work and verified
authority invalidation. Keep broader boundary proposals separate from the
small implemented optimization and its evidence.
Reply to all nineteen proposals and the frontend lifecycle additions. Keep
experiments separate from model changes, retain the user's forwarding boundaries,
and coordinate the admission implementation without overlapping edits.
Record the newly merged QuickJS update as a follow-up rather than changing its
pin without the needed evidence. Keep deferred work in the existing TODO.
WebView can retain document focus after another Windows application becomes
foreground. Project each Piik window's actual activation into its document
and share that fact across message feedback, read markers, shortcut ownership
and remote-input reset. Keep media visibility and room grants independent.
The same real foreground-window transition reproduces silence and premature
read advancement on beta.53, then triggers cues and preserves unread position
on the candidate. Returning to Piik advances the cursor. Audio output was
muted in the experiment; oscillator execution and completion were measured.
All 2315 Web tests, TypeScript and the Windows capture-enabled App check pass.
Accept the reviewed history owner and UDP harness correction. Keep Native
pending-resource identity separate from selected-player identity, and agree
the minimum-supply admission correction with explicit SDK ownership and budgets.
Reply with completed mainline and maintenance results, record the reproducible
WebView foreground/read-intent bug, and assign non-overlapping review scopes.
The internal beta.53 artifacts remain frozen at df2acc08.
Point a decoder/playback error to its existing retry and browser control before
network troubleshooting. Keep the media-route procedure and the bilingual entry.
The current Native kernel-NAT run confirms distinct targets on the wire,
completion of the original pair and socket release on withdrawal. Preserve
the earlier 256-target evidence and the distinction between controlled
mechanism checks and a population connection-success rate.
8261f7e7 moved a room's confirmed history window, paging facts, removal
markers and pages under assembly into RoomHistory. The source index still
named message-history.ts as the Browser history window. Link room-history.ts
as the owner and keep message-history.ts as the window rules it applies.
Three documents conflicted where both sides recorded ADR-0016 as accepted
for 3.0 in different words (its status line, ADR-0012's status and the
documentation owner map). The implementer's versions are taken; they also
carry its factual corrections to the record. session.ts merged cleanly
with the history owner.
Adopt the shared Rust core decision as the existing 3.0 architecture record,
separating domain rules from its optional SQLite implementation and keeping
user/accepted design authority above implementation evidence. Scope the replaced
Go-backend decision to 3.0; public 2.x remains separately accepted.
Answer every third-round item and request a failure snapshot from the machine
that reproduces RTP lease reuse. Clarify that the earlier shared-future checks
were local mechanism experiments rather than retained App integration tests.
Keep unfinished package and field validation in the existing TODO.
The owner accepted both records on 2026-11-25. ADR-0016 becomes the 3.0
architecture owner in the documentation map, and ADR-0012 stays accepted
for published 2.x while being superseded for 3.0. Steps 4 and 7 of
ADR-0015 still wait for the refinements the implementer named.
The mailbox tells the implementer about these decisions and about two
more: field data stays in local diagnostic counters, and relay preference
will be proposed as a capability tie-break amending ADR-0005.
The 3.0 line replaced the Go backend with one Rust core executed by
Browser, Native and Server adapters, but no record states that decision
and ADR-0012 still reads as the accepted backend.
Record it as proposed: the core owns admission, room authority,
conversation rules, plans and leases and performs no I/O; the hierarchy is
channel, room, activity with one writer per room; hosting mode places the
writer; media stays peer-to-peer first with ICE and congestion control in
WebRTC and the RTC SDK. It supersedes ADR-0012 for 3.0 only, and it says
which document has authority when the research documents and the code
disagree.
Drafted at the implementing agent's request in the cross-review mailbox.
Record take, decline or defer for every queue item, finding and proposal, with
the owning code, tests and decisions. Keep deferred work in TODO and ADR-0015
proposed until the first RoomReader slice is agreed. Preserve local playback
intent, legitimate file/watch differences and current protocol defaults.
Merge the reviewer's clarification that a pushed reply triggers the next round.
The one-writer mailbox is the response channel; no agent writes to the other's
branch. Source changes are independently committed and the combined checks pass.
The room retains the original source and current successor for its subscribed
viewers. Ordinary snapshots project that typed predecessor, including when a
viewer misses more than one replacement. Local playback and receiving-method
choices remain with the Browser.
Remove one-shot channel event decoration. Joining, leaving, access loss and
session expiry retire the room record. A leave for an already-retired screen
is routed only through that viewer's authorized pending handoff.
Core regressions exercise both cross-kind chains, session recovery, revocation,
fresh sessions and independent viewer exits. Shared Web schemas and Native
constructors use the same pending Domain 46 contract. The existing network
design owns the lifecycle; no persisted-data format changes.
Accept the shared byte-distribution owner, supervised transport retirement,
distinct random-port probes, software keyframe interval and lazy-load retry.
Preserve the review branch's commits and authorship.
Use the one-writer cross-review mailboxes. Narrow the proposed lifetime rules
to demonstrated ownership problems rather than requiring a universal interface
or a restructure after every repeated fix. ADR-0015 remains proposed.
Use the active prototype as its explicitly scoped pre-cutover base and invoke
the vcpkg bootstrap by a fixed relative path. Independent trace reviews and
the queue's recorded controls support these choices; combined checks follow
with the concrete mailbox fixes on the same development branch.
Keep a borrowed page and its active media reader alive while the host inspects
another player. Commit the candidate only after the room accepts it, then retire
the previous reader through the page owner. The native caption reopens the same
source chooser without navigating the logged-in page.
Validation: 2298 Web tests, TypeScript, Windows same-page A/B cancellation and
commit controls, 41 current Windows page tests, Linux page tests and both Android
ABIs. Two cancellation assertions were updated to expect the released empty slot.
The ownership and source-selection contract is in channel-network-design.md.
The searching side of a random-port preparation sent 512 requests but
cycled twice over the same 256 ports. Coverage, not the number of requests,
sets the chance that a probe reaches one of the peer's 256 mappings: with M
mappings and N distinct targets in a pool of R ports the idealized hit
probability is 1 - exp(-M*N/R), as docs/research/nat-traversal.md records.
For M = 256 and R = 64,512 that is 63% at N = 256 and 87% at N = 512, for
the same packets, pacing and deadline.
A second pass over one set only protects against a lost request, and it
loses to distinct targets at any loss rate: at 30% loss the repeated set
covers about 233 ports and the distinct set about 358. The peer signals
Ready after its mappings exist, so a first probe is not early.
The request budget stays 520 and the pool side is unchanged. Lab evidence
in nat-traversal.md was taken with 256 targets and is not re-measured here.
Reference: https://tailscale.com/blog/how-nat-traversal-works (birthday
search against a hard NAT).
room.rs conflicted where the active line added Watch.replace_id beside the
parents and refused fields that the queue moved into ByteTree. Both are
kept: Watch carries replace_id and one ByteTree.
A second agent now reviews the 3.0 line. CONTRIBUTING gains the protocol:
the reviewer keeps refactor/claude-review as a patch queue on top of the
active line, one behaviour per commit, and neither agent commits to the
other's branch. Each agent writes one mailbox addressed to the other, so
synchronizing cannot conflict, and a mailbox holds only what its reader
still has to take or decide; commits own what changed and why, standards
own lessons and Git owns history.
Mailboxes are named for their reader (to-codex.md, to-claude.md). A file
named claude.md is loaded as an instruction file by Claude Code on
case-insensitive filesystems.
CLAUDE.md imports AGENTS.md, which Claude Code does not read by itself.
The first to-codex.md carries the notes for this queue, ten verified
findings that are not fixed here, and the open questions.
ChannelSession holds the domain connection and every activity a page can
start in one 4,000-line class, reconciled by one function and fenced by a
different predicate at each await. It absorbed about 140 fix commits in
thirty days, most of them carrying one lifetime's state across another's
transition.
Propose applying the one-owner-per-lifetime rule to it: owners with a
signal, a reconcile over raw snapshots, one retirement and a projection;
the view as output only; operation failures returned to their callers;
identity replacement moved to the session's owner; and constructor seams
first, so the tests stop writing private fields. The steps are ordered so
the line can merge between them.
Status is proposed. Nothing is implemented by this commit.
The lifecycle rule had grown into one 28-line bullet. Four lines stated the
invariant and the rest were clauses added by individual fixes, which the
document's own rule against incident-specific exceptions forbids. It also
told the reader what to re-check after every await without naming a
structure that makes the check unnecessary, so a type could satisfy it at
each call site and still hold a dozen lifetimes in sibling fields.
Regroup the same content under the structure that makes it hold: one owner
per lifetime with one cancellation signal and one retirement path. Add the
two rules the audit found missing: a parent observes its children's exit by
any cause, and a second repair of the same transition means the owner is
restructured rather than guarded again. New clauses now need an invariant
that holds beyond the case; the case itself stays as a regression test.
Ponytail gains the matching check to run before adding a flag or option.
Align the remote keyboard setting with the existing switch control and remove its custom checkbox styling. Correct the App guides to describe native Windows entry, browser alternatives, bookmarks and startup preferences separately.
Retire quoted content after explicit access revocation without dropping drafts during a room writer restart. Bind a pending file picker to its original conversation, keep room record actions independent, and clarify narrow terminal help and local-network troubleshooting.