mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-24 04:47:03 +00:00
* fix(web): keep the recovery pending until the row sweep succeeds The recovery consumed pendingGapRecovery at the latest-page upsert, before the by-ID row sweep ran: a context request that failed there propagated to the run's catch and surfaced the warning, but the flag was already gone, so the next ordinary tail sync did cursor catch-up only, skipped the sweep, and cleared the warning — the enriched cached call stayed stale with no retry path. Keep the flag pending until the catch-up, the upsert, and every row refresh have succeeded: the upsert now consumes only the activation flag it subsumes, and the recovery completes — clearing pendingGapRecovery — after the sweep finishes without a failure. The sweep's failure exits (a thrown request, a row the endpoint no longer knows, a different-epoch answer) leave the flag set, so the next sync — ordinary or recovery — retries the whole choreography. The upsert itself is idempotent, so a retry costs one extra latest-page round. * fix(android): keep the recovery pending until the row sweep succeeds Mirror of the web fix: the recovery consumed pendingGapRecovery at the latest-page upsert, before the by-ID row sweep ran — a context request that failed there left the enriched cached call stale with no retry path, because the next ordinary tail sync does cursor catch-up only, skips the sweep, and clears the warning. The upsert now consumes only the activation flag it subsumes, and the recovery completes — clearing pendingGapRecovery — after the sweep finishes without a failure; the sweep's failure exits leave the flag set, so the next sync retries the whole choreography. The upsert itself is idempotent, so a retry costs one extra latest-page round. * fix(ios): keep the recovery pending until the row sweep succeeds Mirror of the web/android fix: the recovery consumed pendingGapRecovery at the latest-page upsert, before the by-ID row sweep ran — a context request that failed there left the enriched cached call stale with no retry path, because the next ordinary tail sync does cursor catch-up only, skips the sweep, and clears the warning. The upsert now consumes only the activation flag it subsumes, and the recovery completes — clearing pendingGapRecovery — after the sweep finishes without a failure; the sweep's failure exits leave the flag set, so the next sync retries the whole choreography. The upsert itself is idempotent, so a retry costs one extra latest-page round. Test rides CI. * fix(hub): advance the idle-progress clock on merged tool-call ticks A repeated tick folds into the call's existing row, and the stored row keeps its first snapshot's createdAt for stable ordering — but onAgentProgress received that frozen timestamp on every tick, so repeated snapshots of a live ACP call never advanced the keepalive-idle clock and a session with thinking=false and no background task could be marked idle despite fresh updates. Feed onAgentProgress the merge observation time when the tick updates an existing row; the stored ordering timestamp is unchanged, and the derived todo/team version stamp keeps its strictly-advancing gate. * test(ios): await the actor-isolated failure injection in the sweep-retry test GatedMessagesProvider is an actor, so failNextContextRequests must be awaited from the async test body; without it the new test fails to compile in CI. No production change.