Skip to content

feat(wework): add AI verification sessions - #1896

Merged
qdaxb merged 4 commits into
mainfrom
agent/wework-ai-verification
Jul 11, 2026
Merged

qdaxb merged 4 commits into
mainfrom
agent/wework-ai-verification

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Added an isolated ai:verify CLI for driving the real Wework desktop WebView during development.
  • Added authenticated loopback control, session-scoped runtime isolation, and ownership-scoped process cleanup.
  • Added a Chinese and English developer guide for AI verification sessions.

Why

AI development work could not validate Wework desktop interactions in the real app without risking a developer's active Wework runtime.

Validation

  • pnpm --filter wework test
  • pnpm --filter wework lint
  • pnpm --filter wework typecheck
  • Pre-push AI quality gate (ESLint, TypeScript, and unit tests)

Notes

The PR is draft because the isolated send-message flow still needs a deterministic model-provider fixture before it can safely validate an assistant response end to end.

Summary by CodeRabbit

  • New Features
    • Added an AI verification workflow for isolated Wework desktop app testing.
    • Added commands to inspect and interact with the app, including snapshots, clicks, text entry, key presses, waits, assertions, status checks, and session shutdown.
    • Commands return structured results and report failures through non-zero exit codes.
  • Documentation
    • Added English and Chinese guides covering workflows, security considerations, session artifacts, and troubleshooting.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1a43dba-8d5d-4e49-a8a6-8701e7d91245

📥 Commits

Reviewing files that changed from the base of the PR and between 4949252 and d793ef4.

📒 Files selected for processing (5)
  • docs/en/developer-guide/wework-ai-verification.md
  • docs/zh/developer-guide/wework-ai-verification.md
  • wework/package.json
  • wework/scripts/ai-verify.mjs
  • wework/src/e2e/automation.ts

📝 Walkthrough

Walkthrough

Adds an authenticated ai:verify CLI for isolated Wework desktop verification sessions, extends the E2E control protocol with keyboard presses, and documents the workflow and security model in English and Chinese.

Changes

AI verification sessions

Layer / File(s) Summary
Desktop control protocol
wework/src/e2e/automation.ts
Adds the press action, optional keyboard key data, and bearer-token headers for readiness, command polling, and result posting.
Verification controller and CLI
wework/package.json, wework/scripts/ai-verify.mjs
Adds session creation, authenticated loopback HTTP control, app launching, command execution, status, logging, and shutdown handling.
Verification session documentation
docs/en/developer-guide/wework-ai-verification.md, docs/zh/developer-guide/wework-ai-verification.md
Documents session commands, artifacts, structured results, failure behavior, security boundaries, and recommended workflows.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI as ai:verify CLI
  participant Controller as Verification controller
  participant App as Wework dev app
  participant WebView as Desktop E2E WebView
  CLI->>Controller: Start authenticated session
  Controller->>App: Launch isolated development app
  CLI->>Controller: Submit UI command
  Controller->>WebView: Deliver queued command
  WebView->>Controller: Post command result
  Controller->>CLI: Return structured JSON
Loading

Possibly related PRs

  • wecode-ai/Wegent#1884: Extends the same desktop control protocol used by the desktop task-flow E2E runner.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/wework-ai-verification

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qdaxb
qdaxb marked this pull request as ready for review July 11, 2026 05:35
@qdaxb
qdaxb merged commit d6babfa into main Jul 11, 2026
12 of 13 checks passed
@qdaxb
qdaxb deleted the agent/wework-ai-verification branch July 11, 2026 05:35
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