Workflow for fixing bugs in Ruby SDK integrations. Covers reproducing the bug, using appraisals, adding test cases, and TDD-based fixes.
This skill is for fixing bugs in existing integrations. Follow this workflow to reproduce, test, and fix integration issues.
First, understand and reproduce the issue:
# Run with console logging to see actual trace output
BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG=true bundle exec appraisal provider ruby examples/provider.rb
# Or create a minimal reproduction script
BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG=true bundle exec appraisal provider ruby -e '
require "braintrust"
# minimal reproduction code
'
Test against specific gem versions:
# Install dependencies for all appraisals
bundle exec appraisal install
# Run tests for specific appraisal
bundle exec appraisal provider rake test
# Run single test file
bundle exec appraisal provider rake test TEST=test/braintrust/trace/provider_test.rb
# Run with specific seed (useful for reproducing flaky test failures from CI)
bundle exec appraisal provider rake test[12345]
# Run all appraisals
bundle exec appraisal rake test
# Re-record VCR cassettes
VCR_MODE=all bundle exec appraisal provider rake test
Write a test that reproduces the bug:
def test_bug_description
# Arrange: Set up the scenario that triggers the bug
# Act: Call the method
# Assert: Verify expected behavior (this should FAIL initially)
end
Add a case to the internal example that exercises the buggy code path:
examples/internal/provider.rbbundle exec appraisal provider rake testlib/braintrust/trace/contrib/provider.rbbundle exec rake lint:fixbundle exec appraisal rake testQuery traces to confirm the fix:
mcp__braintrust__btql_query(query: "SELECT input, output, metrics FROM project_logs LIMIT 5")
lib/braintrust/trace/contrib/{openai,anthropic,ruby_llm}.rbtest/braintrust/trace/{openai,anthropic,ruby_llm}_test.rbexamples/internal/{openai,anthropic,ruby_llm}.rbtest/fixtures/vcr_cassettes/provider/npx skills add braintrustdata/fix-integration-bug下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer