Skip to content

Implement stability window enforcement for ratcheting - #29

Merged
sigent-ai-dev merged 1 commit into
mainfrom
feature/12-stability-window
May 21, 2026
Merged

Implement stability window enforcement for ratcheting#29
sigent-ai-dev merged 1 commit into
mainfrom
feature/12-stability-window

Conversation

@sigent-ai-dev

Copy link
Copy Markdown
Owner

Summary

Adds configurable stability window that blocks ratcheting if the thesis was changed too recently. Prevents premature contract promotion.

Changes

  • src/adm_cli/schema.py — added stability_window_days and last_thesis_change fields
  • src/adm_cli/gates.py — ratchet gate checks elapsed days vs window
  • tests/test_gates.py — 3 new tests (blocks when recent, passes when elapsed, zero=immediate)

Linked Issues

Closes #12

Test Plan

  • Tests pass
  • Window=7, changed today → blocked
  • Window=7, changed 10 days ago → allowed
  • Window=0 (default) → always allowed

Checklist

  • Self-review completed

Adds stability_window_days and last_thesis_change to DomainState.
Ratchet gate blocks advancement if thesis was changed too recently
(days elapsed < stability_window_days). Default 0 = immediate ratchet.

Closes #12
@sigent-ai-dev
sigent-ai-dev merged commit e30a5b3 into main May 21, 2026
@sigent-ai-dev
sigent-ai-dev deleted the feature/12-stability-window branch May 21, 2026 12:56
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.

Stability window enforcement for ratcheting

1 participant