Skip to content

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

Closed

Description

@Nitjsefnie

Bug Description

FixVerifier stability monitoring has no positive pacing delay when monitoring_duration is between one and nine seconds. The loop repeatedly performs checks with asyncio.sleep(0) until the wall-clock deadline, so its iteration count is governed by event-loop scheduling speed rather than a bounded monitoring cadence.

Steps to Reproduce

  1. Check out commit 2e6bcf00d0b15e478fa9a8b90402452111852124.
  2. Evaluate min(30, duration // 10) for a duration from 1 through 9; it returns 0.
  3. Run _monitor_stability() with a controlled clock and a recording replacement for asyncio.sleep.
  4. Observe that every completed iteration calls sleep(0) before immediately beginning another check.

Expected Behavior

Every positive monitoring duration uses a positive pacing delay between stability checks, bounding the number of observations performed during the monitoring window.

Actual Behavior

Durations from one through nine seconds produce a zero-second sleep interval, allowing back-to-back checks for the entire wall-clock duration.

Environment

  • Agent Version/Commit: 2e6bcf00d0b15e478fa9a8b90402452111852124
  • Deployment Method: Direct Python call with a controlled clock
  • Platform: FixVerifier stability-monitoring path

Configuration

monitoring_duration=5

Logs

computed interval: 0
recorded sleep arguments: [0, 0, 0]

Additional Context

Discovered while verifying #7, "Integrate FixVerifier post-remediation verification into agent loop". This is distinct from #52: that issue covers non-positive durations producing no observations, while this issue covers positive short durations producing unpaced observations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions