maf 0.7.0 → 0.7.1

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: 96b1964631e2a552046c0ddd8652294c79a4cce5c1c712770a2e6d2560f01fe6
4
- data.tar.gz: 5931acc6d9569fedd3859f1ffe28a293c83f415e4cb228402867c7a4b7747171
3
+ metadata.gz: 0600cae448899ea324b41b1cc21c2fefc40f9f1b5b349bfd0d6ae6ea2fdd90dc
4
+ data.tar.gz: 32d55e40cfa8de776f1ba464a3316c8872737a1bfe4953bae45462678792046c
5
5
  SHA512:
6
- metadata.gz: 44c6fa9c6804fc4f474630a56504197353d353452cc4bf0e34d90f646e9ef7320cd173cfe2cf33f7d4e60da2d47b410eb1432e797e772f20060e6c74ec1d6833
7
- data.tar.gz: 36f145d2992490cebe573dc613dfaea00ec23b7159ec3c493176066e6d5930c2283ac183a813a80de27c706d143e2ee9821da119828a9304c2e48f067b6f399a
6
+ metadata.gz: 2efc01c78cd25e6a017361df5c735880c7ddad65d4b40e7e3b9c6b8659bb5b3fed7680009838ed9ff1e84cb0ec65c9f9261f70229800d50e35d71d860e4c0044
7
+ data.tar.gz: 752dd79b5d7ea15a8206a7aaf3b6097f21c5d8d51a7f45ef66d60822d46ea948272d0095b66a4959670f5d00495242c11774fcbd30784fd21e2ab65dd54bab0c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.1] - 2026-10-29
6
+
7
+ - Changed: the dispatcher no longer escalates a crash or a LaunchServices denial of a macOS
8
+ service (a program in `/System/`, `MTLCompilerService`, `intelligencecontextd`). It writes a log
9
+ line only. Before, each one reached the project manager as an `ESCALATION` that needed no action.
10
+ - Fixed: the macOS sandbox lets an agent connect to the PostgreSQL socket in `/tmp`
11
+ (`/tmp/.s.PGSQL.<port>`). Before, a Rails test that used the socket got `Operation not permitted`.
12
+ - Fixed: when the pull request of a goal merges, coord keeps the goal branch while a task of the
13
+ goal is still open. Before, `coord gc` deleted it and the open task could not land.
14
+
5
15
  ## [0.7.0] - 2026-10-24
6
16
 
7
17
  - Changed: the project manager interviews the user until no decision stays silently assumed. It asks
data/assets/coord CHANGED
@@ -1577,6 +1577,7 @@ end
1577
1577
  def goal_reason(name)
1578
1578
  goal = @tasks.find_short(name.delete_prefix("goal/"))
1579
1579
  return "goal is not done" unless goal["status"] == "completed"
1580
+ return "goal has open tasks" if @tasks.for_goal(goal["uuid"]).any?
1580
1581
 
1581
1582
  Git.ancestor?(@root, name, ref) ? nil : "not merged into #{ref}"
1582
1583
  end
data/assets/dispatcher CHANGED
@@ -758,6 +758,10 @@ module Dispatcher
758
758
  "apps outside the sandbox. An app with its own sandbox (Chrome) also needs it off (--no-sandbox), " \
759
759
  "because macOS cannot start a sandbox in a sandbox. Tell the user."
760
760
 
761
+ SYSTEM = %w[MTLCompilerService intelligencecontextd].freeze
762
+ IGNORED = "Dispatcher of %<worker>s: in the macOS sandbox, these macOS services crashed or were refused " \
763
+ "LaunchServices: %<apps>s. maf ignores them."
764
+
761
765
  @seen = []
762
766
 
763
767
  def self.guard(harness, config, env, &block)
@@ -774,9 +778,21 @@ module Dispatcher
774
778
  def self.report(config, env, crashes, denied)
775
779
  crashes = crashes.except(*@seen)
776
780
  denied -= @seen
781
+ @seen.concat(crashes.keys, denied)
782
+ ignore(config, crashes.keys + denied)
783
+ escalate(config, env, crashes.reject { |app, _| system?(app) }, denied.reject { |app| system?(app) })
784
+ end
785
+
786
+ def self.system?(app) = app.start_with?("/System/") || SYSTEM.include?(File.basename(app, ".*"))
787
+
788
+ def self.ignore(config, apps)
789
+ ignored = apps.select { |app| system?(app) }.uniq
790
+ Log.line(format(IGNORED, worker: config.worker, apps: ignored.join(", "))) if ignored.any?
791
+ end
792
+
793
+ def self.escalate(config, env, crashes, denied)
777
794
  return if crashes.empty? && denied.empty?
778
795
 
779
- @seen.concat(crashes.keys, denied)
780
796
  text = format(NOTICE, worker: config.worker, found: found(crashes, denied))
781
797
  Log.line(text)
782
798
  CoordCall.run(env, "escalate", text)
@@ -15,6 +15,7 @@ module Maf
15
15
  DEVICES = '(literal "/dev/null") (literal "/dev/zero") (literal "/dev/dtracehelper") ' \
16
16
  '(regex #"^/dev/tty") (regex #"^/dev/fd/") (regex #"^/dev/ptmx")'
17
17
  DNS = '(path-literal "/private/var/run/mDNSResponder")'
18
+ POSTGRES = '(regex #"^/private/tmp/\\.s\\.PGSQL\\.[0-9]+$")'
18
19
  TMP_PREFIX = "maf-sandbox-"
19
20
  # The map database of LaunchServices only reads: it turns a type name into a type.
20
21
  # Without it, pbcopy writes the text with a type that no app reads.
@@ -98,7 +99,7 @@ module Maf
98
99
  end
99
100
 
100
101
  def self.sockets(dirs)
101
- allowed = [DNS, *dirs.map { |dir| "(subpath #{quote(dir)})" }]
102
+ allowed = [DNS, POSTGRES, *dirs.map { |dir| "(subpath #{quote(dir)})" }]
102
103
  rules = allowed.map { |path| "(allow network-outbound (remote unix-socket #{path}))\n" }
103
104
  "(deny network-outbound (remote unix-socket))\n#{rules.join}"
104
105
  end
data/lib/maf/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Maf
4
- VERSION = "0.7.0"
4
+ VERSION = "0.7.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Alberski