Repository navigation
fix: keep shadow order identities unique across restarts - #122
Closed
stefan-jansen wants to merge 8 commits into
Closed
stefan-jansen wants to merge 8 commits into
stefan-jansen wants to merge 8 commits into
Conversation
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.7.0...2.8.0) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.8.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Shadow fills used a millisecond timestamp as the order id. Two orders accepted in the same millisecond shared an id, so later reconciliation overwrote the first fill. Co-authored-by: quantum-like <quantum-like@users.noreply.github.com>
Contributor
Author
|
Superseded by the combined maintainer-directed maintenance PR #121 to avoid qualifying and merging this queue separately. This PR head and its regression/documentation evidence are preserved in #121 and in a verified recovery archive. The accepted issue remains open until the combined fix lands; this closure does not claim the fix is merged. Follow-up work continues in #121. |
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.
Shadow orders submitted within one clock tick share an ID. The initial sequence-based repair also repeats IDs after a broker restart while the execution journal persists. Generate unique identities for both normal shadow fills and shadow position reductions.
Closes #117. Resolves the shadow-identity part of #111. Retains the original contribution from #112 by quantum-like/Cursor Agent, then corrects its restart collision.
Regression:
uv run pytest -q tests/contracts/test_causal_strategy_parity.py::test_shadow_order_identities_do_not_collide_within_ticks_or_after_restart tests/unit/test_safe_broker.py::test_shadow_order_ids_stay_unique_when_the_clock_does_not_advance.git archiveand runs the unchanged regression. Ruff and commit hooks, including ty, passed. Full supported-runtime and artifact qualification runs in hosted CI before merge.Depends on security baseline #109. No release is included.
AI assistance: Cursor prepared the original repair; Codex reproduced the restart failure, revised identity generation, added the public-engine regression and ran checks.
Current qualification head: 54bbca4, integrated with merged IB fix #104. The two identity regressions and all 12 provider-contract cases pass in 3.23s. The latter retain IB-adapter invalidation and shared-safety invalidation for both IB and Alpaca. Security prerequisite #109 is merged. Current-head hosted qualification remains required before merge.