fix: add FilteredItemLogEntry type and buildFilteredItemLogEntry to fix lint failure#2078
Merged
lpcox merged 2 commits intofeat/difc-filtered-item-loggingfrom Mar 18, 2026
Conversation
…tion to fix lint failure Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [67501871628] Fix the failing GitHub Actions workflow lint
fix: add FilteredItemLogEntry type and buildFilteredItemLogEntry to fix lint failure
Mar 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a CI lint/test compilation failure by adding the missing DIFC filtered-item logging symbols that were referenced by difc_log_test.go, and aligns production logging behavior with what the tests expect.
Changes:
- Introduces
FilteredItemLogEntry(a local struct with JSON tags matching test deserialization). - Renames/defines
buildFilteredItemLogEntryto build the new struct (and adds a conversion helper to JSONL format). - Updates
logFilteredItemsto emit[DIFC-FILTERED] <json>to both unified and per-server text logs while preserving JSONL emission.
💡 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.
This was referenced Mar 18, 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI lint failed with
undefined: FilteredItemLogEntrybecausedifc_log_test.goreferenced two symbols that didn't exist in production code:FilteredItemLogEntry(struct) andbuildFilteredItemLogEntry(func). The production code had a mismatchedbuildFilteredLogEntryreturning*logger.JSONLFilteredItemwith no text-log output.Changes to
internal/server/difc_log.goFilteredItemLogEntrystruct — local type with JSON tags matching what the tests deserialize; decoupled fromlogger.JSONLFilteredItembuildFilteredLogEntry→buildFilteredItemLogEntry— returnsFilteredItemLogEntryvalue (not pointer), matching test call siteslogFilteredItems— marshals entry to JSON and writes[DIFC-FILTERED] <json>to both unified and per-server text logs viaLogInfoWithServer; continues emitting to JSONL viaLogDifcFilteredItemfor backward compatibilitytoJSONLFilteredItem()method — convertsFilteredItemLogEntry→*logger.JSONLFilteredItemto eliminate duplicated field mappingLogInfoWithServerinstead of silently dropping themWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/tmp/go-build2821814806/b332/launcher.test /tmp/go-build2821814806/b332/launcher.test -test.testlogfile=/tmp/go-build2821814806/b332/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build2821814806/b237/vet.cfg 1.4.0/mcp/client.go 1.4.0/mcp/cmd.go x_amd64/compile(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build2821814806/b317/config.test /tmp/go-build2821814806/b317/config.test -test.testlogfile=/tmp/go-build2821814806/b317/testlog.txt -test.paniconexit0 -test.timeout=10m0s main�� mat.go se.go x_amd64/compile --detach contextprotocol/-unsafeptr=false(dns block)nonexistent.local/tmp/go-build2821814806/b332/launcher.test /tmp/go-build2821814806/b332/launcher.test -test.testlogfile=/tmp/go-build2821814806/b332/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build2821814806/b237/vet.cfg 1.4.0/mcp/client.go 1.4.0/mcp/cmd.go x_amd64/compile(dns block)slow.example.com/tmp/go-build2821814806/b332/launcher.test /tmp/go-build2821814806/b332/launcher.test -test.testlogfile=/tmp/go-build2821814806/b332/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build2821814806/b237/vet.cfg 1.4.0/mcp/client.go 1.4.0/mcp/cmd.go x_amd64/compile(dns block)this-host-does-not-exist-12345.com/tmp/go-build2821814806/b341/mcp.test /tmp/go-build2821814806/b341/mcp.test -test.testlogfile=/tmp/go-build2821814806/b341/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build2821814806/b253/vet.cfg _.a ternal/fips140/hkdf/cast.go 522601/b097=>(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.