Repository navigation
ios: unify failure ambiguity classifiers and extract AidenDurablePendingMutation - #901
sambitcreate wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Important
Durable Bot retries can keep a key after the host has proven its rejection is settled.
Reviewed changes I reviewed the complete initial diff and traced both classifier tiers and the shared pending-mutation engine through their iOS callers and host-side durability contracts.
- Failure classification: Consolidates mutation ambiguity decisions into before-effect-refusal and cached-rejection-ledger policies across Bot, workspace, schedule, Git, fork, and worktree flows.
- Durable mutation engine: Adds the shared
AidenDurablePendingMutationlifecycle for persist-before-send admission, storage fencing, replay limits, unknown-outcome retention, and settlement. - Bot model integrations: Moves Open Work, Peers, Peer Exchange, Resume, Routine Models, and Watch onto the shared engine while preserving their stores and reconciliation paths.
- Coverage and shipping wiring: Adds classifier, engine, and Resume behavioral tests and registers the new Swift sources in Xcode and the shipping inventory.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
ℹ️ No new issues in this incremental delta; the earlier unresolved classifier concern remains open.
Reviewed changes I reviewed the changes since the prior Pullfrog review at 1354e0d08, including their interaction with every retry call site in the full PR.
- Made retry persistence nonescaping: Split
beginRetryinto a no-persistence convenience overload and a required persistence-callback overload so fail-closed retry sites can pass actor-isolated state safely. - Isolated Tier 2 test closures: Typed the classifier table as
@MainActorand wrapped actor-isolated method references in explicit closures. - Extended state-machine coverage: Added behavioral checks for rejected, saved, and storage-failed retry persistence outcomes while preserving the pending attempt and phase invariants.
@v0 or keep the SHA fresh with Dependabot | Fix it ➔ | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the durable Bot-ledger classifier changes since the prior Pullfrog review and traced them through the affected iOS retained-key flows and host-side operation contracts.
- Added an explicit Bot-ledger policy: Introduced
durableBotLedgerBeforeEffectRefusalso decoded replayed409 internal_errorresponses release settled keys without weakening live failures, malformed responses, oridempotency_in_flight. - Updated durable Bot callers: Routed Bot creation, avatar upload, conversation creation, messages, and indirect session actions through the named policy while leaving strict before-effect routes unchanged.
- Added end-to-end retry coverage: Exercised lost responses, malformed and in-flight
409responses, settled rejection replay, fresh-key retry, and eventual success across representative create, avatar, conversation, and question flows.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

Summary
ios/AidenOnTheGo/Networking/AidenRemoteFailureClassification.swiftwith two endpoint-contract tiers (beforeEffectRefusalvscachedRejectionLedger), fixing the live409 idempotency_in_flightkey-drop bug (OpenWork, Watch, RoutineModels, Bot Session/Settings/Avatar) andCancellationError/non-AidenRemoteClientErrorkey drops (Coordinator, ScheduledTasks, WorkspaceGit)@MainActorAidenDurablePendingMutationacross the 5storageBlockedfiles / 6 classes (AidenBotResumeModel,AidenBotWatchModel,AidenBotRoutineModelsModel,AidenBotPeersModel+AidenBotPeerExchangeModel,AidenBotOpenWorkModel) while keeping the 4 persistence stores and purge hooks unchangedAidenRemoteFailureClassificationTests,AidenDurablePendingMutationTests, andAidenBotResumeModelTests, extendAidenScheduledTaskTests, and wire intoproject.pbxprojandscripts/check-ios-shipping-target.test.mjsVerification
node --test scripts/check-ios-shipping-target.test.mjs scripts/check-ios-testflight-policy.test.mjs scripts/check-ios-app-store-metadata.test.mjs(22/22 passed on Linux; macOS CIxcodebuild testrunning on this PR)