Skip to content

feat: post-transition cooldown for FissionFusionManager (#68)#77

Merged
4444J99 merged 1 commit intomainfrom
feat/68-fission-fusion-cooldown
Apr 15, 2026
Merged

feat: post-transition cooldown for FissionFusionManager (#68)#77
4444J99 merged 1 commit intomainfrom
feat/68-fission-fusion-cooldown

Conversation

@4444J99
Copy link
Copy Markdown
Collaborator

@4444J99 4444J99 commented Apr 15, 2026

Summary

  • Add refractory period after fission/fusion transitions to prevent rapid oscillation
  • Default cooldown: 2 × evaluation_interval (60s at default 30s interval)
  • should_transition() returns None during cooldown — hysteresis alone was insufficient for conflict-resolution transitions
  • Both perform_fission() and perform_fusion() record transition time (including early-return paths)

Closes #68

Test plan

  • 5 new tests in TestTransitionCooldown
  • Cooldown blocks immediate re-transition
  • No cooldown before first transition
  • Cooldown expires after configured duration
  • Full fission-fusion suite: 34/34 passing
  • ruff check + mypy — 0 errors

🤖 Generated with Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bf8eab4f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hive/fission_fusion.py
"""
# Cooldown gate: suppress transitions during refractory period
if self._last_transition_time is not None:
elapsed = (datetime.now(UTC) - self._last_transition_time).total_seconds()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use monotonic time for cooldown gating

Measure the cooldown with a monotonic clock instead of datetime.now(UTC), because wall-clock adjustments (e.g., NTP corrections or manual time changes) can make elapsed jump backward or forward and incorrectly prolong or bypass the refractory period. In long-running agents this can produce unexpected transition suppression or immediate re-transition even though the intended cooldown duration has not actually passed.

Useful? React with 👍 / 👎.

Suppress transitions during refractory period after fission/fusion to
prevent rapid oscillation. Default cooldown: 2× evaluation_interval.

- _last_transition_time tracked in perform_fission() and perform_fusion()
  (including early-return paths)
- should_transition() returns None during cooldown
- 5 new tests in TestTransitionCooldown

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@4444J99 4444J99 force-pushed the feat/68-fission-fusion-cooldown branch from 0bf8eab to 8babe81 Compare April 15, 2026 18:02
@4444J99 4444J99 merged commit bf4e8ae into main Apr 15, 2026
@4444J99 4444J99 deleted the feat/68-fission-fusion-cooldown branch April 15, 2026 18:02
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: post-transition cooldown / refractory period in FissionFusionManager

1 participant