Skip to content

fix: rename OMX_OPENCLAW env vars to OMO_OPENCLAW#2609

Merged
code-yeongyu merged 1 commit intodevfrom
fix/rename-omx-to-omo-env
Mar 16, 2026
Merged

fix: rename OMX_OPENCLAW env vars to OMO_OPENCLAW#2609
code-yeongyu merged 1 commit intodevfrom
fix/rename-omx-to-omo-env

Conversation

@code-yeongyu
Copy link
Copy Markdown
Owner

@code-yeongyu code-yeongyu commented Mar 16, 2026

Renames all environment variable gates from the old oh-my-codex (OMX) prefix to the correct oh-my-openagent (OMO) prefix.

Changes

  • OMX_OPENCLAW -> OMO_OPENCLAW
  • OMX_OPENCLAW_COMMAND -> OMO_OPENCLAW_COMMAND
  • OMX_OPENCLAW_DEBUG -> OMO_OPENCLAW_DEBUG
  • OMX_OPENCLAW_COMMAND_TIMEOUT_MS -> OMO_OPENCLAW_COMMAND_TIMEOUT_MS

TDD

  • Added env gate tests verifying OMO_OPENCLAW=1 is required
  • Added negative test confirming old OMX_OPENCLAW is rejected
  • 19 tests pass, 0 fail

Summary by cubic

Renames OpenClaw env gates from OMX_* to OMO_* and enforces the new names. Old OMX_* vars are ignored; OMO_OPENCLAW=1 is required to activate.

  • Migration
    • Replace: OMX_OPENCLAW -> OMO_OPENCLAW, OMX_OPENCLAW_COMMAND -> OMO_OPENCLAW_COMMAND, OMX_OPENCLAW_DEBUG -> OMO_OPENCLAW_DEBUG, OMX_OPENCLAW_COMMAND_TIMEOUT_MS -> OMO_OPENCLAW_COMMAND_TIMEOUT_MS.
    • Ensure OMO_OPENCLAW=1 to enable OpenClaw, and OMO_OPENCLAW_COMMAND=1 for command gateways.

Written for commit 2c8813e. Summary will update on new commits.

Renames all environment variable gates from the old oh-my-codex (OMX) prefix
to the correct oh-my-openagent (OMO) prefix:

- OMX_OPENCLAW -> OMO_OPENCLAW
- OMX_OPENCLAW_COMMAND -> OMO_OPENCLAW_COMMAND
- OMX_OPENCLAW_DEBUG -> OMO_OPENCLAW_DEBUG
- OMX_OPENCLAW_COMMAND_TIMEOUT_MS -> OMO_OPENCLAW_COMMAND_TIMEOUT_MS

Adds TDD tests verifying:
- OMO_OPENCLAW=1 is required for activation
- Old OMX_OPENCLAW env var is not accepted
@code-yeongyu code-yeongyu merged commit 4759dfb into dev Mar 16, 2026
6 checks passed
@code-yeongyu code-yeongyu deleted the fix/rename-omx-to-omo-env branch March 16, 2026 09:47
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files

Confidence score: 4/5

  • This PR is likely safe to merge: the only reported issue is in test code (src/openclaw/__tests__/dispatcher.test.ts), not application runtime behavior.
  • The main risk is test pollution—setting process.env to undefined can leave the literal string "undefined", which may cause follow-on tests to read a bad environment value if cleanup is incomplete.
  • Pay close attention to src/openclaw/__tests__/dispatcher.test.ts - restore env vars with delete and use try/finally so cleanup always runs after assertions.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/openclaw/__tests__/dispatcher.test.ts">

<violation number="1" location="src/openclaw/__tests__/dispatcher.test.ts:75">
P2: Assigning `undefined` to `process.env` stringifies it to `"undefined"`. Use `delete` to restore an unset variable, and wrap the test logic in a `try/finally` block to prevent test pollution if an assertion fails.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

expect(result.success).toBe(false);
expect(result.error).toContain("disabled");
process.env.OMX_OPENCLAW_COMMAND = oldEnv;
process.env.OMO_OPENCLAW_COMMAND = oldEnv;
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Assigning undefined to process.env stringifies it to "undefined". Use delete to restore an unset variable, and wrap the test logic in a try/finally block to prevent test pollution if an assertion fails.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/openclaw/__tests__/dispatcher.test.ts, line 75:

<comment>Assigning `undefined` to `process.env` stringifies it to `"undefined"`. Use `delete` to restore an unset variable, and wrap the test logic in a `try/finally` block to prevent test pollution if an assertion fails.</comment>

<file context>
@@ -63,16 +63,16 @@ describe("OpenClaw Dispatcher", () => {
       expect(result.success).toBe(false);
       expect(result.error).toContain("disabled");
-      process.env.OMX_OPENCLAW_COMMAND = oldEnv;
+      process.env.OMO_OPENCLAW_COMMAND = oldEnv;
     });
   });
</file context>
Fix with Cubic

code-yeongyu added a commit that referenced this pull request Mar 16, 2026
…omo-env"

This reverts commit 4759dfb, reversing
changes made to 8213534.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant