Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ci/spec22-gems/fixtures/probe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@
gem_loaded = $LOADED_FEATURES.any? { |f| f.end_with?("/tebako-runtime.rb") }
puts "PROBE gem-loaded #{gem_loaded ? 'yes' : 'no'}"

# Boot-environment tripwire (every leg, never gates): the harness hands
# the runtime its whole contract through the env (TEBAKO_RUNTIME_IMAGE
# mounts the stdlib env image; TEBAKO_HOME/HOME scope the store and the
# user dirs). Incident 13 round 5: a comment line inside run_probe's
# env -i continuation silently split the command, the runtime booted
# with NONE of these, and the only symptom was the rubygems prelude
# warning + the line-66 NoMethodError below — a full CI cycle to
# diagnose. Report presence up front so a lost handoff names itself in
# the first three lines of the proof log.
puts "PROBE-DIAG env TEBAKO_RUNTIME_IMAGE=#{ENV['TEBAKO_RUNTIME_IMAGE'] ? 'set' : 'UNSET'} " \
"TEBAKO_HOME=#{ENV['TEBAKO_HOME'] ? 'set' : 'UNSET'} HOME=#{ENV['HOME'] ? 'set' : 'UNSET'}"

# Redirect rubygems at the in-image probe gem home BEFORE requiring any
# probe gem.
ENV["GEM_HOME"] = GEM_HOME_IN_IMAGE
Expand Down
18 changes: 13 additions & 5 deletions ci/spec22-gems/run-msys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,19 @@ fi
run_probe() {
local leg="$1" img="${2:-$PAYLOAD_IMG}"
set +e
# TEBAKO_DEBUG_TFS: the closure-walk traces (dlmap2file's answer, the
# PE parse verdict, each dep's resolve/materialize verdict) ride
# stderr into the per-leg proof log — incident 13's 126 was mute
# without them. env -i strips the ambient copy, so it rides inside
# the list; overridable for a quiet local run.
# WARNING: a comment line INSIDE a backslash continuation terminates
# the command at that point (the continuation splices the comment
# line in, the comment ends at its own newline) — the trailing lines
# then run as a SEPARATE command with the ambient environment. The
# round-4 insert below did exactly that: env -i ran with no command
# and the runtime booted without TEBAKO_RUNTIME_IMAGE (no env image
# mounted, rubygems prelude failed, probe.rb:66 NoMethodError on all
# four legs — run 32188296332). Comments stay OUTSIDE the list.
env -i \
MSYS2_ARG_CONV_EXCL='*' \
MSYS2_ENV_CONV_EXCL='*' \
Expand All @@ -487,11 +500,6 @@ run_probe() {
APPDATA="$(w "$SCRATCH/home")/AppData/Roaming" \
TEBAKO_HOME="$(w "$SCRATCH/tebako-home")" \
TEBAKO_RUNTIME_IMAGE="$(w "$RUNTIME_IMAGE")" \
# TEBAKO_DEBUG_TFS: the closure-walk traces (dlmap2file's answer, the
# PE parse verdict, each dep's resolve/materialize verdict) ride
# stderr into the per-leg proof log — incident 13's 126 was mute
# without them. env -i strips the ambient copy, so it rides inside
# the list; overridable for a quiet local run.
TEBAKO_JAIL="deny;$(w "$SCRATCH"):/host-scratch:rw" \
TEBAKO_DEBUG_TFS="${TEBAKO_DEBUG_TFS:-1}" \
"$RUNTIME_EXE" --tebako-image "$(w "$img"):-:/" --tebako-entry /probe/probe.rb "$leg" \
Expand Down