Skip to content

feat: 12-char Base62 box IDs + trait-based migration framework#285

Merged
DorianZheng merged 1 commit intomainfrom
feat/base62-box-id-migration-framework
Feb 21, 2026
Merged

feat: 12-char Base62 box IDs + trait-based migration framework#285
DorianZheng merged 1 commit intomainfrom
feat/base62-box-id-migration-framework

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • New box ID format: 12-char Base62 (~71 bits entropy) via BoxIDMint::mint(), replacing ULID generation
  • Backward compatible: BoxID::parse() accepts both 12-char Base62 (new) and 26-char ULID (legacy)
  • Migration framework: Refactored from monolithic if-chain to trait-based per-file pattern (db/migration/)
  • Clean imports: BoxID moved from runtime::types to dedicated runtime::id module; all imports updated

Test plan

  • cargo test -p boxlite --lib — 468 passed
  • cargo clippy -p boxlite --tests -- -D warnings — zero warnings
  • cargo fmt --check — clean

@DorianZheng DorianZheng force-pushed the feat/base62-box-id-migration-framework branch 3 times, most recently from f46885e to 08bd620 Compare February 21, 2026 08:49
Replace ULID box ID generation with 12-char Base62 (~71 bits entropy).
Existing ULID IDs are preserved for backward compatibility — BoxID::parse()
accepts both formats.

- Add BoxIDMint for new ID generation (runtime/id.rs)
- Refactor migrations from monolithic if-chain to trait-based per-file pattern
- Remove BoxID from types.rs, canonical import is now runtime::id::BoxID
- Update all internal imports and stale comments
@DorianZheng DorianZheng force-pushed the feat/base62-box-id-migration-framework branch from 08bd620 to 45822f9 Compare February 21, 2026 08:51
@DorianZheng DorianZheng merged commit cbe7025 into main Feb 21, 2026
14 checks passed
@DorianZheng DorianZheng deleted the feat/base62-box-id-migration-framework branch February 21, 2026 08:55
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