Commit Graph
1279 Commits
  • docs(review): answer the queue and narrow the recovery contract
    Record independently rendered queue acceptance, the reproduced source-follow correction, and the new atomic identity storage boundary. Keep Native diagnostics and early recovery at their demonstrated scope; update the pending field-input and upstream runtime facts.
  • merge(review): adopt route and local failure presentation
    Integrate Claude queue through 374a92e5. The changes derive route, room-open and operation feedback from existing owners. Independent Chromium review covered real components and IndexedDB version rejection; integrated type checking and all 2409 Web tests pass with the reviewed corrections that follow.
  • refactor(storage): persist domain identities as individual rows
    Keep Identity as the authority, while a Domain SQLite transaction writes the admitted user and conditionally updates the small domain header. Normal startup hydrates the same model without rewriting it. This removes full-history profile rewrites and preserves recovery of a previously uncommitted room directory without a dirty-state mechanism.
    
    The private Domain physical format is 1; Room SQLite remains 10 and portable archives and wire versions are unchanged. Unsupported old private databases remain untouched. A matching old build can export the existing domain archive for import into a fresh directory.
    
    Paired local Release controls at 2000 retained identities measured join 17.78 to 4.17 ms and rename 7.75 to 4.02 ms. Full Rust, Native, WASM, protocol and 2394 Web checks pass. Actual old-Linux-export/new-Windows-import preserves credentials and records; real Browser hosting verifies storage scope and byte-bounded signed history across five pages. Correct obsolete fixture assumptions about standby pairs and private room admission.
  • docs(guide): say who keeps a room's history
    A security review reproduced that a room's creator can restore a backup that names another member as the author of a message. The owner decided to build nothing against it: whoever hosts a room holds its history and can change its own store with or without a restore, so a check or a marker would add a special case that protects nothing. The guide says plainly who keeps the history and what a restore does.
  • fix(ops): validate the channel runtime and expected deployment
    The Rust health endpoint returns a fixed text marker, so the operator check must not decode the former JSON response. Carry the accepted optional full-revision comparison from maintenance and exclude the operator updater script from automatic product-release planning.
    
    Eleven local CLI cases exercise real HTTP with an SSH substitute, including healthy stale releases. Eight release-planning cases pass. First-public cutover still requires resolving the Rust CI and coordinating public guides/downloads; no live service or workflow setting was changed.
  • feat(stage): tell a viewer that no route to a picture is available yet
    A watched screen whose viewer has no selected incoming flow showed
    "Waiting for a video route" with no action and no outcome. The core never
    records a failure for a viewer it cannot place, and a measured viewer
    decoded as soon as a source output freed, so this state is a wait with no
    deadline, not a failure.
    
    The client already separates the three states from facts it holds: no
    selected incoming flow for the publication (awaitingRoute, from the pair
    bindings), a selected flow without a stream (connecting), and the
    publication in failedSubscriptions (failed). The no-route line now says
    that no route is available yet and that watching starts by itself, in all
    five locales. The tile offers the existing picture help for this state;
    its dialog explains that nothing needs to be done, shows no retry and no
    route-failed comic. Retry stays hidden here, because it withdraws and
    resubscribes and cannot place the viewer sooner. Stopping stays in the
    tile's footer. The connecting and failed states are unchanged. The
    troubleshooting guide quotes the new line.
    
    Verified with npx tsc -b, the diagnosis and stage tests (new cases for
    the no-route diagnosis and the tile's actions), and the full vitest run.
  • merge(review): add microphone modes and preserve playback intent
    Integrate the Browser push-to-talk and activation modes, local operation feedback and shared content-hint mapping. A held action owns its release across fast key events, rebinding and focus changes; capture applies the current press before publication. Voice readiness follows actual local playback events. Screen intent comes from the publication source through probe, ordinary sender, shared encoder and rollback.
    
    Keep scoped flow/link debug events. Defer whole HostInput recording and periodic sampling that cannot establish a replay or quality comparison; retain the existing opt-in exporter. Omit the picture-specific Server-help claim until the relevant offered kind is available to that surface. Preserve committed quick-room reuse and recorded pending picker fixes.
    
    TypeScript and all 2393 Web tests pass. Real Chrome AudioWorklet/WebRTC/PiP controls verify decoded PCM release and activation without a physical microphone. Production voice settings pass narrow/wide bilingual theme and keyboard controls. Recovery timing remains an explicitly isolated experiment, not a production routing change.
  • docs(review): return Domain 48 integration and bounded recovery evidence
    Report outcomes for the queue through 151cd1c9, actual per-kind Server forwarding, corrected UI/identity ownership and archive import. Record the next four lanes as under review, and keep the one-use Server entry and remaining experimental choices in their existing work owners.
  • fix(backup): reject history data the importer cannot preserve
    Close archive-only live row and reaction decoding without tightening the ordinary message wire. Supported room backup and copy writers remain unchanged. Unknown durable fields now fail before installation instead of disappearing on export.
    
    Both native staging and real WASM importers reproduce the old loss and reject seven unknown-field positions with the fix. Legal attachment, reply, mention, image and tombstone controls pass; all twelve stored-room tests remain green.
  • merge(review): integrate voice ownership and scoped Server forwarding
    Take the reviewed voice owner and interface lanes, preserving room-local media lifetimes. Server forwarding is offered per kind by its operator, remains off by default, and fills participant routing gaps without sacrificing reachable receivers. Validate the registered service identity even in public rooms and advance private Domain protocol to 48 for the typed offer.
    
    Correct quick-sharing reuse, pending picker ownership and local bootstrap retirement. Keep record-extension and recovery proposals separate from production mechanisms. Full Rust, Native, Browser-WASM and protocol checks plus 2350 Web tests pass; follow-up focused controls pass 672 tests. Actual Domain-48 loopback controls verify master-off, voice-only hosted and files-only Browser-hosted traffic with unchanged room authority.
  • docs(adr): take one outer form for every room record
    The owner asked that the record form be decided by what mature projects do. Every system in which others define stored record types has one outer form from its first release, and those that added extension later carry two models for good. Uniform means a shared outer form with content still checked by schema, so core types keep a short reserved name and need no fallback, and deletion strips content and keeps a skeleton as Matrix and XMPP do. The cost a string type name adds to every record is recorded as the counter-evidence.
  • fix(media): probe the automatic codec with the share's mapped hint
    Display capture stopped setting "motion", so the automatic codec
    preflight's clone inherited an empty hint. Chromium then keeps the
    desktop source's screencast flag, and every default probe encoded as
    screen content while a Balanced or Fluency share encodes with "motion".
    The H.264 decision was made on a configuration the share does not use.
    
    preferredVideoCodecForTrack now takes the sender's hint and sets it on
    its clone. startScreen passes screenContentHint for the stored
    preference and the track's display surface, the same mapping
    configureVideoSender applies. The relay probe in media.ts passes none
    and is unchanged: it probes a received track, as before. The
    media-quality standard names the preflight among the hint's readers.
    
    Verified: npx tsc -b --pretty false; npx vitest run (159 files, 2360
    tests), including new tests that the probe clone carries the given hint
    without touching the source, and that startScreen passes "detail" only
    for Clarity on a display surface.
  • fix(media): map the picture preference to a screen share's content hint
    Every Browser screen share was hinted "motion", which turns off Chromium's
    screen-content encoding, so text could be downscaled to keep motion even
    when the person chose Clarity. The stored picture preference already
    states that intent, so one pure function, screenContentHint, now maps it:
    Clarity gives "detail" on a display surface; Balanced, Fluency, cameras
    and received tracks keep "motion". Balanced stays "motion" because
    Chromium turns an explicit "balanced" into maintain-resolution under
    "detail", which would collapse three choices into two.
    
    The function is the single owner of the hint. Display capture no longer
    sets one. cloneSenderVideoTrack takes the hint instead of falling back to
    "motion" and still copies it to the frame-forwarding track, so the first
    configure need not rebuild the codec. configureVideoSender sets the hint
    from the profile whenever no carrier is active, so a live edit and its
    rollback restore it; the pool carrier keeps its own transport hint. The
    pool producer clones with the mapped hint. Start-up protection becomes a
    configureVideoSender flag that overrides only the sender's degradation
    preference, replacing startupVideoProfile, so it cannot reach the hint.
    No setting, default or per-choice degradation preference changes. The
    media-quality standard now states the mapping.
    
    Tests whose expectation changed: quality "bounds initial capture to the
    selected profile" (capture leaves the video hint empty), "holds resolution
    only while a scaling preference starts" and "leaves picture cadence with
    the producer..." (startupVideoProfile removed; the latter uses the flag).
    The sender-video-track clone helper passes a hint for the new signature.
    New tests cover the mapping, a clone, a live edit, a rollback, start-up
    and a camera at the quality, clone, producer and transport boundaries.
    
    Verified: npx tsc -b --pretty false; npx vitest run (159 files, 2355
    tests). Encoder behaviour under each hint still needs a lab measurement.
  • docs(adr): revise the extension record to what survived review
    The implementer traced the proposal against the present consumers, authority, layouts and record formats. The vocabulary and the four places stay. Built-in records keep their compiled forms and a generic record for a community kind waits for the first extension, because wrapping every record was measured to cost bytes and to conflict with deletion. Owners undo their own registrations without ending one another, the full place and simple sharing are two views of one session, and a paired experiment decides whether a part interface earns its place.
  • feat(forwarding): make Server forwarding an operator-controlled fallback
    The owner decided how a Server forwards. Forwarding spends the operator's
    bandwidth, so the operator offers it and it is off by default. Once offered,
    rooms use it without a second switch, a room manager can decline it, and the
    service ranks after participant paths (canon: P2P first, load is shared, the
    same rule for every node, automatic).
    
    a. Operator switches. PIIK_CHANNEL_SERVICE_TRANSIT is the master switch, off
    by default. PIIK_CHANNEL_SERVICE_TRANSIT_SCREEN, _VOICE and _FILES default to
    true and each turns one kind off. Files include original video forwarded for
    watching together. With the master switch off nothing is offered. The offer
    reaches room hosts with the service socket. The room removes the service from
    the relays of a kind it does not offer, and the channel rejects a projection
    that gives the service such a kind as site transit. A service that offers no
    kind reads as unavailable.
    
    b. A new room allows the service. Creation paths apply only an explicit
    choice, so Browser, App and Server-hosted rooms and room copies take the
    default, and a stored false stays false. The setting reads as declining a
    default, and its note says the site forwards only the kinds its operator
    offers, in all five locales.
    
    c. The planner names the service as the fallback. When a route is assigned it
    first extends the tree with participant relays only, then lets the service
    reach the receivers still waiting. It keeps that tree unless the joint tree,
    where the service may take a scarce output, serves more receivers, so ties go
    to participants. A strict participant-first pass could spend the source's
    outputs on direct listeners and leave those reachable only through the
    service unserved; a test reproduces that. The ranking among participants is
    unchanged.
    
    The rule applies when a route is assigned. A receiver already served through
    the service keeps that route until it fails or demand ends, even if a
    participant path appears later. A screen viewer can still make the usual move
    to a direct path from the person sharing.
    
    Left open: in a public room the service's session has ordinary read access,
    so a modified room host can list it as a plain participant relay, without the
    transit view that carries the room's choice and the operator's kinds, even
    when forwarding is off. Closing it needs the channel to recognise the
    Server's own session by identity in rooms that session does not host.
    
    Tests added in channel-core: a participant wins over the service; the service
    serves only receivers no participant path reaches; the service takes a scarce
    source output when that serves more receivers; a moved child takes a ready
    participant before the service; the service carries only the kinds its
    operator offers; a service that offers no kind reads as unavailable; a new
    room uses the offered service until its manager declines. Expectations
    changed for the new default in host_review, service_transit, stored_room and
    the first test of tests/service-transit-wasm.test.ts.
    
    Verified on the lane: cargo test for piik-channel-core with and without
    sqlite, cargo check for channel-server and channel-browser, the
    room_creation_policy test, a rebuilt WASM package, tsc -b, the whole vitest
    suite and the docs check. The channel-native suites were not run.
  • merge(review): assess extension proposal against current owners
    Keep ADR-0020 proposed and return nine scoped outcomes from architecture, client-lifetime, authority and wire/storage reviews. Require a paired experiment against the same plain-owner extraction before adding a generic part interface or record envelope. Runtime layouts, shared leases, deletion and copy semantics remain the accepted contracts.
    
    Record matching Windows and Linux package acceptance, Android static compatibility, original-page readiness controls and the later output-recovery repair. No plugin framework or new public wire contract is introduced.
  • docs(adr): revise the life of a message to the reviewed outcomes
    The quote policy and a marker for a deleted reply target wait for their features, the rule that merges a change of text with a change of reactions is set when editing is built, search is a stated literal match over a bounded scan, and stored fields come with the capability that uses them. What stays before publication is that a backup must not drop a row's data without notice.
  • fix(playback): retain output recovery after the first video frame
    A cached or presented frame does not repair a failed selected audio device. Keep the existing output chooser visible until that output recovers, independently of picture waiting. The regression fails before this change; TypeScript and 33 related output/playback tests pass. Physical device and audible background-alert acceptance remain explicit TODO items.
  • merge(review): return integrated repairs and measured recovery boundaries
    Take the small-core canon and synchronize the reviewer mailbox through ca407420. Record per-item decisions, the tested history and bootstrap changes, and current file ownership for the next voice/interface/Server-forwarding lanes. Keep proposed message and topology mechanisms separate from implemented contracts.
    
    Record the protocol-47 relay-exit measurement: the first RTC failure report triggered branch retirement; healthy paths still survive signaling loss. Complete TODO entries for lineage, persistence and ADR scope, and retain specific platform, archive-attribution and public-contract acceptance.
  • docs(adr): correct the microphone that ADR-0015 says voice shares
    The ADR said room voice and share commentary share one microphone capture,
    so steps 3 and 4 would use one lease. They do not: commentary captures its
    own microphone through its share, and a session test pins that. Only the
    voice rooms share a microphone among themselves.
    
    Correct the sentence and describe the step 3 owner as it now exists: what
    VoiceParticipation owns, the session state that left the class, and what
    the session keeps.
    
    Verified that tests/docs-publication.test.ts passes.
  • docs(adr): propose one vocabulary for extension
    The owner wants bots, API clients, plugins, new activities and providers to be the same kind of thing underneath, with built-in features on the same points, and the scaffolding designed now. ADR-0020 proposes it from the primary documents of the harness the owner named and of seven older designs, and from three designers who worked from the requirements alone: one vocabulary of points, contributions, scopes, kinds and static compositions; four places where code runs, with authority that never comes from being an extension; a kind with a fallback as the only thing that crosses machines; and a proof on one built-in feature before any point is promised.
  • merge(review): integrate scoped design and lifecycle review
    Merge Claude's queue through 0e018ae7 with the reviewed guide, trust and 2.x/3.0 scope corrections. ADR-0018 and ADR-0019 remain proposals. Topology comparison keeps per-kind budgets, manual limits, generation fencing and measured failure detection.
    
    Complete the consecutive-source viewing fix by retaining the pending predecessor in the room surface, covered by the same 616 tests and real-browser controls. Track the separate local-launch credential and restored-attribution questions before public release.
  • docs(guide): align entry points and storage actions with each version
    Keep the public README on released guides and label the internal 3.0 path. Match current sharing, room restore, cache clearing and reset labels. Distinguish Browser-hosted, App-hosted and Server-hosted rooms without changing their behavior. Checked current control labels, guide links and reset-script backup behavior.
  • fix(history): bind reading positions to restored history
    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.
  • docs(canon): add a small core that is open to extension
    From the owner: the core does a few things well, and what it leaves out is added through an API, bots and plugins that use the same actions and authority as a person. It is the reason a Server keeps no file originals, and it settles later questions of whether a feature belongs in the core.
  • docs(guide): say that an invitation or password still admits a removed person
    The guide said a removed person needs a new grant to return. The invitation link and the password still admit them. The owner keeps removal and the invitation as separate responsibilities, so the guide now says what removal does and how to keep someone out.
  • docs(adr): propose the life of a message
    3.0 rooms keep history, so how a message is edited, deleted and found has to be decided, with the fewest rules that are still correct. ADR-0019 proposes them from a map of the present model and from how Matrix, XMPP and two chat services define the same things: edit by the author with no earlier version kept, delete as today, one revision per message, and search at the writer as a plain match. It names the five points of the stored format to settle before it is first published.
  • docs(canon): let the pool build connections ahead of need when idle
    The owner found the statement too tight: connections come mostly from the activity that needs one, and building and checking some in idle time is also good. The runtime's standby connections now agree with the canon.
  • docs(adr): say what each earlier record means for 3.0
    Seven records carried founding ideas or 2.x mechanisms without saying which still holds for 3.0. Each gains a scope line. The naming standard records the two words that changed meaning between the generations: a room's host, and a relay as distinct from server forwarding.
  • docs(adr): start topology improvement offline and decide moves by comparison
    The implementer's measurements and a reading of the tree change the proposal. A report every second is not free: every reported state change sends a full snapshot to every session, the room authority would hold private path facts, and Native lacks several counters. Frame counts are not comparable across layers or re-encoding. Stage 0 is therefore offline replay on exported diagnostics, a move is decided by comparing a candidate with the incumbent, observations open a comparison without deciding it, and capacity grows only on unmet demand with sibling proof. The wait after a silent parent death stays an open measurement.
  • docs(guide): say what a site operator can read
    The room guide said a site owner needs access to read a private room. That describes what the product shows, and leaves out that the site carries chat in a form its operator can read and that a Server-hosted room keeps its records on the operator's machine. The canon asks that Piik say plainly what each party can see.
  • docs(adr): give voice no shape of its own
    The owner prefers the present voice shape and wants nothing built for voice alone. Voice follows the same planner, pool and learned capacity as a screen; being light, it proves capacity quickly and reaches more listeners directly without a rule of its own.
  • docs(adr): stage voice and keep the forwarding limit as an override
    The owner recalled that the manual limit was added because two downstream peers was too conservative on strong uplinks, and prefers the present voice shape until it is measured. Capacity is automatic by default and a person can still set a limit. Voice first uses every connection that already exists, without the fanout limit; connecting every pair in a room with voice becomes the last stage and waits for measurements.
  • docs(adr): propose quiet topology improvement
    The canon asks for a topology that keeps improving by itself without disturbing what works, and that nobody tunes. ADR-0018 proposes how: records and a shadow planner first, direct voice, capacity learned from what a node carried, placement by proved facts, and one proved move at a time for repair and promotion, with each later stage justified by the records of the first.
    
    It rests on two surveys of primary sources and on three designers who worked from the requirements, the canon and the verified evidence without reading the repository; the evidence note records where they agree, where they differ and which measurements are still missing. The three earlier rules stay: no weighted score, no media probe of an idle pair, no periodic re-solve.
  • docs(design): consolidate the founding model and public contract proposal
    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.
  • docs(canon): keep every statement short and general
    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.
  • docs(adr): separate what is settled before release from what waits
    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.
  • merge: take the implementer's line through 35034f34
    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.
  • docs(review): bound the proposed public contract changes
    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.
  • docs(canon): state the two pools and who handles each plane
    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.
  • docs(todo): name the two shapes the topology design depends on
    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.
  • docs(watch): explain who receives a shared video link
    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.
  • docs(canon): put reuse of mature stacks first
    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.
  • docs(canon): state the founding design in one place
    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.
  • docs(review): return the calibrated rules and runtime evidence
    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.