Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Refs #36677
This PR covers the active-borrower reload lifecycle leak discussed in that issue. It does not establish that the original idle CPU loop or accumulated MCP processes are resolved.
Type of change
What does this PR do?
Fix the active-borrower reload leak described by Just-Silver and underdark456. After reload replaces an RcMap entry under the same key, the old entry sees the replacement and treats itself as cached. With an infinite idle TTL, its layer scope never closes.
Patch Effect 4.0.0-rc.112 to compare entry identity when releasing: close the detached graph after its last borrower, without removing the replacement. The regression holds two borrowers across reload and checks both finalization and replacement reuse. This fixes that lifecycle leak; I have not reproduced the original idle CPU loop or measured the reported MCP process counts.
How did you verify your code works?
bun run test test/location-layer.test.ts --timeout 60000: 25 passed. The initial default-timeout run had 22 passes and 3 five-second timeouts.bun run checkpassed through the normal pre-push hook: lint reported 0 errors (17,479 existing warnings); all 36 typecheck tasks passed. Node type stripping, disabled Astro telemetry, and a writable Wrangler log path were used for the local environment.Screenshots / recordings
Not applicable.
Checklist