Repository navigation
fix: record callback terminal operation updates - #868
Open
zhongkechen wants to merge 3 commits into
Open
zhongkechen wants to merge 3 commits into
zhongkechen wants to merge 3 commits into
Conversation
Contributor
Codex AI reviewNo actionable findings in the three changed files, including against CONTRIBUTING.md rules 1–9. Tests were inspected but not executed under the read-only constraints. Deployed Lambda parity remains unverified, as documented in the PR. Reviewed commit |
This branch was successfully deployed
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.
Issue #, if available
Fixes #860.
Description of changes
An externally completed callback could resume with terminal state but no
UpdatedOperationIdsentry, so its first completion was treated as replay andthe terminal plugin hook could be missing before dependent code ran.
Record the callback operation ID after accepted success, failure, and timeout
transitions, under each path's existing state lock. The existing helper keeps
insertion idempotent. Results, diagnostics, sequence/token behavior, and rejected
completion validation remain unchanged.
Design
through existing public APIs and adds no API or option.
_record_updated_operation, as wait,retry, and chained-invoke completion already do. A separate delivery ledger or
changes to plugin hook scheduling are unnecessary.
replaced its state but omitted the existing updated-ID bookkeeping call.
Validation
The failures demonstrate missing pending IDs and missing terminal hooks before
the dependent step. Already-pending-ID controls pass on the baseline.
hatch run dev-testing:test -q --tb=short: 1766 passed. The fullsuite ran with loopback access after the sandbox denied web-runner binds.
hatch run dev-testing:typecheck: no issues in 137 source files.hatch fmt --check: passed.hatch run dev-testing:js-examples --js-dir ... --no-build: 123 passed,zero retries/failures, four files without cloud tests out of 127 selected,
using the existing build at
3deb8389531d35642e2d4657a69575522dc7a7ea.Unit tests cover success/failure/timeout, idempotent ID insertion, unknown and
already-terminal rejection, unchanged unrelated callbacks, sequence/token
accounting, both stores, and input construction through both invokers. Public
handler tests cover suspension/resume on memory and filesystem stores, snapshot
visibility, the first terminal hook's non-replay flag, status/result/error, and
delivery before the dependent step. A saved step executes once.
No existing test expectations change.
Assumptions
service-parity expectation specified in [Testing]: Record callback terminal completions as updated operations #860 and carried forward from fix(testing): match replay state to the service #795.
Deployed Lambda qualification is unverified here; tests exercise the local
runner and persistence paths.
time; it does not fabricate a completion hook or operation snapshot.
Decisions not covered by the issue or the design note
then assert after execution. This proves ordering without turning an expected
baseline assertion failure into step retries.
acknowledgment remain independently scoped to [Testing]: Acknowledge invocation input without losing pending updates #861; empty errors remain [Testing]: Preserve empty callback error history without changing runtime errors #862.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.