Skip to content

fix: core reliability, cancellation, and durable session lifecycle - #1

Draft
649472774 wants to merge 6 commits into
mainfrom
649472774-core-reliability
Draft

fix: core reliability, cancellation, and durable session lifecycle#1
649472774 wants to merge 6 commits into
mainfrom
649472774-core-reliability

Conversation

@649472774

@649472774 649472774 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Scope

Core-only Phase 1 reliability implementation, ready for coordinated integration. No version bump, shared-device installation, agent implementation, or release publication.

Changes

  • Complete HTTP body/socket cancellation and non-streaming reads off Main.
  • Generation-safe login/cancel/refresh, joined awaited logout, and verified Android-Keystore credential migration to no-backup storage.
  • Account-scoped typed runtime model catalog: no retired fallback lists or silent selected-model replacement.
  • SSE event framing, explicit errors/EOF/finish reasons, and delivery of queued partial text before failures.
  • One session authority for live metadata/messages, atomic backups and tombstones, visible corruption recovery, summary loading, and bounded inactive caches.
  • Content-addressed attachments, legacy data-URI migration, bounded coherent prompt history, historical vision, and safe treatment of replies whose original question was deleted.
  • Durable idempotent send receipts and source-compatible awaited UI operations.

Checkpoints

  • 93aa260: HTTP/provider prerequisites.
  • da66b99: production core APIs and lifecycle implementation.
  • 7371ff0: final race/boundary fixes and JVM/native migration coverage.

Evidence

  • 84 declared JVM tests matched to 84 executed XML results; zero failures, skips, or missing methods.
  • Debug APK and Android instrumentation APK build successfully.
  • Android lint: zero errors; 57 pre-existing warnings outside the owned core files.
  • Real persisted DataStore JVM fixtures use the portable Okio-backed factory, retaining all migration assertions.
  • Two compiled AndroidJUnit4 cases use the default Android DataStore factory plus real AndroidKeyStore in generated isolated directories/key aliases. Device execution is reserved to integration's API 31/36 fixture lanes.

Integration notes

Existing constructors remain compatible. DI must wire proxy readiness/configurationError and the optional modelCacheFile; catalog alias/VM contracts were coordinated with owners. Legacy inline text/code is preserved verbatim when the old format has no attachment identity. No automatic blob garbage collection removes files that retained UI drafts may reference. No real credentials or conversations are in fixtures.

Full integrated UI/device acceptance, updated-dependency validation, signing/install compatibility, and milestone publishing remain with the integration/release owners. This PR remains a draft until that acceptance is complete.

Tong Xie and others added 4 commits September 7, 2026 00:29
Keep non-streaming body reads off the caller thread, close responses across callback cancellation races, and cancel the underlying socket through response consumption. Add readiness-gated proxy clients without invalidating live dispatchers and controlled HTTP lifetime regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add generation-safe auth and verified no-backup credential migration; typed cached model discovery without retired fallbacks; SSE error/completion framing; atomic session snapshots, backups, tombstones, summary cache and bounded inactive state. Add content-addressed attachment references, bounded coherent prompt history with retained vision, durable send receipts and awaited UI action APIs. Preserve v0.1.33 JSON and existing public adapters for coordinated UI integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve queued stream deltas before errors, join concurrent logout operations, scope catalog and submissions to account generations, reject changed idempotency payloads, and keep orphaned replies out of unrelated prompt turns. Harden proxy and attachment boundaries and no-follow atomic writes. Add complete regression discovery coverage, portable real-DataStore JVM fixtures, and isolated default-Android-backend plus Keystore instrumentation cases; production key alias and DI defaults are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the published OkioStorage and PreferencesSerializer APIs for token/proxy JVM migration fixtures. createWithPath also selects FileStorage under DataStore 1.1.7 and retains the Windows temp-file replacement bug. Keep all persistence assertions and native default-backend instrumentation unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Tong Xie and others added 2 commits September 7, 2026 10:53
Add opt-in Android acceptance for the three exact legacy fixture IDs and source hashes. Drive production AppPaths, SessionStore and ChatStreamCenter through migration and two fresh reopens; verify all messages, known metadata, interruption repair, original recovery backups and the historical PNG bytes. Add an explicitly read-only migrated-state mode for milestone rechecks. Never seed, delete, access credentials, or make network requests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Force the runBlocking test entrypoint to JVM void so JUnit4 accepts it. Keep both modes, every preflight guard and all migration assertions unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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