Skip to content

fix: type mismatch in LogDifcFilteredItem causes build failure#2080

Merged
lpcox merged 1 commit intofeat/difc-filtered-item-loggingfrom
copilot/fix-github-actions-integration-test
Mar 18, 2026
Merged

fix: type mismatch in LogDifcFilteredItem causes build failure#2080
lpcox merged 1 commit intofeat/difc-filtered-item-loggingfrom
copilot/fix-github-actions-integration-test

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

LogDifcFilteredItem was passing *JSONLFilteredItem to logger.LogMessage, which only accepts *JSONLRPCMessage, causing a compile error.

Change

  • internal/logger/jsonl_logger.go: Replace logger.LogMessage(entry) with logger.logEntry(entry) in LogDifcFilteredItem. logEntry accepts interface{} and is the underlying method LogMessage already delegates to — making it the correct call site for non-RPC entry types.
// Before
_ = logger.LogMessage(entry)  // type error: *JSONLFilteredItem is not *JSONLRPCMessage

// After
_ = logger.logEntry(entry)    // accepts interface{}, handles any JSON-serializable type

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
@lpcox lpcox marked this pull request as ready for review March 18, 2026 01:12
Copilot AI review requested due to automatic review settings March 18, 2026 01:12
@lpcox lpcox merged commit d4bf94a into feat/difc-filtered-item-logging Mar 18, 2026
@lpcox lpcox deleted the copilot/fix-github-actions-integration-test branch March 18, 2026 01:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a compile-time type mismatch in JSONL logging by routing DIFC-filtered entries through the JSONL logger’s generic entry writer, allowing non-RPC JSONL records to be logged alongside RPC messages.

Changes:

  • Update LogDifcFilteredItem to call logger.logEntry(entry) instead of logger.LogMessage(entry) to avoid passing a non-*JSONLRPCMessage type into the RPC-only method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 171 to 173
if logger == nil {
return
}
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.

3 participants