Skip to content

fix: add FilteredItemLogEntry type and buildFilteredItemLogEntry to fix lint failure#2078

Merged
lpcox merged 2 commits intofeat/difc-filtered-item-loggingfrom
copilot/fix-github-actions-workflow-lint-yet-again
Mar 18, 2026
Merged

fix: add FilteredItemLogEntry type and buildFilteredItemLogEntry to fix lint failure#2078
lpcox merged 2 commits intofeat/difc-filtered-item-loggingfrom
copilot/fix-github-actions-workflow-lint-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

CI lint failed with undefined: FilteredItemLogEntry because difc_log_test.go referenced two symbols that didn't exist in production code: FilteredItemLogEntry (struct) and buildFilteredItemLogEntry (func). The production code had a mismatched buildFilteredLogEntry returning *logger.JSONLFilteredItem with no text-log output.

Changes to internal/server/difc_log.go

  • New FilteredItemLogEntry struct — local type with JSON tags matching what the tests deserialize; decoupled from logger.JSONLFilteredItem
  • Renamed buildFilteredLogEntrybuildFilteredItemLogEntry — returns FilteredItemLogEntry value (not pointer), matching test call sites
  • Updated logFilteredItems — marshals entry to JSON and writes [DIFC-FILTERED] <json> to both unified and per-server text logs via LogInfoWithServer; continues emitting to JSONL via LogDifcFilteredItem for backward compatibility
  • Added toJSONLFilteredItem() method — converts FilteredItemLogEntry*logger.JSONLFilteredItem to eliminate duplicated field mapping
  • Improved error handling — logs marshal failures via LogInfoWithServer instead of silently dropping them

Warning

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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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
    • Triggering command: /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=&gt; (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow lint
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 67501871628
Job URL: https://github.com/github/gh-aw-mcpg/actions/runs/23223729138/job/67501871628


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

…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
Copilot AI requested a review from lpcox March 18, 2026 01:05
@lpcox lpcox marked this pull request as ready for review March 18, 2026 01:05
Copilot AI review requested due to automatic review settings March 18, 2026 01:05
@lpcox lpcox merged commit a503093 into feat/difc-filtered-item-logging Mar 18, 2026
3 checks passed
@lpcox lpcox deleted the copilot/fix-github-actions-workflow-lint-yet-again branch March 18, 2026 01:06
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

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 buildFilteredItemLogEntry to build the new struct (and adds a conversion helper to JSONL format).
  • Updates logFilteredItems to 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.

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