Skip to content

feat(trace): Copilot skills, spec pointers, and pasted images (M2) - #3804

Merged
migmartri merged 2 commits into
chainloop-dev:mainfrom
migmartri:feat/copilot-trace-m2
Nov 11, 2026
Merged

migmartri merged 2 commits into
chainloop-dev:mainfrom
migmartri:feat/copilot-trace-m2

Conversation

@migmartri

@migmartri migmartri commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

This PR builds M2 of the plan for GitHub Copilot support in Chainloop Trace (docs/plans/issue-3800-copilot-trace-provider.md): R-008, R-009, and R-010 for these requirements.

  • Skills tracking (R-008): the Copilot provider records each skill that the session loaded, from the skill.invoked events of the Copilot event log, and captures each skill folder through the shared skill pipeline. A skill listing does not count as a use.
  • Spec source pointers (R-009): exact copies of stored spec sources are replaced with pointers: full view reads, shell reads with cat (also in a combined output, at line boundaries), create calls, and apply_patch calls that add one file. Copilot also logs the input of each Trace hook in hook.start records, and the same copies there are replaced. Partial reads, changed content, failed tool calls, and other edits stay inline.
  • Pasted image pointers (R-009): each distinct image that the user attached is stored once as "Pasted image N", and the data of its session.binary_asset record is replaced with a pointer. An image that a tool gives the model stays inline.
  • End-to-end suite (R-010): the Copilot harness attaches pasted images with --attachment, so the pasted image check runs headless. The viewer-pointer, inline-copy, and skill-package checks that Codex uses now apply to Copilot too. The compatibility tables show the new Copilot cells.
  • Cache token accounting: the end-to-end check now compares the stored Copilot token counts with the per-call session.usage_record events of the event log, so the Copilot cell moves from Unknown to Yes.

Differences from the plan:

  • No separate transcript.go: the extensions read the event types of parse.go.
  • The Codex e2e checks are made to apply to Copilot, instead of a Copilot copy of them.
  • The cat matching helpers are copied from the Codex provider, not moved to a shared package.

Not verified:

  • A skill that the user starts with a slash command. Prompt mode sends the slash command to the model as text, so only skills that the model loads are checked.
  • The manual VS Code check, and the open question of the spec about the VS Code event log.

@matiasinsaurralde could you take a look?

Refs #3800

AI disclosure: Claude Code helped to research, implement, and test this change.

🤖 Generated with Claude Code

Implements M2 of the plan for spec issue-3800 (R-008, R-009, R-010): the Copilot provider records the skills that a session loaded, and replaces copies of spec sources and attached images in the transcript with pointers to their materials.

Refs chainloop-dev#3800

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 0f38bc43-08fc-4080-9634-a22ace400584
@chainloop-platform

chainloop-platform Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — 🟡 82% · ✅ 0 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 82% 1 ✅ 0 99% AI / 1% Human 13 +1831 / -38 39m17s

🟡 82% — 99% AI — ✅ All policies passing

Nov 11, 2026 01:50 UTC · 39m17s · $35.34 · 744 in / 401.9k out · claude-code 2.1.322 (claude-opus-5-5)

View session details ↗

Change Summary

  • Adds tracking for actual skill invocations and skill-folder discovery.
  • Replaces stored spec copies and user-attached images with material pointers in native and viewer transcripts.
  • Extends live-host skill, spec, image, and cache-accounting checks.
  • Updates compatibility documentation and support limitations.

AI Session Overall Score

🟡 82% — Strong automated validation accompanies a corrected overclaim, extra coverage scope, and outstanding manual acceptance.

AI Session Analysis Breakdown

🟢 95% · context-and-planning

🟢 The baseline supplies milestone scope, extension boundaries, negative cases, and concrete verification steps before implementation. · High Impact

🟢 92% · solution-quality

🟢 Read replacement is tied to each tool call and its arguments, preventing cross-call authorization and ranged-read rewriting. · High Impact

🟢 92% · user-trust-signal

No notes.

🟡 73% · scope-discipline

🟠 The AI adds independent cache-accounting coverage beyond M2 skills, spec pointers, and images without a captured user scope expansion. · Medium Severity

💡 Separate optional coverage improvements from milestone work, or ask for explicit approval before adding them.

🟡 73% · verification

🟢 Live-host checks report skills and spec pointers passing three times, plus pasted-image material and viewer-pointer checks. · High Impact

🟠 The required manual VS Code milestone check was not performed and remains a pre-merge acceptance gap. · Medium Severity

💡 Arrange and record the required manual-host check before merging, identifying exactly which compatibility cells it validates.

🟠 The active user approves opening the PR but never explicitly confirms the implemented behavior works. · Medium Severity

💡 Request a concrete behavior check rather than treating PR authorization as runtime acceptance.

🟡 72% · alignment

🟠 The completion report claimed partial reads stayed inline, but review exposed unguarded ranged views before the later fix. · Medium Severity

💡 Verify ranged full-content reads separately before claiming all partial-read requests remain inline.


File Attribution

███████████████████░ 99% AI / 1% Human

Status Attribution File Lines
created ai app/cli/internal/trace/copilot/materials.go +816 / -0
created ai app/cli/internal/trace/copilot/materials_test.go +438 / -0
created ai app/cli/internal/trace/copilot/skills.go +202 / -0
created ai app/cli/internal/trace/copilot/skills_test.go +181 / -0
modified ai app/cli/internal/trace/e2e/checks_tokens.go +59 / -0
modified ai app/cli/internal/trace/e2e/checks_tokens_test.go +45 / -0
modified ai app/cli/internal/trace/copilot/parse.go +25 / -2
modified ai app/cli/internal/trace/e2e/copilot.go +18 / -8
modified ai app/cli/internal/trace/e2e/checks_codex.go +18 / -7
modified ai app/cli/internal/trace/copilot/copy.go +15 / -6
modified ai app/cli/internal/trace/README.md +9 / -9
modified ai app/cli/internal/trace/e2e/checks_more.go +3 / -4
modified ai app/cli/internal/trace/e2e/checks.go +2 / -2

Policies (4)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-0f38bc -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-0f38bc -
✅ Passed ai-config-no-secrets ai-coding-session-0f38bc -
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-0f38bc -

Security Checks — ✅ 5 passing

✅ Nothing this change touches has a recorded security-fix history.

View in Chainloop ↗ · How this works ↗

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed sast -
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -
Scans not applied (3)
Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗


Powered by Chainloop and Chainloop Trace

@migmartri
migmartri requested a review from a team November 11, 2026 02:23

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 11 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

…ting check

Match cat copies per shell call, keep ranged views inline, read every cat operand, and accept the object form of apply_patch in hook records. The end-to-end cache token check now compares Copilot evidence with the per-call usage records of the event log.

Refs chainloop-dev#3800

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 0f38bc43-08fc-4080-9634-a22ace400584

@danlishka danlishka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@migmartri
migmartri merged commit a3d3cce into chainloop-dev:main Nov 11, 2026
17 checks passed
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