Skip to content

feat(crossreview): zcode reviewer - #2

Merged
EvilFreelancer merged 7 commits into
EvilFreelancer:mainfrom
hijera:feat/zcode-reviewer
Nov 1, 2026
Merged

EvilFreelancer merged 7 commits into
EvilFreelancer:mainfrom
hijera:feat/zcode-reviewer

Conversation

@hijera

@hijera hijera commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Add zcode — the agent CLI bundled inside the ZCode desktop app (resources/glm/zcode.cjs, run under Electron's Node) — as a reviewer:

  • scripts/agents.tsv: the zcode row, zcode --prompt "$(cat {brief})" --mode plan --no-color. The prompt travels as an argument (like koda and antigravity): --attach accepts media only and stdin is not a prompt.
  • scripts/crossreview.py: argument-brief agents are recognised from the template shape (takes_brief_as_argument); hints for an empty API balance and for the ZCode token-exchange failure; the template-drift check is no longer suppressed for argument-brief agents.
  • references/agents.md: a zcode section — the zcode launcher recipe (POSIX shim; Windows needs a real .exe, source included), the three setup steps the desktop hides (the bundle's provider/zcode-builtin.json, zcode login, a personal API-key provider in ~/.zcode/v2/provider_config.json), pitfalls and recovery commands.
  • tests/: table rules for argument-brief agents, --mode plan pinned in the zcode templates, an entry_warnings drift case; the merged antigravity tests got their Windows legs fixed (PowerShell 5.1 redirect encoding, the runner's batch-shim refusal).
  • version 2.2.0 (2.1.0 went to Antigravity on main).

Verification

  • the suite is green on Windows (62 tests).
  • Verified on 0.17.0 (the CLI inside the ZCode 3.16.3 desktop app): one-word probe 9 s; a 19 KB brief reviewed in 4m29s through the template.
  • Two full cross-review rounds of this branch ran through the skill; every finding was verified against the code and fixed in follow-up commits.
  • Documented trap: the account route fails at Z.ai's coding-plan key exchange (project_token_login_failed) even after a successful zcode login; the personal API-key provider bypasses it.

ZCode ships its agent CLI inside the desktop app (resources/glm/zcode.cjs
run under Electron's Node) and has no standalone binary of its own, so the
template drives a `zcode` launcher on PATH that forwards to the bundle. The
prompt travels as an argument (--attach takes media only), which turns the
koda exceptions into ARG_AGENTS; --mode plan is the read-only mode, and the
model comes from ~/.zcode/v2/provider_config.json since there is no --model
flag. Version 2.1.0.
The signed-in probe reaches the model call and dies on Z.ai's
POST /api/auth/z/login ("Z.ai user information is invalid", identical for a
valid OAuth token, direct or proxied); document the failure mode and keep
the status checked, not verified.
…API-key setup

The signed-in probe now reaches the model API and the server answers
"[1113][Insufficient balance or no resource package. Please recharge.]"
with HTTP 429, which the hints called a rate limit. Give it its own hint,
and document the personal API-key provider (personalModelIds, not
builtinModelIds) as the zcode setup that bypasses the account's broken
coding-plan key exchange.
The reviewer's own first review of this branch: README still called Koda the
only brief-as-argument exception, and the expected zcode blocker
(project_token_login_failed) had no hint. Verified both against the code and
fixed; the one-word probe (9s) and a real 19 KB review (4m29s) through the
template make zcode Verified on 0.17.0.
Two reviewers approved with changes;
verified and fixed all five findings: the macOS bundle layout was unmarked
guesswork, the argument-limit warning suppressed the template-drift check
for ARG_AGENTS, nothing pinned --mode plan in the zcode row, entry_warnings
had no test, and desktop updates silently break the launcher setup.
Rejected the doubts about the marker, the argv substitution, the models
column and stale versions as already covered.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T20:39:07.781697Z 12cd69f Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Kept both reviewers and main's takes_brief_as_argument predicate in place of
my ARG_AGENTS set, with the template-drift check still keyed on the known-issue
warnings only. Version 2.2.0: main released 2.1.0 for Antigravity.

Main's antigravity tests were green only on POSIX; fixed their Windows legs so
the suite runs everywhere: the detection assertion follows the platform's
template column, the plain-command test accepts PowerShell 5.1's UTF-16
redirects and CRLF argument handover, and the run tests drive a real
executable instead of a .cmd shim, which the runner refuses to feed a brief.
@hijera

hijera commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 12cd69f771

ℹ️ 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 scripts/agents.tsv
qwen qwen qwen - {bin} -m {model} --approval-mode plan -o text < {brief} > {out} cmd /d /c --% {bin} -m {model} --approval-mode plan -o text < {brief} > {out}
kimi kimi kimi - {bin} --quiet --plan -m {model} < {brief} > {out} cmd /d /c --% {bin} --quiet --plan -m {model} < {brief} > {out}
antigravity agy agy models {bin} --model {model} --mode plan -p "$(cat {brief})" > {out} {bin} --model {model} --mode plan -p "$(Get-Content -Raw -Encoding UTF8 {brief})" > {out}
zcode zcode bigmodel - {bin} --prompt "$(cat {brief})" --mode plan --no-color > {out} {bin} --prompt "$(Get-Content -Raw -Encoding UTF8 {brief})" --mode plan --no-color > {out}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve stdout bytes in the Windows ZCode template

When this template is executed verbatim in Windows PowerShell 5.1 through the documented no-Python workflow (SKILL.md:225-234), the bare > transcodes ZCode's stdout into UTF-16LE instead of preserving its UTF-8 bytes. The revised test at tests/test_crossreview.py:406-409 explicitly tolerates that conversion, but UTF-8 consumers receive NUL-filled or corrupted review text. The Python runner's argv bypass avoids this problem; literal template execution does not. Keep stdout byte-preserving in this path too: AGENTS.md requires the PowerShell column to hand redirection to cmd.exe specifically to prevent this re-encoding.

AGENTS.md reference: AGENTS.md:L50-L52

Useful? React with 👍 / 👎.

@hijera
hijera force-pushed the feat/zcode-reviewer branch from 12cd69f to 7770cf0 Compare November 1, 2026 20:45
@EvilFreelancer
EvilFreelancer merged commit ff92a8a into EvilFreelancer:main Nov 1, 2026
5 checks passed
EvilFreelancer added a commit that referenced this pull request Nov 1, 2026
feat(crossreview): zcode reviewer
EvilFreelancer added a commit that referenced this pull request Nov 1, 2026
feat(crossreview): zcode reviewer
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.

2 participants