Skip to content

refactor(graders): read the command record with the shared run-record reader - #1663

Open
napetrov wants to merge 1 commit into
intel:mainfrom
napetrov:arch/r14-3a
Open

napetrov wants to merge 1 commit into
intel:mainfrom
napetrov:arch/r14-3a

Conversation

@napetrov

@napetrov napetrov commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The commands grader kept its own copy of the run-record checks (missing file, not an object, the framework's problem key). It now calls run_record.read_run_record, as hidden_tests and mutation already do, and keeps only its own check that the record has groups. Same messages, same order.

_record(run_dir)            dokimi/repos/graders/command.py
  before: own checks: no RECORD / not an object / problem / groups
  after:  read_run_record(run_dir, RECORD, "the commands did not run")   # shared
          groups check only

The refactor is internal: no CLI flag, file format or public name changes.

Evidence

  • Grader tests (test_grader_characterization.py, test_repo_command_grader.py, test_repo_builtin_graders.py, test_repo_mutation_grader.py, test_repo_typecheck_grader.py, test_unloaded_hidden_unicode.py): 333 passed.
  • ci-local --offline --jobs static,typecheck on the head: 0 failed, 17 passed, 3 skipped.

Merge Danger

Door: two-way. No schema, file or CLI change; a revert restores the local copy.

Blast Radius: only commands grader runs, through the record reader. The three error messages are the same text as before.

🤖 Generated with Claude Code

… reader

The commands grader had its own copy of the run-record checks (missing,
not an object, the framework's problem key). It now calls
run_record.read_run_record, as hidden_tests and mutation do, and keeps only
its own check that the record has groups. Same messages, same order.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov requested a review from a team as a code owner December 6, 2026 06:35
Copilot AI balanced review requested due to automatic review settings December 6, 2026 06:35
@napetrov napetrov added the skip-changelog No user-visible change: bypasses the changelog fragment check label Dec 6, 2026

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the refactor that reuses the shared run-record reader.

No open issues 🎉

What changed in this PR

0 new findings; nothing to fix.

This internal refactor makes the commands grader reuse the shared run-record reader without changing its validation messages or order.

Changes:

  • Replace duplicated record checks with read_run_record, retaining commands-specific groups validation.
  • Add a changelog fragment documenting the behavior-preserving refactor.
File Description
dokimi/​dokimi/​repos/​graders/​command.py Delegate common validation to the shared reader.
dokimi/​changelog.d/​20261205_130000_napetrov_arch-r14-3a.md Document the internal refactor.

Review effort: Balanced

@exai-bot

exai-bot commented Dec 6, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s).

CI at 8529aef: 26 passing, 4 skipped (9 jobs of superseded runs not counted).

Review details
  • Commit reviewed: 8529aef against merge base 19e5222
  • Coverage: 2 files in 1 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 58k tokens (36k from cache), 7s
  • Tool calls: 5 (4 file_read, 1 code_search)
  • small change set: 2 files

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.43%. Comparing base (19e5222) to head (8529aef).

Files with missing lines Patch % Lines
dokimi/dokimi/repos/graders/command.py 75.00% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1663      +/-   ##
==========================================
- Coverage   96.44%   96.43%   -0.01%     
==========================================
  Files         585      585              
  Lines       76600    76592       -8     
  Branches    13175    13172       -3     
==========================================
- Hits        73876    73861      -15     
- Misses       1671     1673       +2     
- Partials     1053     1058       +5     
Files with missing lines Coverage Δ
dokimi/dokimi/repos/graders/command.py 89.23% <75.00%> (+0.82%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No user-visible change: bypasses the changelog fragment check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants