Skip to content

refactor: delete zero-reference defs and the unused paired_cluster module - #1189

Merged
napetrov merged 1 commit into
intel:mainfrom
napetrov:arch/r6-dead
Nov 25, 2026
Merged

napetrov merged 1 commit into
intel:mainfrom
napetrov:arch/r6-dead

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Summary

dokimi/ (zero references, checked on head)
├── runner/run.py            - DocMetrics                 removed
├── harnesses/tasks.py       - _is_public                 removed
├── novelty/report.py        - colour_of (+ COLOURS import) removed
└── eval/paired_cluster.py   - paired_cluster_difference  removed (only caller: its own test)
tests/test_paired_cluster.py                              removed

Arch review round 6, items R6-3 and R6-4. Test-only helpers are left alone.

Evidence

  • Before: AST scan of the package for function and class defs with no reference outside their own line. It lists three names with zero references in package, scripts and tests (DocMetrics, _is_public, colour_of); paired_cluster has no non-test importer.
    After: git grep for each removed name over tracked files returns no code, doc or test hit (only an unrelated hunk header in .agent-eval/tasks/feat-static-metric/oracle.patch).
  • scripts/check_test_narrowing.py --base intel/main --head HEAD exits 0 (the deleted test file is waived by the Test-narrowed: line in the commit message).
  • make ci-local static job on this head: 17/17 pass (includes Test narrowing and the changelog fragment check). The full test job passed on the same package and test tree before the changelog wording fix and the commit-message waiver.

Merge Danger

Door: two-way. A revert restores the three names and the module.

Public names go: dokimi.runner.run.DocMetrics, dokimi.novelty.report.colour_of, and the module dokimi.eval.paired_cluster. Code outside the repo that imports them breaks on upgrade; the ### Removed fragment says so.

Blast Radius: library import surface only. No CLI, artifact, schema or runtime path reads these names, so CLI behaviour and output are unchanged.

Self-review

Local self-review (3 passes, finder runs as claude -p children with fresh context; lens and probe checks run by hand). Two blocking findings were fixed (changelog count, test-narrowing waiver). A stale oracle fixture in .agent-eval is pre-existing: it pins base 16e319fd, where it applies, and fails the same way on main.

🤖 Generated with Claude Code

…dule

DocMetrics, colour_of and _is_public have no reference in dokimi or its tests. eval/paired_cluster.py (added in intel#431) has no production caller: its only importer was its own test, so both files go. The Removed fragment names the two public symbols.

Test-narrowed: tests/test_paired_cluster.py is deleted with eval/paired_cluster.py, the only code it exercises; no production caller existed, so no check of shipped behaviour is lost.
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov requested a review from a team as a code owner November 25, 2026 07:06
@exai-bot

exai-bot commented Nov 25, 2026 •

Copy link
Copy Markdown

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

CI at `8c62f4b`: 1 failing, 20 passing, 4 skipped

Not fully read: log of Test Linux Wheels Python 3.14: longer than 8000000 bytes, only the start was read

Check Status
Test Linux Wheels Python 3.14 failing at step Install the wheel and run ci/test.py
Review details
  • Commit reviewed: 8c62f4b against merge base 5205a07
  • Coverage: 4 files in 1 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 58k tokens (35k from cache), 14s
  • Tool calls: 10 (7 file_read, 1 ci_status, 1 code_search, 1 local_check_results)
  • Remove dead code across task harness, novelty reporting, and runner: 4 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.08%. Comparing base (5205a07) to head (8c62f4b).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1189      +/-   ##
==========================================
- Coverage   96.10%   96.08%   -0.02%     
==========================================
  Files         491      490       -1     
  Lines       64882    64804      -78     
  Branches    11266    11250      -16     
==========================================
- Hits        62352    62269      -83     
- Misses       1560     1561       +1     
- Partials      970      974       +4     
Files with missing lines Coverage Δ
dokimi/dokimi/harnesses/tasks.py 97.63% <ø> (+0.24%) ⬆️
dokimi/dokimi/novelty/report.py 100.00% <100.00%> (+0.39%) ⬆️
dokimi/dokimi/runner/run.py 97.67% <ø> (-0.25%) ⬇️

... and 4 files with indirect coverage changes

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

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 LGTM · checked 8c62f4b · nothing required from @napetrov

🔀 Merge: safe now · merges cleanly into current main, 3 commits behind; its tests pass on the merge · no open PR touches its files

✅ make ci-local --offline: 28,203 passed · ⚠️ schema_compat fails from the base (opportunities.v1.json from #1082 on main), not from this PR · ✅ no reference to the removed names left in code, tests, docs or main · ✅ 318 tests of the touched modules pass on the merge

A clean deletion: nothing used these names, and the fragment and Test-narrowed: line say so.

@vchamarthi vchamarthi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving 8c62f4b.
What I checked: the full test suite passes with main merged in (28,384 tests), apart from failures main has too; it merges cleanly onto main.

@napetrov
napetrov merged commit 9b4b67d into intel:main Nov 25, 2026
30 of 31 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.

5 participants