Skip to content

feat(ci): agentic VCR capture mode for the demo corpus workflow - #678

Merged
jensholdgaard merged 2 commits into
mainfrom
agentic-corpus-capture
Jul 29, 2026
Merged

feat(ci): agentic VCR capture mode for the demo corpus workflow#678
jensholdgaard merged 2 commits into
mainfrom
agentic-corpus-capture

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

Extends the corpus-capture workflow with an agentic=vcr dispatch input for demo 3.0+:

  • Layers compose.agent.yaml (agent + MCP + chatbot; prebuilt 3.0.0-agent/-mcp/-chatbot ghcr images verified to exist) between the demo base and our collector override.
  • VCR replay, zero secrets: the demo's .env already defaults to USE_VCR=True with LLM_MODEL=azure/gpt-5.5 matching a shipped cassette and an empty API_KEY — recorded LLM responses, live Traceloop/OTel instrumentation, so the emitted gen_ai.* semconv telemetry is real.
  • Drives the three cassette-backed prompts (the agent README's "Default Requests") against POST /prompt every 10s through the steady-state window, via the compose-published ephemeral port.
  • Readiness gates on the agent service; pre-3.0 refs fail loudly if the mode is requested; the manifest gains a gen_ai.* key census so a capture proves its GenAI content at a glance.

Groundwork for a corpus/otel-demo-v5 with public, reproducible GenAI telemetry — the semconv-dotted complement to the flat-key dogfood capture.

Verification

YAML parses; a live agentic=vcr trial dispatch follows this PR (the workflow is dispatch-only, so the real proof is the trial's manifest).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F

Summary by CodeRabbit

  • New Features

    • Added optional agent-layer support to OpenTelemetry Demo capture runs through workflow configuration.
    • Added automated agent interactions using predefined prompts during capture sessions.
    • Capture manifests now include a census of generative AI attribute keys.
  • Bug Fixes

    • Added validation for unsupported agent modes and missing agent-layer configuration.
    • Capture runs now verify that the agent service is ready before proceeding.

agentic=vcr layers the demo 3.0+ agent/MCP/chatbot services
(compose.agent.yaml, prebuilt ghcr images) in VCR replay mode — the
demo's .env defaults already point at the shipped azure/gpt-5.5
cassette with no API key — gates readiness on the agent, and drives
the three cassette-backed prompts through the capture window. The LLM
calls replay from cassettes; the Traceloop/OTel instrumentation around
them is live, so the corpus gains real gen_ai.* semconv telemetry at
zero cost with no secrets. The manifest gains a gen_ai.* key census so
a capture proves (or disproves) the GenAI content at a glance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
@jensholdgaard
jensholdgaard requested a review from Copilot July 29, 2026 12:11
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c908af87-9fd4-432d-ac25-970578df66e1

📥 Commits

Reviewing files that changed from the base of the PR and between 600f798 and 8a42afd.

📒 Files selected for processing (1)
  • .github/workflows/capture-otel-demo-corpus.yml
📝 Walkthrough

Walkthrough

The capture workflow adds an optional agentic=vcr mode that enables the agent compose layer, waits for agent readiness, drives rotating prompts during capture, and records gen_ai.* keys in the generated manifest.

Changes

Agentic corpus capture

Layer / File(s) Summary
Agentic compose selection
.github/workflows/capture-otel-demo-corpus.yml
Adds the agentic dispatch input, propagates it to compose resolution, layers compose.agent.yaml for VCR mode, and rejects unknown values.
Agent readiness and prompt capture
.github/workflows/capture-otel-demo-corpus.yml
Propagates agentic mode to readiness and capture steps, waits for the agent service when enabled, and runs a rotating prompt driver during the steady-state window.
GenAI manifest census
.github/workflows/capture-otel-demo-corpus.yml
Adds ranked counts of distinct gen_ai* keys found in logs.jsonl to manifest.md.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CaptureWorkflow
  participant ComposeServices
  participant AgentService
  participant logs.jsonl
  CaptureWorkflow->>ComposeServices: Enable compose.agent.yaml for AGENTIC=vcr
  CaptureWorkflow->>ComposeServices: Wait for agent readiness
  CaptureWorkflow->>AgentService: POST rotating prompts
  AgentService->>logs.jsonl: Emit captured telemetry
  CaptureWorkflow->>AgentService: Stop prompt driver after DURATION
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The summary is detailed, but the required Related and Checklist sections from the template are missing. Add a Related section with issue/RFC links and a Checklist section with the required checkbox items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding an agentic VCR capture mode to the corpus-capture workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agentic-corpus-capture

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/capture-otel-demo-corpus.yml:
- Around line 295-300: Update the AGENTIC=vcr flow around want_running agent so
it verifies the agent’s /prompt endpoint is HTTP-ready before capture. Remove
suppression such as “|| true” from the prompt-driver curl/request path, require
cassette-backed prompts to complete successfully during the capture window, and
propagate any readiness or request failure so the step fails instead of
publishing an empty corpus.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 16a2138c-6889-41c9-8228-3386db9439ad

📥 Commits

Reviewing files that changed from the base of the PR and between 36e21cd and 600f798.

📒 Files selected for processing (1)
  • .github/workflows/capture-otel-demo-corpus.yml

Comment thread .github/workflows/capture-otel-demo-corpus.yml

Copilot AI 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.

Pull request overview

This PR extends the dispatch-only OTel demo corpus capture workflow to optionally include the demo’s agent/MCP/chatbot compose layer in a VCR replay mode (agentic=vcr), and to actively drive cassette-backed prompts during the capture window so the resulting corpus includes GenAI (gen_ai.*) telemetry.

Changes:

  • Adds an agentic workflow_dispatch input and validates agentic=vcr (with a hard fail for unknown modes or pre-3.0 demo refs lacking compose.agent.yaml).
  • Layers compose.agent.yaml between the demo base compose file and the collector override via COMPOSE_FILE.
  • Drives /prompt in a loop during the steady-state window and extends the capture manifest with a gen_ai.* attribute-key census.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/capture-otel-demo-corpus.yml
…the driver

Container running-state is not /prompt readiness: the capture now
probes until the first cassette-backed prompt answers 2xx and fails
loudly otherwise (a cassette mismatch 500s here too) — an apparently
successful corpus with no gen_ai content is the failure mode this
prevents. The driver logs every HTTP code; zero successes across the
window fails the capture. setsid gives the driver its own process
group so teardown kills in-flight curls, with a wait before slicing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/capture-otel-demo-corpus.yml:342

  • docker compose port agent 8010 can emit multiple lines (e.g., dual-stack 0.0.0.0:PORT and :::PORT). In command substitution that becomes a newline in agent_addr, producing an invalid URL like http://0.0.0.0:PORT\n:::PORT/prompt and breaking both the readiness probe and the prompt driver. Filter to a single address (and prefer a routable loopback host) before building the URL.
            agent_addr="$(docker compose port agent 8010)"

@jensholdgaard
jensholdgaard merged commit c23c805 into main Jul 29, 2026
28 checks passed
@jensholdgaard
jensholdgaard deleted the agentic-corpus-capture branch July 29, 2026 12:27
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