ace-test-runner 0.28.2 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/ace/test_runner/models/environment_policy.rb +5 -0
- data/lib/ace/test_runner/molecules/fixture_environment.rb +35 -0
- data/lib/ace/test_runner/organisms/test_orchestrator.rb +17 -1
- data/lib/ace/test_runner/suite/process_monitor.rb +11 -3
- data/lib/ace/test_runner/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5097778b0777c36cd9a0835246b82064dd35f98a719f72490cf7519e55d8434
|
|
4
|
+
data.tar.gz: 6b24aa6b83bb3b0c4664bc43bd55b1169d98b64a3790f26b3de226a823e6ef14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 774941f19c64073d4bf6309e85e0b4bbb2c94cec034f24441d904217119fedf42ee92c58605bcb4a2daeb5dbef442c61d0652a2bc267fb052c96c47adf133cba
|
|
7
|
+
data.tar.gz: fad73c1d744b5895b6886f25f62a98c4530e689e7282c9584a109b8f635bb070280429ca3d7ec6bf5babc200c8524792e10e9d5f75ea19d04bac5c87c85602ab
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.28.3] - 2026-11-17
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Raise `ace-support-cli` runtime dependency floor to `~> 0.6, >= 0.6.10` to match the Toolchain API contract used by the installed-mode hermetic runtime fixture environment.
|
|
15
|
+
- Supersede the released 0.28.2 suite-worker-only runtime preservation (upstream acb22a288): that contract asserted an inner fixture environment on an installed runtime carries no GEM_HOME/ACE_TOOLCHAIN/GEM_PATH, which starved hermetic test children of their dependency surface. Under the corrected hermetic contract (host factual correction on 8yf.t.1al) every hermetic child carries the restored surface, so reconciling this branch with main replaces that assertion instead of preserving it. Note the propagation semantics: every hermetic test child on an installed runtime now runs with ACE_TOOLCHAIN=installed, so nested tooling invocations from tests observe installed-mode source-guard semantics rather than an unset toolchain. Development-mode suite workers now launch Bundler's exec entrypoint (`bundle exec ruby ace-test`) instead of `ruby -rbundler/setup`, matching the released 0.28.2 shape so a locked-Bundler version switch cannot drop Ruby preload setup.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Restore the selected installed runtime surface (ACE_TOOLCHAIN, GEM_HOME, GEM_PATH, tool PATH) as explicit fixture overrides after sanitization for every hermetic child: suite package workers launch the installed launcher instead of a bundler bootstrap, and subprocess test children run the interpreter directly against the restored dependency home instead of a release bundle binstub that hijacks BUNDLE_GEMFILE to its own Gemfile. Ambient GEM_*/BUNDLE_* preservation stays rejected; installed-mode subprocess test children execute tests instead of dying on bundler activation before the first test runs.
|
|
20
|
+
|
|
10
21
|
## [0.28.2] - 2026-11-10
|
|
11
22
|
|
|
12
23
|
### Fixed
|
|
@@ -13,6 +13,11 @@ module Ace
|
|
|
13
13
|
# Deterministic test children start from an empty environment and receive only:
|
|
14
14
|
# - preserved toolchain/process keys (PATH, locale, temp directories)
|
|
15
15
|
# - fixture-owned HOME/XDG replacements (applied by Molecules::FixtureEnvironment)
|
|
16
|
+
# - the selected installed runtime surface (ACE_TOOLCHAIN, GEM_HOME, GEM_PATH,
|
|
17
|
+
# runtime-leading PATH) on installed toolchains - restored by
|
|
18
|
+
# Molecules::FixtureEnvironment as explicit post-sanitization values, never
|
|
19
|
+
# as ambient preservation; keys this policy REQUIRES stay runner-unprovided
|
|
20
|
+
# so require: keeps naming fixture configuration the package must supply
|
|
16
21
|
# - explicit fixture overrides supplied through runner configuration
|
|
17
22
|
#
|
|
18
23
|
# Everything else - ambient LAB_* and ACE_* runtime/provider configuration,
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
require "fileutils"
|
|
4
4
|
require "tmpdir"
|
|
5
5
|
|
|
6
|
+
require "ace/support/cli/toolchain"
|
|
7
|
+
|
|
6
8
|
module Ace
|
|
7
9
|
module TestRunner
|
|
8
10
|
module Molecules
|
|
@@ -11,6 +13,8 @@ module Ace
|
|
|
11
13
|
# The fixture environment:
|
|
12
14
|
# - starts from the sanitized allowlisted base (Atoms::EnvironmentSanitizer)
|
|
13
15
|
# - replaces HOME and XDG locations with test-owned directories
|
|
16
|
+
# - restores the selected installed runtime surface (explicit overrides,
|
|
17
|
+
# never ambient preservation)
|
|
14
18
|
# - applies explicit fixture overrides after sanitization
|
|
15
19
|
# - validates required explicit configuration, naming missing keys not values
|
|
16
20
|
#
|
|
@@ -53,11 +57,42 @@ module Ace
|
|
|
53
57
|
env = Atoms::EnvironmentSanitizer.sanitize(@parent_env, @policy)
|
|
54
58
|
env["MT_NO_AUTORUN"] = "1"
|
|
55
59
|
apply_fixture_homes(env)
|
|
60
|
+
apply_selected_runtime_surface(env)
|
|
56
61
|
@policy.overrides.each { |key, value| env[key] = value }
|
|
57
62
|
validate_required_keys!(env)
|
|
58
63
|
env
|
|
59
64
|
end
|
|
60
65
|
|
|
66
|
+
# On an installed toolchain the runner itself resolves gems through an
|
|
67
|
+
# explicit dependency home (GEM_HOME/GEM_PATH). The hermetic contract
|
|
68
|
+
# strips ambient GEM_*/BUNDLE_* keys from children, so without an
|
|
69
|
+
# explicit surface a child cannot resolve bundler or any gem and dies
|
|
70
|
+
# before the first test runs. Restore the selected runtime as explicit
|
|
71
|
+
# overrides derived from the running toolchain's Gem environment:
|
|
72
|
+
# deterministic per runtime, credential-free, applied after
|
|
73
|
+
# sanitization - never as ambient preservation (which stays rejected).
|
|
74
|
+
# Per-fixture configuration overrides remain more specific and win.
|
|
75
|
+
# Keys the policy REQUIRES stay runner-unprovided: a required key names
|
|
76
|
+
# fixture configuration the package demands explicitly, so requiring
|
|
77
|
+
# GEM_HOME/GEM_PATH/ACE_TOOLCHAIN still fails setup naming the key
|
|
78
|
+
# unless the package itself overrides it. PATH is a preserved toolchain
|
|
79
|
+
# key, not a dependency-home selector, so it is always restored.
|
|
80
|
+
def apply_selected_runtime_surface(env)
|
|
81
|
+
return unless Ace::Support::Cli::Toolchain.installed?
|
|
82
|
+
|
|
83
|
+
required = @policy.required_keys
|
|
84
|
+
env["ACE_TOOLCHAIN"] = "installed" unless required.include?("ACE_TOOLCHAIN")
|
|
85
|
+
unless required.include?("GEM_HOME")
|
|
86
|
+
env["GEM_HOME"] = Gem.dir
|
|
87
|
+
end
|
|
88
|
+
unless required.include?("GEM_PATH")
|
|
89
|
+
env["GEM_PATH"] = Gem.path.join(File::PATH_SEPARATOR)
|
|
90
|
+
end
|
|
91
|
+
path_entries = [Gem.bindir, File.dirname(Gem.ruby),
|
|
92
|
+
*env["PATH"].to_s.split(File::PATH_SEPARATOR)].compact.uniq
|
|
93
|
+
env["PATH"] = path_entries.join(File::PATH_SEPARATOR)
|
|
94
|
+
end
|
|
95
|
+
|
|
61
96
|
def apply_fixture_homes(env)
|
|
62
97
|
home = File.join(@root, "home")
|
|
63
98
|
config_home = File.join(home, ".config")
|
|
@@ -4,8 +4,11 @@ require_relative "../formatters/base_formatter"
|
|
|
4
4
|
require_relative "../molecules/config_loader"
|
|
5
5
|
require_relative "../molecules/pattern_resolver"
|
|
6
6
|
require_relative "../atoms/report_directory_resolver"
|
|
7
|
+
require_relative "../atoms/command_builder"
|
|
7
8
|
require_relative "sequential_target_executor"
|
|
8
9
|
|
|
10
|
+
require "ace/support/cli/toolchain"
|
|
11
|
+
|
|
9
12
|
module Ace
|
|
10
13
|
module TestRunner
|
|
11
14
|
module Organisms
|
|
@@ -181,6 +184,18 @@ module Ace
|
|
|
181
184
|
|
|
182
185
|
private
|
|
183
186
|
|
|
187
|
+
# Subprocess test children resolve their dependencies from the fixture
|
|
188
|
+
# environment's runtime surface. On an installed toolchain that surface
|
|
189
|
+
# is the selected dependency home (GEM_HOME/GEM_PATH); wrapping the
|
|
190
|
+
# child in `bundle exec` would instead run the release bundle binstub,
|
|
191
|
+
# which hijacks BUNDLE_GEMFILE to its own install-relative Gemfile and
|
|
192
|
+
# demands its pinned bundler version - impossible hermetically, so
|
|
193
|
+
# children run the interpreter directly against the restored runtime.
|
|
194
|
+
# Development mode keeps the bundler bootstrap (locked dependency set).
|
|
195
|
+
def test_command_builder
|
|
196
|
+
Atoms::CommandBuilder.new(bundler: !Ace::Support::Cli::Toolchain.installed?)
|
|
197
|
+
end
|
|
198
|
+
|
|
184
199
|
def setup_components
|
|
185
200
|
@configuration = build_configuration(@options)
|
|
186
201
|
@pattern_resolver = Molecules::PatternResolver.new(@configuration)
|
|
@@ -207,7 +222,8 @@ module Ace
|
|
|
207
222
|
@test_executor = Molecules::SmartTestExecutor.new(
|
|
208
223
|
timeout: @configuration.timeout,
|
|
209
224
|
force_mode: force_mode,
|
|
210
|
-
launch_env: @fixture_environment.env
|
|
225
|
+
launch_env: @fixture_environment.env,
|
|
226
|
+
command_builder: test_command_builder
|
|
211
227
|
)
|
|
212
228
|
@result_parser = Atoms::ResultParser.new
|
|
213
229
|
@failure_analyzer = Molecules::FailureAnalyzer.new
|
|
@@ -4,6 +4,8 @@ require "open3"
|
|
|
4
4
|
require "json"
|
|
5
5
|
require "timeout"
|
|
6
6
|
|
|
7
|
+
require "ace/support/cli/toolchain"
|
|
8
|
+
|
|
7
9
|
module Ace
|
|
8
10
|
module TestRunner
|
|
9
11
|
module Suite
|
|
@@ -208,12 +210,18 @@ module Ace
|
|
|
208
210
|
private
|
|
209
211
|
|
|
210
212
|
def build_command(package, options)
|
|
213
|
+
# On an installed toolchain the suite worker is operational ACE, not
|
|
214
|
+
# a test process: launch the installed RubyGems launcher with the
|
|
215
|
+
# runtime surface the fixture environment restores (GEM_HOME/GEM_PATH/
|
|
216
|
+
# PATH). A bundler bootstrap cannot work hermetically - bundler setup
|
|
217
|
+
# would re-activate the checkout lockfile's pinned bundler version,
|
|
218
|
+
# which the sanitized child gem surface does not carry.
|
|
219
|
+
# Development mode keeps Bundler's exec entry point so switching the
|
|
220
|
+
# locked Bundler version does not drop Ruby preload setup and fail
|
|
221
|
+
# before tests start.
|
|
211
222
|
cmd_parts = if Ace::Support::Cli::Toolchain.installed?
|
|
212
223
|
[RbConfig.ruby, Ace::Support::Cli::Toolchain.executable("ace-test")]
|
|
213
224
|
else
|
|
214
|
-
# Bundler's version switch may re-exec a script without Ruby's -r
|
|
215
|
-
# options. Its supported exec entrypoint restores setup after that
|
|
216
|
-
# switch and uses the tested checkout's dependency definition.
|
|
217
225
|
[RbConfig.ruby, Gem.bin_path("bundler", "bundle"), "exec", RbConfig.ruby, ace_test_executable]
|
|
218
226
|
end
|
|
219
227
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ace-test-runner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.28.
|
|
4
|
+
version: 0.28.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michal Czyz
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-11-
|
|
10
|
+
date: 2026-11-17 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: ace-support-fs
|
|
@@ -30,6 +30,9 @@ dependencies:
|
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '0.6'
|
|
33
|
+
- - ">="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: 0.6.10
|
|
33
36
|
type: :runtime
|
|
34
37
|
prerelease: false
|
|
35
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -37,6 +40,9 @@ dependencies:
|
|
|
37
40
|
- - "~>"
|
|
38
41
|
- !ruby/object:Gem::Version
|
|
39
42
|
version: '0.6'
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 0.6.10
|
|
40
46
|
- !ruby/object:Gem::Dependency
|
|
41
47
|
name: ace-support-core
|
|
42
48
|
requirement: !ruby/object:Gem::Requirement
|