Skip to content

Two robustness fixes the Bazel pilot surfaced - #415

Merged
dai199 merged 2 commits into
rubys:mainfrom
dai199:pilot-fixes
Oct 4, 2026
Merged

dai199 merged 2 commits into
rubys:mainfrom
dai199:pilot-fixes

Conversation

@dai199

@dai199 dai199 commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Two fixes the Bazel/BuildBuddy pilot (#309) surfaced. Both are correct without Bazel.

  • tests/overlay_cable_{identity,dispatch}.rb. They stubbed broadcasts (and turbo_streams.rb's siblings) in $LOADED_FEATURES under the path as given. require_relative resolves symlinks, so from a symlinked tree (a symlinked checkout, Bazel's runfiles) the stub missed and the real file loaded. They now register the real path. To check, I ran both drivers from a cp -as copy of runtime/: main's versions fail, and these print ALL OK.
  • scripts/campfire-oracle. It chose git archive after a bare git -C APP rev-parse, which answers for any enclosing work tree. A tarball checkout inside another repository therefore exported the outer repository: no Gemfile, so bundle install failed. It now uses git only when APP is its own repository's top level.

Summary by CodeRabbit

  • Bug Fixes
    • App packaging now correctly identifies whether the app itself is a Git checkout, even when it resides inside a linked parent repository. When it is not, packaging uses a tarball fallback and reports the commit SHA as unknown instead of using the parent repository’s tracked files or commit.

dai199 and others added 2 commits October 4, 2026 22:17
require_relative resolves symlinks, so a stub registered under the path
as given misses when the tree is reached through one (a symlinked
checkout, Bazel's runfiles), and the real file loads instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tarball checkout inside another git work tree made `git -C APP
rev-parse` answer for the outer repository, and `git archive` exported
that instead of the app: no Gemfile, and bundle install failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 209eefb0-c489-4615-b9d2-049c329f8693
📥 Commits

Reviewing files that changed from the base of the PR and between 602ab15 and d8a1576.

📒 Files selected for processing (3)
  • scripts/campfire-oracle
  • tests/overlay_cable_dispatch.rb
  • tests/overlay_cable_identity.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Preparation now selects the tracked-file archive only when the app path matches the physical Git top level. Overlay tests now register loaded features with real paths derived from their requiring files.

Changes

Checkout archive selection

Layer / File(s) Summary
Select the app archive source
scripts/campfire-oracle
cmd_prepare records HEAD and uses git archive only when the app path matches the physical Git top-level directory. Other inputs keep the SHA as unknown and use the existing tar fallback.

Overlay loaded-feature paths

Layer / File(s) Summary
Match require_relative feature paths
tests/overlay_cable_dispatch.rb, tests/overlay_cable_identity.rb
The tests register the broadcasts and Turbo Streams feature paths using real paths derived from the requiring files.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: rubys

Merge Risk: ⚪ Minimal · up to d8a15

Preparation avoids using an enclosing repository’s archive for the app, and the overlay fixtures use paths that match the runtime’s relative requires. No actionable merge-blocking risk is established.

Architecture Summary

Architecture risk: 🔵 Low · up to d8a15

The change affects 2 systems.

Changed systems: tests, scripts

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 2 changed files map to changed impact.
  • observed — scripts (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in scripts/campfire-oracle: cmd_prepare now uses git archive and records HEAD only when the app path is the physical Git top level. Other inputs, including checkouts whose .git resolves to a parent repository, keep the SHA as unknown and follow the existing tar fallback.
  • observed — Modified behavior in tests/overlay_cable_dispatch.rb: The broadcasts.rb loaded-feature entry now uses the real path of the overlay action_cable.rb directory instead of an expanded repository path, matching require_relative resolution.
  • observed — Modified behavior in tests/overlay_cable_dispatch.rb: Turbo Streams sibling feature entries now use the real path of turbo_streams.rb’s directory rather than expanded paths under runtime/spinel.
  • observed — Modified behavior in tests/overlay_cable_identity.rb: The loaded-feature path now uses File.realpath on the action_cable.rb directory and appends broadcasts.rb, replacing the expanded path to the broadcasts file.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies two robustness fixes and connects them to the Bazel pilot. It is broad, but it summarizes the changes without misleading readers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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 a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@dai199
dai199 merged commit 2c849e1 into rubys:main Oct 4, 2026
35 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.

1 participant