Skip to content

Propagate dirty ids through nested containers#888

Merged
saulshanabrook merged 4 commits into
egraphs-good:mainfrom
saulshanabrook:codex/split-nested-container-dirty-closure
May 27, 2026
Merged

Propagate dirty ids through nested containers#888
saulshanabrook merged 4 commits into
egraphs-good:mainfrom
saulshanabrook:codex/split-nested-container-dirty-closure

Conversation

@saulshanabrook
Copy link
Copy Markdown
Member

@saulshanabrook saulshanabrook commented May 18, 2026

Context

If an inner container rebuilds in place, parent containers that contain it can become newly matchable without changing their own ids. Seminaive matching needs those parent ids marked dirty too. Follow-up to #832.

Changes

  • Expands container rebuild dirty ids through parent containers to a fixed point.
  • Adds a focused nested-container regression in tests/nested-container-dirty-propagation.egg.
  • Leaves tests/container-fail.egg focused on the original Rule Fails to Match With Containers #831 regression.
  • Updates the relevant snapshots, including the proof-support inventory.

Validation

  • cargo test --test files nested_container_dirty_propagation -- --test-threads=1
  • cargo test --test files container_fail -- --test-threads=1
  • cargo test --test files proof_support_snapshot -- --test-threads=1
  • cargo fmt --check
  • git diff --check
  • CodeRabbit review: 0 issues after addressing the initial clone-cleanup suggestion.

@saulshanabrook saulshanabrook force-pushed the codex/split-nested-container-dirty-closure branch from a7b029b to 28387d0 Compare May 18, 2026 20:32
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.08%. Comparing base (36de434) to head (194d3ef).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #888      +/-   ##
==========================================
+ Coverage   87.06%   87.08%   +0.01%     
==========================================
  Files          88       88              
  Lines       25844    25867      +23     
==========================================
+ Hits        22502    22526      +24     
+ Misses       3342     3341       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 18, 2026

Merging this PR will improve performance by 27.38%

⚡ 2 improved benchmarks
❌ 1 regressed benchmark
✅ 22 untouched benchmarks
🆕 1 new benchmark
⏩ 215 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust_rule_fib[rule_run_1000] 280.7 ms 202.8 ms +38.39%
🆕 Simulation tests[repro-herbie-vanilla] N/A 1.4 s N/A
Simulation tests[python_array_optimize] 1.5 s 1.7 s -8.11%
Simulation tests[cykjson] 440.2 ms 270.9 ms +62.51%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing saulshanabrook:codex/split-nested-container-dirty-closure (194d3ef) with main (8c1c70b)2

Open in CodSpeed

Footnotes

  1. 215 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (36de434) during the generation of this report, so 8c1c70b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@saulshanabrook saulshanabrook force-pushed the codex/split-nested-container-dirty-closure branch 2 times, most recently from 3261b21 to e87fe3d Compare May 20, 2026 21:29
@saulshanabrook saulshanabrook marked this pull request as ready for review May 20, 2026 23:08
@saulshanabrook saulshanabrook requested a review from a team as a code owner May 20, 2026 23:08
@saulshanabrook saulshanabrook requested review from ezrosent and oflatt and removed request for a team and oflatt May 20, 2026 23:08
@saulshanabrook saulshanabrook force-pushed the codex/split-nested-container-dirty-closure branch from e87fe3d to b773e8a Compare May 20, 2026 23:14
@saulshanabrook saulshanabrook moved this to This Week in Saul Shanabrook May 26, 2026
@saulshanabrook saulshanabrook moved this from This Week to In Progress in Saul Shanabrook May 26, 2026
@saulshanabrook saulshanabrook moved this from In Progress to Waiting for Review in Saul Shanabrook May 26, 2026
Copy link
Copy Markdown
Contributor

@ezrosent ezrosent left a comment

Choose a reason for hiding this comment

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

  • Why are you running tests just with one thread?
  • This is a fun consequence of being able to 'directly nest' containers!

@saulshanabrook
Copy link
Copy Markdown
Member Author

Why are you running tests just with one thread?

Thats a great question... I have no idea 🫣

@saulshanabrook saulshanabrook merged commit e564e46 into egraphs-good:main May 27, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Waiting for Review to Done in Saul Shanabrook May 27, 2026
@saulshanabrook
Copy link
Copy Markdown
Member Author

This is a fun consequence of being able to 'directly nest' containers!

Yep I guess this is why it was disabled before lol

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