Skip to content

feat: add range validation for fractional fields (TrustScore, ContextCapFraction, AntiThrashMinSavingsRatio)#47

Open
Wezylnia wants to merge 1 commit into
fuseraft:mainfrom
Wezylnia:fix/issue-28-fractional-range-validation
Open

feat: add range validation for fractional fields (TrustScore, ContextCapFraction, AntiThrashMinSavingsRatio)#47
Wezylnia wants to merge 1 commit into
fuseraft:mainfrom
Wezylnia:fix/issue-28-fractional-range-validation

Conversation

@Wezylnia

Copy link
Copy Markdown

Closes #28

Summary

Adds [0, 1] range validation for three fractional config properties in the validate command.

Part A — Fractional range checks

ValidateAgents:

  • TrustScore must be 0.0–1.0
  • ContextCapFraction must be 0.0–1.0

ValidateCompactionConfig:

  • AntiThrashMinSavingsRatio must be 0.0–1.0

Note: Part B (WarnAt >= CutoverAt) was already resolved.

Tests (7 new)

All 59 tests pass.

Add [0,1] range checks for three config properties that are ratios:
- TrustScore (AgentConfig) in ValidateAgents
- ContextCapFraction (ContextWindowConfig) in ValidateAgents
- AntiThrashMinSavingsRatio (CompactionConfig) in ValidateCompactionConfig

Add 7 corresponding unit tests for out-of-range and boundary values.

Closes fuseraft#28
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.

feat: add range validation for fractional fields and WarnAt/CutoverAt ordering to validate command

1 participant