ace-lab 0.16.0 → 0.16.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78e9b81907693f3c427e477a6f2a17052d1e72c9f13bb3b0fd505854d9c6e222
4
- data.tar.gz: beac210464ec9f958652ad7b817a6c6452e90dca7acf320b0c652a957bb2e0bc
3
+ metadata.gz: 59e9a71fd2aca6e0e830fa27a018ce5fa98ec6425dc16b9e173697753aa1b61f
4
+ data.tar.gz: 2ab5294e49ea83a6eba1703370e683c248c6d140d1721c4c8b76b6481399538f
5
5
  SHA512:
6
- metadata.gz: 07de910a64b118ae1335c7e220fe5d21b9cba2b82050f170d6094297d507cb57a20e87f3af76a7ad66f9d5607889b06c462433e430cb76d38c4ebe669ef8d5f2
7
- data.tar.gz: 7518f23fc8caefbfd2bd813887d18716898aaee27c80078131ee0ca8a4c902e3d5538d0bb0bdcc4827731fa46eb16c99c587df701041440f5808104fc0c44295
6
+ metadata.gz: 672d4bedbd558125d2f14c8c13bcc62d2c4b9653e1eca3c726155d0db7fca78260465bb8c188fbed2a52185b546780e8ec3a871533ab90b780c4c92b19881f12
7
+ data.tar.gz: 6afe8fa7d8d110a5876b6af237b2a88eff6fa2ad9fc2b2401aab40aa0b22c109f2a71e7909ce11ca50e295781dc1785c5e990d95af7f9576c298dcfad3807c95
data/CHANGELOG.md CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.16.2] - 2026-11-15
11
+
12
+ ### Fixed
13
+
14
+ - Normalize shared runtime file permissions so unprivileged agents can read gems shipped with private source modes; never follow packaged symlinks.
15
+ - Generate the runtime Gemfile with the RubyGems source URI instead of its object representation, allowing fresh bundle installation.
16
+
17
+ ## [0.16.1] - 2026-11-12
18
+
19
+ ### Changed
20
+
21
+ - Permit configured Second Captain environments and ordinary coordinator-scope executors.
22
+
23
+
10
24
  ## [0.16.0] - 2026-11-11
11
25
 
12
26
  ### Changed
@@ -31,7 +31,11 @@ A failed update restores the previous Gemfile, lockfile and bundle configuration
31
31
  Already installed sibling versions remain on disk; the lockfile selects the
32
32
  runtime. Diagnostics of a bundled runtime use frozen, read-only `bundle check`.
33
33
 
