Skip to content

feat: remove remaining lint warnings in event bus and ring buffer#3

Open
remcostoeten wants to merge 1 commit intomasterfrom
feat/lint-warning-cleanup
Open

feat: remove remaining lint warnings in event bus and ring buffer#3
remcostoeten wants to merge 1 commit intomasterfrom
feat/lint-warning-cleanup

Conversation

@remcostoeten
Copy link
Copy Markdown
Owner

@remcostoeten remcostoeten commented Feb 11, 2026

Summary\n- removed non-null assertion from event bus unsubscribe path by capturing a stable listener bucket\n- replaced ring buffer

ew Array(capacity) allocation with typed Array.from initialization\n- preserved existing runtime behavior while eliminating remaining lint warnings\n\n## Validation\n- bun run check\n\n## Notes\n- this implements the quick win from o_implement.md under lint cleanup

Summary by CodeRabbit

  • Refactor
    • Internal code structure improvements to event subscription and performance logging systems.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hi @remcostoeten! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Two modules refactored for improved implementation patterns. The event bus subscribe function now uses a named bucket alias for Set operations, while the performance logger replaces its buffer with a nullable variant and adds filtering logic to sanitize results.

Changes

Cohort / File(s) Summary
Event Bus Refactoring
src/core/eventBus.ts
Renamed direct Set usage to a bucket alias in the subscribe function. Set operations (add, delete) now accessed through the bucket variable, improving code clarity without altering functionality or public API.
Logger Buffer Nullability
src/domains/performance/logger.ts
Changed buffer from PerfEvent[] to (PerfEvent | null)[] initialized with nulls. Added notNull type guard and filtering logic to exclude null entries in getAll() results for both full and partial buffer states.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A bucket of events, now clearly named,
No nulls shall slip through our logger's frame,
With guards in place and filters true,
The code flows clean—both old and new!


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant