Skip to content

Honor grace periods in commitment violation checks#523

Closed
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/core-grace-period-498
Closed

Honor grace periods in commitment violation checks#523
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/core-grace-period-498

Conversation

@dangelo352

@dangelo352 dangelo352 commented Jun 22, 2026

Copy link
Copy Markdown

Fixes #498

Summary

  • enforce grace_period_days in check_violations and get_violation_details
  • relax max-loss during the initial grace window and duration until expires_at + grace_period_days
  • use TimeUtils::checked_days_to_seconds plus checked deadline addition so overflow rejects instead of wrapping
  • document grace semantics and backward-compatible tuple behavior in docs/commitment_core/SEMANTICS.md

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-core-grace-target cargo test -p commitment_core check_violations -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-core-grace-target cargo test -p commitment_core get_violation_details -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-core-grace-target cargo test -p commitment_core update_value -- --nocapture
  • git diff --check

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.

Add grace_period enforcement to commitment_core::check_violations

2 participants