feat(ci): agentic VCR capture mode for the demo corpus workflow - #678
Conversation
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>
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe capture workflow adds an optional ChangesAgentic corpus capture
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
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.github/workflows/capture-otel-demo-corpus.yml
There was a problem hiding this comment.
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
agenticworkflow_dispatch input and validatesagentic=vcr(with a hard fail for unknown modes or pre-3.0 demo refs lackingcompose.agent.yaml). - Layers
compose.agent.yamlbetween the demo base compose file and the collector override viaCOMPOSE_FILE. - Drives
/promptin a loop during the steady-state window and extends the capture manifest with agen_ai.*attribute-key census.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…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>
There was a problem hiding this comment.
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 8010can emit multiple lines (e.g., dual-stack0.0.0.0:PORTand:::PORT). In command substitution that becomes a newline inagent_addr, producing an invalid URL likehttp://0.0.0.0:PORT\n:::PORT/promptand 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)"
Summary
Extends the corpus-capture workflow with an
agentic=vcrdispatch input for demo 3.0+:compose.agent.yaml(agent + MCP + chatbot; prebuilt3.0.0-agent/-mcp/-chatbotghcr images verified to exist) between the demo base and our collector override..envalready defaults toUSE_VCR=TruewithLLM_MODEL=azure/gpt-5.5matching a shipped cassette and an emptyAPI_KEY— recorded LLM responses, live Traceloop/OTel instrumentation, so the emittedgen_ai.*semconv telemetry is real.POST /promptevery 10s through the steady-state window, via the compose-published ephemeral port.gen_ai.*key census so a capture proves its GenAI content at a glance.Groundwork for a
corpus/otel-demo-v5with public, reproducible GenAI telemetry — the semconv-dotted complement to the flat-key dogfood capture.Verification
YAML parses; a live
agentic=vcrtrial 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
Bug Fixes