34
- For updates, change the manifest pins and run `ace-lab install` once. To rerun
34
+ For updates, preserve `ACE_TOOLCHAIN=installed`, change the manifest pins and run
35
+ `ace-lab install` once. Use the installer version that contains the required fixes;
36
+ installing a newer gem does not switch an older locked binstub. See the
37
+ [operator upgrade procedure](../../docs/lab-setup.md#3-upgrade-istniejącego-laba--bez-odtwarzania-środowiska)
38
+ for backups, publication status, reloads and readiness checks. To rerun
35
39
  installation of an unchanged runtime directly:
36
40
 
37
41
  ```sh
@@ -103,7 +103,7 @@ module Ace
103
103
 
104
104
  def normalize_environment_files(raw)
105
105
  return {} if raw.nil?
106
- roles = %w[lab-overseer project-overseer worker verifier integrator]
106
+ roles = %w[lab-overseer project-overseer worker verifier integrator second-captain]
107
107
  unless raw.is_a?(Hash) && raw.all? { |role, path|
108
108
  roles.include?(role) && path.is_a?(String) && path.start_with?("/") &&
109
109
  File.expand_path(path) == path && !path.match?(/[[:cntrl:]]/)
@@ -9,7 +9,7 @@ module Ace
9
9
  # Passive launch data from the installed manifest. Roles select a brief
10
10
  # and a project-specific environment, not an operating-system identity.
11
11
  class SessionConfiguration
12
- ROLES = %w[lab-overseer project-overseer worker verifier integrator].freeze
12
+ ROLES = %w[lab-overseer project-overseer worker verifier integrator second-captain].freeze
13
13
  Selection = Data.define(:project, :path, :role, :instructions, :gem_home, :runtime, :environment_file)
14
14
 
15
15
  def initialize(loader: -> { Molecules::InstallManifestLoader.load })
@@ -20,9 +20,9 @@ module Ace
20
20
  document = @loader.call
21
21
  raise Error, "session role is not supported" unless ROLES.include?(role)
22
22
 
23
- scope = if role == "lab-overseer"
24
- document["coordinator"] if document.dig("coordinator", "id") == project
25
- else
23
+ scope = if document.dig("coordinator", "id") == project
24
+ document["coordinator"] unless role == "project-overseer"
25
+ elsif role != "lab-overseer"
26
26
  document.fetch("projects").find { |entry| entry["id"] == project }
27
27
  end
28
28
  selected_role = document.fetch("roles").find { |entry| entry["id"] == role }
@@ -3,6 +3,7 @@
3
3
  require_relative "../errors"
4
4
  require "open3"
5
5
  require "fileutils"
6
+ require "find"
6
7
  require "yaml"
7
8
  require "rbconfig"
8
9
 
@@ -46,7 +47,7 @@ module Ace
46
47
  bundle_root = File.dirname(File.dirname(gem_home))
47
48
  gemfile = File.join(bundle_root, "Gemfile")
48
49
  raise Ace::Lab::InvalidConfigurationError, "runtime Gemfile must not be a symlink" if File.symlink?(gemfile)
49
- content = "source #{Gem.sources.first.to_s.dump}\n" + gems.map do |gem|
50
+ content = "source #{Gem.sources.first.uri.to_s.dump}\n" + gems.map do |gem|
50
51
  "gem #{gem.fetch('name').dump}, #{gem.fetch('version').dump}\n"
51
52
  end.join
52
53
  settings_dir = File.join(bundle_root, ".bundle")
@@ -66,7 +67,10 @@ module Ace
66
67
  result = @runner.call(runtime_argv(gem_home,
67
68
  ["BUNDLE_GEMFILE=#{gemfile}", "BUNDLE_USER_CONFIG=#{File::NULL}", "bundle", "install"]))
68
69
  failure = command_failure("bundle install", result) unless result["status"] == "ok"
69
- install_entrypoints(gem_home, runtime["bin_dir"]) unless failure
70
+ unless failure
71
+ converge_runtime_modes(gem_home)
72
+ install_entrypoints(gem_home, runtime["bin_dir"])
73
+ end
70
74
  rescue StandardError, Interrupt
71
75
  restore_bundle(previous)
72
76
  raise
@@ -182,6 +186,19 @@ module Ace
182
186
  end
183
187
  end
184
188
 
189
+ # Archives may retain the publisher's private/group-only source modes.
190
+ # This shared runtime must be readable by its unprivileged consumers.
191
+ # Never follow a packaged symlink into a different filesystem tree.
192
+ def converge_runtime_modes(gem_home)
193
+ Find.find(gem_home) do |path|
194
+ stat = File.lstat(path)
195
+ next if stat.symlink?
196
+ next unless stat.directory? || stat.file?
197
+ mode = stat.directory? || (stat.mode & 0o111).positive? ? 0o755 : 0o644
198
+ File.chmod(mode, path) unless (stat.mode & 0o7777) == mode
199
+ end
200
+ end
201
+
185
202
  def install_entrypoints(gem_home, directory)
186
203
  return unless directory
187
204
  FileUtils.mkdir_p(directory)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ace
4
4
  module Lab
5
- VERSION = "0.16.0"
5
+ VERSION = "0.16.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-lab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-11-11 00:00:00.000000000 Z
10
+ date: 2026-11-15 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler