From 829a6f501b234ba4eec0bccc3f2b78cd16689e5b Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 16 Sep 2026 06:01:01 +0000 Subject: [PATCH 1/3] test: assert observable CLI behavior --- test/codex-contract.test.js | 12 +----------- test/release-config.test.js | 10 ---------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/test/codex-contract.test.js b/test/codex-contract.test.js index ba38568..42341eb 100644 --- a/test/codex-contract.test.js +++ b/test/codex-contract.test.js @@ -77,16 +77,6 @@ describe("codex contract — outcomeFromError", () => { assert.equal(out.exitCode, 1); }); - it("keeps the bridge reason strings verbatim", () => { - const reasons = ["busy", "hop-limit", "route-not-allowed", "thread-error", "unknown-status", "unknown-thread", "external-owner", "experimental-disabled", "unsupported", "rejected", "transport", "bad-response", "approval-refused", "usage"]; - for (const reason of reasons) { - const out = outcomeFromError( - Object.assign(new Error(reason), { delivery: "rejected", reason }), - ); - assert.equal(out.reason, reason); - assert.equal(out.exitCode, 1); - } - }); }); describe("codex contract — outcomeFromReceipt", () => { @@ -110,6 +100,6 @@ describe("codex contract — outcomeFromReceipt", () => { refused: ["approvals/request"], }); assert.equal(out.exitCode, 1); - assert.ok(typeof out.error === "string" && out.error.length > 0); + assert.equal(out.error, "Codex refused one or more approvals."); }); }); diff --git a/test/release-config.test.js b/test/release-config.test.js index f07a574..baf2b77 100644 --- a/test/release-config.test.js +++ b/test/release-config.test.js @@ -19,13 +19,3 @@ test("npm package metadata identifies the public source repository", () => { url: "https://github.com/ScriptedAlchemy/grok-bot-cli/issues", }); }); - -test("npm executable paths point at the Agent Bundle dist bins", () => { - assert.deepEqual(packageJson.bin, { - gbot: "./dist/bin/gbot.mjs", - "gbot-install": "./dist/bin/gbot-install.js", - "grok-bot": "./dist/bin/gbot.mjs", - }); - assert.deepEqual(packageJson.files, ["dist", "README.md", "CHANGELOG.md", "LICENSE"]); - assert.equal(packageJson.scripts.prepack, "agent-bundle prepack"); -}); From e0b8351f6de78b854cbcc212445ec22dccbf475d Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Tue, 15 Sep 2026 23:15:59 -0700 Subject: [PATCH 2/3] test: smoke the packed grok-bot executable alias --- .github/workflows/ci.yml | 1 + .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eed142a..ad0e81c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,4 +45,5 @@ jobs: test "${#package_files[@]}" -eq 1 npm install --global --prefix "$install_root" "${package_files[0]}" "$install_root/bin/gbot" --help + "$install_root/bin/grok-bot" --help "$install_root/bin/gbot-install" --help diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a68a581..795eb28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,7 @@ jobs: test "${#package_files[@]}" -eq 1 npm install --global --prefix "$install_root" "${package_files[0]}" "$install_root/bin/gbot" --help + "$install_root/bin/grok-bot" --help "$install_root/bin/gbot-install" --help - name: Create release pull request or publish From 95978a9677196bbfd72df0094fb5e6e3fb980372 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Wed, 16 Sep 2026 06:20:00 +0000 Subject: [PATCH 3/3] test: tidy codex contract suite --- test/codex-contract.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/codex-contract.test.js b/test/codex-contract.test.js index 42341eb..253b073 100644 --- a/test/codex-contract.test.js +++ b/test/codex-contract.test.js @@ -76,7 +76,6 @@ describe("codex contract — outcomeFromError", () => { assert.equal(out.delivery, "rejected"); assert.equal(out.exitCode, 1); }); - }); describe("codex contract — outcomeFromReceipt", () => {