Skip to content

[codex] add gateway backend communication harness#949

Merged
ashione merged 4 commits intomainfrom
codex/add-gateway-harness-spec
Apr 30, 2026
Merged

[codex] add gateway backend communication harness#949
ashione merged 4 commits intomainfrom
codex/add-gateway-harness-spec

Conversation

@ashione
Copy link
Copy Markdown
Contributor

@ashione ashione commented Apr 30, 2026

Summary

  • add a spec-driven @clawx/harness workspace package for Gateway backend communication work
  • add Gateway scenario/rule/task specs that require fast + comms validation and block renderer boundary violations
  • wire baseline harness checks into local scripts and GitHub Actions with uploaded harness reports

Why

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:ci
  • pnpm run lint:check (passes with one existing react-hooks/exhaustive-deps warning in src/pages/Chat/ChatInput.tsx)
  • pnpm run typecheck

@ashione ashione marked this pull request as ready for review April 30, 2026 15:57
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread harness/src/git.mjs Outdated
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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread harness/src/specs.mjs
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread harness/src/git.mjs
Comment on lines +11 to +12
} catch {
return [];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@ashione ashione merged commit 110b473 into main Apr 30, 2026
6 checks passed
@ashione ashione deleted the codex/add-gateway-harness-spec branch April 30, 2026 16:22
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