Skip to content

feat(heatsoaking): improve heatsoaking helper macros with enhanced defaults and validation#129

Merged
tg73 merged 4 commits intoRat-OS:v2.1.x-developmentfrom
tg73:topic/heatsoak-sugar-5
Mar 4, 2026
Merged

feat(heatsoaking): improve heatsoaking helper macros with enhanced defaults and validation#129
tg73 merged 4 commits intoRat-OS:v2.1.x-developmentfrom
tg73:topic/heatsoak-sugar-5

Conversation

@tg73
Copy link
Collaborator

@tg73 tg73 commented Mar 4, 2026

Summary by CodeRabbit

  • New Features

    • Added configurable setting to control default source for heatsoak configuration.
  • Improvements

    • Enforced duration value bounds with user feedback when limits are applied.
    • Enhanced message formatting for clearer display of heatsoak parameters.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

📝 Walkthrough

Walkthrough

The heatsoaking configuration macro is enhanced with per-command DEFAULT source handling, parameter validation with bounds enforcement, and refined output formatting. Default quality and first-layer duration calculations are now conditional based on the source ('startup' or 'current'), with console feedback when duration limits are applied.

Changes

Cohort / File(s) Summary
Heatsoaking Configuration
configuration/macros/heatsoaking.cfg
Adds DEFAULT source validation ('startup' or 'current'), conditional default quality/duration calculations, bounds enforcement for FIRST_LAYER_DURATION (max 120 min) and DURATION (max 720 min) with user feedback, replaces static defaults with derived values, and updates RATOS_ECHO output and HEATSOAK_SETTINGS formatting to use conditional integer-or-two-decimal precision for duration values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #127: Modifies HEATSOAK_SETTINGS "show" behavior and output message formatting for duration values with conditional precision.
  • PR #126: Refines and extends the same heatsoaking macros (USE_ADAPTIVE_HEATSOAK, USE_FIXED_HEATSOAK, HEATSOAK_SETTINGS) with related functionality.
  • PR #128: Directly modifies the same heatsoaking.cfg macros with DEFAULT source handling, default computations, validation/clamping, and RATOS_ECHO updates.

Poem

🐰 Hopping through the heat, so precise and neat,
Defaults now dance with sources, startup or current beat,
Bounds keep them bounded, 120 and 720 meet,
No more guesses—just validation, making config sweet!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The pull request title clearly describes the main changes: improving heatsoaking helper macros with enhanced defaults and validation, which aligns with the substantial modifications to configuration/macros/heatsoaking.cfg.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@coderabbitai coderabbitai bot changed the title @coderabbitai Enhance heatsoaking macro with per-command defaults and validation Mar 4, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@configuration/macros/heatsoaking.cfg`:
- Around line 87-89: The user-facing message incorrectly states "720 minutes (6
hours)"; update the CONSOLE_ECHO MSG string to reflect the correct conversion
(720 minutes is 12 hours) where duration_mins is clamped, i.e., change the text
associated with the CONSOLE_ECHO MSG in the template that handles duration_mins
so it reads "720 minutes (12 hours)" or similar accurate wording.
- Around line 117-121: The HEATSOAK_SETTINGS macro documents and defines
variable_default_source but does not expose it through the HEATSOAK_SETTINGS
parsing, so users cannot set/reset default_source via that macro; update the
HEATSOAK_SETTINGS "vars" list to include "default_source" (matching the
variable_default_source name used in the file) and ensure any parsing/validation
logic that iterates over vars (the code that reads/sets values from
HEATSOAK_SETTINGS) accepts and applies "default_source" so the documented
DEFAULT parameter works as intended.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e95780 and 2b623d5.

📒 Files selected for processing (1)
  • configuration/macros/heatsoaking.cfg

@tg73 tg73 changed the title Enhance heatsoaking macro with per-command defaults and validation feat(heatsoaking): improve heatsoaking helper macros with enhanced defaults and validation Mar 4, 2026
@tg73 tg73 merged commit b427c59 into Rat-OS:v2.1.x-development Mar 4, 2026
3 checks passed
@tg73 tg73 deleted the topic/heatsoak-sugar-5 branch March 4, 2026 00:18
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