Skip to content

fix(seed): fix --local parity for ruby-sdk-v2#14599

Open
jsklan wants to merge 3 commits intomainfrom
devin/1775259911-fix-local-parity-ruby-sdk-v2
Open

fix(seed): fix --local parity for ruby-sdk-v2#14599
jsklan wants to merge 3 commits intomainfrom
devin/1775259911-fix-local-parity-ruby-sdk-v2

Conversation

@jsklan
Copy link
Copy Markdown
Contributor

@jsklan jsklan commented Apr 4, 2026

Description

Refs FER-9446

Fixes seed test --local and seed run --local producing different output from Docker mode for the ruby-sdk-v2 generator. The root cause was that rubocop formatting never ran in local mode, producing unformatted output while Docker produced formatted output.

Changes Made

  • seed/ruby-sdk-v2/seed.yml: Add missing test.local configuration (was required to enable --local mode at all)
  • generators/ruby-v2/sdk/src/SdkGeneratorCli.ts: Three fixes to post-generation steps:
    1. Run bundle install before rubocop (was reversed — rubocop ran first and silently failed since gems weren't installed yet)
    2. Use bundle exec rubocop -A instead of bare rubocop (uses the project's bundled rubocop instead of relying on a system-level install)
    3. Clear RUBYLIB, GEM_PATH, GEM_HOME env vars when spawning Ruby processes to avoid nix/devbox library conflicts (devbox provides Ruby 3.3 but RUBYLIB/GEM_PATH point to Ruby 3.4 nix store paths, causing LoadError on native extensions)
  • generators/ruby-v2/sdk/versions.yml: Add v1.2.1 changelog entry
  • scripts/validate-all-changelogs.sh: Remove ruby-sdk from the changelog validation generators list (no seed/ruby-sdk directory exists, causing the "Validate Changelogs" CI check to crash)

⚠️ Review Notes

  • These changes affect Docker mode too, not just local mode. In Docker, rubocop was previously installed globally (gem install 'rubocop:~> 1.21') and ran before bundle install. Now it runs via bundle exec after bundle install, so it uses the Gemfile-pinned version. Verified that Docker output remains identical after the change.
  • The env var clearing (RUBYLIB, GEM_PATH, GEM_HOMEundefined) is safe in Docker since those vars aren't set in the container, but worth confirming.
  • The ruby-sdk removal from validate-all-changelogs.sh fixes a pre-existing issue on main — there is no seed/ruby-sdk directory, so the validation was always going to fail for that entry.

Human Review Checklist

  • Confirm ruby-sdk (v1) genuinely has no seed directory or versions.yml requiring changelog validation
  • Verify Docker output parity is maintained with the rubocop execution order change
  • Check that clearing RUBYLIB/GEM_PATH/GEM_HOME doesn't break Docker builds

Testing

  • Ran seed test --generator ruby-sdk-v2 --fixture exhaustive --skip-scripts in Docker mode (baseline)
  • Ran seed test --generator ruby-sdk-v2 --fixture exhaustive --skip-scripts --localzero diff vs Docker
  • Ran seed run --generator ruby-sdk-v2 --local and seed run (Docker) — identical output (only Gemfile.lock platform line differs: x86_64-linux-musl vs x86_64-linux, expected)
  • pnpm format and pnpm run check pass
  • All CI checks passing (including "Validate Changelogs")
  • Unit tests added/updated

Link to Devin session: https://app.devin.ai/sessions/54696844eb9247c0871aa49f1fa288e7


Open with Devin

- Add test.local configuration to seed/ruby-sdk-v2/seed.yml
- Run bundle install before rubocop (was reversed)
- Use bundle exec rubocop -A instead of bare rubocop
- Clear RUBYLIB/GEM_PATH/GEM_HOME env vars to avoid nix/devbox
  Ruby version conflicts (Ruby 3.4 libs loaded by Ruby 3.3)

Co-Authored-By: judah <jsklan.development@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

…sts)

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration devin-ai-integration bot marked this pull request as ready for review April 4, 2026 02:21
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant