Repository navigation
Apply SYNC response contract preservation to the v2 mutation path - #340
Merged
Merged
Conversation
Backport of #336 to v2.engine.Graph. See PR body for plan.
When systemMutationMode=ASYNC overrides a table whose own mode is SYNC, derive the response status from the request's EdgeOperation (INSERT -> CREATED, UPDATE -> UPDATED, DELETE -> DELETED, PURGE -> PURGED) instead of returning QUEUED. Tables whose own mode is ASYNC keep returning QUEUED. Mutations are still queued via the WAL. Backport of #336 to v2.engine.Graph. Closes #339 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Add GraphSystemAsyncIgnoreSpec to lock in `system=IGNORE` and `table=IGNORE` returning QUEUED (v2-only modes the v3 patch could not consider). - Convert queuedStatus comment to KDoc and enumerate the QUEUED branches. - Replace inlined FQN with an import; tidy a stray blank line in the async edge JSON descriptor. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
IGNORE is not used in production, so locking in its QUEUED behavior is out of scope for #339. Also trim IGNORE from the queuedStatus KDoc to keep the comment focused on the documented modes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The "system=ASYNC + ASYNC EDGE keeps QUEUED" case is subsumed by the existing "system=ASYNC overrides request=SYNC on ASYNC EDGE" scenario, which already locks in QUEUED for ASYNC tables. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
PURGE is not exercised in production, and MULTI_EDGE is only officially supported by v3 (v2 keeps compatibility but has no integrations). Drop the corresponding tests and fixtures. Keep the `PURGE -> PURGED` mapping in Graph.kt as a defensive intent-based default. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add a class-level KDoc listing the covered scenarios and the intentionally-skipped ones (MULTI_EDGE, PURGE, multi-event tie-break) with a one-line reason each. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
Author
|
Skipped |
2 tasks
Contributor
Author
|
Optimistic merging. |
em3s
added a commit
that referenced
this pull request
May 16, 2026
(cherry picked from commit dbd4058)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport #336 to the v2 mutation path. When
systemMutationMode=ASYNCoverrides a table whose own mode isSYNC, derive the response status from the request'sEdgeOperation(INSERT → CREATED,UPDATE → UPDATED,DELETE → DELETED,PURGE → PURGED) instead of returningQUEUED. Tables whose own mode isASYNCkeep returningQUEUED. Mutations are still queued via the WAL — only the response status changes.Closes #339
Changes
v2.engine.Graph.mutateforsystem=ASYNC + table=SYNC(no force)v2.engine.dml.GraphSystemAsyncSpecmirroring the v3 coverage — INSERT / UPDATE / DELETE / PURGE on SYNC EDGE, INSERT on SYNC MULTI_EDGE, ASYNC table keepsQUEUED, request=SYNC and force=true overridesHow to Test
./gradlew :engine:test --tests "*v2*SystemAsync*"./gradlew buildAI Assistance