Skip to content

MUL-3417: tolerate OpenClaw config file CLI mismatch#4302

Open
multica-eve wants to merge 2 commits into
mainfrom
agent/gpt-boy/e1bcbc5d
Open

MUL-3417: tolerate OpenClaw config file CLI mismatch#4302
multica-eve wants to merge 2 commits into
mainfrom
agent/gpt-boy/e1bcbc5d

Conversation

@multica-eve

@multica-eve multica-eve commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep openclaw config file as the preferred active-config discovery path when supported
  • fall back to documented OpenClaw path env vars when that subcommand is rejected with the 2026.2-style command-shape errors
  • preserve the original openclaw config file stderr if the env-var fallback also fails
  • add regression coverage for execenv prep fallback, all fallback path sources, and the known unsupported-command matcher shapes

Fallback is intentionally limited to these known command-shape signals: too many arguments for 'config', Expected 0 arguments but got 1, or an unknown ... config ... file form. Other CLI errors still fail closed.

Closes MUL-3417
Fixes #4299

Testing

  • go test ./internal/daemon/execenv

Co-authored-by: multica-agent <github@multica.ai>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multica-docs Ready Ready Preview, Comment Jun 18, 2026 9:11am

Request Review

Co-authored-by: multica-agent <github@multica.ai>
@YOMXXX

YOMXXX commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

I investigated the backend CI failure on this PR. The failing tests are unrelated to the OpenClaw diff itself:

  • server/internal/handler / TestMembershipCache_InvalidatedOnDeleteMember: setup: expected cache hit after Set
  • server/internal/middleware / TestDaemonAuth_DaemonTokenCacheHit: expected cache hit but got 401

Root cause looks like Redis test isolation: the Redis-backed test helpers in multiple packages all use the same REDIS_TEST_URL DB and call FlushDB at setup/cleanup. Since go test ./... runs packages in parallel, one package can delete another package's freshly-set cache key. That matches both failures: Set succeeds, then a package-parallel FlushDB turns the immediate Get into a miss.

I could not push directly to multica-ai:agent/gpt-boy/e1bcbc5d (403 Permission to multica-ai/multica.git denied to YOMXXX), so I pushed a patch branch with the exact fix candidate:

  • YOMXXX:codex/fix-4302-redis-test-isolation
  • commit d263e2862 (test: isolate redis-backed package tests)

Patch shape: each Redis-backed test package selects a package-dedicated Redis DB before FlushDB (auth=10, middleware=11, handler=12, service=13), preserving per-test clean DB semantics without cross-package deletion.

Local validation:

  • cd server && go test ./internal/daemon/execenv -run 'Openclaw|PrepareEnvironmentOpenclaw' -count=1\n- cd server && go test ./internal/auth ./internal/middleware ./internal/service -count=1\n- cd server && go test ./internal/handler -run 'MembershipCache|Redis(LocalSkill|Update|Model|Liveness)' -count=1\n- git diff --check\n\nNote: Docker/Redis/Postgres are not running on my local machine, so Redis/DB-backed tests that require those services are skipped locally per the existing test helpers; the CI failure itself was diagnosed from the failed backend job logs.

@YOMXXX

YOMXXX commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Follow-up: I also opened the Redis test-isolation patch as standalone PR #4348 so it can be reviewed/merged independently of this OpenClaw PR: #4348

If #4348 lands first, rebasing/rerunning this PR should avoid the package-parallel Redis FlushDB cache miss seen in the current backend job.

@YOMXXX

YOMXXX commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

#4348 is now green (frontend, backend, and both installer checks passed; mergeStateStatus=CLEAN). That gives a clean path to unblock this PR without mixing the Redis test-infra change into the OpenClaw branch manually.

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.

multica daemon calls 'openclaw config <arg>' but openclaw 2026.2.1 requires subcommand syntax — all openclaw-runtime tasks fail at execenv prep

2 participants