Skip to content

Add separate event kinds for ratings, info, and disputes#25

Merged
grunch merged 1 commit into
mainfrom
add-new-kind-constants
Jan 16, 2026
Merged

Add separate event kinds for ratings, info, and disputes#25
grunch merged 1 commit into
mainfrom
add-new-kind-constants

Conversation

@grunch

@grunch grunch commented Jan 16, 2026

Copy link
Copy Markdown
Member
  • Orders: kind 38383 (unchanged)
  • Ratings: kind 38384
  • Info: kind 38385
  • Disputes: kind 38386

Updated all documentation to reflect the new event kinds and added reference tables in overview.md and order_event.md.

Summary by CodeRabbit

  • Documentation
    • Added new "Mostro Event Kinds" reference section mapping event types to their identifiers.
    • Updated event kind identifiers across dispute, order, and rating documentation for consistency.
    • Enhanced overview with clarified event type table and improved contextual descriptions.

✏️ Tip: You can customize this high-level summary in your review settings.

- Orders: kind 38383 (unchanged)
- Ratings: kind 38384
- Info: kind 38385
- Disputes: kind 38386

Updated all documentation to reflect the new event kinds and added
reference tables in overview.md and order_event.md.
@coderabbitai

coderabbitai Bot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The PR updates Mostro protocol documentation to establish distinct event kinds: Orders (38383), Ratings (38384), Info (38385), and Disputes (38386). Changes include updating event kind references across multiple files and introducing new event kind mapping documentation.

Changes

Cohort / File(s) Summary
Dispute Event Kind Updates
src/admin_cancel_order.md, src/admin_settle_order.md, src/dispute.md, src/list_disputes.md
Updated addressable dispute event kind from 38383 to 38386 across admin cancellation/settlement flows and dispute initiation documentation
Event Kind Mapping Documentation
src/order_event.md, src/overview.md
Added new "Mostro Event Kinds" mapping table and section documenting the relationship between event types and their assigned kind values (38383-38386)
Rating Event Kind Update
src/user_rating.md
Updated rating event kind from 38383 to 38384 and added tag ["y", "mostro"] to payload
Instance Status Event Kind Update
src/other_events.md
Updated Mostro Instance Status event kind from 38383 to 38385

Possibly Related Issues

Poem

🐰 Four kinds of events now clearly defined,
Thirty-eight thousand hops, one of a kind!
Orders, ratings, info in flight,
Disputes marked in the moonlight—
A rabbit's tale of order made right! 🌙


Estimated code review effort: 🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: introducing separate event kinds for ratings, info, and disputes, which is reflected across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


🧹 Recent nitpick comments
src/overview.md (1)

12-12: Improve link text descriptiveness.

The link text "here" is not descriptive. Consider using more specific text that indicates what the user will find when clicking the link.

📝 Suggested improvement
-You can find more details about the order event [here](./order_event.md)
+For more details about order events, see the [Order Event documentation](./order_event.md).

Or alternatively:

-You can find more details about the order event [here](./order_event.md)
+See [Order Event](./order_event.md) for more details.

Based on static analysis hint from markdownlint-cli2.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8eeb79e and 22dc032.

📒 Files selected for processing (8)
  • src/admin_cancel_order.md
  • src/admin_settle_order.md
  • src/dispute.md
  • src/list_disputes.md
  • src/order_event.md
  • src/other_events.md
  • src/overview.md
  • src/user_rating.md
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: arkanoider
Repo: MostroP2P/protocol PR: 19
File: src/restore_session.md:51-69
Timestamp: 2025-08-17T08:44:22.667Z
Learning: In the MostroP2P protocol, orders can have a "dispute" status in the orders array while simultaneously having detailed dispute information in the disputes array. This is normal behavior - the order status reflects the current state while the disputes array contains specific dispute metadata for the same trade_index.
📚 Learning: 2025-08-17T08:44:22.667Z
Learnt from: arkanoider
Repo: MostroP2P/protocol PR: 19
File: src/restore_session.md:51-69
Timestamp: 2025-08-17T08:44:22.667Z
Learning: In the MostroP2P protocol, orders can have a "dispute" status in the orders array while simultaneously having detailed dispute information in the disputes array. This is normal behavior - the order status reflects the current state while the disputes array contains specific dispute metadata for the same trade_index.

Applied to files:

  • src/overview.md
  • src/list_disputes.md
  • src/dispute.md
  • src/order_event.md
📚 Learning: 2025-10-07T14:00:06.672Z
Learnt from: arkanoider
Repo: MostroP2P/protocol PR: 21
File: src/restore_trade_index.md:23-23
Timestamp: 2025-10-07T14:00:06.672Z
Learning: In the Mostro protocol (MostroP2P/protocol repository), the value 0 for `trade_index` or `last_trade_index` has special meaning and should not be used as a default. When a user has never created a trade, `last_trade_index` should default to 1, not 0.

Applied to files:

  • src/order_event.md
🪛 markdownlint-cli2 (0.18.1)
src/overview.md

12-12: Link text should be descriptive

(MD059, descriptive-link-text)

🔇 Additional comments (10)
src/admin_settle_order.md (1)

49-49: LGTM! Dispute event kind correctly updated to 38386.

The addressable dispute event now uses the dedicated dispute event kind (38386), which aligns with the new event kind separation strategy introduced in this PR.

src/user_rating.md (2)

67-67: LGTM! Rating event kind correctly updated to 38384.

The addressable rating event now uses the dedicated rating event kind (38384), which properly separates rating data from order data.


75-76: LGTM! Tag additions improve event categorization.

The addition of the ["y", "mostro"] tag brings this event into alignment with other Mostro events, and the ["z", "rating"] tag correctly identifies this as a rating event.

src/other_events.md (1)

16-16: LGTM! Info event kind correctly updated to 38385.

The Mostro Instance Status event now uses the dedicated info event kind (38385), which properly categorizes instance metadata separately from orders.

src/admin_cancel_order.md (1)

77-77: LGTM! Dispute event kind correctly updated to 38386.

The addressable dispute event now uses the dedicated dispute event kind (38386), maintaining consistency with the new event kind separation strategy.

src/order_event.md (1)

3-14: Excellent addition! Event kind mapping provides clear, consistent documentation.

The new "Mostro Event Kinds" section serves as a central reference for the event kind structure, making it easy for implementers to understand the separation of concerns between different event types. All event kind references across the codebase are consistent with this mapping, and each event correctly includes its corresponding z tag value.

src/dispute.md (1)

71-71: LGTM! Dispute addressable events correctly updated to kind 38386.

Both addressable dispute event examples (initiated and in-progress states) have been properly updated to use the new dispute event kind 38386, maintaining consistency with the new event taxonomy.

Also applies to: 162-162

src/overview.md (2)

3-11: Excellent addition of event kinds reference table.

The new table clearly documents the distinct event kinds introduced in this PR, providing a helpful reference for developers working with the Mostro protocol. The taxonomy is logical and well-organized.


3-12: Event kind taxonomy is consistently implemented across all documentation files.

All four event kinds (38383 for Orders, 38384 for Ratings, 38385 for Info, and 38386 for Disputes) are correctly referenced throughout the documentation. The order_event.md file is properly updated with a reference table, and all implementation examples in related files (new_buy_order.md, take_sell.md, dispute.md, user_rating.md, other_events.md, etc.) use the correct event kinds consistently. No outdated references or inconsistencies were found.

src/list_disputes.md (1)

3-3: LGTM! Dispute event kind correctly updated to 38386 across all references.

The event kind has been consistently updated from 38383 to 38386 for disputes throughout the documentation and examples. All dispute-related references now correctly use 38386, while order events properly retain kind 38383. No missed references exist.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 and usage tips.

@grunch
grunch merged commit 9c834af into main Jan 16, 2026
1 check passed
@grunch
grunch deleted the add-new-kind-constants branch January 16, 2026 14:04
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.

1 participant