oh-my-codex 0.21.36 → 0.21.37

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/Cargo.lock CHANGED
@@ -32,7 +32,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
32
32
 
33
33
  [[package]]
34
34
  name = "omx-api"
35
- version = "0.21.36"
35
+ version = "0.21.37"
36
36
  dependencies = [
37
37
  "serde",
38
38
  "serde_json",
@@ -40,14 +40,14 @@ dependencies = [
40
40
 
41
41
  [[package]]
42
42
  name = "omx-explore-harness"
43
- version = "0.21.36"
43
+ version = "0.21.37"
44
44
  dependencies = [
45
45
  "libc",
46
46
  ]
47
47
 
48
48
  [[package]]
49
49
  name = "omx-mux"
50
- version = "0.21.36"
50
+ version = "0.21.37"
51
51
  dependencies = [
52
52
  "serde",
53
53
  "serde_json",
@@ -55,7 +55,7 @@ dependencies = [
55
55
 
56
56
  [[package]]
57
57
  name = "omx-runtime"
58
- version = "0.21.36"
58
+ version = "0.21.37"
59
59
  dependencies = [
60
60
  "fs2",
61
61
  "libc",
@@ -67,7 +67,7 @@ dependencies = [
67
67
 
68
68
  [[package]]
69
69
  name = "omx-runtime-core"
70
- version = "0.21.36"
70
+ version = "0.21.37"
71
71
  dependencies = [
72
72
  "fs2",
73
73
  "serde",
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "omx-sparkshell"
79
- version = "0.21.36"
79
+ version = "0.21.37"
80
80
  dependencies = [
81
81
  "omx-mux",
82
82
  ]
package/Cargo.toml CHANGED
@@ -11,7 +11,7 @@ resolver = "2"
11
11
 
12
12
  [workspace.package]
13
13
 
14
- version = "0.21.36"
14
+ version = "0.21.37"
15
15
 
16
16
  edition = "2021"
17
17
  rust-version = "1.73"
@@ -574,6 +574,41 @@ command = "node"
574
574
  await rm(wd, { recursive: true, force: true });
575
575
  }
576
576
  });
577
+ it("reports claim-digest mismatches in setup and doctor", async () => {
578
+ const wd = await mkdtemp(join(tmpdir(), "omx-doctor-plugin-cache-claim-digest-"));
579
+ try {
580
+ const home = join(wd, "home");
581
+ const codexDir = join(home, ".codex");
582
+ await mkdir(codexDir, { recursive: true });
583
+ const setupRes = runOmx(wd, ["setup", "--scope", "user", "--plugin", "--force"], { HOME: home, CODEX_HOME: codexDir });
584
+ if (shouldSkipForSpawnPermissions(setupRes.error))
585
+ return;
586
+ assert.equal(setupRes.status, 0, setupRes.stderr || setupRes.stdout);
587
+ const version = await packagedPluginVersion();
588
+ const cacheDir = join(codexDir, "plugins", "cache", "oh-my-codex-local", "oh-my-codex", version);
589
+ const completePath = join(cacheDir, ".omx-complete");
590
+ const completion = JSON.parse(await readFile(completePath, "utf-8"));
591
+ const wrongDigest = `${completion.claimDigest[0] === "0" ? "1" : "0"}${completion.claimDigest.slice(1)}`;
592
+ await writeFile(completePath, `${JSON.stringify({ ...completion, claimDigest: wrongDigest })}\n`);
593
+ const setupWithDrift = runOmx(wd, ["setup", "--scope", "user", "--plugin"], {
594
+ HOME: home,
595
+ CODEX_HOME: codexDir,
596
+ });
597
+ if (shouldSkipForSpawnPermissions(setupWithDrift.error))
598
+ return;
599
+ assert.equal(setupWithDrift.status, 0, setupWithDrift.stderr || setupWithDrift.stdout);
600
+ assert.match(setupWithDrift.stdout, /claim digest mismatch/);
601
+ const doctorRes = runOmx(wd, ["doctor"], { HOME: home, CODEX_HOME: codexDir });
602
+ if (shouldSkipForSpawnPermissions(doctorRes.error))
603
+ return;
604
+ assert.equal(doctorRes.status, 0, doctorRes.stderr || doctorRes.stdout);
605
+ assert.match(doctorRes.stdout, /Skills: plugin marketplace oh-my-codex-local cache provenance is invalid: cache snapshot claim digest mismatch/);
606
+ assert.match(doctorRes.stdout, /Plugin versions: expected cache directory .* has invalid plugin cache provenance: cache snapshot claim digest mismatch/);
607
+ }
608
+ finally {
609
+ await rm(wd, { recursive: true, force: true });
610
+ }
611
+ });
577
612
  it("warns with pointer-specific diagnostics when the cached manifest drifts", async () => {
578
613
  const wd = await mkdtemp(join(tmpdir(), "omx-doctor-plugin-cache-pointer-drift-"));
579
614
  try {