Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

The Copilot engine's timestamped ERROR pattern (\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)\s+\[(ERROR)\]\s+(.+) was matching too many log lines, causing false positives in error detection.

Changes

  • Removed pattern from copilot_engine_tools.go: Deleted the "Copilot CLI timestamped ERROR messages" pattern from GetErrorPatterns()
  • Updated test expectations: Removed assertions in error_validation_test.go, pattern_error_counting_test.go, and engine_error_patterns_test.go that validated the removed pattern

Error detection still works

The Copilot engine retains comprehensive error detection through:

  • Generic ERROR patterns (from common patterns shared across engines)
  • Bracketed format: [2024-01-01T10:00:00.123Z] ERROR: message
  • Shell/Node.js specific patterns
  • Permission-denied warnings

The removed pattern was redundant with the generic ERROR pattern while being more prone to false positives due to its strict timestamp format requirements.

Original prompt

Remove this error pattern from copilot as it matches too many errors:

Pattern 6/16: Copilot CLI timestamped ERROR messages - regex: (\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)\s+\[(ERROR)\]\s+(.+)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 8, 2026 00:26
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove error pattern from Copilot CLI Remove overly broad Copilot CLI timestamped ERROR pattern Jan 8, 2026
Copilot AI requested a review from pelikhan January 8, 2026 00:34
@pelikhan pelikhan marked this pull request as ready for review January 8, 2026 00:49
@pelikhan pelikhan merged commit ddf67e3 into main Jan 8, 2026
45 checks passed
@pelikhan pelikhan deleted the copilot/remove-error-pattern-copilot branch January 8, 2026 01:00
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