Fix silent conversation-transcript fetch failures in Copilot session data fetcher - #51195
Merged
pelikhan merged 3 commits intoAug 7, 2026
Merged
Conversation
…ack and diagnostics Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Root cause conversation-transcript fetch failure in Copilot Session Insights
Fix silent conversation-transcript fetch failures in Copilot session data fetcher
Aug 7, 2026
pelikhan
marked this pull request as ready for review
August 7, 2026 22:40
pelikhan
deleted the
copilot/deep-report-root-cause-conversation-transcript-fet
branch
August 7, 2026 22:40
Contributor
There was a problem hiding this comment.
Pull request overview
Improves Copilot session transcript retrieval and failure visibility.
Changes:
- Adds elevated-token fallback and exit-code diagnostics.
- Emits failure summaries with remediation guidance.
- Recompiles both consuming workflows.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/shared/copilot-session-data-fetch.md |
Adds authentication fallback, diagnostics, and documentation. |
.github/workflows/copilot-session-insights.lock.yml |
Regenerates the session-insights workflow. |
.github/workflows/copilot-opt.lock.yml |
Regenerates the optimization workflow. |
Review details
Tip
Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
| > "$raw_log" 2>/dev/null || true | ||
| > "$raw_log" 2>"$raw_log_err" || log_rc=$? | ||
|
|
||
| if [ -f "$raw_log" ] && [ -s "$raw_log" ]; then |
| @@ -1,4 +1,4 @@ | |||
| # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"138fe93c4df6669482e2736e3bf8ce91e31439f6c921848737f80f9c10028fa1","body_hash":"3e7da356432617f7a3740f0dbb7cdde755e1c78d89c38f99b59c1810029c84f6","strict":true,"agent_id":"claude","engine_versions":{"claude":"2.1.224"}} | |||
| # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1a205bf3354b3cf4ede0f23f8443a2f0dd553ee0a66727371426742bf0733e68","body_hash":"2a96a21304b975c51504dd556731857febd942d37b53e1fcc5b42a29855ab23e","strict":true,"agent_id":"claude","engine_versions":{"claude":"2.1.223"}} | |||
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.
copilot-session-data-fetch.mdhas produced zero*-conversation.txttranscripts for 71+ consecutive days, blocking turn-by-turn tool use, token counts, loop detection, and prompt-quality analysis in Copilot Session Insights — reporting has silently degraded to run-metadata-only.Root cause
Copilot coding-agent runs execute under a special
dynamic/copilot-swe-agent/copilotworkflow path. Their job logs do contain the expected[cca-engine] turn=N ...lines (confirmed on real runs), but the fetch script'sgh apicalls to list jobs and download job logs discarded all stderr/exit codes (2>/dev/null || true). Once the defaultGITHUB_TOKENlost the ability to fetch these logs, every failure went completely unnoticed — thelogs/directory stayed empty with no signal as to why.Changes
secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN, matching the existing repo convention for operations that need permissions beyond the default token.gh apicalls; classify each failure (API error, no jobs found, empty log, no matching lines) by actual exit code rather than stderr presence, and log the specific reason per run.GH_AW_GITHUB_TOKEN).copilot-session-insights.mdandcopilot-opt.md.