Skip to content

Wait for ByteRover memory writes during shutdown - #129

Open
Shy7777 wants to merge 1 commit into
NousResearch:mainfrom
Shy7777:fix/byterover-shutdown-curations
Open

Shy7777 wants to merge 1 commit into
NousResearch:mainfrom
Shy7777:fix/byterover-shutdown-curations

Conversation

@Shy7777

@Shy7777 Shy7777 commented Nov 30, 2026

Copy link
Copy Markdown

When Hermes shuts down after a built-in memory write or a pre-compression flush, ByteRover can return from shutdown while its background curation is still in flight. Those hooks start daemon threads, but the provider only waited for the latest turn-sync thread.

Track unfinished curations from all three hooks. Shutdown waits for the pending count to reach zero within the existing ten-second budget, including when a worker raises. Turn sync keeps its existing throttling.

I reproduced both hook cases on Labs main 9ab596a by holding curation open during shutdown. The two regressions failed before the change. All eight ByteRover tests pass with the fix on Python 3.12 against Hermes core 64a0dbb. The regression tests exercise real threads and replace the external ByteRover CLI call.

Copilot AI balanced review requested due to automatic review settings November 30, 2026 04:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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