Refactor engine log parsing to canonical Copilot event format#38781
Refactor engine log parsing to canonical Copilot event format#38781Copilot wants to merge 5 commits into
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request standardizes engine log parser outputs on a canonical Copilot “event” schema, and updates shared rendering/summary code paths to accept those canonical entries (normalizing internally as needed). It also adjusts the compiled Copilot smoke workflow to use $HOME-based Copilot config paths.
Changes:
- Introduces shared helpers to detect Copilot event logs and convert between legacy trace entries and canonical Copilot event entries.
- Refactors multiple engine parsers/tests to emit and assert against canonical event entries (e.g.,
session.init,assistant.message,tool.execution_*,session.result). - Updates the compiled Copilot smoke workflow to avoid hardcoded
/home/runnerpaths and to set Copilot config env paths via$HOME.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/action_resolver.go | Fixes/cleans up error handling when resolving gh-aw refs via gh api. |
| actions/setup/js/parse_pi_log.cjs | Converts Pi legacy entries to canonical Copilot event entries before rendering/returning. |
| actions/setup/js/parse_gemini_log.cjs | Converts Gemini legacy entries to canonical Copilot event entries before rendering/returning. |
| actions/setup/js/parse_custom_log.test.cjs | Loosens assertions to match updated “Custom Engine Log” rendering expectations. |
| actions/setup/js/parse_copilot_log.test.cjs | Updates tests to validate canonical session.result data shape (numTurns, etc.). |
| actions/setup/js/parse_copilot_log.cjs | Treats event-format inputs as canonical, converts legacy to events, and normalizes for rendering/information sections. |
| actions/setup/js/parse_codex_log.test.cjs | Updates Codex tests to assert tool.execution_* and session.init events. |
| actions/setup/js/parse_codex_log.cjs | Converts Codex legacy entries to canonical Copilot event entries for logEntries output. |
| actions/setup/js/parse_claude_log.cjs | Converts Claude legacy entries to canonical Copilot event entries for logEntries output and rendering. |
| actions/setup/js/parse_antigravity_log.test.cjs | Updates Antigravity tests to assert presence of assistant.message events. |
| actions/setup/js/parse_antigravity_log.cjs | Converts Antigravity legacy entries to canonical Copilot event entries before returning. |
| actions/setup/js/log_parser_shared.cjs | Adds event-format detection + bidirectional legacy↔event conversion helpers and exports them. |
| actions/setup/js/log_parser_format.cjs | Normalizes event entries to legacy trace shape internally for rendering and summaries. |
| actions/setup/js/log_parser_bootstrap.cjs | Allows model extraction from either legacy init or canonical session.init. |
| .github/workflows/smoke-copilot-aoai-entra.lock.yml | Switches Copilot config paths to $HOME and adjusts env exports accordingly. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 14/15 changed files
- Comments generated: 1
| // Add Information section | ||
| const lastEntry = logEntries[logEntries.length - 1]; | ||
| const initEntry = logEntries.find(entry => entry.type === "system" && entry.subtype === "init"); | ||
| const lastEntry = legacyRenderEntries[legacyRenderEntries.length - 1]; | ||
| const initEntry = legacyRenderEntries.find(entry => entry.type === "system" && entry.subtype === "init"); | ||
|
|
|
❌ Test Quality Sentinel failed to deliver outputs during test quality analysis. |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #38781 does not have the implementation label (has_implementation_label=false) and has only 8 new lines of code in business logic directories, below the 100-line threshold (requires_adr_by_default_volume=false). |
|
@copilot run pr-finisher skill |
There was a problem hiding this comment.
✅ Test Quality Sentinel: 73/100. Test quality is acceptable — 15.8% of modified tests are implementation tests (threshold: 30%). The 3 flagged tests are false positives where only the test accessor was refactored; all behavioral assertions remain intact. No coding-guideline violations detected.
…ver.go Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Removed the unused |
This change makes the Copilot event log schema the canonical parser output across engine parsers and aligns rendering on that schema. Copilot session
events.jsonlinputs now pass through without conversion, while legacy Claude/Codex/Gemini/Pi/Antigravity shapes are normalized to Copilot events.Canonical event schema adoption
session.init,assistant.message,tool.execution_start,tool.execution_complete, andsession.result.Renderer compatibility via normalization
Parser refactors by engine
session.resultmetadata when absent.Bootstrap/model metadata alignment
session.initentries.Test updates
logEntriesand event-based metadata access patterns.