From 4ac4b9bb64fec18c5e6e7dff4cdc80915596f387 Mon Sep 17 00:00:00 2001 From: Tagami Daiki Date: Sat, 3 Oct 2026 01:08:05 +0900 Subject: [PATCH 1/2] The overlay-cable drivers stub features by real path 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 --- tests/overlay_cable_dispatch.rb | 8 +++++--- tests/overlay_cable_identity.rb | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/overlay_cable_dispatch.rb b/tests/overlay_cable_dispatch.rb index 9e6e1e713..bc05363f1 100644 --- a/tests/overlay_cable_dispatch.rb +++ b/tests/overlay_cable_dispatch.rb @@ -51,8 +51,10 @@ def self.application = @application ||= Struct.new(:global_id_app, :secret_key_b load "#{root}/runtime/ruby/action_controller/message_verifier.rb" # action_cable.rb's one require; the transport half is not under test. -$LOADED_FEATURES << File.expand_path( - "#{root}/runtime/spinel/scaffold/ruby_overlay/runtime/broadcasts.rb" +# Not expand_path: require_relative resolves symlinks, so under a symlinked tree (Bazel's runfiles) the paths differ. +$LOADED_FEATURES << File.join( + File.dirname(File.realpath("#{root}/runtime/spinel/scaffold/ruby_overlay/runtime/action_cable.rb")), + "broadcasts.rb" ) module Broadcasts LOG = [] @@ -69,7 +71,7 @@ module Broadcasts # Loading the spinel action_cable here would replace `Channel::Base` with # the sibling whose methods raise — a green run against the wrong file. %w[action_cable base64 broadcasts].each do |sibling| - $LOADED_FEATURES << File.expand_path("#{root}/runtime/spinel/#{sibling}.rb") + $LOADED_FEATURES << File.join(File.dirname(File.realpath("#{root}/runtime/spinel/turbo_streams.rb")), "#{sibling}.rb") end load "#{root}/runtime/spinel/turbo_streams.rb" load "#{root}/runtime/spinel/global_id_locator.rb" diff --git a/tests/overlay_cable_identity.rb b/tests/overlay_cable_identity.rb index 6378140cb..367cd1a50 100644 --- a/tests/overlay_cable_identity.rb +++ b/tests/overlay_cable_identity.rb @@ -29,8 +29,10 @@ def self.application = @app ||= Application.new("a" * 64) load "#{root}/runtime/spinel/cgi_io.rb" # action_cable.rb's one require; the transport half is not under test. -$LOADED_FEATURES << File.expand_path( - "#{root}/runtime/spinel/scaffold/ruby_overlay/runtime/broadcasts.rb" +# Not expand_path: require_relative resolves symlinks, so under a symlinked tree (Bazel's runfiles) the paths differ. +$LOADED_FEATURES << File.join( + File.dirname(File.realpath("#{root}/runtime/spinel/scaffold/ruby_overlay/runtime/action_cable.rb")), + "broadcasts.rb" ) module Broadcasts LOG = [] From d8a157662236c4593ecccdb19dbc07561ba94a24 Mon Sep 17 00:00:00 2001 From: Tagami Daiki Date: Sat, 3 Oct 2026 01:08:05 +0900 Subject: [PATCH 2/2] campfire-oracle archives with git only from the app's own repository 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 --- scripts/campfire-oracle | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/campfire-oracle b/scripts/campfire-oracle index 52e8cfa37..d4fc3f37d 100755 --- a/scripts/campfire-oracle +++ b/scripts/campfire-oracle @@ -236,12 +236,15 @@ cmd_prepare() { [[ -d "$APP" ]] || die "no campfire checkout at $APP" command -v sqlite3 >/dev/null || die "sqlite3 not on PATH" - local sha - sha="$(git -C "$APP" rev-parse HEAD 2>/dev/null || echo unknown)" + local sha=unknown tracked= + # Not a bare rev-parse: a tarball checkout inside another repository (Bazel's execroot links .git) would archive that one. + if [[ "$(git -C "$APP" rev-parse --show-toplevel 2>/dev/null)" == "$(cd "$APP" && pwd -P)" ]]; then + tracked=1; sha="$(git -C "$APP" rev-parse HEAD)" + fi step "exporting $APP @ ${sha:0:12} -> $OUT" rm -rf "$OUT"; mkdir -p "$OUT" - if git -C "$APP" rev-parse HEAD >/dev/null 2>&1; then + if [[ -n "$tracked" ]]; then # git archive: tracked files only, no local litter. (cd "$APP" && git archive HEAD) | tar -x -C "$OUT" else