Skip to content

fix(integrations): serialize same-connector mutations - #3336

Draft
Chris0Jeky wants to merge 4 commits into
audit/3331-integration-session-ownershipfrom
audit/3334-integration-mutation-order
Draft

Chris0Jeky wants to merge 4 commits into
audit/3331-integration-session-ownershipfrom
audit/3334-integration-mutation-order

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Closes #3334.

Stack

Stacked on PR #3332 (audit/3331-integration-session-ownership), itself stacked on #3329. The current merge base is corrected parent head 4a18108e3fd9dec6b2edadd176461c414f734369; compare confirms the child is ahead with only its four mutation-ordering files.

Summary

Serializes update/delete/enable/disable work per connector ID while preserving independent-connector concurrency:

  • the first same-connector mutation starts transport immediately;
  • later intent waits for its predecessor, regardless of success or failure;
  • queued work rechecks the credential epoch captured at submission;
  • identity/token/session replacement clears queue registration, preventing old intent from using later credentials;
  • a failed predecessor does not cancel the next intent;
  • queued start clears a receipt only when it is owned by its own predecessor, never an unrelated connector;
  • fix(integrations): invalidate mutations on session replacement #3332’s stale-session cache/detail/toast/error rules remain unchanged.

Delete remains ordered rather than magical: later intent may still reach the server and receive NotFound. This preserves one client’s submission order only and does not solve cross-device concurrency without a backend revision contract.

Test-first and review evidence

  • Original parent: ade79cd4ceac6ca3f3130ba1765039bbfbc0337a
  • Initial test-only child: ecae7bd64f55f26b572bd22486fbe0e3bc7264a6
  • Initial serialization correction: 67aed3cfd07ec6317b0d46a6cd998e2a402248f7
  • Independent-error regression: ed2edaee632f3fe67934dd15645750ec83a44551
  • Parent reconciliation and review correction / current head: 26973971495bf19d55328a2daaf7b46499e507e6

The original negative control produced five expected failures while the different-connector concurrency control passed; all six ordering schedules passed after serialization.

Codex review found that connector 1's queued mutation could erase connector 2's failure when transport began. The new deferred Pinia case makes connector 2 fail while connector 1's successor waits, then asserts connector 2's receipt survives both queued start and success. Error receipts now carry the token that produced them, and queued work can retire only its own predecessor's token.

Prior qualification

Initial head 67aed3cfd07ec6317b0d46a6cd998e2a402248f7 passed Self-Test 35599938032, Extended 35599938236, and Required CI 35599938601. Those runs predate the review correction and corrected parent.

Exact-head CI and repeat independent review are required at 26973971495bf19d55328a2daaf7b46499e507e6. Keep draft and stacked until inspected. After #3329 and #3332 land, retarget to current main, verify the child-only diff and rerun qualification.

Green CI is not merge authorization. No merge, release or deployment qualification is claimed.

@Chris0Jeky
Chris0Jeky marked this pull request as ready for review September 21, 2026 14:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T14:13:03.782182Z 67aed3c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67aed3cfd0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/taskdeck-web/src/store/integrationStore.ts Outdated
@Chris0Jeky
Chris0Jeky marked this pull request as draft September 21, 2026 14:13

Copy link
Copy Markdown
Owner Author

Parent reconciliation required before any further qualification.

PR #3332 now ends at 636953f3592e972743df8d1ec3577b76e63545a9, not the 4a18108 parent snapshot currently embedded here. The corrected parent preserves settled connector list/detail across same-user refresh and retries only active empty read lanes, retaining the connector ID and never replaying mutations.

Keep this third-level child draft and treat its current non-mergeable state and prior CI as superseded. After #3329 and #3332 are integrated, rebuild the mutation-ordering delta on the corrected parent, verify the child-only diff, and rerun the complete matrix and review.

Copy link
Copy Markdown
Owner Author

Handoff: this child is fully saved at 26973971495bf19d55328a2daaf7b46499e507e6. Parent #3332 has since advanced to 636953f3592e972743df8d1ec3577b76e63545a9, so keep this PR draft. Reconcile/restack after #3329/#3332 settle, verify the child-only diff, and rerun exact-head CI/review before changing readiness.

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

Status: Pending

Development

Successfully merging this pull request may close these issues.

1 participant