Skip to content

android: fix 409 idempotency_in_flight key drop and unify failure classification - #902

Open
sambitcreate wants to merge 2 commits into
mainfrom
fix/sm-android-parity
Open

sambitcreate wants to merge 2 commits into
mainfrom
fix/sm-android-parity

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

  • Fix the live 409 idempotency_in_flight key-drop bug in AidenBotOpenWorkController.kt and unify Android failure-ambiguity classifiers into protocol/AidenRemoteFailureClassification.kt across Bot, Schedule, Fork, and Worktree controllers
  • Extract shared features/bots/AidenDurablePendingMutation.kt across the 5 durable pending-mutation Bot controllers and fix two STORAGE-masking bugs in OpenWork and Peers
  • Add AidenRemoteFailureClassificationTest.kt and expand controller unit tests

Verification

  • ./gradlew :app:testDebugUnitTest (120 suites, 1,407 tests passed) and ./gradlew :app:assembleDebug :app:compileDebugAndroidTestKotlin (passed); ./gradlew :app:lintDebug running on CI (OOM'd locally on low-RAM Linux box)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

This PR still introduces a key-drop path for unreadable 409 responses, so retrying can duplicate a Bot or scheduled mutation.

Reviewed changes I reviewed the complete Android failure-classification and durable-mutation change against the corresponding transport, host ledger, controller, and mobile contract behavior.

  • Shared failure policies — Adds endpoint-specific ambiguity rules for before-effect refusals, cached durable-ledger rejections, and strict fork/new-worktree replay contracts.
  • Durable Bot controllers — Reuses one sticky-uncertainty and retry-window helper across Open Work, Peers, Resume, Routine Models, and Watches, including the first-attempt 409 idempotency_in_flight fix.
  • Keyed actions — Moves Bot create/session actions, scheduled run-now, fork/continue, avatar, and new-worktree key settlement onto the shared classifier.
  • Storage handling and tests — Preserves Open Work and Peer Stop storage failures and expands behavioral coverage for same-key replay, unknown conflicts, definite refusals, and failed journal clears.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes I reviewed the malformed-error-envelope fix added since the prior Pullfrog review and rechecked it against the complete Android transport and idempotency-settlement diff.

  • Envelope provenance — Preserved whether an HTTP error envelope was genuinely decoded instead of letting synthetic internal_error bodies masquerade as structured rejections.
  • Settlement safeguards — Required decoded envelopes before clearing keys or applying code-specific behavior, while retaining the intentional strict new-worktree handling for unreadable non-409 answers.
  • Regression coverage — Added parser, classifier, controller, and real HTTP tests that verify malformed 409 responses retain and replay the original scheduled-run, Bot action, and Resume keys.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

This branch has not been deployed

No deployments
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