Make price cycle iterations configurable - #1555
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1555 +/- ##
=======================================
Coverage 90.88% 90.88%
=======================================
Files 61 61
Lines 9109 9121 +12
Branches 9109 9121 +12
=======================================
+ Hits 8279 8290 +11
Misses 509 509
- Partials 321 322 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.
| Benchmark suite | Current: a677af9 | Previous: 6a19604 | Ratio |
|---|---|---|---|
example_run/two_outputs example |
646641927.5 ns |
485146523.5 ns |
1.33 |
select_best_assets_parallel/01 |
13690478.465277778 ns |
9132896.765151516 ns |
1.50 |
select_best_assets_parallel/05 |
39035384.125 ns |
26819628.777777776 ns |
1.46 |
select_best_assets_parallel/10 |
66671843.33333333 ns |
45113674.75 ns |
1.48 |
select_best_assets_parallel/15 |
95127633.25 ns |
65351435.33333333 ns |
1.46 |
select_best_assets_parallel/20 |
125093015.5 ns |
85097739.5 ns |
1.47 |
select_best_assets_sequential/01 |
13602696.320833333 ns |
9107675.635526314 ns |
1.49 |
select_best_assets_sequential/05 |
65397523.66666667 ns |
43859325.75 ns |
1.49 |
select_best_assets_sequential/10 |
130282616.5 ns |
87553632.5 ns |
1.49 |
select_best_assets_sequential/15 |
196109821 ns |
131658938.5 ns |
1.49 |
select_best_assets_sequential/20 |
262064023 ns |
175652280.5 ns |
1.49 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add a focused cyclic-market pricing test covering configured iterations and default behavior.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Makes cyclic-market price iterations configurable via price_cycle_iterations, defaulting to one.
Changes:
- Replaces the hardcoded iteration count.
- Adds parameter validation and schema documentation.
- Updates pricing documentation and release notes.
| File | Summary |
|---|---|
src/simulation/prices.rs |
Applies the configurable iteration count. |
src/model/parameters.rs |
Defines, defaults, validates, and tests the parameter. |
schemas/input/model.yaml |
Documents the new input field. |
docs/release_notes/upcoming.md |
Records the new feature. |
docs/model/prices.md |
Explains iterative price refinement. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Description
Removing the hardcoded
N_CYCLE_ITERATIONSfor circularity price calculation and creating a new configurable parameterprice_cycle_iterations. Keeping the default as 1 for now, but I think 2 might be better.Fixes # (issue)
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks