Skip to content

feat(judge): evaluate independent judges on one agent run - #290

Merged
JHWang-1997 merged 18 commits into
mainfrom
feat/multi-judge
Oct 10, 2026
Merged

JHWang-1997 merged 18 commits into
mainfrom
feat/multi-judge

Conversation

@zpzjzj

@zpzjzj zpzjzj commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and behavior

A case previously had one judge, so checking a generated change with a deterministic script and evaluating its quality with agent_judge required two evaluated-agent runs or lost independent attribution. With judges, the case executes the evaluated agent once, then evaluates each named judge against isolated copies of the completed workspace. A script failure remains attributable to the script judge even when semantic review passes.

This implements the initial all_required aggregation for #246. expect remains a separate hard gate; outcomes retain IDs, status, evidence, duration, and artifact paths in evaluation.json and human/CI reports. A case-level judges list replaces the eval-level list, and existing singular judge configs retain their behavior.

Design and extension boundaries

See Independent multi-judge design for configuration, execution and result contracts, the Harbor comparison, and future extension boundaries.

  • Optional JudgeSnapshotProvider / JudgeSnapshot interfaces remove concrete-runtime dispatch. Only none implements workspace snapshot/fork today; unsupported runtimes are rejected before the evaluated agent runs. Workspace isolation does not cover host or external-service effects.
  • OutcomeAggregator separates case policy from judge execution. Evaluation and grouped reports use the same policy identity. The sole implemented policy remains all_required.
  • Context metadata and archived manifests reference each named judge's own material directory; the legacy singular-judge layout is preserved.
  • Numerical scores, configurable weights/thresholds, benchmark metrics, reusable validator bundles, additional runtime adapters, and durable regrading are documented as future work. Script entry paths can be reused across cases today. Judge list order does not form a dependent pipeline.

Validation

  • make build
  • make verify
  • make test (race detector; an earlier run hit the existing SIGTERM trap timing flake, the targeted test passed three consecutive runs, and subsequent full runs passed)
  • make e2e
  • npm run docs:build
  • Regression tests exercise runtime-capability dispatch, aggregation precedence, workspace isolation, and persisted report/manifest material references.

Real-model example verification

The existing code-stats example now uses OpenCode / DashScope qwen3.8-max and reuses its existing check-stats.sh alongside an independent semantic judge. Guides, references and optional templates use the same compatible model configuration.

Real calls with OpenCode 1.14.24 exercised the selected analyze-directory case and a controlled negative variant:

Run Gates Script Semantic Aggregate
With Skill PASS PASS PASS PASS
Without Skill baseline FAIL SKIP SKIP FAIL
Controlled script failure PASS FAIL PASS FAIL

The positive run reported 3 files, 20 lines and 350 bytes. In the negative run the script wrote a probe file and exited 1; the semantic judge's actual directory checks found no probe in its fork. The failure remained attributable to the script and the case stayed FAIL. Archived semantic material references were read back successfully, and JSON/HTML/JUnit reports were generated for the positive run.

The baseline failure is an exact-output-format gate result, not evidence that Qwen cannot calculate the counts. Only this selected case and the negative variant were live-tested; the remaining example cases and the six-case skill-upper suite were configuration-validated. The design report records reproduction steps and limits. Harbor remains a source comparison.

The Chinese example also exposed byte-based prompt truncation in list-cases; previews now preserve Unicode characters, covered by a dedicated integration regression.

Snapshot copies also preserve regular-file and directory modification times, so copying does not reverse source/output freshness. A regression covers timestamp preservation across capture and multiple forks. Both real Qwen scenarios were rerun after this fix with the same outcomes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 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-10-09T02:30:47.840768Z bf9d8d2 New commits
ℹ️ 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: 67b592cd1b

ℹ️ 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 internal/evaluator/multi_judge.go Resolved
Comment thread internal/evaluator/evaluator.go Resolved

@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: 360b833d3a

ℹ️ 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 internal/evaluator/evaluator.go Resolved

@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: 498b80e9e4

ℹ️ 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 internal/config/schema.go Resolved
Comment thread internal/judge/script.go Resolved

@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: 807f55dd14

ℹ️ 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 internal/runtime/none_judge_snapshot.go Resolved

@JHWang-1997 JHWang-1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified one P2 issue on this revision: multi-judge context artifact references do not match the archived files. The inline comment includes the reproduction and suggested correction.

Comment thread internal/evaluator/multi_judge.go Resolved

@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: 49db7475e8

ℹ️ 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 internal/evaluator/multi_judge.go Resolved

@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: e297613d3a

ℹ️ 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 internal/runtime/none_judge_snapshot.go Resolved
@zpzjzj

zpzjzj commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the timestamp-preservation review in eb49e85 and resolved its inline thread. Regular-file and directory mtimes are now retained, with a freshness/isolation regression. The existing code-stats Qwen positive and controlled-negative experiments were rerun after the fix with unchanged outcomes; reproduction steps and verification boundaries are recorded in docs/design/multi-judge.md.

@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: eb49e85a8e

ℹ️ 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 docs/design/multi-judge.md Resolved
@zpzjzj

zpzjzj commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the design-example review in 8e1e0f2 and resolved its inline thread. The example now includes the required Qwen model and states its engine/endpoint prerequisite; the extracted block was configuration-validated and the documentation build passed. All CI checks passed on the preceding runtime-fix commit; this final change is documentation-only.

@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: e2ac7c5ed6

ℹ️ 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 internal/evaluator/multiturn.go Resolved
@JHWang-1997
JHWang-1997 enabled auto-merge October 8, 2026 12:12
@zpzjzj

zpzjzj commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

Updated through bf9d8d2:

  • Synced main through c3cc4a8 (user-simulator feat(evaluator): simulate dynamic user turns #286) and resolved schema/validator conflicts while preserving both simulator validation and multi-judge configuration. Added successful simulated-turn and simulator-error composition regressions.
  • Recorded skipped members for post-condition exits and single/multi-turn execution failures, preserving case FAIL/ERROR status and grouped artifacts.
  • Mapped absolute workspace attachment and generated-file paths into each judge fork, including canonical workspace aliases; original configuration/input slices and separate archive references remain unchanged.

Validation: full race tests, make verify, build, and uncached E2E passed. Actual offline CLI checks verified grouped artifacts on failed gates/errors, normal judging with skip_remaining, and absolute attachment/generated-file isolation: a script mutates its fork, the following agent judge sees original bytes, and mutation through the generated-file index leaves the source workspace unchanged. These follow-up checks used a custom engine and do not claim another live Qwen run.

A later review fix rejects .git pointer files in linked worktrees/submodules rather than sharing external Git metadata across judge forks. Use a standalone checkout with a .git directory. A real linked-worktree CLI check confirmed ERROR with every judge SKIP/snapshot_failed; source files were not changed by a judge.

Follow-up fixes in c0ce2db / bf9d8d2 resolve symlinked workspace roots before copying, validate entire symlink chains, and record all configured judges as SKIP when snapshot or session-resumption capabilities are unsupported. Actual CLI checks verified a valid symlink root, rejection of a chained escape without changing external files, and grouped ERROR/SKIP artifacts for a batch engine without session resumption. Full race tests, make verify, build, and uncached E2E passed locally.

Final CI for bf9d8d2: 16 checks passed, 3 deployment/release checks skipped, no failures or pending checks. Live readback confirms zero unresolved review threads and no merge conflicts. Maintainer approval is still required; the PR remains unmerged.

@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: 730056a979

ℹ️ 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 internal/runtime/none_judge_snapshot.go Resolved

@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: 2dd2b6197e

ℹ️ 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 internal/runtime/none_judge_snapshot.go Resolved
Comment thread internal/evaluator/evaluator.go Resolved
@zpzjzj
zpzjzj requested a review from JHWang-1997 October 9, 2026 03:35

@JHWang-1997 JHWang-1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@JHWang-1997
JHWang-1997 added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit a337a8d Oct 10, 2026
19 checks passed
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