Skip to content

Log cleanup threshold & Bus subscription memory leak #17185

@NotUnHackable

Description

@NotUnHackable

Description

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.
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.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)perfIndicates a performance issue or need for optimization

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions