rosett-ai 1.5.9 → 1.5.12

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: 29a816be5fea64d709f477070a052b5b595a13f74c1f77507a17f7f175a87972
4
- data.tar.gz: ca13bcf8795e23edb27c19c27f2b5f90355159f1688f5a40c05e88c45331afd9
3
+ metadata.gz: cb0358498de4f1123fd29a3ae3e728712340a70772a5469a31d25048a4525aca
4
+ data.tar.gz: bbc11a0a29c5d4b8b14fe3c34e9d28ae93c1046b1b6fc6f1758f09e4c8d21684
5
5
  SHA512:
6
- metadata.gz: fa098e5c74b48e50337278e7a6e8f59a37c4a26d916466d573426882e5aa8b139680d68d9e5d48e5975bfba36f016b6d684716cf829d910fdc85698469f6774a
7
- data.tar.gz: 4951940f5dc9d20cd28f0dc648a2f004c69c7ec8bce406191c91819736e8faae92a51b6393d881fc9a1b511ef555fb77dc3181c65273aedaa866cdb8f731e535
6
+ metadata.gz: bbfc6704a022cbc1077b0c394282abb6ed055aea1de6810d7bfc56b915c2749831ba9484b2325aae150601bd8cf8c01db2b84e17856e2a71c928184b06121436
7
+ data.tar.gz: 8a143b9cb92ee1e6dad0622cd0da6275e806589e6ec10fb171111af98a0e21882a24e4f952652e0b7b40aa079c69cda8b57f07cd7bfc2b1d5949030b1bb5021b
data/CHANGELOG.md CHANGED
@@ -6,6 +6,42 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.5.12] - 2026-07-15
10
+
11
+ ### Fixed
12
+
13
+ - **`rai_behaviour_list` / `rai_behaviour_show` / `rai_behaviour_display` MCP tools** — all three
14
+ were resolving the behaviour directory via `RosettAi.root.join('conf', 'behaviour')` (the gem
15
+ install directory) instead of `RosettAi.paths.rai_conf_dir.join('behaviour')` (the user XDG
16
+ config path `~/.config/rosett-ai/conf/behaviour/`). This caused the tools to always return
17
+ empty results.
18
+
19
+ ## [1.5.11] - 2026-07-15
20
+
21
+ ### Fixed
22
+
23
+ - **D-Bus rate-limiter thread-safety specs** — added `Process.clock_gettime` stub to the
24
+ `describe 'thread safety'` block, freezing monotonic time at `0.0` for all concurrent
25
+ examples. Without the stub, wall-clock token refill (rate: 100–1000 tokens/s) races the
26
+ assertions on slow CI runners, causing intermittent `results.count(:success) != burst`
27
+ failures. Root cause: test-timing artifact; the implementation mutex is correct. Mirrors
28
+ the existing stub pattern used in `#available_tokens` and `refill precision` blocks.
29
+
30
+ ## [1.5.10] - 2026-07-08
31
+
32
+ ### Security
33
+
34
+ - **publish:gem CI gate hardened** — `publish:gem` now declares `needs:` on
35
+ `audit:artifact`, `package:smoke-test`, and `package:gem-smoke-test` in
36
+ addition to the existing `audit:gem` gate. Gem publication is blocked until
37
+ both the `.gem` and `.deb` artifact audits pass and the install-parity smoke
38
+ tests succeed. Closes the DAG gap that allowed v1.5.9 to publish the gem
39
+ past failing audit and smoke-test jobs.
40
+
41
+ - **publish:deb-push-aptly CI gate hardened** — adds `package:smoke-test`
42
+ to the existing `needs:` list so `.deb` publication is also blocked until
43
+ the postinst smoke test passes.
44
+
9
45
  ## [1.5.9] - 2026-07-06
10
46
 
11
47
  ### Security
@@ -13,7 +49,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
13
49
  - **audit:gem CI gate** — adds a standalone `audit:gem` job (allowlist,
14
50
  denylist, PII scan, gitleaks) wired as a `needs:` dependency of
15
51
  `publish:gem`. Closes the DAG gap that let v1.5.8 publish without any
