Skip to content

Add weak-coherent-discrimination-design task - #19

Open
bingran-you wants to merge 10 commits into
mainfrom
add-weak-coherent-discrimination-design
Open

Add weak-coherent-discrimination-design task#19
bingran-you wants to merge 10 commits into
mainfrom
add-weak-coherent-discrimination-design

Conversation

@bingran-you

@bingran-you bingran-you commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Outcome

This PR adds the weak-coherent-discrimination-design planning/research task, authored by Wenjun Ke (@wenjun-ke), and migrates it to BenchFlow's standalone rubric.json contract.

rubric.json is generic and independent of PLAN.md. This task happens to request one PLAN.md, so its task-specific criteria evaluate that plan and the trusted trajectory. No other task file defines rubric configuration, reviewer execution, or scoring logic.

Task contract

The agent must:

  • make at least 50 distinct, useful repository/source-navigation calls before writing;
  • produce only /app/receiver_lab/PLAN.md;
  • not implement the plan, edit existing files, run the final pipeline, or create RESEARCH.md/NAVIGATION.md; and
  • specify the complete expected design.yaml, output/summary.json, and output/trials.csv contract for a future execution.

The contributor provides four core human-authored inputs:

  1. task.md — task and final-output contract;
  2. oracle/plan.md — reviewed expert plan;
  3. oracle/solve.sh — oracle control; and
  4. verifier/rubric.json — the sole rubric definition.

verifier/test.sh and test_outputs.py separately implement 8 deterministic final-artifact checks. The verifier directory contains exactly:

verifier/
  rubric.json
  test.sh
  test_outputs.py

The old task-local judge, Reward Kit, verifier.md, TOML/YAML rubrics, evaluator credential plumbing, navigation ledger, and trajectory truncation logic are removed.

Native review architecture

This task's rubric.json contains 9 yes/no items covering research before the first PLAN.md write, codebase and QuTiP synthesis, source grounding, receiver comparison, dependency-aware stages, risks, scope, validation, and the future output contract.

The JSON contains only the native reviewer configuration, pass threshold, and task criteria. BenchFlow supplies the submitted workspace, held-out oracle reference, and complete trusted trajectory at runtime. The binary artifact reward remains separate from the plan/trajectory review score.

Native validation used the BenchFlow feat/rubric-review implementation. It auto-discovered this single JSON file, ran all 9 criteria in individual mode, retained trajectory snapshots, enforced the required research gate, and emitted separate reward, review, and review_passed metrics. The native BenchFlow rubric/config test suite passes 88/88 locally.

The released BenchFlow 0.6.5 does not contain that review stage; merge/deployment of this task therefore requires the native rubric.json support to land. This task does not duplicate the runner while waiting for that release.

Provenance and anti-cheat controls

  • docs/apparatus_record.md is an agent-visible frozen primary record for AUTHOR-APPARATUS-LOG, including measurement scope and limitations.
  • component_catalog.json points directly to that record instead of held-out oracle provenance.
  • docs/output_contract.md and the expert oracle enumerate the concrete nested summary fields and CSV reconciliation contract.
  • The verifier compares the submitted workspace directly with content-addressed frozen starter tree b22e09f7dd29b9c7e23c24546cf8f3ea3e42acbf, with Git replacement objects disabled. An agent that edits README, commits the edit, and then writes PLAN.md still fails with only PLAN.md may change.

Complexity

The environment is a partially implemented scientific package with public tests, a frozen component/source catalogue, an author apparatus record, and a pinned QuTiP 5.3.0 snapshot: 491 files and about 79k Python lines. The plan must connect receiver, budget, simulation, reporting, and quantum-reference boundaries to upstream implementations, exports, tests, source provenance, and reproducible outputs.

Validation

Exact head: fb7d969abeff5c87951eca9bd0077dc49dc63490
Task digest: sha256:e64041d369a31cf3221105d128a0dfa529a93fe3747fa0bb1f74eac6391a7b5b
Rubric SHA-256: 7af9eba7ebbf764cd16d66fc51817686b77c3d88fa5f7609fda8b5b972e23dae

  • Fresh oracle on the exact final task: reward=1.0, 8/8 deterministic checks.
  • Native positive control on the immediately preceding source-remediation tree (sha256:5992f4d6...): reward=1.0, review=1.0, review_passed=1.0, 9/9 rubric items yes, and 68 useful pre-plan calls after one duplicate was excluded.
  • The final changes after that positive control only normalize the primary-record metadata and strengthen mentor guidance; rubric.json is byte-identical.
  • Exact-final native samples show the failure boundary is active: padding calls are excluded and fail the required research gate; incomplete plans separately fail deterministic checks or individual semantic criteria. These are model failures, not infrastructure errors and not reported as positive controls.
  • Codex and Claude alternate-solver attempts were infrastructure-invalid (Responses endpoint 404 and Anthropic 401 respectively) and are excluded from task/model scores.
  • Repository validation, task validation, taxonomy, skill-frontmatter, docs, Ruff, shell syntax, JSON parsing, digest equality, native task loading, native rubric tests, and git diff --check pass locally.

Every commit in this PR includes Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>.

Companion design task to heterodyne-shot-noise-analysis: plan a
shot-noise-limited discrimination experiment for a ~1.4 pW coherent
state at 795 nm, graded against a frozen 11-item expert rubric by a
quote-verified LLM judge with a fail-closed score validator.

