Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0ad94f4
fix(mobile): preserve stream recovery and optimistic send ownership
sambitcreate Sep 22, 2026
53499c7
fix(mobile): fence recovery handoffs and terminal publications
sambitcreate Sep 22, 2026
7e3c559
docs: record held-I/O recovery regression evidence
sambitcreate Sep 22, 2026
c022807
fix(ios): fence accepted transcript cache writes
sambitcreate Sep 22, 2026
11003b1
fix(ios): honor rejected transcript writes at callers
sambitcreate Sep 22, 2026
bf5ddba
fix(ios): fence stream companions and propagate removal
sambitcreate Sep 22, 2026
3b61471
fix(ios): couple chat deletion to consumer lifetime
sambitcreate Sep 22, 2026
f959469
fix(ios): fence all chat cache writes across deletion
sambitcreate Sep 22, 2026
d573672
test(bots): handle stdin closure after native rejection
sambitcreate Sep 22, 2026
c22c083
fix(ios): finish draft and attachment lifetime cleanup
sambitcreate Sep 22, 2026
683f92d
Assert capacity denial against its own filesystem observation
sambitcreate Sep 22, 2026
0cba92f
test(worktrees): allow large finite capacity observations
sambitcreate Sep 22, 2026
057dc75
fix(ios): complete deletion metadata and upload cleanup fences
sambitcreate Sep 22, 2026
d3e34e6
fix(ios): retain completed uploads through deletion cleanup
sambitcreate Sep 22, 2026
ff777f5
Fence cleanup-era cache writes while preserving unrelated metadata
sambitcreate Sep 22, 2026
62fa352
fix(ios): retain incoming cursor for absent partial summary cache
sambitcreate Sep 23, 2026
1a3cd3e
Fence Android chat reads and Home summary admission (#225)
sambitcreate Sep 26, 2026
ccb6415
Preserve iOS Bot navigation and live permission ownership (#233)
sambitcreate Sep 26, 2026
75a156c
Merge origin/main into feature/mobile-stream-recovery
sambitcreate Sep 26, 2026
d41ad06
test(mobile): cover #217 x #218 run controls on iOS and Android
sambitcreate Sep 26, 2026
37b5920
fix(ios): resolve the 9 failing AidenChatTests on #217
sambitcreate Sep 26, 2026
26123c4
Merge origin/main into feature/mobile-stream-recovery
sambitcreate Sep 26, 2026
49f8d90
docs(papercuts): keep ios/AGENTS.md device policy as the standing gui…
sambitcreate Sep 26, 2026
adf2509
Merge origin/main into feature/mobile-stream-recovery
sambitcreate Sep 26, 2026
eb2dc82
fix(ios): superseded create/send read the admitted chat winner
sambitcreate Sep 26, 2026
fd217a3
Merge remote-tracking branch 'origin/main' into HEAD
sambitcreate Sep 26, 2026
1ad6af1
fix(ios): keep a superseded or failed create's row in the durable list
sambitcreate Sep 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .memory/ios-bot-response-ownership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# iOS Bot response ownership

Isolated worktree /Users/sambitbiswas/.codex/worktrees/ios-bot-response-ownership/aiden-agent, branch feature/ios-bot-response-ownership atop PR217 ff777f501. PR217/225/227 heads remain unchanged. PR227 exact3f7154e7 all hosted CI green,0threads, acceptance recorded.

Bot open/hydrate reserve cache tickets before their first await and share a navigation attempt owner. Later loads and away/back scope changes invalidate older callbacks; deep-link publication supersedes them. Permission completion updates the currently presented transcript instead of its captured pre-permission copy. Cache admission retains an in-memory winner before disk IO, with removal/purge fences, so an old rejected GET cannot fall back to stale disk after a newer write failure. Warm Bot loads also use the admitted winner.

New held production HTTP regression covers GET A delayed behind GET B, newer disk failure, removal and purge, with request-origin admission and persisted winner checks. A held permission-attempt regression covers away/back and instance/device navigation. Generic XCTest compilation passes; physical execution is not claimed. Android/policy checks and independent Sol medium reviews underway. These tests are compiled, not executed baseline reproductions; original-main duplicateGET reachability was source-confirmed in .memory/mobile-response-ownership.md. iOS workspace rename/list ownership remains assigned separately; physical device locked, no simulator/device launch.

Review corrections: path mutations now invalidate attempts synchronously through the same production helper used with the real navigation store in the held away/back test; error continuations also directly check path/scope. Live installation write grants and a live notice-policy closure are rechecked at permission publication against the attempt policy. Restoration identity includes both policy inputs, allowing current-chat permission refresh without transcript rollback. Deep-link permission and detail transcript callbacks preserve the other current field. The admitted cache API rejects disk fallback after purge even if cleanup left a file; fresh post-purge admission remains valid. Four XCTest methods compile, covering held production GET order/disk/removal/purge, real navigation-store away/back ownership, and held write/notice downgrades. Android177 JVM/lint/instrumentation and policy31Node20Ruby42 pass. Final independent reviews/build pending; no physical execution claimed.

Create review correction: a successful Bot create receipt publishes the shared awaitingPermission presentation (mutations false), then existing-destination restoration resolves live permission. Added a held real Bot-create POST regression using that same production presentation. This avoids inheriting pre-POST permission across a downgrade without retrying the POST. Fixed the test idempotency argument to UUID after a compilation diagnostic. Final generic XCTest build is being confirmed; both actual-diff re-reviews requested.

Final acceptance: generic iOS app/XCTest build-for-testing passes (/tmp/aiden-ios-bot-response-build.log); Android177 JVM/lint/instrumentation compilation and policy31Node20Ruby42 pass (/tmp/aiden-ios-bot-response-android.log and /tmp/aiden-ios-bot-response-policy.log). Both independent GPT-5.6 Sol medium final actual-diff reviews are clear. Physical XCTest remains unexecuted.

Hermes review on 0f94027e (2 P1s): (1) restoration now adopts an in-flight user open for the same scope/chat/canWrite/notice policy instead of superseding it on the open's own path change (owner `adoptable`/`adoptsRestoration`/`finish`; restoration attempts are never adoptable because SwiftUI cancels them on id change). (2) Restoration revalidating an already-presented chat keeps a live grant only when it was made under the same notice policy and write is still allowed (`Presentation.resolved`/`revalidating`); policy changes and non-live (deep-link) grants still fail closed. Two owner-level XCTests added; generic build-for-testing passes, not executed (no physical device, simulator prohibited).
35 changes: 35 additions & 0 deletions .memory/ios-home-response-ownership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# iOS Home response ownership

Isolated feature/ios-home-response-ownership atop PR236 dcfd0d707. Implementation complete; preparing reviewed publication. Hosted and combined acceptance remain pending.

Source schedule: Home reserves before HTTP but summary save returned Void on rejected tokens; caller then published raw response/cursor. Per-model generation cannot arbitrate another Home owner or detail settlement. Added namespaced synchronous summary reservations, shared original-token admission, Bool write results, memory summary winner after IO failure, and detail projection under the accepted original token. Home respects rejection; continuation checks its cursor boundary against admitted shared state before merging.

Two new regression methods hold actual production Home HTTP through detail settlement, another Home request, or purge; and hold actual continuation cache admission through newer detail/request/purge, checking unchanged cursor and retry. Generic XCTest compilation passed before final cursor-base refinement; policy31Node20Ruby42 pass. Tests compiled only, no physical execution or executed iOS baseline claimed. Both Sol reviewers inspecting pending diff; final checks and corrections remain necessary.

PR236 dcfd0d707 has hosted verify/E2E running and no review threads at this turn. Integration bbb71364a accepted by both Sol reviewers, fresh iOScompile/157host, unchanged213Android evidence. Earlier stable PRs unchanged. Physical acceptance unexecuted while shared iPhone locked. No merges/releases/deployments.

## Final implementation and validation in progress

Summary reservations are synchronous and installation-scoped. Accepted detail projection keeps its original token, so an older queued detail cannot supersede a newer Home request. Home commits only admitted pages; admitted memory survives summary filesystem failure while validation/size failures still reject. Local generation is not used as a cross-owner cache clock.

Review corrections: deletion takes fresh summary authority after held cleanup; no-chat Home plans do not reserve summary authority; rejected chat segments settle and still publish independent segments; local writes patch all unacknowledged edited IDs into current admitted summaries and preserve its cursor; initial UI reapplies local edits since request start, and pagination reapplies postcommit edits including newly introduced page IDs. The newest local patch acknowledges prior edits only after acceptance. Continuations validate the shared cursor before merging. Initial warm hydration checks the latest request token before taking ownership after an await.

Five new methods cover three held production HTTP schedules, three held continuation cache schedules and retry, actual blocked summary filesystem memory admission, held deletion cleanup with an intervening request and restart, and page commit followed by two queued local edits (including a new page row) with restart. Generic app/XCTest compilation succeeds /tmp/aiden-ios-home-response-build.log. Android177 JVM/lint/instrumentation compilation succeeds /tmp/aiden-ios-home-response-android.log. Policy31Node20Ruby42 succeeds /tmp/aiden-ios-home-response-policy.log. These are compiled iOS regressions, not physical execution or executed baseline failures. Final Sol reviews pending.

The partial-summary cursor expression also carries the already accepted PR21762fa semantics: absent cached snapshot retains incoming cursor; cached nil cursor stays nil. This is prerequisite-equivalent integration overlap, not a new cursor policy.

Final review refinements: publish the atomic admitted snapshot/authority rather than a raw accepted response, including partial deletion transformations. Token-qualified local edit replay and per-row original edit tokens prevent replay over a newer cross-owner detail winner. Removal synchronously persists its authoritative deletion regardless of concurrent nonisolated HTTP reservations; a new exact reserve/admit-seam regression verifies restart excludes the row. The held cleanup regression remains.

Per-row authority review correction: full HTTP pages and row mutations now have separate token floors. Detail/local/removal/rename companions advance only their affected row; queued activity A remains valid across unrelated settlement B, while older A edits cannot overwrite newer A. Atomic publication state returns full and per-row floors. Expanded tests include unrelated activity retention through detail and later folded patch, plus durable reopen. Latest compile and policy checks pass.

PR236 dcfd0d707 is now hosted accepted: verify/E2E success, Android correctly area-skipped, zero threads. Final exact-head evidence recorded in PR body, coordinator/integration notified.

Final companion conversion: reconcileWorkspaceChat uses the target row authority for Home eligibility, so unrelated B settlement no longer suppresses valid A rename. Extended regression covers delayed PATCH origin, newer A canonical settlement, accepted rename overlay, newer unrelated B, then companion A and both retained rows. Generic compilation and policy pass after this delta.

Final same-row cutoff correction: rename companion row authority covers max(receipt cutoff, winner), so a whole-row local snapshot reserved during PATCH cannot roll the accepted title back. Expanded schedule reserves that patch after canonical settlement but before receipt cutoff, delivers it after companion and unrelated settlement, then reopens to verify the accepted title and admitted activity.

Post-receipt activity review correction: an existing locally updated row can receive the presented rename winner while retaining its activity, provided no later authoritative full-page snapshot superseded the receipt. Later full-page rows and absent post-receipt removals remain protected. The companion keeps max(existing row, receipt cutoff, winner) authority. Regression persists an activity change after cutoff but before actor receipt admission, then asserts accepted title plus active state and rejection of the earlier queued whole-row patch after restart.

Activity-only writes now carry a field mask through queued cache patching and UI replay. They change only current activity, preserve canonical title/revision and do not recreate missing rows. Unacknowledged full-row edits retain full semantics when folded with subsequent activity changes. The final reopen regression updates activity from a stale-title Home snapshot after the rename companion and confirms both current title and new activity. Latest generic compilation and policy pass.

Both independent GPT-5.6 Sol medium final reviews are clear, including the final activity-only field mask and all preceding ownership/rename corrections. Generic XCTest compilation, Android177 JVM/lint/instrumentation and policy31Node20Ruby42 pass. Physical execution remains unexecuted.
29 changes: 29 additions & 0 deletions .memory/ios-rename-response-ownership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# iOS rename response ownership

Isolated feature/ios-rename-response-ownership atop PR23418eddee68833ffdbfaa1e9cbf7f67cd81e7a91dd. PR217 cursor62fa352d is separately integrated; do not duplicate it.

## Implementation

A successful delayed PATCH owns a title field, not a whole older transcript/revision. Reserve its request origin before HTTP and receipt cutoff synchronously before the cache actor hop. Keep a separately persisted RenameTitle record, with a presentation-only localTitleOverride excluded from AidenChat CodingKeys; canonical cache encoding and admitted canonical objects retain coherent server fields. Workspace rows, detail navigation title, summary projection and Live Activities use displayTitle. Canonical detail initial/reconcile/title GETs now reserve before HTTP and use saveFetchedChat.

The title overlay survives pre-receipt reads and retires only after a later-requested admitted coherent GET/full workspace LIST. Receipt and fetched high-water marks fence actor mailbox reordering and overlapping PATCH completion orders. Retirement writes an atomic explicit retired-state record rather than relying on unlink; a failed canonical write preserves the fresh memory winner and separately records its title for restart. Remove/purge clear or fence overlay state. Post-purge disk fallback remains blocked.

Workspace rename refreshes read-only after a successful PATCH, never replays it, and requires a coherent GET before another revisioned rename/remove while an overlay is pending. Failed refresh retains the successful title. The companion reads current canonical state after the metadata suspension and synchronously upserts list/summary without inventing transcript authority. Post-receipt authoritative metadata omissions remain absent; a newer list row wins presentation over older detailed-cache state. Only actual HTTP list admission may retire a title overlay, not locally queued metadata snapshots. Unrelated chat deletion does not suppress a retained rename.

## Regression/validation evidence

Ten new XCTest methods cover real held PATCH against newer settlement, removal, purge and unrelated deletion; failed refresh with separately reopened title/canonical records; no next PATCH/DELETE until coherent refresh and valid If-Match; successful list/summary reopen; failed unlink and canonical IO; both PATCH/GET orders; fresh GET during suspended receipt persistence and before actor entry; overlapping newer/older receipts; held metadata companion versus older-reserved detail GET; post-receipt empty list/summary; production callback/model/reopened-cache adoption of a newer full-list row; and a held older summary released after the winning list companion. The previous empty-list rename test now distinguishes a valid unrelated row update from a newer authoritative omission. These are compiled regressions, not executed iOS tests or an executed baseline failure.

Generic app/XCTest build-for-testing: /tmp/aiden-ios-rename-response-build.log. Android JVM/lint/instrumentation compilation: /tmp/aiden-ios-rename-response-android.log (177 tests). iOS policy: /tmp/aiden-ios-rename-response-policy.log (31 Node, 20 Ruby/42 assertions). Initial policy source-regex failure was caused by changing the unrelated Bot header title fallback; that binding was restored and checks pass. Final review clearance/publication will be recorded below.

Physical acceptance remains unexecuted; shared iPhone passcodeRequired true, no slot or launch. Remaining assigned work is iOS Home summary response admission and PR CI/review follow-through; this patch does not claim that Home race fixed.

Final summary reconciliation carries the selected list/detail winner token, preventing an already-held older summary from replacing it. Passed presentation objects with a local title override also require coherent refresh before rename/remove, even if another owner has already retired shared overlay state. Final generic XCTest compilation and policy checks pass; Android177 tests/lint/instrumentation remain unchanged and green. Both independent GPT-5.6 Sol medium final full-roster reviews are clear.

## Integration correction: list title across detail hydration

Combined review found that a later authoritative LIST could admit title C but throw before retiring rename B; even successful retirement exposed an older canonical detail title A/B to generic detail hydration. A later authoritative list now supersedes the separate title record in a defer after admission, whether list persistence succeeds or fails. It retains C separately until a coherent detail GET catches up; canonical transcript/revision remains untouched and later revisioned mutations retain the read prerequisite. Actual HTTP title provenance is kept separately from locally replaced workspace snapshots, so a mailbox-late PATCH cannot select a locally replayed old title instead of the newer HTTP title. Removal/purge clear this provenance.

Two additional XCTest methods cover sixteen combinations including empty/nonempty authoritative titles of HTTP/local list, pre/post-receipt reservation and successful/failed list IO, checking workspace and generic detail presentation, unchanged canonical title/revision, restart, and later coherent detail retirement; plus HTTP C followed by local snapshot B before actor-late PATCH admission. Generic compilation passes /tmp/aiden-ios-rename-list-failure-build.log, unchanged177 Android JVM/lint/instrumentation checks pass /tmp/aiden-ios-rename-list-failure-android.log, policy31Node20Ruby42 passes /tmp/aiden-ios-rename-list-failure-policy.log. These regressions are compiled only; physical tests remain unexecuted. Both independent GPT-5.6 Sol medium final correction reviews are clear. Corrected-head integration acceptance remains required.

Review also caught the valid empty-title restart case: new title records encode an explicit retired flag; missing legacy flags retain the prior empty-title tombstone interpretation. Empty authoritative titles now survive restart. Final generic compile and policy checks pass in /tmp/aiden-ios-rename-empty-title-build.log and /tmp/aiden-ios-rename-empty-title-policy.log.
13 changes: 13 additions & 0 deletions .memory/ios-workspace-response-ownership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# iOS workspace response ownership

Isolated branch feature/ios-workspace-response-ownership atop PR2330f94027e. PR217 cursor correction62fa352d is separately published and must be composed by integration; this branch does not duplicate it.

## Workspace list slice

A held workspace GET previously published its raw response before cache admission, allowing a newer detail transcript/title or newly created omitted row to disappear. The request already reserves before HTTP; saveChats now returns admission and merges newer admitted detail owners by that original token. A namespaced admitted workspace snapshot is retained before disk IO, and the model publishes that current snapshot after its awaits. Newer list requests still authoritatively remove omitted older rows. Per-chat removal filters memory and purge clears it. A purge-generation guard rejects stale disk fallback when deletion fails; fresh post-purge lists are admitted normally.

Two compiled XCTest methods cover six real held-HTTP schedules (newer detail, omitted newer detail, failed list write, removal, purge, newer list) and failed purge deletion with actual stale disk plus fresh re-admission. These are source/compiled regressions, not executed iOS negatives. Generic app/XCTest build-for-testing passes /tmp/aiden-ios-workspace-response-build.log. Fresh Android177 JVM tests/lint/instrumentation compilation pass /tmp/aiden-ios-workspace-response-android.log; policy31Node+20Ruby42 pass /tmp/aiden-ios-workspace-response-policy.log. Both independent GPT-5.6 Sol medium reviews are clear after the failed-purge fallback correction. Physical tests remain unexecuted; shared iPhone locked.

## Remaining assigned scope

Rename is separate and not claimed fixed here. Preserve successful PATCH title as a field-specific overlay, canonical transcript/revision unchanged; reserve before PATCH and all detail GETs, refresh via read-only GET and retire overlay only after a later-requested admitted snapshot. Require a coherent refresh before another revisioned rename/remove. Persist overlay separately if restart retention is promised. Never replay mutations. Cover both PATCH/GET orders, refresh failure, next mutation, deletion/purge, disk failure and valid navigation. iOS Home summary response ownership also needs the Android225-equivalent acceptance audit; cache deletion fencing alone does not establish request-versus-detail ownership.
Loading