fix: rename OMX_OPENCLAW env vars to OMO_OPENCLAW#2609
Merged
code-yeongyu merged 1 commit intodevfrom Mar 16, 2026
Merged
Conversation
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
There was a problem hiding this comment.
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.envtoundefinedcan 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 withdeleteand usetry/finallyso 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; |
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_OPENCLAWOMX_OPENCLAW_COMMAND->OMO_OPENCLAW_COMMANDOMX_OPENCLAW_DEBUG->OMO_OPENCLAW_DEBUGOMX_OPENCLAW_COMMAND_TIMEOUT_MS->OMO_OPENCLAW_COMMAND_TIMEOUT_MSTDD
Summary by cubic
Renames OpenClaw env gates from
OMX_*toOMO_*and enforces the new names. OldOMX_*vars are ignored;OMO_OPENCLAW=1is required to activate.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.OMO_OPENCLAW=1to enable OpenClaw, andOMO_OPENCLAW_COMMAND=1for command gateways.Written for commit 2c8813e. Summary will update on new commits.