Task package authored by Wenjun Ke; submitted from their latest
archive with three mechanical CI fixes (taxonomy vocabulary mapping in
task.md, ruff findings in score.py and check_grader.py). rubric.yaml
and judge.py are untouched; the rubric.sha256 freeze gate still
verifies.

Registers the task in registry.json and validate_repository.py,
following the pattern of #8.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontierphysics-site Ready Ready Preview Aug 3, 2026 6:33am

Request Review

Replace the prose-only custom grader with a multi-module scientific SWE task, human expert plans, native plan-and-trajectory judging, eight deterministic outcome tests, and a mentor skill. Freeze claim-level source provenance and require all planning, research, trajectory, and execution gates to pass.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
Match navigation ledgers to trusted trajectories by chronology and target while allowing ACP to normalize model-visible shell reads, searches, and listings into native event kinds. Failed or invented calls still fail the all-pass trajectory gate.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
Use NAVIGATION.md only as a chronological target and finding index. Score action kinds, batching, counts, and edit timing from the host trajectory so self-authored tool labels cannot either earn credit or create false failures.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
Require the agent to research before producing only PLAN.md, move the complete LLM judge contract to rubric.toml, and compose eight deterministic plan checks with nine all-pass trajectory, research, and planning criteria. Remove the legacy research, navigation, execution, and duplicate verifier-plan artifacts; add the expert oracle plan, future output contract, mentor guidance, contributor documentation, and CI enforcement for the standard planning-task layout.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
@bingran-you
bingran-you marked this pull request as ready for review August 3, 2026 03:57

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

ℹ️ 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 tasks/weak-coherent-discrimination-design/verifier/rubrics/rubric.toml Outdated
Comment thread tasks/weak-coherent-discrimination-design/verifier/reward_kit/reward.py Outdated
Replace the task-local judge and alternate rubric files with the draft native agentic review contract, while keeping the deterministic execution reward separate. Standardize the contributor, maintainer, and validation pipeline around task.md, oracle/plan.md, verifier/rubric.json, and test_outputs.py.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
@bingran-you

Copy link
Copy Markdown
Collaborator 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: c3bb40a5bc

ℹ️ 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 tasks/weak-coherent-discrimination-design/verifier/rubric.json Outdated
Comment thread tasks/weak-coherent-discrimination-design/verifier/test_outputs.py Outdated
Remove unnecessary PLAN-specific protocol and duplicated rubric schema machinery. Treat rubric.json as the sole generic task rubric input while retaining only the minimal planning-task layout guidance and task-specific PLAN and trajectory criteria.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
@bingran-you

Copy link
Copy Markdown
Collaborator Author

@codex review

Prevent agents from hiding unauthorized edits by committing them. The held-out verifier now diffs the working tree against the content-addressed Docker starter tree with replacement objects disabled, while still allowing only PLAN.md.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>

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

ℹ️ 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 tasks/weak-coherent-discrimination-design/oracle/plan.md Outdated
Use the current standalone rubric.json schema, preserve the required pre-plan research gate, and tighten the mentor control and deterministic terminology checks based on native end-to-end evaluation.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
Expose a frozen primary record for author measurements, enumerate the expert plan's public output fields, refresh the frozen starter-tree guard, and clarify the with-skill research and final-audit guidance without adding any rubric mechanism outside rubric.json.

Co-authored-by: Wenjun Ke <u3597436@connect.hku.hk>
@bingran-you

Copy link
Copy Markdown
Collaborator 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: fb7d969abe

ℹ️ 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 CONTRIBUTING.md
Comment on lines +166 to +168
- Test the submitted plan contract deterministically. Put process and semantic
plan criteria only in `rubric.json`, where the native reviewer can use the
trusted host trajectory.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope plan-only verifier rules to planning tasks

These rules sit in the general verifier/ section, so contributors creating computational, data-analysis, or artifact tasks are now instructed to test a nonexistent plan artifact and move semantic checks into rubric.json. The same unscoped instruction appears in .agents/skills/task-creator/SKILL.md, contradicting the repository's outcome-based verifier contract; keep the original general verifier guidance here and place these rules exclusively under the planning/research profile.

AGENTS.md reference: AGENTS.md:L43-L44

Useful? React with 👍 / 👎.

Comment on lines +51 to +54
With the frozen efficiency assumptions, balanced heterodyne has 8.824 detected
photons, a detected-state Helstrom error of 3.68e-5, and an implementable error
of 1.784e-2 after the image-band penalty. Threshold direct counting has 6.624
detected photons, a Helstrom error of 3.32e-4, and a receiver error of 9.14e-4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Specify the efficiencies used in the receiver comparison

At the stated 11.366 incident photons, the two detected-photon values imply total efficiencies of 0.7763 and 0.5828, but neither value nor its optical/detector/mode factorization is provided or sourced anywhere in the plan; the only supplied configuration instead gives 0.90 * 0.80 * 0.95**2 = 0.6498. Consequently, an implementer following the public schema cannot reproduce these Helstrom and receiver-error figures without inventing loss assumptions, so the reference plan should state and classify each architecture's efficiency factors explicitly.

AGENTS.md reference: AGENTS.md:L40-L41

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.

1 participant