[codex] add gateway backend communication harness#949
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e14ed767d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export async function getChangedFiles(since = 'origin/main') { | ||
| const files = new Set(); | ||
| for (const line of await gitLines(['diff', '--name-only', `${since}...HEAD`])) files.add(line); | ||
| for (const line of await gitLines(['diff', '--name-only'])) files.add(line); |
There was a problem hiding this comment.
Include staged files when collecting changed paths
getChangedFiles() unions git diff <base>...HEAD, git diff --name-only, and untracked files, but never queries staged changes (git diff --cached --name-only). Because git diff --name-only is the working-tree vs index form (the staged form is a separate --cached mode), staged tracked files are missed entirely; running pnpm harness validate/run after staging changes can incorrectly pass boundary/touched-area checks even though the staged patch violates them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9e75e10d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } catch { | ||
| return []; |
There was a problem hiding this comment.
Surface missing base-ref errors in changed-file detection
getChangedFiles() assumes since = "origin/main" and then suppresses any git failure by returning an empty list from gitLines(). When that ref is unavailable (e.g., shallow or single-ref checkouts, or remotes without origin/main), the harness silently treats the diff as empty, so validateGatewayTaskSpec() and boundary scans can pass even though the branch changed communication files. This weakens the core enforcement logic because a broken diff baseline is interpreted as "no changes" instead of a validation error.
Useful? React with 👍 / 👎.
Summary
@clawx/harnessworkspace package for Gateway backend communication workfast+commsvalidation and block renderer boundary violationsWhy
ClawX is the visual desktop layer for OpenClaw usage scenarios. Backend communication changes need an explicit spec so AI Coding work cannot bypass the renderer/Main/host-api/api-client/Gateway boundaries while still producing a local and CI-verifiable report.
Validation
pnpm run harness:cipnpm run lint:check(passes with one existingreact-hooks/exhaustive-depswarning insrc/pages/Chat/ChatInput.tsx)pnpm run typecheck