Skip to content

make the ChiaDialect flags a strong type#698

Merged
arvidn merged 2 commits intomainfrom
bitflags
Feb 13, 2026
Merged

make the ChiaDialect flags a strong type#698
arvidn merged 2 commits intomainfrom
bitflags

Conversation

@arvidn
Copy link
Copy Markdown
Contributor

@arvidn arvidn commented Feb 12, 2026

using the bitflags crate.


Note

Medium Risk
Broad, cross-cutting API type change touches core interpreter flag plumbing and external bindings; behavior should be equivalent but incorrect flag conversions or combination logic could subtly change execution modes.

Overview
Introduces ClvmFlags (via bitflags) to strongly-type ChiaDialect/Dialect flag handling, replacing ad-hoc u32 bitmask constants and updating all call sites to use contains, union, and empty().

Updates public exports to expose ClvmFlags and MEMPOOL_MODE (now a ClvmFlags value), adds ChiaDialect: Default, and includes a unit test to ensure flag bit values don’t overlap.

Python bindings continue to accept u32 flags but now convert via ClvmFlags::from_bits_truncate, and module-level flag constants are exported as bits() values; benchmarks/fuzz/tools are updated accordingly.

Written by Cursor Bugbot for commit e6c1934. This will update automatically on new commits. Configure here.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 12, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​bitflags@​2.6.0 ⏵ 2.10.010010093100100

View full report

@coveralls-official
Copy link
Copy Markdown

coveralls-official bot commented Feb 12, 2026

Pull Request Test Coverage Report for Build 21968688864

Details

  • 38 of 52 (73.08%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 90.433%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tools/src/bin/sha256tree-benching.rs 0 1 0.0%
src/runtime_dialect.rs 0 4 0.0%
src/chia_dialect.rs 19 28 67.86%
Files with Coverage Reduction New Missed Lines %
wheel/src/api.rs 1 93.85%
Totals Coverage Status
Change from base Build 21960112108: -0.08%
Covered Lines: 6636
Relevant Lines: 7338

💛 - Coveralls

@arvidn arvidn enabled auto-merge February 12, 2026 22:34
@arvidn arvidn disabled auto-merge February 12, 2026 23:42
@arvidn arvidn closed this Feb 12, 2026
@arvidn arvidn reopened this Feb 12, 2026
Copy link
Copy Markdown
Contributor

@richardkiss richardkiss left a comment

Choose a reason for hiding this comment

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

Seems reasonable.

@arvidn arvidn merged commit d2268d3 into main Feb 13, 2026
53 checks passed
@arvidn arvidn deleted the bitflags branch February 13, 2026 00:12
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.

3 participants