@miller-tech/uap 1.128.2 → 1.129.0

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.
@@ -3,11 +3,15 @@
3
3
  *
4
4
  * Captures the project state before the convergence loop runs so deliver can
5
5
  * roll back if it ends up worse (by the real gates' measure) than it started.
6
- * Excludes heavy/derived DIRECTORIES (.git, node_modules, target, .venv, …):
7
- * they aren't part of the task's source and would make snapshots slow. The
8
- * contract is symmetric an excluded directory is neither snapshotted nor
9
- * touched by restore, at any depth. Files sharing an excluded name (e.g. a
10
- * script called `build`) are snapshotted normally.
6
+ * Two classes of entry are excluded, with a SYMMETRIC contract (neither
7
+ * snapshotted nor touched by restore, at any depth):
8
+ * - heavy/derived DIRECTORIES (.git, node_modules, target, .venv, …) not
9
+ * part of the task's source, and copying them is what melted a machine;
10
+ * - secret-bearing FILES (.env*, keys, certs) they must not persist in
11
+ * snapshot storage under ~/.cache, so they are never copied and rollback
12
+ * leaves them exactly as they are.
13
+ * Files merely sharing an excluded directory name (a script called `build`)
14
+ * are snapshotted normally.
11
15
  *
12
16
  * Hardening (2026-07-08, after the project-i incident where a 424 GB Rust
13
17
  * `target/` tree was copied into a 61 GB RAM tmpfs):
@@ -15,17 +19,27 @@
15
19
  * overrides — absolute paths only), never os.tmpdir(), which is RAM-backed
16
20
  * on many Linux setups;
17
21
  * - the source tree is size-guarded before copying (UAP_SNAPSHOT_MAX_MB,
18
- * default 4096) — over the cap, snapshotTree returns null and the caller
22
+ * default 4096) — over the cap the snapshot is skipped and the caller
19
23
  * degrades to "no rollback this run" instead of exhausting the machine;
20
- * - snapshotTree never throws: any failure cleans up its partial copy and
21
- * returns null;
24
+ * - snapshotTree never throws: it returns a discriminated SnapshotResult and
25
+ * any failure cleans up its partial copy (presentation belongs to callers);
22
26
  * - restoreTree validates the snapshot before touching the project, restores
23
27
  * copy-first (prune extras, then merge back) so an interrupted restore
24
28
  * never leaves a gutted tree, and marks the snapshot preserve-on-failure
25
29
  * so the reaper won't collect the only good copy;
26
- * - each snapshot carries a pid marker; stale snapshots from dead processes
27
- * (crashes, SIGKILL, ENOSPC mid-copy) are reaped before a new one is taken.
30
+ * - each snapshot carries a pid+host marker; stale snapshots from dead
31
+ * processes are reaped before a new one is taken, and markers from other
32
+ * hosts / pid namespaces (shared $HOME, containers) are never judged by
33
+ * local pid liveness — only by the 7-day age backstop.
28
34
  */
35
+ export type SnapshotResult = {
36
+ ok: true;
37
+ path: string;
38
+ } | {
39
+ ok: false;
40
+ reason: 'size-cap' | 'error';
41
+ detail: string;
42
+ };
29
43
  /** Disk-backed base directory for snapshots (never os.tmpdir — often RAM tmpfs). */
30
44
  export declare function snapshotBaseDir(): string;
31
45
  /**
@@ -36,18 +50,18 @@ export declare function snapshotBaseDir(): string;
36
50
  */
37
51
  export declare function reapStaleSnapshots(): void;
38
52
  /**
39
- * Copy the project tree (minus excluded dirs) to a disk-backed snapshot dir.
40
- * Returns the snapshot path, or null when the snapshot is skipped (tree over
41
- * the size cap) or fails for any reason callers must treat null as "no
42
- * rollback available for this run", not as an error. Never throws.
53
+ * Copy the project tree (minus excluded entries) to a disk-backed snapshot
54
+ * dir. Never throws and never logs callers decide presentation from the
55
+ * discriminated result. `ok: false` means "no rollback available for this
56
+ * run", not a fatal error.
43
57
  */
44
- export declare function snapshotTree(root: string): string | null;
58
+ export declare function snapshotTree(root: string): SnapshotResult;
45
59
  /**
46
60
  * Restore the project tree from a snapshot. Validates the snapshot BEFORE
47
61
  * touching the project, then prunes extras and merge-copies the snapshot
48
62
  * back — copy-first ordering so an interruption leaves a recoverable union
49
63
  * of both trees, never a gutted project. On failure the snapshot is marked
50
- * preserve (reaper-immune) and the error is rethrown.
64
+ * preserve (reaper-immune) and the error is rethrown; callers own logging.
51
65
  */
52
66
  export declare function restoreTree(root: string, snap: string): void;
53
67
  /** Remove a snapshot directory. */
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/delivery/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AA8EH,oFAAoF;AACpF,wBAAgB,eAAe,IAAI,MAAM,CAOxC;AA8ED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAoBzC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiCxD;AAmCD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAuB5D;AAED,mCAAmC;AACnC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD"}
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/delivery/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA0EH,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAuBhE,oFAAoF;AACpF,wBAAgB,eAAe,IAAI,MAAM,CAOxC;AAwFD;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAoBzC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAkCzD;AAoED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CA2B5D;AAED,mCAAmC;AACnC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD"}
@@ -3,11 +3,15 @@
3
3
  *
4
4
  * Captures the project state before the convergence loop runs so deliver can
5
5
  * roll back if it ends up worse (by the real gates' measure) than it started.
6
- * Excludes heavy/derived DIRECTORIES (.git, node_modules, target, .venv, …):
7
- * they aren't part of the task's source and would make snapshots slow. The
8
- * contract is symmetric an excluded directory is neither snapshotted nor
9
- * touched by restore, at any depth. Files sharing an excluded name (e.g. a
10
- * script called `build`) are snapshotted normally.
6
+ * Two classes of entry are excluded, with a SYMMETRIC contract (neither
7
+ * snapshotted nor touched by restore, at any depth):
8
+ * - heavy/derived DIRECTORIES (.git, node_modules, target, .venv, …) not
9
+ * part of the task's source, and copying them is what melted a machine;
10
+ * - secret-bearing FILES (.env*, keys, certs) they must not persist in
11
+ * snapshot storage under ~/.cache, so they are never copied and rollback
12
+ * leaves them exactly as they are.
13
+ * Files merely sharing an excluded directory name (a script called `build`)
14
+ * are snapshotted normally.
11
15
  *
12
16
  * Hardening (2026-07-08, after the project-i incident where a 424 GB Rust
13
17
  * `target/` tree was copied into a 61 GB RAM tmpfs):
@@ -15,21 +19,25 @@
15
19
  * overrides — absolute paths only), never os.tmpdir(), which is RAM-backed
16
20
  * on many Linux setups;
17
21
  * - the source tree is size-guarded before copying (UAP_SNAPSHOT_MAX_MB,
18
- * default 4096) — over the cap, snapshotTree returns null and the caller
22
+ * default 4096) — over the cap the snapshot is skipped and the caller
19
23
  * degrades to "no rollback this run" instead of exhausting the machine;
20
- * - snapshotTree never throws: any failure cleans up its partial copy and
21
- * returns null;
24
+ * - snapshotTree never throws: it returns a discriminated SnapshotResult and
25
+ * any failure cleans up its partial copy (presentation belongs to callers);
22
26
  * - restoreTree validates the snapshot before touching the project, restores
23
27
  * copy-first (prune extras, then merge back) so an interrupted restore
24
28
  * never leaves a gutted tree, and marks the snapshot preserve-on-failure
25
29
  * so the reaper won't collect the only good copy;
26
- * - each snapshot carries a pid marker; stale snapshots from dead processes
27
- * (crashes, SIGKILL, ENOSPC mid-copy) are reaped before a new one is taken.
30
+ * - each snapshot carries a pid+host marker; stale snapshots from dead
31
+ * processes are reaped before a new one is taken, and markers from other
32
+ * hosts / pid namespaces (shared $HOME, containers) are never judged by
33
+ * local pid liveness — only by the 7-day age backstop.
28
34
  */
29
35
  import { cpSync, rmSync, mkdtempSync, mkdirSync, readdirSync, readFileSync, writeFileSync, lstatSync, statSync, } from 'fs';
30
36
  import { join, basename, isAbsolute, resolve } from 'path';
31
- import { tmpdir, homedir } from 'os';
37
+ import { tmpdir, homedir, hostname } from 'os';
32
38
  const EXCLUDE = new Set([
39
+ // A DIRECTORY named .env is almost always a python venv, never source.
40
+ '.env',
33
41
  // VCS / UAP-internal
34
42
  '.git',
35
43
  '.worktrees',
@@ -60,20 +68,34 @@ const EXCLUDE = new Set([
60
68
  '.ruff_cache',
61
69
  '.tox',
62
70
  ]);
71
+ /**
72
+ * Secret-bearing file names that must never be copied into snapshot storage.
73
+ * Kept symmetric with restore: these files are also never pruned or
74
+ * overwritten by a rollback. Committed env TEMPLATES (.env.example etc.) are
75
+ * carved out — they contain no secrets and should roll back like source.
76
+ */
77
+ function isSecretName(name) {
78
+ if (/^\.env(\..+)?$/i.test(name))
79
+ return !/^\.env\.(example|sample|template|dist)$/i.test(name);
80
+ return /^\.npmrc$|^\.netrc$|\.(pem|key|p12|pfx)$|^id_(rsa|dsa|ecdsa(_sk)?|ed25519(_sk)?)$/i.test(name);
81
+ }
63
82
  /** Marker written inside each snapshot so the reaper can tell live from stale. */
64
83
  const META_FILE = '.uap-snap.json';
65
84
  const SNAP_PREFIX = 'uap-snap-';
66
85
  /** Age past which a marker-less (legacy/partial) snapshot is considered stale. */
67
86
  const LEGACY_STALE_MS = 24 * 60 * 60 * 1000;
68
- /** Backstop against pid reuse pinning a dead snapshot forever. */
87
+ /** Backstop against pid reuse (and the only signal for foreign-host markers). */
69
88
  const MAX_AGE_MS = 7 * 24 * 60 * 60 * 1000;
70
89
  const DEFAULT_MAX_MB = 4096;
71
- /** True for a directory whose name marks it as derived/heavy (dir-only contract). */
72
- function isExcludedDir(path, name) {
73
- if (!EXCLUDE.has(name))
90
+ /** True when the entry must be skipped by snapshot, prune, and size walk alike. */
91
+ function isExcludedEntry(path, name) {
92
+ const secretName = isSecretName(name);
93
+ const dirName = EXCLUDE.has(name);
94
+ if (!secretName && !dirName)
74
95
  return false;
75
96
  try {
76
- return lstatSync(path).isDirectory();
97
+ const isDir = lstatSync(path).isDirectory();
98
+ return isDir ? dirName : secretName;
77
99
  }
78
100
  catch {
79
101
  return false;
@@ -93,9 +115,9 @@ function maxSnapshotBytes() {
93
115
  return (Number.isFinite(mb) && mb > 0 ? mb : DEFAULT_MAX_MB) * 1024 * 1024;
94
116
  }
95
117
  /**
96
- * Sum file sizes under root (skipping excluded dirs and symlinks), bailing out
97
- * as soon as the running total exceeds `limit` so huge trees cost one early
98
- * partial walk, not a full traversal.
118
+ * Sum file sizes under root (skipping excluded entries and symlinks), bailing
119
+ * out as soon as the running total exceeds `limit` so huge trees cost one
120
+ * early partial walk, not a full traversal.
99
121
  */
100
122
  function treeSizeExceeds(root, limit) {
101
123
  let total = 0;
@@ -125,6 +147,8 @@ function treeSizeExceeds(root, limit) {
125
147
  stack.push(path);
126
148
  }
127
149
  else {
150
+ if (isSecretName(name))
151
+ continue;
128
152
  total += st.size;
129
153
  if (total > limit)
130
154
  return true;
@@ -154,10 +178,20 @@ function isStaleSnapshot(path) {
154
178
  const meta = JSON.parse(readFileSync(metaPath, 'utf-8'));
155
179
  if (meta.preserve === true)
156
180
  return false;
181
+ const created = Date.parse(meta.created ?? '');
182
+ const expired = Number.isFinite(created) && Date.now() - created > MAX_AGE_MS;
183
+ // A marker from another host or pid namespace (shared $HOME, container):
184
+ // local pid liveness says nothing about it — age is the only safe signal.
185
+ // Without a parseable created field, fall back to dir mtime so a garbled
186
+ // foreign marker can't pin its snapshot forever.
187
+ if (typeof meta.host === 'string' && meta.host !== hostname()) {
188
+ if (Number.isFinite(created))
189
+ return expired;
190
+ return Date.now() - statSync(path).mtimeMs > MAX_AGE_MS;
191
+ }
157
192
  if (!Number.isInteger(meta.pid) || meta.pid <= 1)
158
193
  return true;
159
- const created = Date.parse(meta.created ?? '');
160
- if (Number.isFinite(created) && Date.now() - created > MAX_AGE_MS)
194
+ if (expired)
161
195
  return true;
162
196
  return !pidAlive(meta.pid);
163
197
  }
@@ -206,10 +240,10 @@ export function reapStaleSnapshots() {
206
240
  }
207
241
  }
208
242
  /**
209
- * Copy the project tree (minus excluded dirs) to a disk-backed snapshot dir.
210
- * Returns the snapshot path, or null when the snapshot is skipped (tree over
211
- * the size cap) or fails for any reason callers must treat null as "no
212
- * rollback available for this run", not as an error. Never throws.
243
+ * Copy the project tree (minus excluded entries) to a disk-backed snapshot
244
+ * dir. Never throws and never logs callers decide presentation from the
245
+ * discriminated result. `ok: false` means "no rollback available for this
246
+ * run", not a fatal error.
213
247
  */
214
248
  export function snapshotTree(root) {
215
249
  let snap;
@@ -217,39 +251,73 @@ export function snapshotTree(root) {
217
251
  reapStaleSnapshots();
218
252
  const limit = maxSnapshotBytes();
219
253
  if (treeSizeExceeds(root, limit)) {
220
- console.warn(` no-regress: snapshot skipped — project tree exceeds ${Math.round(limit / (1024 * 1024))} MB ` +
221
- '(raise UAP_SNAPSHOT_MAX_MB to override)');
222
- return null;
254
+ return {
255
+ ok: false,
256
+ reason: 'size-cap',
257
+ detail: `project tree exceeds ${Math.round(limit / (1024 * 1024))} MB (raise UAP_SNAPSHOT_MAX_MB to override)`,
258
+ };
223
259
  }
224
260
  snap = mkdtempSync(join(snapshotBaseDir(), SNAP_PREFIX));
225
261
  }
226
262
  catch (err) {
227
- console.warn(` no-regress: snapshot unavailable (${err.message}) — rollback disabled for this run`);
228
- return null;
263
+ return { ok: false, reason: 'error', detail: err.message };
229
264
  }
230
265
  try {
231
266
  cpSync(root, snap, {
232
267
  recursive: true,
233
268
  // Never filter the root itself — a project dir named `build`/`dist`/…
234
269
  // must still snapshot its contents, not produce an empty snapshot.
235
- filter: (src) => src === root || !isExcludedDir(src, basename(src)),
270
+ filter: (src) => src === root || !isExcludedEntry(src, basename(src)),
236
271
  });
237
- writeFileSync(join(snap, META_FILE), JSON.stringify({ pid: process.pid, created: new Date().toISOString() }));
238
- return snap;
272
+ writeFileSync(join(snap, META_FILE), JSON.stringify({ pid: process.pid, host: hostname(), created: new Date().toISOString() }));
273
+ return { ok: true, path: snap };
239
274
  }
240
275
  catch (err) {
241
276
  // Never leak a partial snapshot (the original failure mode: ENOSPC
242
277
  // mid-copy left tens of GB behind).
243
278
  rmSync(snap, { recursive: true, force: true });
244
- console.warn(` no-regress: snapshot failed (${err.message}) — rollback disabled for this run`);
245
- return null;
279
+ return { ok: false, reason: 'error', detail: err.message };
280
+ }
281
+ }
282
+ /**
283
+ * rm -rf that leaves secret files in place (and keeps any directory that
284
+ * still holds one). Excluded dirs (node_modules, target, …) encountered
285
+ * inside the doomed tree are derived/reinstallable — removed wholesale
286
+ * rather than walked. Returns true when the path was fully removed.
287
+ */
288
+ function rmPreservingSecrets(path) {
289
+ let st;
290
+ try {
291
+ st = lstatSync(path);
292
+ }
293
+ catch {
294
+ return true;
295
+ }
296
+ if (!st.isDirectory()) {
297
+ if (isSecretName(basename(path)))
298
+ return false;
299
+ rmSync(path, { force: true });
300
+ return true;
301
+ }
302
+ if (EXCLUDE.has(basename(path))) {
303
+ rmSync(path, { recursive: true, force: true });
304
+ return true;
305
+ }
306
+ let removedAll = true;
307
+ for (const entry of readdirSync(path)) {
308
+ if (!rmPreservingSecrets(join(path, entry)))
309
+ removedAll = false;
246
310
  }
311
+ if (removedAll)
312
+ rmSync(path, { recursive: true, force: true });
313
+ return removedAll;
247
314
  }
248
315
  /**
249
316
  * Delete entries under rootDir that the snapshot doesn't contain (or whose
250
- * file/dir type flipped), recursing with the same excluded-dir contract as
251
- * the snapshot filter so nested excluded trees (a workspace's node_modules,
252
- * a nested target/) survive rollback untouched.
317
+ * file/dir type flipped), recursing with the same excluded-entry contract as
318
+ * the snapshot filter so nested excluded trees (a workspace's node_modules)
319
+ * and secret files survive rollback untouched — even secrets created after
320
+ * the snapshot inside directories the snapshot never held.
253
321
  */
254
322
  function pruneToSnapshot(rootDir, snapDir) {
255
323
  for (const entry of readdirSync(rootDir)) {
@@ -261,7 +329,7 @@ function pruneToSnapshot(rootDir, snapDir) {
261
329
  catch {
262
330
  continue;
263
331
  }
264
- if (rootStat.isDirectory() && EXCLUDE.has(entry))
332
+ if (rootStat.isDirectory() ? EXCLUDE.has(entry) : isSecretName(entry))
265
333
  continue;
266
334
  let snapStat = null;
267
335
  try {
@@ -271,14 +339,16 @@ function pruneToSnapshot(rootDir, snapDir) {
271
339
  /* not in snapshot */
272
340
  }
273
341
  if (!snapStat) {
274
- rmSync(rootPath, { recursive: true, force: true });
342
+ rmPreservingSecrets(rootPath);
275
343
  }
276
344
  else if (rootStat.isDirectory() && snapStat.isDirectory()) {
277
345
  pruneToSnapshot(rootPath, join(snapDir, entry));
278
346
  }
279
347
  else if (rootStat.isDirectory() !== snapStat.isDirectory()) {
280
- // Type flip (file↔dir): remove so the merge copy can recreate it.
281
- rmSync(rootPath, { recursive: true, force: true });
348
+ // Type flip (file↔dir): remove so the merge copy can recreate it. If a
349
+ // secret survives inside (dir→file flip), leave the dir the copy will
350
+ // fail and the preserve path keeps the snapshot for manual recovery.
351
+ rmPreservingSecrets(rootPath);
282
352
  }
283
353
  }
284
354
  }
@@ -287,7 +357,7 @@ function pruneToSnapshot(rootDir, snapDir) {
287
357
  * touching the project, then prunes extras and merge-copies the snapshot
288
358
  * back — copy-first ordering so an interruption leaves a recoverable union
289
359
  * of both trees, never a gutted project. On failure the snapshot is marked
290
- * preserve (reaper-immune) and the error is rethrown.
360
+ * preserve (reaper-immune) and the error is rethrown; callers own logging.
291
361
  */
292
362
  export function restoreTree(root, snap) {
293
363
  const entries = readdirSync(snap); // throws if the snapshot is gone — root untouched
@@ -297,19 +367,23 @@ export function restoreTree(root, snap) {
297
367
  try {
298
368
  pruneToSnapshot(root, snap);
299
369
  for (const entry of entries) {
300
- if (entry === META_FILE)
370
+ // Skip the marker and (defense-in-depth) any secrets present in a
371
+ // pre-hardening snapshot — never overwrite a live rotated secret.
372
+ if (entry === META_FILE || isSecretName(entry))
301
373
  continue;
302
- cpSync(join(snap, entry), join(root, entry), { recursive: true });
374
+ cpSync(join(snap, entry), join(root, entry), {
375
+ recursive: true,
376
+ filter: (src) => !isExcludedEntry(src, basename(src)) || src === join(snap, entry),
377
+ });
303
378
  }
304
379
  }
305
380
  catch (err) {
306
381
  try {
307
- writeFileSync(join(snap, META_FILE), JSON.stringify({ pid: process.pid, created: new Date().toISOString(), preserve: true }));
382
+ writeFileSync(join(snap, META_FILE), JSON.stringify({ pid: process.pid, host: hostname(), created: new Date().toISOString(), preserve: true }));
308
383
  }
309
384
  catch {
310
385
  /* marker rewrite is best-effort */
311
386
  }
312
- console.warn(` no-regress: restore FAILED — snapshot preserved at ${snap}`);
313
387
  throw err;
314
388
  }
315
389
  }
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/delivery/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,MAAM,EACN,MAAM,EACN,WAAW,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,EACT,QAAQ,GACT,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAErC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC;IACtB,qBAAqB;IACrB,MAAM;IACN,YAAY;IACZ,cAAc;IACd,cAAc;IACd,KAAK;IACL,cAAc;IACd,MAAM;IACN,OAAO;IACP,KAAK;IACL,UAAU;IACV,OAAO;IACP,OAAO;IACP,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,kBAAkB;IAClB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AI,EAAE,CAAC,CAC1G,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,mCAAmC;QACrC,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACjD,CAAC"}
@@ -145,11 +145,19 @@ The pre-run snapshot lands on real disk under `~/.cache/uap/snapshots`
145
145
  (`UAP_SNAPSHOT_DIR` overrides; absolute paths only) — never `/tmp`, which is
146
146
  RAM-backed on many Linux systems. Derived directories (`.git`,
147
147
  `node_modules`, `target`, `.venv`, `dist`, `build`, …) are neither
148
- snapshotted nor touched by a rollback, at any depth. Trees larger than
149
- `UAP_SNAPSHOT_MAX_MB` (default 4096) skip the snapshot and the run proceeds
150
- with rollback disabled. Snapshots orphaned by killed runs are reaped
151
- automatically on the next `--keep-best` run; a snapshot whose restore failed
152
- is preserved and its path printed.
148
+ snapshotted nor touched by a rollback, at any depth. Secret-bearing files
149
+ (`.env*`, `.npmrc`, `.netrc`, `*.pem`/`*.key`/`*.p12`/`*.pfx`, `id_rsa` &
150
+ friends) follow the same symmetric contract: they are never copied into
151
+ snapshot storage, and a rollback never reverts or deletes them — even inside
152
+ directories created after the snapshot. Committed env templates
153
+ (`.env.example`/`.sample`/`.template`/`.dist`) are treated as source and roll
154
+ back normally. Trees larger
155
+ than `UAP_SNAPSHOT_MAX_MB` (default 4096) skip the snapshot and the run
156
+ proceeds with rollback disabled. Snapshots orphaned by killed runs are reaped
157
+ automatically on the next `--keep-best` run (snapshots created on another
158
+ host or in a container are judged only by a 7-day age backstop, never by
159
+ local pid liveness); a snapshot whose restore failed is preserved and its
160
+ path printed.
153
161
 
154
162
  ---
155
163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "1.128.2",
3
+ "version": "1.129.0",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "start": "node dist/bin/cli.js",
22
22
  "test": "vitest",
23
23
  "test:ci": "vitest run",
24
- "test:enforcers": "python3 -m unittest tools.agents.tests.test_enforcement_self_protect tools.agents.tests.test_schema_diff_gate tools.agents.tests.test_workdir_scope_enforcer tools.agents.tests.test_path_containment tools.agents.tests.test_path_normalizer_hardened tools.agents.tests.test_sandbox_tool_strip tools.agents.tests.test_proxy_env_loader tools.agents.tests.test_stream_required_tool tools.agents.tests.test_tool_call_wrapper_profiles tools.agents.tests.test_tool_convert_cache",
24
+ "test:enforcers": "python3 -m unittest tools.agents.tests.test_enforcement_self_protect tools.agents.tests.test_workdir_scope_enforcer tools.agents.tests.test_path_containment tools.agents.tests.test_path_normalizer_hardened tools.agents.tests.test_sandbox_tool_strip tools.agents.tests.test_proxy_env_loader tools.agents.tests.test_stream_required_tool tools.agents.tests.test_tool_call_wrapper_profiles tools.agents.tests.test_tool_convert_cache",
25
25
  "test:coverage": "vitest --coverage",
26
26
  "bench": "vitest --config vitest.bench.config.ts",
27
27
  "lint": "eslint src --ext .ts",