Skip to content

feat(logfile): add persistent logfile for N+1 findings#1

Merged
keiththomps merged 1 commit into
keiththomps:mainfrom
endoze:feat/add-logfile-option-for-findings
Mar 27, 2026
Merged

feat(logfile): add persistent logfile for N+1 findings#1
keiththomps merged 1 commit into
keiththomps:mainfrom
endoze:feat/add-logfile-option-for-findings

Conversation

@endoze
Copy link
Copy Markdown
Collaborator

@endoze endoze commented Mar 11, 2026

Developers need a way to review all detected N+1 queries across a full test suite or dev session without scrolling through terminal output. This adds a logfile writer that buffers detections in memory, deduplicates by fingerprint, and flushes to disk on process exit. File-level locking ensures safe writes from parallel workers, and stale files from previous runs are automatically truncated. Supports both plain text and JSONL output formats.

@endoze endoze force-pushed the feat/add-logfile-option-for-findings branch from 5f0604a to f26249c Compare March 11, 2026 14:55
Comment thread lib/and_one/logfile_writer.rb
Developers need a way to review all detected N+1 queries across a full
test suite or dev session without scrolling through terminal output.
This adds a logfile writer that buffers detections in memory, deduplicates
by fingerprint, and flushes to disk on process exit. Stale files from
previous runs are truncated at boot before workers fork, and file-level
locking ensures parallel workers safely append. Supports both plain text
and JSONL output formats.
@endoze endoze force-pushed the feat/add-logfile-option-for-findings branch from f26249c to 57d0cbe Compare March 25, 2026 14:10
@keiththomps keiththomps merged commit be368fb into keiththomps:main Mar 27, 2026
1 check passed
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