Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@terwey
Copy link
Collaborator

@terwey terwey commented Nov 5, 2025

No description provided.

claude and others added 4 commits November 5, 2025 17:52
…rable

The Action struct had pointer fields (Create, Modify, Cancel) which made
it non-comparable in Go. Since OrderWork embeds Action and the typed queue
requires comparable structs, this violated Go's comparability requirements.

The fix removes the pointers and uses value types instead. The ActionType
field already indicates which action is active, making nil checks redundant.

This change:
- Changes Action fields from pointers to values
- Updates all action creation sites to use values instead of pointers
- Removes all nil pointer checks, replacing them with ActionType checks
- Updates all dereferences to use values directly
- Updates test assertions to remove NotNil checks

Resolves Bug #1: OrderWork Comparability Violation as described in
specs/multi_venue_emission.adoc
Fixed compilation errors from the Action struct pointer removal:
- storage/storage.go: Return &action.Create from LoadHyperliquidRequest
- filltracker/service.go: Remove & when assigning to Action fields (4 places)
- storage/sqlite_test.go: Remove nil checks and dereferences for value types
The cloneAction function no longer needs to check for nil or dereference
fields since Action now uses value types instead of pointers. A simple
struct copy is sufficient as Go will copy all value fields.
@terwey terwey merged commit c5899a4 into codex/extend-cmd/recomma-to-handle-multiple-venues Nov 5, 2025
1 check passed
@terwey terwey deleted the claude/fix-orderwork-comparability-011CUq9XdzPA2Jj9kyhTqGJK branch November 5, 2025 19:01
terwey pushed a commit that referenced this pull request Nov 5, 2025
Updated MULTI_VENUE_BUGS.md to reflect resolved issues:

Resolved (PRs #75 and #76):
- Bug #1: OrderWork comparability violation
- Bug #2-4: Scaled orders multi-venue architecture

Remaining issues (renumbered #1-4):
- Bug #1: Missing scaled_orders in wallet migration (High)
- Bug #2: Take profit reconciliation fan-out (Medium)
- Bug #3: Fill tracker memory growth (Medium)
- Bug #4: Replay logic edge case (Low)

PRs:
- #75: Removed pointer fields from Action struct
- #76: Fixed multi-venue scaled order handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants