@miller-tech/uap 1.175.4 → 1.175.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "1.175.4",
3
+ "version": "1.175.5",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -60,6 +60,19 @@ BYPASS_PATTERNS = (
60
60
  # review. Refuse it here so the attempt is visible rather than silent.
61
61
  re.compile(r"UAP_NO_REVIEW\s*=\s*['\"]?1", re.I),
62
62
  re.compile(r"UAP_USER_VALIDATION\s*=\s*['\"]?0", re.I),
63
+ # Single-flight is a DATA-SAFETY control, not a policy preference: deliver
64
+ # runs each candidate in a git worktree, and two runs against one repo are
65
+ # not safe together. Disabling it cost real work — observed live
66
+ # (octopus_invaders_v3, 2026-07-31): the agent ran
67
+ # `UAP_DELIVER_NO_LOCK=1 uap deliver ...`, two runs overlapped for seven
68
+ # minutes, and the untracked space-shooter/ tree they were both building
69
+ # disappeared. It had never been committed, so nothing could recover it.
70
+ #
71
+ # The env var stays a real operator hatch; only the INLINE form is refused,
72
+ # because a switch the constrained party writes into its own command line is
73
+ # not an override — it is an off switch, the same reasoning as every entry
74
+ # above it.
75
+ re.compile(r"UAP_DELIVER_NO_LOCK\s*=\s*['\"]?1", re.I),
63
76
  )
64
77
  # Destructive ops against the enforcer/policy surface.
65
78
  #
@@ -49,6 +49,29 @@ class SelfProtectTest(unittest.TestCase):
49
49
  rc, out = run("Bash", {"command": "UAP_ENFORCE_DELIVERY=advisory uap deliver x"})
50
50
  self.assertEqual(rc, 2)
51
51
 
52
+ def test_blocks_inline_single_flight_bypass(self):
53
+ """Single-flight is a DATA-SAFETY control, not a preference.
54
+
55
+ deliver runs each candidate in a git worktree, and two runs against one
56
+ repo are not safe together. Observed live (octopus_invaders_v3,
57
+ 2026-07-31): the agent ran `UAP_DELIVER_NO_LOCK=1 uap deliver ...`, two
58
+ runs overlapped for seven minutes, and the untracked tree they were both
59
+ building disappeared. It had never been committed, so nothing could
60
+ recover it.
61
+ """
62
+ rc, out = run("Bash", {"command": "UAP_DELIVER_NO_LOCK=1 uap deliver -- build it"})
63
+ self.assertEqual(rc, 2)
64
+
65
+ def test_blocks_exported_single_flight_bypass(self):
66
+ rc, out = run("Bash", {"command": "export UAP_DELIVER_NO_LOCK=1 && uap deliver -- x"})
67
+ self.assertEqual(rc, 2)
68
+
69
+ def test_allows_merely_mentioning_the_override(self):
70
+ # The env var remains a real OPERATOR hatch; only the agent writing it
71
+ # into its own command line is refused. Talking about it is not doing it.
72
+ rc, out = run("Bash", {"command": "echo 'UAP_DELIVER_NO_LOCK is an operator override'"})
73
+ self.assertEqual(rc, 0)
74
+
52
75
  def test_blocks_bash_rm_enforcer(self):
53
76
  rc, out = run("Bash", {"command": "rm -f .policy-tools/abc_delivery_enforcement.py"})
54
77
  self.assertEqual(rc, 2)