Skip to content

fix: Ensure default effects of custom functions are sound - #2269

Open
acl-cqc wants to merge 4 commits into
mainfrom
acl/custom_func_default
Open

acl-cqc wants to merge 4 commits into
mainfrom
acl/custom_func_default

Conversation

@acl-cqc

@acl-cqc acl-cqc commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

this makes the default conservative, but I've used Claude to add the missing effects=() argument to all cases where it wasn't specified, and then manually removed all existing effects=[Effect.ANY]s

@acl-cqc
acl-cqc force-pushed the acl/custom_func_default branch 2 times, most recently from 55cb4c4 to da26371 Compare September 3, 2026 08:09
Base automatically changed from acl/callgraph to main September 4, 2026 11:24
@acl-cqc
acl-cqc force-pushed the acl/custom_func_default branch from da26371 to 503bc55 Compare September 4, 2026 15:31
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectguppylang
Branchacl/custom_func_default
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes
(Result Δ%)
Upper Boundary
nodes
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
62.10 x 1e3
(0.00%)Baseline: 62.10 x 1e3
62.72 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
4,585.00
(0.00%)Baseline: 4,585.00
4,630.85
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
27.80 x 1e3
(0.00%)Baseline: 27.80 x 1e3
28.08 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
1,301.00
(0.00%)Baseline: 1,301.00
1,314.01
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_benchmark_compile📈 view plot
🚷 view threshold
7.24 x 1e3
(0.00%)Baseline: 7.24 x 1e3
7.32 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
310.00
(0.00%)Baseline: 310.00
313.10
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_pop_benchmark_compile📈 view plot
🚷 view threshold
9.86 x 1e3
(0.00%)Baseline: 9.86 x 1e3
9.96 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
411.00
(0.00%)Baseline: 411.00
415.11
(99.01%)
🐰 View full continuous benchmarking report in Bencher

@maximilianruesch maximilianruesch changed the title fix: @custom_func change default effects fix: Ensure default effects of custom functions are sound Sep 4, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.23%. Comparing base (702bcb0) to head (503bc55).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2269      +/-   ##
==========================================
- Coverage   93.23%   93.23%   -0.01%     
==========================================
  Files         162      162              
  Lines       15824    15817       -7     
==========================================
- Hits        14754    14747       -7     
  Misses       1070     1070              

☔ View full report in Codecov by Harness.
📢 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.

@acl-cqc
acl-cqc marked this pull request as ready for review September 4, 2026 15:42
@acl-cqc
acl-cqc requested a review from a team as a code owner September 4, 2026 15:42
@codspeed-hq

codspeed-hq Bot commented Sep 4, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 11 untouched benchmarks


Comparing acl/custom_func_default (503bc55) with main (d217e9b)

Open in CodSpeed

ArrayIsBorrowedCompiler(),
checker=ArrayIndexChecker(),
unitary_flags=UnitaryFlags.Dagger,
effects=(),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok so actually this can panic if out-of-bounds

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