From e1c1a9aa981c72cff40cd7ebc0e5756e1f55d123 Mon Sep 17 00:00:00 2001 From: tebako-ci Date: Wed, 19 Aug 2026 07:40:14 +0800 Subject: [PATCH 1/2] ci/spec22-gems: hoist the TEBAKO_DEBUG_TFS comment out of run_probe's env -i continuation (incident 13 round 5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The round-4 diagnostics insert (e318712) placed a 5-line comment block INSIDE the backslash-continued env -i list. A comment line in a continuation terminates the command there: the line above splices the comment in, the comment ends at its own newline, and the remaining lines parse as a NEW command. run_probe therefore executed TWO commands: 1. env -i MSYS2_... TEBAKO_RUNTIME_IMAGE=... (no command: prints the env and exits 0 — invisible under set +e) 2. TEBAKO_JAIL=... TEBAKO_DEBUG_TFS=1 "$RUNTIME_EXE" --tebako-image ... — with the AMBIENT msys environment, without the env -i scrub, and without TEBAKO_RUNTIME_IMAGE / TEBAKO_HOME / HOME / APPDATA / USERPROFILE / TMP* / the System* baseline. The driver early-returns when TEBAKO_RUNTIME_IMAGE is unset, so the env image never mounted: rubygems and the default gems failed to load (the prelude warnings in every r9 proof log), gem_prelude's partial Gem module survived, and probe.rb died at line 66 (Gem.clear_paths, NoMethodError) on all four legs of run 32188296332. The TEBAKO_HOME loss also redirected the store journal to the runner's real ~/.tebako — the r9 artifact's missing journal.log was a symptom, not an upload bug. tebako#417 is exonerated: its traces are pure diagnostics, and the r9 logs show the materialize verdicts working (styles-tree cache hits). The traces plus this flag's passthrough are exactly what made the mis-parse diagnosable. Verified: bash -n clean; a same-shape repro shows comment-in-list splits the command (ambient env leaks, listed vars lost) while the comment-outside shape delivers every assignment under the scrub. --- ci/spec22-gems/run-msys.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ci/spec22-gems/run-msys.sh b/ci/spec22-gems/run-msys.sh index c5fbe82..3af615e 100755 --- a/ci/spec22-gems/run-msys.sh +++ b/ci/spec22-gems/run-msys.sh @@ -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='*' \ @@ -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" \ From 7d7c8cd367da1095a1f51800808aa61fe91a913c Mon Sep 17 00:00:00 2001 From: tebako-ci Date: Wed, 19 Aug 2026 07:40:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ci/spec22-gems:=20probe.rb=20boot-env=20tri?= =?UTF-8?q?pwire=20=E2=80=94=20a=20lost=20harness=20handoff=20names=20itse?= =?UTF-8?q?lf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Incident 13 round 5's failure was invisible from inside the payload: the runtime booted without TEBAKO_RUNTIME_IMAGE/TEBAKO_HOME/HOME and the only payload-side symptom was the rubygems prelude warning plus the line-66 NoMethodError, a full CI cycle removed from the cause. Print the three var presences right after the gem-loaded canary (pure ENV reads, no rubygems dependency), so a broken handoff shows in the first lines of every leg's proof log. Never gates. --- ci/spec22-gems/fixtures/probe.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ci/spec22-gems/fixtures/probe.rb b/ci/spec22-gems/fixtures/probe.rb index 2150cd1..bb2e437 100644 --- a/ci/spec22-gems/fixtures/probe.rb +++ b/ci/spec22-gems/fixtures/probe.rb @@ -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