Skip to content

fix: pace short stability-monitoring windows - #57

Merged
OkiriGabriel merged 2 commits into
open-devops-agent:mainfrom
Nitjsefnie-OSC:candidate/open-devops-55-positive-delay-20260819
Aug 31, 2026
Merged

OkiriGabriel merged 2 commits into
open-devops-agent:mainfrom
Nitjsefnie-OSC:candidate/open-devops-55-positive-delay-20260819

Conversation

@Nitjsefnie

Copy link
Copy Markdown
Contributor

Description

Ensure every positive stability-monitoring duration uses a positive pacing delay, preventing short windows from busy-spinning while preserving the proportional interval and existing 30-second maximum.

Fixes #55

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • New platform/collector support

Platform/Component

  • Core Agent
  • Kubernetes
  • CI/CD (specify: ____________)
  • Cloud Provider (specify: ____________)
  • ArgoCD
  • Docker
  • API Server
  • Tools/Executor
  • Documentation
  • Tests

Testing

  • Unit tests added/updated
  • Integration tests pass
  • Manual testing performed
  • Tested with dummy data
  • Tested in production-like environment

The regression tests cover all affected positive durations (1–9), retain representative proportional intervals, and retain the 30-second cap. The test-only commit failed by the intended nine assertions on a 10-job fork run. Candidate 629d681396e5148eb3ef8984ec9ab5c117731d9c then passed all 10 jobs, including Python 3.10, 3.11, and 3.12 with 206 passed and 2 skipped per matrix job. A byte-identical-test mutant that restored the zero-delay defect was killed by exactly the nine new assertions.

Test Configuration

OS: GitHub Actions runner
Python Version: 3.10, 3.11, 3.12
Kubernetes Version: (if applicable) N/A
Cloud Provider: (if applicable) N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Breaking Changes

None.

Additional Notes

No documentation describes this internal pacing formula, and the change has no dependent work. Verification ran on GitHub-hosted fork runners rather than the shared development host.

Reviewer Checklist

  • Code quality is acceptable
  • Tests are comprehensive
  • Documentation is updated
  • No security concerns
  • Performance impact is acceptable

Generated by Claude Opus 5 (implementation, testing), GPT-5.6 Sol (brief, review, verification), Kimi K3 (template verification)

Nitjsefnie and others added 2 commits August 19, 2026 18:29
…ent#55)

Add a regression test that drives FixVerifier._monitor_stability with a
controlled clock, a stubbed immediate-check, and a recording replacement
for asyncio.sleep. It covers every positive integer duration from 1 to 9
and asserts that each completed observation awaits a strictly positive
pacing delay, so the observation count is bounded by the requested
monitoring window rather than by event-loop throughput.

It also pins the intervals that must not change: the 30 second maximum
for long windows and the duration // 10 interval for medium ones.

Co-Authored-By: Claude Opus 5 <[email protected]>
…pen-devops-agent#55)

min(30, duration // 10) evaluates to zero for every monitoring duration
from one to nine seconds, so the stability loop awaited asyncio.sleep(0)
and re-checked the target as fast as the event loop allowed until the
wall-clock deadline. Clamp the interval to at least one second so the
observation count follows the requested window instead of event-loop
throughput. Longer windows are unaffected: the 30 second maximum and the
duration // 10 interval both stay as they were.

Fixes open-devops-agent#55

Co-Authored-By: Claude Opus 5 <[email protected]>
@OkiriGabriel

Copy link
Copy Markdown
Collaborator

Reviewed — CI is green across all checks. Pacing short stability-monitoring windows is a good fix. Merging to main.

@OkiriGabriel
OkiriGabriel merged commit 5988b3e into open-devops-agent:main Aug 31, 2026
10 checks passed
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.

[BUG] Stability monitoring busy-spins for short positive durations

2 participants