Skip to content

Sync v0 for Phase 2: op log, gateway notification, phone and PC clients, sealed tasks - #229

Open
aharonamir wants to merge 59 commits into
agents-demo:mainfrom
aharonamir:feat/phase2-sync-v0
Open

aharonamir wants to merge 59 commits into
agents-demo:mainfrom
aharonamir:feat/phase2-sync-v0

Conversation

@aharonamir

@aharonamir aharonamir commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Sync v0 for Phase 2 (Part of #32)

Turns typed on the phone now reach the PC and back through the backend, with the
op log, the gateway notification, both app clients and the sealed short-task path
from docs/project/plan/backend/tasks/week2-sync.md.

What changed

Backend (services/backend)

  • V10__sync.sql: sync_heads + sync_ops, append-only, RLS forced with the
    board's household policy, text client ids, a partial unique index on
    (household_id, thread_id, turn_id), no cursor table (the client owns it).
  • com.hopa.backend.sync: SyncStore, SyncService, SyncRoutes, SyncGateway,
    InMemorySyncStore; store/PgSyncStore bumps the head inside the tenant
    transaction so a household's seq has no gaps or duplicates.
  • POST /v1/sync/ops (batch ≤ 100, ≤ 64 KiB per ciphertext, ≤ 256 KiB body,
    idempotent by op_id, duplicate echoed with the stored seq) and
    GET /v1/sync/ops?after=&limit= (≤ 200, caller's household and member only).
  • sync.changed {seq} fans out to the sender's other devices of the same member
    after a push with at least one new op; no FCM wake in v0.
  • PairingService.mint reuses the household's existing owner member instead of
    inserting a second 'owner', so an operator-minted PC shares the phone's member.

Shared client (core/backend)

  • sync/client: SyncHttp/OkHttpSyncHttp, SyncCodec (AES-GCM via
    PayloadCipher), SyncEngine (push bounded by count and body size, pull
    with a SyncReport(applied, skipped)), SyncBacklog, SyncCursor, SyncTarget.
  • onSyncChanged on BackendLink/BackendClient.
  • TaskDraft: sealed task.create builder and goalOf for both body shapes.

Android

  • BackendSync owns merge in backend mode (the bridge ChatSync is never built),
    cursor in settings, 250 ms coalescing, sync.changed and local-write triggers,
    an open chat reload on change, content-derived-less title rule: a persisted
    threadId → title record so a message never re-pushes a stale title and
    rename-back still lands.
  • Undo-delete and undo-turn are refused in backend mode, because v0 has no
    restore-after-delete and no turn tombstone.
  • RemoteTaskRunner unseals body["sealed"] with the household key and keeps the
    plaintext path for server-authored admin.action.

Windows

  • ChatStore.mergeRemote (dedupe, ordered insert, LWW title, final tombstone),
    BackendSyncHost (cursor/titles files carry household+device and reset on a
    re-pair, pass on every return to Live, no cancellation of a live pass, a failed
    save holds the cursor), chat.changed in the sidecar↔host protocol, and a WPF
    reload of the open chat.

Review fixes on this branch

The whole-branch review found a blocking defect in the first cut, now fixed:

  • A retried op was refused 409 on every pass. Clients re-push their history and
    SyncCodec reseals with a fresh IV, so the same opId arrived with different bytes,
    which the server called a conflict; SyncEngine.push aborting the batch meant no turn
    after the first pass ever uploaded. f514bf0b decides a duplicate by the op it names
    (kind, threadId, turnId) and demotes body_hash to integrity. The turn unique
    index is now member-scoped.
  • Android carried its cursor across a re-pair (4c3e4992): the cursor and title
    record now name their household and device and reset on a mismatch, and persist
    clears them.
  • Android could read a torn identity/token/key tuple (d3da8cde, a717ae77): a
    credential generation marker is captured before the reads and re-checked after them;
    the residual window is documented rather than over-promised.
  • Android did not reconcile on a foreground reconnect (4c3e4992): a pass now runs
    on every transition into Live.
  • Own echoed ops were counted as skipped (d3da8cde): the engine takes an ignore
    predicate and reports ignored separately.
  • Protocol surface (6f8a32ff): the composer frames are documented and the
    devices.error family, which no builder emits, is gone — protocol-contract.py was
    failing before this.
  • Docs (0b6251dd): the M0 payload table and the OpenAPI duplicate rule now match
    the shipped code.

Evidence

apps\android\gradlew.bat -p services\backend :test --no-daemon
apps\android\gradlew.bat -p apps/android :backend:test :backend:ktlintCheck --no-daemon
apps\android\gradlew.bat -p apps/android :app:testDebugUnitTest :app:ktlintCheck --no-daemon
apps\android\gradlew.bat -p apps/windows/sidecar test --no-daemon
dotnet test apps/windows/Hopa.Windows.Tests -c Debug
dotnet test apps/windows/Hopa.Windows.IntegrationTests -c Debug
python tools/scripts/protocol-contract.py

Results are in the PR checks; the per-task review reports were kept out of the tree.

Phase 2 clauses

docs/project/evidence/B2-accounts.md records what was measured here and what still
needs the physical exit run. Phase 2 in #32 is not ticked by this PR: the
on-device turn latency, the 5 s revocation measurement and the device-to-device task
run need the phone and the PC on the local stack.

Decisions worth reviewing

  • V10__sync.sql was edited in place while the branch was open (the turn unique index
    became member-scoped and the duplicate rule changed). It has never been deployed, so
    nothing needs a follow-up migration; a local database that already ran the old V10
    must be reset, and Flyway will refuse it loudly on the checksum.
  • A replayed opId is a duplicate when it names the same op (kind, threadId,
    turnId), not when its bytes match: clients reseal a retry with a fresh IV, so byte
    equality could never be the retry path. A reused id that names another op is still
    E_CONFLICT.
  • One PR instead of the plan's three: the groups are clean commit runs, and the
    objective asked for a PR.
  • sync_cursors was dropped; the cursor is client-owned (after=).
  • Title LWW is by server seq; a pulled title beats a concurrent unpushed local
    rename, which is the plan's "seq is authoritative" rule.
  • Tombstones are final in v0; restore-after-delete and turn deletion are refused in
    the UI rather than silently diverging.

Sync v0 needs a per-member append-only log before any client can exchange
turns. V10 adds sync_heads and sync_ops with the board's forced-RLS household
policy, a partial unique turn index and a pull index; appends lock the head row
so one household's seqs have no gap, a replayed op id is a duplicate and a turn
lands once per thread. The service validates the batch shape and caps before
the store writes anything, and pull serves a client-owned cursor with a 1..200
page. The in-memory store keeps route tests database-free.

Part of agents-demo#32
POST /v1/sync/ops acks a sealed batch with its seqs and the household head;
GET /v1/sync/ops pages the caller's member log after a client-owned cursor.
Both take the household, member and device from the bearer token only and never
look at an op body. BodyTooLarge is 413 E_SCHEMA, a malformed body or base64 is
400 E_SCHEMA, and a store conflict is 409 E_CONFLICT. The mini-design records
the tables, payloads, cursor and merge rules the client tasks build on.

Part of agents-demo#32
mint inserted a fresh 'owner' member even when the caller named an existing
household, so pairing a second device split the household into two members and
two member-scoped sync logs. Resolve the household's first owner inside the
tenant transaction and reuse its id; a member is created only for a household
that has none.

Part of agents-demo#32
The spec gains POST and GET /v1/sync/ops next to the board paths with the
same bearerAuth security, the sealed op shapes, the batch and page limits, and
the E_CONFLICT rule the store enforces. check-openapi.py passes both ways.

Part of agents-demo#32
One frame per push carrying the highest new seq, only to the same household and member, never to the sender. A duplicate-only batch sends nothing. Part of agents-demo#32.
The validator accepts the type, the gateway schema enumerates it with a non-negative seq, a fixture pins body:{seq:7}, and the sync mini-design documents the one-frame-per-push rule. Part of agents-demo#32.
The link exposes a seq-only handler; a missing, non-integer or negative seq is ignored so a malformed frame never costs the socket or logs a body. Part of agents-demo#32.
The sync client needs the wire types and a transport before it can move the household's op log: sealed ops out, remote ops in, and a typed refusal for a non-2xx answer. OkHttp stays confined to OkHttpSyncHttp so the engine remains a plain JVM component.

Part of agents-demo#32.
Payloads travel sealed inside SyncDraft, so SyncCodec is the only place that touches PayloadCipher. It refuses what the server would refuse (blank ids, a turn without a turn id, a thread upsert with one) and the 64 KiB ciphertext cap, without putting plaintext in an exception message.

Part of agents-demo#32.
The engine batches pushes by 100, pulls page by page and applies in seq order, writing the cursor after each op. An unknown kind is skipped so a newer client cannot wedge an older one, while a bad tag still throws and leaves the cursor at the last good seq. SyncBacklog gives the apps deterministic turn order and title op ids.

Part of agents-demo#32.
The server refuses a body over 256 KiB, so a 100-op batch of near-cap or even ordinary turns could never upload. Batches now split on count and on a conservative JSON-size estimate with headroom under the cap, and one oversized op still travels alone. Pulls now open before dedupe, throw on a bad tag even when the turn is held, and return a SyncReport whose skipped seqs make a shape/value problem observable instead of losing the turn or wedging the log.

Part of agents-demo#32.
The last applied sync seq is metadata, not a secret: it lives beside the other mapping values instead of in the keystore, and a lost cursor only replays idempotent ops. Clearing the gateway resets it so a new identity cannot start mid-log.

Part of agents-demo#32.
A title push is keyed by the thread's revision, so a rename that leaves updatedAt unchanged could never be told apart from the last push and the server would dedupe it away. Rename now writes a strictly newer revision (max(updatedAt + 1, now)) in both stores. An adopted thread with a blank title also gets the same 'New chat' default the Room store already used, so a thread created by a remote turn is not nameless.

Part of agents-demo#32.
BackendSync runs one pull-then-push pass on the shared engine off the main thread: the cursor comes from settings, the local backlog is every turn plus one revisioned title per thread, and a StoreTarget merges remote ops into the conversation store. A pass persists the cursor only when it finishes, emits the thread it changed, and serializes passes behind a mutex while coalescing triggers for 250 ms. An op older than the local revision is ignored, so an own last push cannot undo a newer rename, and a tombstone never takes a title. No identity, no token or no household key means SignedOut and no network. SyncOwnership decides which engine merges: a paired gateway with a household key wins over the PC bridge. Tests cover signed-out, local push dedupe, remote turns, title conflicts, tombstones, the cursor and a refused call.

Part of agents-demo#32.
With a gateway identity and a household key, the backend op log owns chat merge and the PC bridge is not even built; without those credentials the bridge keeps the path it had. Local appends, renames and deletes notify the sync through a ConversationStore decorator, a peer's sync.changed pulls, and a foreground pass catches up after the app was away. The chat and chats-sheet view models reload from the store when a pass reports a changed thread, through a defaulted dependency property so other fakes are untouched.

Part of agents-demo#32.
One turn larger than the 64 KiB op cap used to make every pass fail, because the engine seals the whole backlog up front and the thread stays in allWithDeleted() after a delete. The backlog now measures each payload against the codec cap minus PayloadCipher's 12-byte IV and 16-byte tag, skips the turns that cannot fit, keeps them local and reports them as Done.skippedTurns. A title op id now hashes the title content instead of the thread timestamp, so a message on one device cannot republish a stale title as a new op, and a tombstone id is keyed by the deletion time. Title merge follows server seq order; an op this device wrote is inert when it comes back on the next pull, so its own echo cannot undo a newer rename, and a title this phone has not pushed yet is held until it is. The cursor and the change announcement now happen as soon as the pull finishes, so a failed push no longer hides applied turns.

Part of agents-demo#32.
A remote tombstone removes the thread from all(), so the open chat used to stay on screen and writable; the view model now clears state.current when the thread it shows is gone, and appending returns early. Undo-turn and undo-delete have no wire op in v0 and could not reach the other devices (restore reuses the tombstone's id), so both are refused in backend mode with a short explanation, through the same SyncOwnership rule the merge uses. The manual sync message now also reports turns that were too large to push. Tests cover the closed chat, both guards (and both controls), and the skip message.

Part of agents-demo#32.
The record is a JSON map threadId -> title next to the sync cursor. It lives in plain settings so it survives a restart: a title is pushed only when the local one differs, and a title the server already holds is never re-sent just because a message bumped the thread's timestamp.

Part of agents-demo#32.
Replaces the content-hash title id and its in-memory pending set. A title op id is keyed by the thread's revision again, so A to B to A is three ops instead of a duplicate of the first; the push decision comes from the persisted record, not the id. A title is recorded when the server acks its op and when a pull applies a remote title, so a retry re-sends the same id, a failed push leaves the record for the retry, and an applied title is not echoed back. A message changes updatedAt but not the title, so it can no longer re-push a stale one. Tests cover A to B to A, a message-only push, a failed push losing to a peer rename, a restart, and the ahead-of-the-rename message case.

Part of agents-demo#32.
ChatStore.mergeRemote creates an unknown thread, dedupes a message by id, keeps messages in timestamp order and applies a title only when it is non-blank, with a tombstone that is final. allWithDeleted exposes the rows sync needs, and every store method is synchronized now that a background pass and the stdin loop share it. Tests cover create, dedupe, out-of-order insert, last-writer-wins titles, the tombstone and the tombstone-aware listing.

Part of agents-demo#32.
One unsolicited frame names the thread a sync pass changed and carries no id and no message text. The schema, the golden frame and the family test treat it as a contract family, and the builder test pins the exact shape the window parses.

Part of agents-demo#32.
BackendSyncHost builds the shared engine from the stored session on every pass and merges into ChatStore, so a sign-out, a token rotation or a re-pair takes effect without a restart. The cursor and the last-synced title map are small atomic JSON files in the data dir; a title is pushed only when it differs from that record, tombstones travel every pass, and this PC's own ops are inert on a pull so an older echo cannot undo a rename. GatewayHost starts a pass on the first Live state and on sync.changed, and a conversation write or a turn append asks for the debounced pass.

Part of agents-demo#32.
EngineHostClient raises ChatChanged from the chat.changed line, EngineSession forwards the conversation id, and the window re-reads the sidebar and the open conversation through the select path. A turn running locally is authoritative, so it is not reloaded underneath the person. Tests cover the frame and the reload of a conversation that is already current.

Part of agents-demo#32.
The pass loaded the session for the token and device, then loaded it again for the content key. A re-pair between the two reads sealed the old household's ops under the new household's key, and every other device would wedge on that seq. The key is now derived from the same BackendSession the token came from, so one pass can only ever describe one household; the test makes the second read return a different household and asserts the pass reads once, sends the first token and seals with the first key.

Part of agents-demo#32.
The host remembered that it had started sync and never forgot until the sidecar restarted, so a dropped socket and a new Live state pulled nothing and the server does not replay what a peer wrote while this PC was away. A small trigger now compares each link state with the previous one and starts a pass on every transition into Live; a presence re-emit of Live is not a reconnect and adds no pass. The test drives Disconnected to Live, a presence change, a drop through Connecting, then Live again, and expects exactly two passes.

Part of agents-demo#32.
Every trigger cancelled the pending job, including a pass already inside its pull; with the cursor persisted only after the pull returns, a stream of sync.changed frames could starve the first sync forever. A trigger during the debounce or a pass now records one follow-up pass and leaves the pass alone, and stop() lets an in-flight pass finish too. The test holds the first pull open, fires three triggers, then expects two completed pulls, two total pulls and zero cancellations.

Part of agents-demo#32.
syncNow returned 0 on any exception, so a pull that applied ops and a push that then failed looked like nothing happened, contradicting the documented return. A push failure is now handled beside the push and returns the pull's applied count; a failed pull still returns 0 because the engine never reported one. Every failure path logs one line with the exception class name only (pull, push, notify, missing key), never a message that could quote plaintext. Tests cover the push and pull paths and their log lines.

Part of agents-demo#32.
mergeRemote saved through a runCatching that swallowed every I/O error, and the pass then advanced the cursor; a restart lost the merged ops and never pulled them again. ChatStore now keeps the last write's failure, and a pass that sees one holds both the cursor and the last-synced title record, logging the exception class and the held seq. A failed cursor or title write is logged too. The test points the store at a directory, so every save fails, and asserts the cursor stays at 0, no title record is written and the failure is logged.

Part of agents-demo#32.
The cursor and the last-synced titles survived a re-pair, so the new household's earliest ops sat under a stale seq and were never pulled, while local titles looked already sent. Both files now carry the household and device they belong to; a mismatch starts at zero, clears the title record and logs the reset, and the seq is written back with its new owner. The test leaves a previous build's cursor at 5 and a bare title map, then pairs to a new household and expects a pull from 0, a title push and the new owner on disk.

Part of agents-demo#32.
The phone and the PC both need to author a device-to-device task, and the
server only relays what the client sealed. TaskDraft builds the R29 body
(`{"sealed": base64url(IV || ciphertext || tag)}`) under the household key and
opens it again, so the composer and both receive paths share one rule.

goalOf tries the sealed body first and never falls back to a plaintext goal
beside it: an unauthentic body is a refusal, not a second chance. The trace
is a fresh W3C traceparent; the server-owned TraceIds lives in the service
module, which this client module cannot depend on.

Part of agents-demo#32.
The phone only ran plaintext goals, so a task from the PC (which seals) could
never run, and nothing let the phone start a task at all.

- RemoteTaskRunner opens `{"sealed": …}` with the household key before it
  claims an id. A body that does not open is E_SCHEMA "the task could not be
  opened", non-retryable and unclaimed, so a re-pair can resend it. The
  plaintext goal still runs for the server-authored admin.action.
- RemoteTaskSender seals one goal, sends `task.create`, learns the
  server-assigned id from the acceptance ack, and shows only an answer from the
  addressed peer naming exactly that id.
- BackendSession forwards relayed task replies; AppContainer wires them to the
  sender and decodes the key once for both directions.
- One sheet and one view model list the household's devices (minus this phone
  and revoked rows), take a goal, and show "Sent to <name>", the sealed answer,
  or the stable failure code. Nothing logs or renders the goal.

Part of agents-demo#32.
The PC could only receive; the window had no way to hand a goal to the phone.
`task.send` seals the goal with the session's content key in the sidecar and
sends a `task.create` through the gateway link; `devices.list` answers the
picker from `GET /v1/devices` with the stored bearer. Both run on the backend
scope so the stdin loop never waits on the socket or the server.

The window gets one menu button and one dialog: choose a device, type a goal,
and StatusText confirms "Sent to <name>" or shows the sidecar's stable code.
No goal is logged, echoed in a reply, or carried in `chat.changed`.

Part of agents-demo#32.
The required `:backend:ktlintCheck` gate had never run on this branch (earlier
tasks ran `:app:ktlintCheck`, which the Android module's ktlint plugin reduces
to the .kts files). SyncBacklog.titleOpId was the one finding: the expression
body fits beside the signature. No behaviour change; the returned string is
identical.

Part of agents-demo#32.
`task.send`, `devices.list` and `devices.error` are new host families, and the
schema's own rule says an unlisted family is a contract change. The golden
frames pin what this build emits; the family test names them so a rename is
caught before the window sees it.

Part of agents-demo#32.
A `task.create` is not a success when it leaves the socket: the server answers
a rejected create with a top-level `error` and an accepted one with a
`task.ack` whose body names the id it routes under. Both echo the client's
traceparent, so the send's trace is the correlation key.

RemoteTaskSender now registers that trace, publishes `Sending`, and waits
(bounded at 10 s) for its own ack (publishing `Sent(serverTaskId)`), or for an
`error` with the same trace (its stable code), or `E_TIMEOUT`. A stale ack for
another trace is ignored, and a refused send can no longer read as success.

The app had no path for `error`: BackendClient already routes it to the board
seam, so BackendSession narrows that seam to `error` and AppContainer forwards
it to the sender. BackendClient's routing is unchanged.

Part of agents-demo#32.
The sidecar reported `{ok:true, taskId:<client id>}` as soon as the frame left,
so a revoked target, E_TENANT or E_RATE read as success. Now `task.send`
registers the frame's trace and waits up to 10 s: an acceptance `task.ack`
resolves with the server's task id, an `error` with the same trace resolves
with its code, and silence is `E_TIMEOUT`. Nothing is ever reported accepted
before the server says so, and the client envelope id stays internal.

The same trace also fixes a hijack: BackendGateway's single approval slot used
to adopt any `task.ack` carrying `body.task`, so a send's acceptance ack could
overwrite the approval's server id and turn the phone's real answer into a
timeout-deny. The ask now sends its own traceparent and the slot only claims an
ack that echoes it; a send ack goes to the send waiter and vice versa.

GatewayHost seals and delegates; the WPF dialog shows the refusal's stable code
through SendTaskWindow.RefusalCode. The schema's `task.send` also allows
`code`.

Part of agents-demo#32.
SyncExitRun drives the app's own SyncCodec over a loopback socket and the shared SyncHttp port: ten sealed turns each way, a 20-op batch in one push and one pull, a second member's empty pull, and a revoked device refused with 401 and no new row. SyncExitRunTest runs it on PostgresHarness with real issued bearers and skips when Docker is absent. B2-accounts rows 1, 2 and 9 now quote the measured p50/max and leave the on-device legs pending.
A composer waits for the acceptance ack of its own trace, so a refusal without the trace looks like a timeout. Part of agents-demo#32.
The protocol contract checker rejects a schema family with no builder, and the composer frames had no documentation. Refusals for devices.list already travel as data.error. Part of agents-demo#32.
Every client re-pushes its whole local history on each pass and reseals each op with a fresh IV, so a retried op is never byte-identical. PgSyncStore compared body_hash and answered 409, so the second pass failed forever and nothing after the first op could upload.

An op id that names the same kind, thread and turn is now a duplicate (stored seq, no write); anything else under that id stays a conflict. body_hash remains an integrity/diagnostic column only.

Also scope the turn unique index by member (v0's log is per member) so one member cannot pre-empt another member's (thread_id, turn_id), and align the OpenAPI pull limit with the service clamp (minimum 0, 0 means the 200 default). Phase 2 sync v0, task 8a.
A re-pair kept the previous household's cursor and title record, so every
op at or below the old seq was skipped forever: turns never arrived, and
stale titles suppressed pushes. Persist the cursor's household+device and
the title record's household beside them (the shape the Windows sidecar
uses), start at 0 with no titles when the owner is not the current
identity, and clear both when a claim changes the device or household.

A pass also takes the identity again after the token and key reads and
abandons the pass when it changed: a claim landing between them would
seal household A's ops under B's key and wedge A's log. Chat sync now runs
on every transition into Live, so a foreground reconnect pulls what a
peer wrote while the socket was down, and report.skipped reaches
SyncOutcome.Done and the manual sync message instead of being dropped.

Milestone: G4 (sync v0).
The M0 design still listed payload fields the clients never send (the row already names the thread and turn), and the OpenAPI push summary still promised a byte-equality replay rule that the retry fix replaced. Part of agents-demo#32.
A pass read the identity, token and key one after another, but the tuple is
written in pieces: persist writes secrets before the identity and sign-up
writes the identity before the key. Two identity reads could therefore agree
while the token came from one pairing and the key from another. A plain
credential epoch is now bumped when a claim, a sign-up or a sign-out lands,
and a pass captures it before the reads and gives up (no send) when it moved.

The skip count also lied: OwnOpsIgnored rewrote this device's own replayed
ops to kind=null, which the engine counted as skips, so a clean sync reported
"N skipped". The engine now takes an optional ignore predicate that steps
over such ops without opening them and counts them in SyncReport.ignored;
the Android pass uses it for its own device and the sheet counts real skips
only.

Milestone: G4 (sync v0).
The epoch bump closes the common tear but not a pass whose whole read falls inside the write sequence, nor a kill in that gap. The comments claimed the stronger guarantee. Part of agents-demo#32.
The retry-idempotency fix added four tests, so the evidence line's 405 is now 409. Part of agents-demo#32.
Phone to PC 1.25 s warm and 2.42 s on the cold first pass, PC to phone 1.45 s, a revoked PC refused in 138 ms, and one sealed task done each way with the PC to phone execution carried as a gap. Row 1 and 3 stay unticked. Part of agents-demo#32.
Task a7e9bae9 opened the calculator on the PC from the phone. The run also exposed two wrinkles: duplicate phone device rows after sign-up then sign-in, and a composer that does not refresh an expired access token. Part of agents-demo#32.
Keeps the family-board protocol families next to the sync and task composer families: both sides of GatewayHost, the protocol schema, the golden frames and the host protocol table. devices.error returns as a real family with a literal builder, since TaskHandler already emitted it through dataError. Part of agents-demo#32.
Task 037ad005 was delivered and answered E_DEVICE, so the surface still does not answer and the gap is the accessibility service binding, not sync. Part of agents-demo#32.
The header status line was Visibility=Collapsed, so a refused devices.list or an unpaired client left the Send to phone button looking dead. It is visible now, and an unpaired window says so. Part of agents-demo#32.
The window chrome makes the top 52 px a caption, so a real click on Send to phone started a drag and a double click maximized; only the three window buttons were marked hit-test visible. UI Automation bypassed the chrome, which hid the bug in tests. Part of agents-demo#32.
Three warm rounds at 985/998/931 ms and a PC-to-phone task that ran to done after the phone's screen path was set to This phone. The cold first pass (2417 ms) stays recorded rather than dropped. Part of agents-demo#32.
GatewayHost.start runs startBoard before the gateway coroutine, and onBoard is a single slot: attach() replaced the board's receive handler with an error-only lambda, so board.op.ack and board.changed were dropped and every board append timed out on a paired PC. Chain to the handler that was already there and let both see error frames. Part of agents-demo#32.
The class doc promised that a peer's older op could not undo an unpushed local rename, but a pulled title is applied unconditionally and the titles record then suppresses the rename; the test pins that behavior and the PR lists it as a decision. Say what the code does. Part of agents-demo#32.
…other

update() read a snapshot outside edit() and wrote every key from it, so concurrent writers (the sync pass persisting a cursor or titles, the UI, sign-up bumping the credential epoch) could silently revert each other's fields. Run the transform on the preferences edit() already holds. Part of agents-demo#32.
The sync reload checked Running and CurrentId before awaiting the engine, then rebuilt the view unconditionally, so a selection or turn that started during the round trip was overwritten. Every open bumps a generation; a stale reply returns without touching CurrentId or the view, and a reload also yields to a running turn. Part of agents-demo#32.
check-android-structure.py requires a file to carry one public declaration named after it, and contracts may share a file but behaviour may not. SendTaskSheet, RemoteTaskSender, SyncOwnership, DeviceListClient and the sync test fixtures each carried two, which failed both the Android and bridge CI jobs before they reached their tests. Part of agents-demo#32.
The factory appends the link to the list before connect() calls start() on it, so the test could observe the window in between and fail on a loaded CI runner. Poll for started inside the same timeout the file already uses. Part of agents-demo#32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant