FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: log cleanup threshold and bus subscription memory leak by NotUnHackable · Pull Request #17178 · anomalyco/opencode · GitHub

fix: log cleanup threshold and bus subscription memory leak - #17178

Closed
NotUnHackable wants to merge 1 commit into
anomalyco:devfrom
NotUnHackable:dev
Closed

fix: log cleanup threshold and bus subscription memory leak#17178
NotUnHackable wants to merge 1 commit into
anomalyco:devfrom
NotUnHackable:dev

Conversation

NotUnHackable commented Mar 12, 2026
edited
Loading

Copy link
Copy Markdown

Two small bug fixes:

  1. Log cleanup threshold (src/util/log.ts): Fixed inconsistent threshold check - was checking files.length <= 5 but keeping last 10 files with slice. Changed to files.length <= 10 to match the slice logic.
  2. Bus subscription memory leak (src/bus/index.ts): When all subscribers for an event type unsubscribed, the empty array remained in the subscriptions Map. Added cleanup to delete the key when the array becomes empty.

Fixes #17185

github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Mar 12, 2026

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found a potentially related PR:

Related PR:

The other memory leak PRs appear to be older or focus on different subsystems (SSE streams, LSP, session handling, etc.) rather than the specific log cleanup threshold and bus subscription issues addressed in PR #17178.

Copy link
Copy Markdown
Author

Added the issue

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 12, 2026
github-actions Bot closed this Mar 12, 2026
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
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.

Log cleanup threshold & Bus subscription memory leak

1 participant


Back | FazBrowse Home | New Git URL