Skip to content

feat(market): allow sequenced bid creation#2077

Open
chalabi2 wants to merge 1 commit into
mainfrom
chalabi/allow-bseq-bids
Open

feat(market): allow sequenced bid creation#2077
chalabi2 wants to merge 1 commit into
mainfrom
chalabi/allow-bseq-bids

Conversation

@chalabi2

Copy link
Copy Markdown
Contributor

Description

Closes: N/A

Allow CreateBid to accept nonzero BSeq values for sequenced provider bids.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

I have...

  • included the correct type prefix in the PR title
  • targeted the correct branch: main
  • provided a link to the relevant issue or specification: N/A
  • included the necessary unit and integration tests: existing handler tests
  • added a changelog entry to CHANGELOG.md: N/A
  • included comments for documenting Go code: N/A
  • updated the relevant documentation or specification: N/A
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
@chalabi2 chalabi2 requested a review from a team as a code owner June 24, 2026 17:32
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 99f4287b-0c4e-4c3b-b281-5e1cf36b1ce5

📥 Commits

Reviewing files that changed from the base of the PR and between 7e903e6 and c7e851a.

📒 Files selected for processing (1)
  • x/market/handler/server.go
💤 Files with no reviewable changes (1)
  • x/market/handler/server.go

Walkthrough

In CreateBid within x/market/handler/server.go, the early validation that returned ErrInvalidBid when msg.ID.BSeq != 0 is removed. The handler now proceeds directly to order retrieval and subsequent validations for all incoming bids regardless of BSeq value.

Changes

CreateBid BSeq Validation Removal

Layer / File(s) Summary
Remove BSeq != 0 guard in CreateBid
x/market/handler/server.go
Deletes the four-line block that returned mv1.ErrInvalidBid when msg.ID.BSeq != 0; CreateBid now skips directly to order retrieval and remaining bid validations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Hop, hop, the fence is gone,
BSeq non-zero may carry on!
No early "invalid" to block the way,
The bid hops forward without delay.
CodeRabbit cheers this tiny snip —
four lines removed, a smooth new trip! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: allowing sequenced bid creation by accepting nonzero BSeq values.
Description check ✅ Passed The description is directly related to the change and explains that CreateBid now accepts nonzero BSeq values.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chalabi/allow-bseq-bids

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant