Skip to content

fix: separate common and campaign error discriminants#61

Open
Danservfinn wants to merge 1 commit into
OrbitChainLabs:mainfrom
Danservfinn:kublai/error-discriminant-ranges
Open

fix: separate common and campaign error discriminants#61
Danservfinn wants to merge 1 commit into
OrbitChainLabs:mainfrom
Danservfinn:kublai/error-discriminant-ranges

Conversation

@Danservfinn

Copy link
Copy Markdown

Summary

  • moves shared common::ErrorCode discriminants into a reserved 1000..=1099 workspace range
  • documents the campaign-local 1..=999 and common shared ranges in code comments and deployment notes
  • adds a regression test that fails if common and campaign contract-error codes collide again

Closes #41

Validation

  • cargo test -p orbitchain-campaign error_discriminant_tests -- --nocapture
  • cargo test -p orbitchain-common
  • git diff --check
  • grep summary: common/src/lib.rs codes 1000..1003; campaign/src/types.rs codes 1..80

Alqku commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Hi @Danservfinn 👋 — thanks for putting this up. Issue #41 isn't currently assigned to anyone in this repo, so I can't merge under our contributor-matches-assignee policy on this pass. Could you ask a maintainer to assign #41 to you? Once that's done I'll re-confirm CI is still green and merge ✅

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.

[LOW] Error discriminant collision between campaign::Error and common::ErrorCode (1-3 swapped, 4 reused)

2 participants