Skip to content

rollup of adam's and my fixes to the cse system and related stuff - #527

Merged
prozacchiwawa merged 2 commits into
mainfrom
20260616-cse-fix-rollup
Jul 20, 2026
Merged

rollup of adam's and my fixes to the cse system and related stuff#527
prozacchiwawa merged 2 commits into
mainfrom
20260616-cse-fix-rollup

Conversation

@prozacchiwawa

@prozacchiwawa prozacchiwawa commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes CSE optimization semantics for module builds (cse_dominance on), which can alter generated CLVM for programs with nested conditionals; cache key versioning limits stale hits but dependency downgrades (chia-bls) warrant release verification.

Overview
Fixes common subexpression elimination (CSE) so nested if/i conditions no longer treat a subexpression as safe to hoist when inner branches are not actually dominated. A new dialect flag cse_dominance gates the corrected cse_is_covering logic; legacy behavior remains when the flag is off.

Module-style compiles now route through shared module_compile_opts (optimization on, int_fix, stepping floored to 26, cse_dominance enabled). compile_pre_forms applies detect_chialisp_module before the frontend so module dialect/settings are set consistently, and the duplicate stepping-based optimize toggle on the module path is removed.

.chialisp disk cache keys are bumped to v2: they hash dialect fields (including cse_dominance) plus include fingerprints, so cached hex cannot be reused across the old vs new CSE behavior.

Also pins chia-bls to 0.42.0, drops thiserror 2.x from the lockfile, downgrades subprocess, tweaks CI action pins, and adds cse-complex-4 regression coverage.

Reviewed by Cursor Bugbot for commit ff3a62f. Bugbot is set up for automated code reviews on this repo. Configure here.

aqk
aqk previously approved these changes Jul 17, 2026
@socket-security

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​subprocess@​1.2.0 ⏵ 1.1.09710093100100

View full report

@prozacchiwawa
prozacchiwawa marked this pull request as draft July 18, 2026 08:35
@prozacchiwawa
prozacchiwawa marked this pull request as ready for review July 20, 2026 10:40
@prozacchiwawa
prozacchiwawa merged commit 76331f2 into main Jul 20, 2026
38 checks passed
@prozacchiwawa
prozacchiwawa deleted the 20260616-cse-fix-rollup branch July 20, 2026 18:34
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.

2 participants