Skip to content

feat: make EFFECTS_THRESHOLD runtime-configurable#374

Merged
AviAvni merged 1 commit intomainfrom
effects-threshold-config
Apr 14, 2026
Merged

feat: make EFFECTS_THRESHOLD runtime-configurable#374
AviAvni merged 1 commit intomainfrom
effects-threshold-config

Conversation

@AviAvni
Copy link
Copy Markdown
Contributor

@AviAvni AviAvni commented Apr 14, 2026

Summary

Split from #359.

  • Move EFFECTS_THRESHOLD from read-only to runtime-settable configuration
  • Allow GRAPH.CONFIG SET EFFECTS_THRESHOLD <value> at runtime

Test plan

  • cargo check passes
  • GRAPH.CONFIG SET EFFECTS_THRESHOLD 100 works at runtime

Summary by CodeRabbit

  • New Features
    • EFFECTS_THRESHOLD is now adjustable at runtime via the SET command. Previously, attempting to set this value would result in an error.

Move EFFECTS_THRESHOLD from read-only to runtime-settable config,
allowing tuning without restart.

Split from #359.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f929b4b1-c858-4fa0-836e-d990891af5a6

📥 Commits

Reviewing files that changed from the base of the PR and between d51f96e and fd0e9df.

📒 Files selected for processing (2)
  • src/commands/config_cmd.rs
  • src/config.rs

📝 Walkthrough

Walkthrough

EFFECTS_THRESHOLD configuration is converted from read-only to runtime-settable. It is relocated from the read-only section to the runtime-configurable atomics in src/config.rs, and the configuration command handler is updated to validate and apply this setting at runtime.

Changes

Cohort / File(s) Summary
Runtime Configuration
src/config.rs
Moved EFFECTS_THRESHOLD declaration from read-only runtime configs section to runtime-configurable atomics section, maintaining AtomicI64 type and initial value of 300.
Config Command Handler
src/commands/config_cmd.rs
Updated configuration validation to accept EFFECTS_THRESHOLD as an integer config, added handling in the apply function to store parsed values, and removed it from the read-only configuration error match arm.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A threshold once frozen in time,
Now dances at runtime—sublime!
With atoms that shift and adjust,
Configuration control we trust.
Effects flow free, as they must! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making EFFECTS_THRESHOLD runtime-configurable instead of read-only.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch effects-threshold-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AviAvni AviAvni merged commit 955320a into main Apr 14, 2026
13 of 14 checks passed
@AviAvni AviAvni deleted the effects-threshold-config branch April 14, 2026 13:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.15%. Comparing base (d51f96e) to head (fd0e9df).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #374      +/-   ##
==========================================
- Coverage   84.15%   84.15%   -0.01%     
==========================================
  Files         110      110              
  Lines       28963    28964       +1     
==========================================
  Hits        24375    24375              
- Misses       4588     4589       +1     
Flag Coverage Δ
fuzz 41.72% <ø> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

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.

1 participant