-
Notifications
You must be signed in to change notification settings - Fork 0
fix(mount): reduce websocket polling overhead #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+123
−7
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { | ||
| "id": "traj_d8emfg3tc8yi", | ||
| "version": 1, | ||
| "task": { | ||
| "title": "Reduce relayfile mount polling noise" | ||
| }, | ||
| "status": "completed", | ||
| "startedAt": "2026-04-17T13:28:00.972Z", | ||
| "completedAt": "2026-04-17T13:28:35.109Z", | ||
| "agents": [ | ||
| { | ||
| "name": "default", | ||
| "role": "lead", | ||
| "joinedAt": "2026-04-17T13:28:04.956Z" | ||
| } | ||
| ], | ||
| "chapters": [ | ||
| { | ||
| "id": "chap_disu8q4jucfi", | ||
| "title": "Work", | ||
| "agentName": "default", | ||
| "startedAt": "2026-04-17T13:28:04.956Z", | ||
| "endedAt": "2026-04-17T13:28:35.109Z", | ||
| "events": [ | ||
| { | ||
| "ts": 1776432484957, | ||
| "type": "decision", | ||
| "content": "Use file watching for CLI mount local writes: Use file watching for CLI mount local writes", | ||
| "raw": { | ||
| "question": "Use file watching for CLI mount local writes", | ||
| "chosen": "Use file watching for CLI mount local writes", | ||
| "alternatives": [], | ||
| "reasoning": "The CLI mount entrypoint was polling and scanning the local mirror every two seconds even though mountsync already has an fsnotify watcher. Wiring the watcher lets websocket mounts skip no-op cycles while still pushing local edits immediately." | ||
| }, | ||
| "significance": "high" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "retrospective": { | ||
| "summary": "Reduced mount-loop noise and local scan overhead by wiring fsnotify into the CLI mount command and skipping websocket no-op cycles in both mount entrypoints.", | ||
| "approach": "Standard approach", | ||
| "confidence": 0.92 | ||
| }, | ||
| "commits": [], | ||
| "filesChanged": [], | ||
| "projectId": "/Users/khaliqgant/Projects/AgentWorkforce/relayfile", | ||
| "tags": [], | ||
| "_trace": { | ||
| "startRef": "df342b6d7c423b09a088577b6e4142a550d82062", | ||
| "endRef": "df342b6d7c423b09a088577b6e4142a550d82062" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Trajectory: Reduce relayfile mount polling noise | ||
|
|
||
| > **Status:** ✅ Completed | ||
| > **Confidence:** 92% | ||
| > **Started:** April 17, 2026 at 03:28 PM | ||
| > **Completed:** April 17, 2026 at 03:28 PM | ||
| --- | ||
|
|
||
| ## Summary | ||
|
|
||
| Reduced mount-loop noise and local scan overhead by wiring fsnotify into the CLI mount command and skipping websocket no-op cycles in both mount entrypoints. | ||
|
|
||
| **Approach:** Standard approach | ||
|
|
||
| --- | ||
|
|
||
| ## Key Decisions | ||
|
|
||
| ### Use file watching for CLI mount local writes | ||
| - **Chose:** Use file watching for CLI mount local writes | ||
| - **Reasoning:** The CLI mount entrypoint was polling and scanning the local mirror every two seconds even though mountsync already has an fsnotify watcher. Wiring the watcher lets websocket mounts skip no-op cycles while still pushing local edits immediately. | ||
|
|
||
| --- | ||
|
|
||
| ## Chapters | ||
|
|
||
| ### 1. Work | ||
| *Agent: default* | ||
|
|
||
| - Use file watching for CLI mount local writes: Use file watching for CLI mount local writes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
--websocketis enabled, this branch skips nine out of ten timer ticks entirely, so no sync runs on those ticks. That regresses fallback behavior: if websocket setup fails or later disconnects,SyncOnceis no longer called each interval to poll (synconly polls whenwsConn == nil), so local uploads and remote pulls can be delayed by up towebsocketReconcileEvery*intervalinstead of the configured interval. This same pattern is also present incmd/relayfile-mount/main.go, so both entrypoints throttle polling even when websocket is unavailable.Useful? React with 👍 / 👎.