oh-my-codex 0.21.21 → 0.21.22

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.21"
35
+ version = "0.21.22"
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.21"
43
+ version = "0.21.22"
44
44
  dependencies = [
45
45
  "libc",
46
46
  ]
47
47
 
48
48
  [[package]]
49
49
  name = "omx-mux"
50
- version = "0.21.21"
50
+ version = "0.21.22"
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.21"
58
+ version = "0.21.22"
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.21"
70
+ version = "0.21.22"
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.21"
79
+ version = "0.21.22"
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.21"
14
+ version = "0.21.22"
15
15
 
16
16
  edition = "2021"
17
17
  rust-version = "1.73"
@@ -1158,6 +1158,8 @@ describe("omx setup install mode behavior", () => {
1158
1158
  });
1159
1159
  });
1160
1160
  assert.match(pinnedOutput, /pinned by a live Codex session/);
1161
+ assert.doesNotMatch(pinnedOutput, /codex plugin remove/);
1162
+ assert.match(pinnedOutput, /close that session before repairing it/);
1161
1163
  assert.equal(JSON.parse(await readFile(launcherPath, "utf-8")).command, "/stale/node");
1162
1164
  await rm(join(cacheDir, ".omx-live-pin"), { recursive: true, force: true });
1163
1165
  const repairedOutput = await captureConsoleOutput(async () => {
@@ -4934,6 +4936,51 @@ describe("omx setup install mode behavior", () => {
4934
4936
  await rm(wd, { recursive: true, force: true });
4935
4937
  }
4936
4938
  });
4939
+ it("preserves fail-closed cache recovery guidance for symlink/untrusted stale launcher", async () => {
4940
+ const wd = await mkdtemp(join(tmpdir(), "omx-setup-untrusted-cache-"));
4941
+ try {
4942
+ await withIsolatedUserHome(wd, async (codexHomeDir) => {
4943
+ await withTempCwd(wd, async () => {
4944
+ const cacheBaseDir = await packagedPluginCacheDir(codexHomeDir);
4945
+ await mkdir(dirname(cacheBaseDir), { recursive: true });
4946
+ // Create a symlink to an external directory instead of a real cache
4947
+ const externalCacheDir = join(wd, "external-cache");
4948
+ await mkdir(externalCacheDir, { recursive: true });
4949
+ await symlink(externalCacheDir, cacheBaseDir);
4950
+ const output = await captureConsoleOutput(async () => {
4951
+ await setup({ scope: "user", installMode: "plugin" });
4952
+ });
4953
+ // For symlink/untrusted cases, should NOT suggest codex plugin remove
4954
+ assert.match(output, /symlink or non-directory entry/);
4955
+ assert.doesNotMatch(output, /codex plugin remove/);
4956
+ // Should preserve the specific recovery guidance for untrusted entries
4957
+ assert.match(output, /remove only the cache entry at .* itself without following symlinks/);
4958
+ });
4959
+ });
4960
+ }
4961
+ finally {
4962
+ await rm(wd, { recursive: true, force: true });
4963
+ }
4964
+ });
4965
+ it("includes codex plugin remove guidance for dead launcher stale-launcher result", async () => {
4966
+ const wd = await mkdtemp(join(tmpdir(), "omx-setup-dead-launcher-"));
4967
+ try {
4968
+ await withIsolatedUserHome(wd, async (codexHomeDir) => {
4969
+ await withTempCwd(wd, async () => {
4970
+ const cacheDir = await seedSameVersionPluginCacheWithStaleLauncher(codexHomeDir);
4971
+ const output = await captureConsoleOutput(async () => {
4972
+ await setup({ scope: "user", installMode: "plugin" });
4973
+ });
4974
+ // For dead launcher, should suggest codex plugin remove
4975
+ assert.match(output, /pinned launcher command does not exist/);
4976
+ assert.match(output, /codex plugin remove oh-my-codex@oh-my-codex-local --json/);
4977
+ });
4978
+ });
4979
+ }
4980
+ finally {
4981
+ await rm(wd, { recursive: true, force: true });
4982
+ }
4983
+ });
4937
4984
  });
4938
4985
  describe("late setup failure transaction boundary", () => {
4939
4986
  it("does not commit config or hooks when a later setup phase fails", async () => {