Skip to content

fix(coding-agent): explain eval language selection (fixes #1395) - #1396

Open
MoerAI wants to merge 1 commit into
code-yeongyu:mainfrom
MoerAI:fix/eval-language-guidance-1395
Open

fix(coding-agent): explain eval language selection (fixes #1395)#1396
MoerAI wants to merge 1 commit into
code-yeongyu:mainfrom
MoerAI:fix/eval-language-guidance-1395

Conversation

@MoerAI

@MoerAI MoerAI commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Fixes #1395.

Explain that eval runs require an explicit language, with no default kernel, while peek and stop do not need it. Apply the description to both schema definitions and distinguish missing languages from unsupported values in request parsing.

Root cause

language must remain optional at the schema level because the same tool handles control requests. Unlike summary, it had no description explaining its run-only requirement. The parser also reported every unsupported value as an omission.

Verification

From packages/senpi-codemode:

node ../../node_modules/vitest/dist/cli.js run test/eval-request-language.test.ts test/eval-request-summary.test.ts test/eval-tool.test.ts
  • Before the fix, the new diagnostic regression had 4 failures / 3 passes: missing and invalid languages both produced eval run requires language.
  • After the fix: 35 tests pass across 3 files.
  • npm run check and npm run build: passed.
  • node .agents/skills/senpi-qa/scripts/rpc-drive.mjs --self-test: passed.

An isolated source CLI with a scripted local provider made three eval calls: omitted language, invalid python, then valid js with return 1395. The captured wire schema matched the source description; the first two calls were rejected distinctly, the real JavaScript kernel returned 1395, and the final model turn completed. Real auth was unchanged and no paid provider was contacted.

PASS: missing-language error and invalid-language schema rejection remain distinct
PASS: language js executes the real kernel and returns 1395
PASS: scripted turn completes without any paid provider request
PASS: sandbox cleaned and real auth unchanged

Existing QA failure

The broader mock-loop.mjs --self-test passes the loopback OpenAI Completions, Anthropic Messages, and OpenAI Responses turns, but its text-tool-leak recovery cases fail. The same complete-leak failure was reproduced in a clean, independently built upstream 4df67dc87 checkout with:

node .agents/skills/senpi-qa/scripts/mock-loop.mjs --with-text-tool-leak --api openai-completions

Those unrelated recovery checks are not changed here.


Summary by cubic

Explains that eval runs require an explicit language with no default kernel, so callers no longer get a generic error when it’s missing or unsupported.

  • Keeps language optional in the shared schema since the same tool serves peek and stop, and documents the run-only requirement in both live and exported schemas.
  • Request parsing now reports an omitted language separately from an unsupported value, listing the supported identifiers for invalid values.
  • Adds regression tests covering omitted vs invalid languages, omitted run languages, and language-free control requests.

Written for commit 380046c. Summary will update on new commits.

Review in cubic

…u#1395)

Describe the run-only language requirement without choosing a default kernel. Report unsupported values separately from omissions. Verify the regression red-to-green, 35 related tests, full checks and build, and an isolated real CLI eval turn.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-09-05T18:37:53.636258Z 380046c PR opened
ℹ️ 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 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: 380046ceb3

ℹ️ 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 on lines +16 to +17
const LANGUAGE_FIELD_DESCRIPTION =
"REQUIRED for run. Choose a kernel explicitly; there is no default. Omit for peek/stop.";

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 Document the language requirement in the README

This introduces a user-visible contract stating that every run must select a language and that no default kernel exists, but packages/senpi-codemode/README.md still only lists available kernels and never documents that requirement. Users and extension integrators relying on the shipped README therefore remain exposed to the ambiguity this change is intended to resolve; update the README alongside the schema.

AGENTS.md reference: packages/senpi-codemode/AGENTS.md:L76-L77

Useful? React with 👍 / 👎.

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.

eval: schema advertises language as optional (no description) but parseEvalRequest rejects every omission

1 participant