Skip to content

fix bugs#2

Open
tronpis wants to merge 5 commits intoopenclaw:mainfrom
tronpis:main
Open

fix bugs#2
tronpis wants to merge 5 commits intoopenclaw:mainfrom
tronpis:main

Conversation

@tronpis
Copy link
Copy Markdown

@tronpis tronpis commented Mar 12, 2026

Motivation

  • Prevent repeated emission of the same lines when LineCapture is used with a regular file path and the file has not actually changed.
  • Preserve existing FIFO/named-pipe behavior and keep backoff sleeps cancelable so shutdown remains responsive.

Description

  • Add a lightweight file-change gate in readPathLoop that records ModTime and Size and skips reopening regular files when both are unchanged while still bypassing the gate for pipes (os.ModeNamedPipe).
  • Split reader logic into scanReader and keep readReader as the one-shot entry that defer-closes the output channel, and use scanReader from the path loop to avoid multiple closers.
  • Replace fixed time.Sleep calls with a context-aware sleepWithContext helper so backoff waits respect cancellation.
  • Add regression tests TestLineCapturePathReopenStreamsMultipleLines and TestLineCapturePathDoesNotReplayUnchangedFile in modules/audio/line_capture_test.go to verify reopen behavior and that unchanged files do not replay.

Testing

  • Ran go test ./... and all packages passed, with modules/audio passing including the new regression tests.
  • The new tests TestLineCapturePathDoesNotReplayUnchangedFile and TestLineCapturePathReopenStreamsMultipleLines completed successfully under the test run.

tronpis and others added 5 commits February 22, 2026 17:45
Make Queue.Enqueue non-blocking when full and add unit tests
Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com>
Avoid replaying unchanged file content in LineCapture path mode
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

@kwasham kwasham left a comment

Choose a reason for hiding this comment

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

PASS: Queue enqueue now drops tasks when full and the new tests cover both fullness and closed states. line_capture now debounces unchanged files, retries on stat/open, and the new tests verify it doesn't replay old content, which improves stability without exposing secrets or auth/RLS surface area. No status checks are configured (statusCheckRollup is empty).

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.

2 participants