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

Skip to content

Conversation

@terwey
Copy link
Collaborator

@terwey terwey commented Nov 2, 2025

Summary

  • propagate venue-aware order identifiers through storage operations and SSE payloads
  • update API schema and generated types to expose venue_id on streamed order identifiers
  • add a dedicated multi-venue regression test covering storage isolation and SSE tagging

Testing

  • go test ./...

https://chatgpt.com/codex/tasks/task_e_6906a9bd04408326af820dbb84a9c2a9

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 134 to 138
callCtx, cancel = context.WithTimeout(gctx, r.timeout)
defer cancel()
}
ok, refreshErr := r.refreshOne(callCtx, md)
ok, refreshErr := r.refreshOne(callCtx, ident)
if refreshErr != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Status refresher ignores venue when querying statuses

The storage interface now returns venue-aware OrderIdentifiers, but StatusRefresher.Refresh still loops over every identifier with a single Hyperliquid client and calls QueryOrderByCloid using only ident.Hex(). When more than one venue is configured, this refresher will attempt to query orders belonging to other venues with the wrong credentials, which Hyperliquid rejects (e.g. “order not found”), leaving those orders’ statuses stale and causing the refresh to return aggregated errors. The refresh logic should partition identifiers by venue/wallet or otherwise dispatch them to the correct client.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex good catch, however due to the refactor described in specs/multi_venue_emission.adoc this should not be fixed here but needs to be part of the refactor. Make an addendum to the spec that mentions this problem and that it needs to be addressed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Documented the need for venue-aware status refresher dispatch in the multi-venue emission refactor spec to ensure identifiers are routed through the correct clients. specs/multi_venue_emission.adocL91-L91

Testing

  • ⚠️ not run (documentation-only change)

View task →

@terwey
Copy link
Collaborator Author

terwey commented Nov 2, 2025

@codex review and keep specs/multi_venue_emission.adoc in mind

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 163 to 168
return nil
}

func (r *StatusRefresher) refreshOne(ctx context.Context, md metadata.Metadata) (bool, error) {
result, err := r.client.QueryOrderByCloid(ctx, md.Hex())
func (r *StatusRefresher) refreshOne(ctx context.Context, ident recomma.OrderIdentifier) (bool, error) {
result, err := r.client.QueryOrderByCloid(ctx, ident.Hex())
if err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route status refreshes to the correct venue client

Storage now returns venue-aware identifiers, but StatusRefresher.Refresh still iterates those identifiers and always queries Hyperliquid through the single r.client. The refresh loop never inspects ident.VenueID/ident.Wallet or chooses the appropriate venue-specific client, so in a multi-venue configuration every order belonging to a non-default venue will be queried against the wrong wallet and their statuses will remain stale (or error). Consider partitioning identifiers by venue and dispatching them to the corresponding client so status updates continue to flow for all venues.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • go test ./...

View task →

@terwey terwey force-pushed the codex/update-database-schema-and-queries-for-venues branch from ea385fd to e9f6c00 Compare November 2, 2025 21:40
Base automatically changed from codex/update-database-schema-and-queries-for-venues to codex/investigate-multi-wallet-support-for-hyperliquid November 2, 2025 22:25
@terwey terwey force-pushed the codex/refactor-storage-for-venue-aware-identifiers branch from 0dc29ff to b7fdd80 Compare November 2, 2025 22:54
…upport-for-hyperliquid' into codex/refactor-storage-for-venue-aware-identifiers
@terwey
Copy link
Collaborator Author

terwey commented Nov 2, 2025

@codex investigate why the go tests are failing and fix them, check the specs/ dir if you have questions

@chatgpt-codex-connector
Copy link

Summary

Testing

  • go test ./...

View task →

@terwey terwey merged commit 2ad0d55 into codex/investigate-multi-wallet-support-for-hyperliquid Nov 2, 2025
2 checks passed
@terwey terwey deleted the codex/refactor-storage-for-venue-aware-identifiers branch November 2, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants