mason-context 0.19.2 → 0.20.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.20.1 — 2026-09-30
6
+
7
+ - Retry temporary Windows lock access failures during concurrent snapshot writes, preserving the acquisition timeout and persistent permission errors.
8
+ - Includes the stats and CLI changes below; 0.20.0 was tagged but not published after its Windows release check failed.
9
+
10
+ ## 0.20.0 — not published
11
+
12
+ - Keep optional stats failures from blocking setup, allow disabling with damaged stats storage, and preserve newer audit outcomes when delivery observations arrive late.
13
+ - Remove the `mason-auto` executable. Use `mason setup`, `mason status`, `mason check`, and `mason stats`; hook configuration and execution use `mason auto`.
14
+ - Enable local stats during setup, preserving explicit opt-outs, with summaries for hook finding delivery, observed resolution, returned decision IDs, automation timing, and supplied feedback ratings. Keep uncertain outcomes explicit; no prompts or source contents are stored or uploaded.
15
+
16
+ - Add a controlled agent-behavior benchmark with matched conditions, independent grading, and retained hook evidence. Pilot results establish delivery, not improved outcomes.
17
+
5
18
  ## 0.19.2 — 2026-09-29
6
19
 
7
20
  - Use operating-system trusted certificates in standalone Mason, preserving bundled and extra certificates, so company TLS certificates work for upgrades and other requests. Report GitHub release lookup failures with their underlying error code and certificate or network guidance.
@@ -489,17 +489,12 @@ async function withStoreLock(root, directory, run, waitMs = 5e3, label = "Mason
489
489
  while (!handle) {
490
490
  try {
491
491
  handle = await fs4.open(file, "wx", 384);
492
- try {
493
- await handle.writeFile(JSON.stringify({ pid: process.pid, host: os.hostname() }));
494
- } catch (error) {
495
- await handle.close().catch(() => {
496
- });
497
- handle = void 0;
498
- await fs4.rm(file, { force: true }).catch(() => {
499
- });
500
- throw error;
501
- }
502
492
  } catch (error) {
493
+ if (process.platform === "win32" && error.code === "EPERM") {
494
+ if (Date.now() >= deadline) throw error;
495
+ await new Promise((resolve) => setTimeout(resolve, 40));
496
+ continue;
497
+ }
503
498
  if (error.code !== "EEXIST") throw error;
504
499
  try {
505
500
  const owner = JSON.parse(await fs4.readFile(file, "utf8"));
@@ -528,6 +523,17 @@ async function withStoreLock(root, directory, run, waitMs = 5e3, label = "Mason
528
523
  if (Date.now() >= deadline) throw new Error(label + " is busy or its lock needs inspection: " + file + ". " + await lockDiagnostic(file));
529
524
  await new Promise((resolve) => setTimeout(resolve, 40));
530
525
  }
526
+ if (handle) {
527
+ try {
528
+ await handle.writeFile(JSON.stringify({ pid: process.pid, host: os.hostname() }));
529
+ } catch (error) {
530
+ await handle.close().catch(() => {
531
+ });
532
+ await fs4.rm(file, { force: true }).catch(() => {
533
+ });
534
+ throw error;
535
+ }
536
+ }
531
537
  }
532
538
  try {
533
539
  return await run();