16
- security verification (WP#3248).
52
+ security verification.
17
53
 
18
54
  ### Added
19
55
 
@@ -22,8 +58,8 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
22
58
  subcommands load without `LoadError` or `NameError`.
23
59
 
24
60
  - **test:mutant:full** — full-suite mutant gate on `v*` tag pipelines;
25
- `allow_failure:true` until surviving mutants are resolved (WP#3248 P1
26
- baseline ~596 survivors).
61
+ `allow_failure:true` until surviving mutants are resolved
62
+ (baseline ~596 survivors).
27
63
 
28
64
  - **sec_016 behaviour rule** — codifies the requirement that every publish
29
65
  job targeting a public registry must declare both an artifact-audit gate
@@ -44,8 +44,8 @@ module RosettAi
44
44
  # @param format [String] output format ('table' or 'json')
45
45
  # @return [Hash] formatted behaviour display
46
46
  def call(format: 'json')
47
- dir = RosettAi.root.join('conf', 'behaviour')
48
- return { behaviours: [], format: format } unless dir.directory?
47
+ dir = RosettAi.paths.rai_conf_dir.join('behaviour')
48
+ return { behaviours: [], format: format, total: 0 } unless dir.directory?
49
49
 
50
50
  behaviours = dir.glob('*.yml').filter_map { |path| load_display(path) }
51
51
  { behaviours: behaviours, format: format, total: behaviours.size }
@@ -31,7 +31,7 @@ module RosettAi
31
31
  #
32
32
  # @return [Hash] result with :behaviours array
33
33
  def call
34
- dir = RosettAi.root.join('conf', 'behaviour')
34
+ dir = RosettAi.paths.rai_conf_dir.join('behaviour')
35
35
  return { behaviours: [] } unless dir.directory?
36
36
 
37
37
  behaviours = dir.glob('*.yml').filter_map { |path| load_behaviour(path) }
@@ -44,7 +44,7 @@ module RosettAi
44
44
  # @param name [String] behaviour name (without .yml)
45
45
  # @return [Hash] behaviour data or error
46
46
  def call(name:)
47
- path = RosettAi.root.join('conf', 'behaviour', "#{name}.yml")
47
+ path = RosettAi.paths.rai_conf_dir.join('behaviour', "#{name}.yml")
48
48
  return ResponseHelper.error("Behaviour not found: #{name}") unless path.exist?
49
49
 
50
50
  data = YAML.safe_load_file(path, permitted_classes: [Symbol])
@@ -77,8 +77,8 @@ module RosettAi
77
77
  'Gemfile.integration', 'Gemfile.integration.lock',
78
78
  # CI/CD
79
79
  '.gitlab-ci*',
80
- # CI artifacts — never ship test/lint output
81
- 'rspec-report.xml', 'rubocop-report.json',
80
+ # CI artifacts — never ship test/lint/security-scan output
81
+ 'rspec-report.xml', 'rubocop-report.json', 'trivy-config-report.json',
82
82
  # Build & packaging
83
83
  'coverage', 'tmp', 'pkg', 'spec', 'test', 'packaging',
84
84
  # Dev tool configs
@@ -89,7 +89,7 @@ module RosettAi
89
89
  '.project', '.rosett-ai',
90
90
  # Dev-only documentation (not needed at runtime)
91
91
  'doc/api', 'doc/reference', 'doc/context', 'doc/issues',
92
- 'doc/decisions', 'doc/changes',
92
+ 'doc/decisions', 'doc/changes', 'doc/design',
93
93
  # Security advisories — internal, never ship publicly
94
94
  'doc/security',
95
95
  # Design docs — carry internal WP refs, not runtime-required
@@ -444,13 +444,24 @@ module RosettAi
444
444
  # -- gem installation --------------------------------------------------
445
445
 
446
446
  def install_gems!
447
- spinner = build_spinner('Installing gems (deployment mode)...')
447
+ spinner = build_spinner('Installing gems into embedded gem home...')
448
+ ruby_abi = query_embedded_ruby('RbConfig::CONFIG["ruby_version"]')
449
+ gem_home = staging_embedded.join('lib', 'ruby', 'gems', ruby_abi)
450
+ FileUtils.mkdir_p(gem_home)
448
451
  embedded_bundle = staging_embedded.join('bin', 'bundle').to_s
449
452
 
450
- env = embedded_env
453
+ # Install runtime deps directly into the embedded Ruby's own gem home.
454
+ # The embedded ruby finds them by default (via GEM_HOME) with no wrapper
455
+ # env vars or bundler/setup at runtime — proving genuine self-containment.
456
+ env = clean_env.merge(
457
+ 'PATH' => "#{staging_embedded.join('bin')}:#{HERMETIC_SYSTEM_PATH}",
458
+ 'BUNDLE_GEMFILE' => staging_app.join('Gemfile').to_s,
459
+ 'GEM_HOME' => gem_home.to_s,
460
+ 'GEM_PATH' => gem_home.to_s,
461
+ 'LD_LIBRARY_PATH' => staging_embedded.join('lib').to_s
462
+ )
463
+
451
464
  cmds = [
452
- [env, embedded_bundle, 'config', 'set', '--local', 'deployment', 'true'],
453
- [env, embedded_bundle, 'config', 'set', '--local', 'path', 'vendor/bundle'],
454
465
  [env, embedded_bundle, 'config', 'set', '--local', 'without', 'development test build desktop engines'],
455
466
  [env, embedded_bundle, 'config', 'set', '--local', 'jobs', jobs_count.to_s],
456
467
  [env, embedded_bundle, 'install']
@@ -462,8 +473,8 @@ module RosettAi
462
473
  spinner.error(Rainbow(' failed').red)
463
474
  log_bundle_debug(env, embedded_bundle)
464
475
  abort_build(<<~MSG.chomp)
465
- Gem installation failed.
466
- The embedded Ruby bundler could not resolve or install gems.
476
+ Gem installation into embedded gem home failed.
477
+ The embedded Ruby bundler could not install gems into #{gem_home}.
467
478
  This usually means Bundler environment variables from the parent
468
479
  process leaked into the build. Check the build log for details.
469
480
  MSG
@@ -492,8 +503,8 @@ module RosettAi
492
503
  end
493
504
 
494
505
  def collect_build_artifacts
495
- Dir.glob(staging_app.join('vendor', 'bundle', '**', '{gem_make.out,mkmf.log}')) +
496
- Dir.glob(staging_app.join('vendor', 'bundle', '**', 'ext', '**', 'Makefile'))
506
+ Dir.glob(staging_embedded.join('lib', 'ruby', 'gems', '**', '{gem_make.out,mkmf.log}')) +
507
+ Dir.glob(staging_embedded.join('lib', 'ruby', 'gems', '**', 'ext', '**', 'Makefile'))
497
508
  end
498
509
 
499
510
  def remove_artifact(path)
@@ -523,15 +534,6 @@ module RosettAi
523
534
  # 1. Unsets all Bundler/RubyGems vars inherited from `bundle exec`
524
535
  # 2. Sets PATH to prefer the embedded Ruby
525
536
  # 3. Points BUNDLE_GEMFILE at the staging app's Gemfile
526
- def embedded_env
527
- env = clean_env.merge(
528
- 'PATH' => "#{staging_embedded.join('bin')}:#{HERMETIC_SYSTEM_PATH}",
529
- 'BUNDLE_GEMFILE' => staging_app.join('Gemfile').to_s
530
- )
531
- log_to_file("embedded_env: #{env.inspect}")
532
- env
533
- end
534
-
535
537
  # Strips all Bundler/RubyGems variables. When passed to system(),
536
538
  # nil values cause the variable to be unset in the child process.
537
539
  def clean_env
@@ -5,5 +5,5 @@
5
5
 
6
6
  module RosettAi
7
7
  # @return [String] Current version of the rosett-ai gem.
8
- VERSION = '1.5.9'
8
+ VERSION = '1.5.12'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rosett-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.9
4
+ version: 1.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Antonio Sepulveda Manriquez