test: stage-to-execute contract tests for Pending Exports - #1686
Merged
Merged
Conversation
Staging tests assert what gets staged and execution tests feed hand-built Pending Exports, so nothing checked that what staging actually produces is something execution can handle, or what state is left afterwards. Three defects lived in that gap (#1681, #1685). This fixture drives the real sync, export and import task processors end to end with no hand-built Pending Exports, across Connected System Object state, the change that arrives, Deprovisioning Action and export path (batched calls, file with and without auto-confirm). After every case it asserts one contract: every staged Delete has an External ID, execution raises no unhandled errors, the end state satisfies the integration sweep's invariants plus one more (no Exported Pending Export left on a disconnected object), and the connector received exactly the expected operations. The three defects are named regression cases. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…te is confirmed Ignored as a finding: staging re-issues a Create for any change that arrives while the Connected System Object is Pending Provisioning, so a second Create reaches the connector instead of an Update after confirmation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Bottom layer of a two-PR stack; the fix it found sits above it.
Why
Staging tests assert what gets staged, and execution tests feed hand-built Pending Exports, so nothing checked that what staging actually produces is something execution can handle, nor what state is left behind. Three defects lived in that gap (#1681 twice, #1685).
What
StageToExecuteContractTests(JIM.Worker.Tests,Workflows/) drives the real sync, export and import task processors end to end onWorkflowTestBase, with no hand-built Pending Exports, across:After every case one shared helper asserts the contract:
Assert-SyncStateInvariants), plus one more: no Pending Export leftExportedon a disconnected CSO.The three earlier defects are named regression cases. Breaking either fix locally turns the matching cases red.
34 cases: 31 pass; the 3
ExportedUnconfirmed + AttributeUpdatecases are a finding (a second Create is sent instead of an Update after confirmation) and are ignored here, and go live in the layer above.Docs: n/a - test only.
🤖 Generated with Claude Code