Repository navigation
Conversation
Keep task bases fixed when comparing guidance revisions. Score structured review findings and check false alarms on a clean diff. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1194 +/- ##
==========================================
- Coverage 96.14% 96.12% -0.02%
==========================================
Files 498 498
Lines 65888 65897 +9
Branches 11441 11442 +1
==========================================
- Hits 63349 63345 -4
- Misses 1570 1577 +7
- Partials 969 975 +6
🚀 New features to boost your workflow:
|
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 19 selected item(s). CI at Review details
|
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 Changes needed · reviewed 079f731
To fix: both review-task checks are red, and the guidance:rev: arm measures guidance that does not fit the pinned task base. The keyword and prompt points in the line comments are smaller.
✅ make ci-local --offline: tests, mypy, mutation, docs pass · schema_compat fails from main (opportunities.v1.json from #1082), not from this PR · ❌ GitHub self / repo tasks check for both review tasks · ✅ both oracles pass grade_seeds · ✅ grade_seeds on hand-made findings: one false credit, two misses (line comments)
Moving the review tasks to structured findings, with a clean-diff control, is the right direction.
Agreed with @exai-bot on the grader mount that Docker cannot see: replied in its thread with the cause and a fix.
vchamarthi
left a comment
There was a problem hiding this comment.
@napetrov, could you fix the problem I found (in the line comments), fix what the bot's thread on .agent-eval/tasks/review-clean-diff/task.json:6, the bot's thread on .agent-eval/tasks/review-pr-conventions/task.json:6, the bot's thread on .github/workflows/repo-eval-self.yml:49, the bot's thread on .agent-eval/tasks/review-clean-diff/task.json:6, the bot's thread on .agent-eval/tasks/review-pr-conventions/task.json:6, vlad-perevezentsev's thread on .agent-eval/README.md:68, vlad-perevezentsev's thread on .agent-eval/tasks/review-pr-conventions/manifest.json:30, vlad-perevezentsev's thread on .agent-eval/tasks/review-pr-conventions/manifest.json:11, vlad-perevezentsev's thread on .agent-eval/tasks/review-pr-conventions/task.json:5, vlad-perevezentsev's thread on .agent-eval/run.py:12 and vlad-perevezentsev's thread on .github/workflows/repo-eval-self.yml:52 still point out and answer my question below? Then push and I'll take another look.
My question before I approve:
- A seeded review whose answer has no findings array gets
pass: falsefromgrade_seeds, and the new test checks that. Either make the contract sayfalsefor an answer with no findings array, or returnpass: nullthere and change the assertion intest_seeded_review_rejects_a_prose_checklist_that_dismisses_the_defects.
Optional, for later (1)
dokimi/dokimi/repos/graders/review.py:225: A severity other thanblocker,majororminorcounts as not severe, so a clean-diff review that reports a blocking problem ascriticalpasses (main has it too).
What I checked on 079f731: the 3 changed tests pass, and fail on main as expected; the full test suite passes with main merged in (28,482 tests), apart from failures main has too; it merges cleanly onto main.
- key_rename now needs the rename wording, not just both key names - logic_off_by_one accepts ">=", "inclusive", "boundary" - schema_in_place accepts "answers.v2", "new version", "in place" - drop "Inspect the full diff" from both review prompts - a minor-only clean review is asserted to pass - README: review tasks have no process metrics; task base lacks files AGENTS.md names Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
@napetrov, could you answer the question below? I'll ask for a re-review after that. Changes:
Needs @napetrov:
Threads and comments:
Left open:
Not caused by this PR:
What I checked on the new commit:
What each test shows
|
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g867zAjl Thread: PRRT_kwDOVBg7g867zAjr Thread: PRRT_kwDOVBg7g867zAjx Thread: PRRT_kwDOVBg7g867zY0P Thread: PRRT_kwDOVBg7g867zY0a Thread: IC_kwDOVBg7g88AAAABq3to1Q Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674RrQ Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674Rq5 Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674Rqw Thread: PRR_kwDOVBg7g88AAAABaQi99Q Thread: PRR_kwDOVBg7g88AAAABaV0UHA.a Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674Rq5 Thread: PRRT_kwDOVBg7g8674RrA Test-narrowed: Guidance edits still trigger repo scan. The replacement workflow test checks every original path and expects Docker smoke tasks only where they can exercise a change. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674Rq5 Thread: PRRT_kwDOVBg7g8674RrA Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674Rq5 Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8674RrQ Test-narrowed: Guidance edits still trigger repo scan. The replacement workflow test checks every original path and expects Docker smoke tasks only where they can exercise a change. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Re: review by vlad-perevezentsev
|
|
vchamarthi
left a comment
There was a problem hiding this comment.
@napetrov, could you fix the 2 new problems I found and the 2 small things I've marked fix before merge (in the line comments) and answer my question below? Then push and I'll take another look.
My question before I approve:
- Whether the daemon on the runner can see the parent of the eval directory, where the copy of the graders is now made (
dokimi/dokimi/repos/grading.py:215). Confirm that the parent is visible to the daemon on the runner, or state in the docs that it must be.
What I checked on ee86250:
- When I broke the changed code on purpose, the tests missed 6 of 12 breakages.
- The 114 changed tests pass, and fail on main as expected.
- The full test suite passes with main merged in (31,213 tests), apart from failures main has too.
- It merges cleanly onto main.
| f"{CONTENT_DIR}/{rel.as_posix()}", RUN_DIR] | ||
| return argv, [Mount(GRADERS_HOST, GRADERS_DIR, read_only=True)] | ||
| # The Docker daemon may see the exported content's parent but not the client's site-packages. | ||
| staging = Path(stack.enter_context(tempfile.TemporaryDirectory(prefix="graders-", dir=ctx.content_dir.resolve().parent))) |
There was a problem hiding this comment.
Must fix: An interrupted grade run loses its grader copy: the copy is deleted when run_entry unwinds, though the grade run may still be going.
Input: a grade run, which is started with survives_halt=True (line 178), interrupted while the runner is still working.
Got: On the latest commit the copy under graders-…/graders is gone once run_entry unwinds, so the mount points at nothing while the grade run may still be going.
Suggestion: Keep the copy until the grade run has finished, for example by not removing it when the runner raises for a surviving grade run, or by staging it outside the with block and deleting it only after the run returns.
I tested this patch: it fixes the problem, and the tests still pass.
Patch
--- a/dokimi/dokimi/repos/grading.py
+++ b/dokimi/dokimi/repos/grading.py
@@ -44,6 +44,7 @@
RUN_DIR,
SOURCE_DIR,
WORKSPACE,
+ BatchInterrupted,
ContainerError,
ContainerResult,
ContainerRunner,
@@ -176,8 +177,13 @@
_run_hidden_tests(ctx, task, run_dir, network, mounts, name)
spec = ContainerSpec(image=ctx.image, argv=argv, workdir=WORKSPACE, mounts=mounts + extra + ctx.cache_mounts(),
env=ctx.grade_env(task), network=network, name=name, survives_halt=kind == "grade")
- result = ctx.runner.run(spec, stdout=run_dir / f"{kind}.log", stderr=run_dir / f"{kind}.err",
- timeout_s=ctx.entry_timeout_s)
+ try:
+ result = ctx.runner.run(spec, stdout=run_dir / f"{kind}.log", stderr=run_dir / f"{kind}.err",
+ timeout_s=ctx.entry_timeout_s)
+ except BatchInterrupted:
+ if kind == "grade": # the grade run may outlive the halt and still mount the copy
+ stack.pop_all()
+ raise
if builtin is not None and result.returncode == _NOT_FOUND_EXIT and _python3_not_found_in_stderr(run_dir, kind):
raise ContainerError(f"{task.raw['grader']} runs on the image's python3, and the image has none on PATH "
f"(`{kind}` exited {_NOT_FOUND_EXIT}; see {run_dir / f'{kind}.err'})")
@@ -212,7 +218,8 @@
argv = ["python3", "-I", "-B", f"{GRADERS_DIR}/{BUILTIN_ENTRY}", kind, builtin,
f"{CONTENT_DIR}/{rel.as_posix()}", RUN_DIR]
# The Docker daemon may see the exported content's parent but not the client's site-packages.
- staging = Path(stack.enter_context(tempfile.TemporaryDirectory(prefix="graders-", dir=ctx.content_dir.resolve().parent)))
+ staging = Path(tempfile.mkdtemp(prefix="graders-", dir=ctx.content_dir.resolve().parent))
+ stack.callback(shutil.rmtree, staging, ignore_errors=True)
graders = shutil.copytree(GRADERS_HOST, staging / "graders", ignore=shutil.ignore_patterns("__pycache__"))
# The package may have been installed with permissions that other UIDs cannot read.
graders.chmod(0o755)Details
I'd expect the copy to stay until the grade run ends, as on main, where the mount is the installed package. The cause is the ExitStack in run_entry, which removes the copy on any exit. I think a grader that imports a module after that point would fail; the test shows only that the copy is gone.
There was a problem hiding this comment.
I ran the actual halt logic with a stubbed Docker command. survives_halt=True keeps the runner waiting and the mount readable. Cleanup runs after grading returns. This is now tested, along with the oracle path where the halt kills the container.
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868J1-q Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868J1-1 Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868J1-- Thread: PRR_kwDOVBg7g88AAAABaZcM_g Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868J1-q Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g868J1-q Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
|
Both hosted review jobs passed on |
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> # Conflicts: # .agent-eval/README.md # dokimi/docs/reviewing.md
Summary
AGENTS.mdthe root project guide and have it route PR reviewers toREVIEW.md. Add the exact checks for schema fixtures, docs links and CI exit status.review-pr-conventionsto seeded review grading and addreview-clean-diffwith a supported CLI flag as a decoy. Stage the built-in graders next to the exported eval content so the Docker daemon can mount them.Evidence
Before, a prose answer explicitly dismissing all five defects scored
1.0. The regression test now gets0.0. A valid boundary finding is credited by file and line, and a blocking claim about the supported flag fails the clean control.133 targeted tests passed. Both review tasks passed the Docker null/oracle check. The clean diff's
eval grounding --threshold 0.6command exited0on its historical base.Before the review round, a four-cell Claude Haiku 4.5 smoke run passed the clean diff in both arms. The seeded run scored 1/5 without guidance and 2/5 with the pinned guidance. Each cell ran once.
Before the review round, all 11 Docker null/oracle checks passed.
make ci-localran with 0 failures, 38 passes and 15 skips. The full pytest suite passed 28,297 tests, and all 20 randomized repeats of the new tests passed. The local runner used Python 3.13 and the Claude client on PATH.After the review round, 156 focused tests passed. Both review tasks passed their Docker null and oracle checks with the grader staged alongside the exported eval content.
The follow-up confirms the grader mount stays readable through a batch halt and is cleaned up when grading finishes. It also verifies stale grade removal and rejects findings that endorse the seeded threshold comparison. Both hosted review jobs passed with the shared-parent bind mount.
Merge Danger
Door Two-way.
Blast Radius Contributor guidance and Dokimi's repository evals. The task protocol changes for review runs. Keep structured-review results separate from earlier prose scores.