Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a930c7b
feat(pricing): 1/5 — generate the evalboard rate table from pricing.py
uipreliga Sep 15, 2026
3d91830
refactor(reports): 2/5 — two DRY fixes and hoist 18 function-local im…
uipreliga Sep 15, 2026
a0a530f
refactor(reports): 3/5 — split reports_stats.py into stats, result_me…
uipreliga Sep 15, 2026
0a4311b
refactor(reports): 4/5 — reports/ package, durations.py, and CE066
uipreliga Sep 15, 2026
721fa30
docs: 5/5 — retarget every reports_* reference and record the rationale
uipreliga Sep 15, 2026
0229d43
fix(lint): CE004 never fired on the relative import spelling
uipreliga Sep 15, 2026
0c4407e
chore: record two deferred harness candidates from the reports consol…
uipreliga Sep 15, 2026
8d2b2b8
fix: code review fixes for the reports consolidation
uipreliga Sep 15, 2026
5386657
fix(lint): 1/4 — is_core_path covers the whole core layer
uipreliga Sep 15, 2026
24ed50b
fix(lint): 2/4 — declare CE044 and CE065 to ruff, and pin the id space
uipreliga Sep 15, 2026
d491cf7
test(reports): 3/4 — cover the HTML slowest-commands truncation branch
uipreliga Sep 15, 2026
2e43ca7
docs: 4/4 — retarget prose that names deleted report modules
uipreliga Sep 15, 2026
8650428
fix: code review fixes for the reports-consolidation review fixes
uipreliga Sep 15, 2026
7a5d33d
feat(lint): CE067 — CLAUDE.md's tree must name every top-level packag…
uipreliga Sep 15, 2026
c7c5baa
test(lint): drop a personal path and de-duplicate the isolation pin
uipreliga Sep 15, 2026
d72d204
test(lint): drop two function-local json imports that shadow the modu…
uipreliga Sep 15, 2026
f8319f6
fix(lint): CE004 checks reports/ — stop borrowing CE066's exemption set
uipreliga Sep 15, 2026
4fc1084
fix(lint): resolve a relative import against the importing file
uipreliga Sep 16, 2026
b79f7df
fix: reconcile the reports split with main's docs restructure
uipreliga Sep 16, 2026
2c47ee5
fix(pricing): carry the exemption set into the generated mirror
uipreliga Sep 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(lint): drop a personal path and de-duplicate the isolation pin
No test datum should carry a developer's home directory. The repo-root case
now uses `/home/dev/src/exp/coder_eval/conftest.py`, which keeps the shape
that mattered — a `src` component that is NOT the package's parent, so it
exercises the anchor rather than merely the absence of `src`.

`ISOLATION` and a verbatim three-line docstring were copied into both the
CE004 and CE066 test classes. Hoisted to one module-level `CORE_ISOLATION`
with the rationale stated once, so the two pins cannot drift to different
paths. Verified the pins still bite: re-exempting `isolation/` in `_NON_CORE`
fails four tests.

Also renames `test_ce008_skips_files_outside_scope` to `ce009` — it sits in
the CE009 block and exercises `YamlModelsForbidExtras` (CE009), while CE008's
own tests cover `ReadTextExplicitEncoding`. Pre-existing mislabel, flagged in
review.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
  • Loading branch information
uipreliga and claude committed Sep 16, 2026
commit c7c5baa259fd9ba244758de0ebb905562451d3ed
30 changes: 16 additions & 14 deletions tests/test_custom_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,14 @@ def test_task_rubric_is_bundled_and_read_by_its_readers(self):
)


# The `driver: docker` evaluation path, and the reason the core-layer predicate
# became an allowlist: the directory-list form it replaced named ten packages and
# `isolation` was not one, so the driver that runs the whole evaluation loop in a
# container was invisible to BOTH layering rules. Shared, so the two pins below
# cannot drift to different paths.
CORE_ISOLATION = "/repo/src/coder_eval/isolation/docker_runner.py"


@pytest.mark.lint
class TestCE004CatchesBothImportSpellings:
"""CE004 must fire on the RELATIVE form, not only `coder_eval.cli`.
Expand Down Expand Up @@ -2138,13 +2146,8 @@ def test_a_non_cli_import_does_not_violate(self, source):
def test_a_non_core_file_is_exempt(self):
assert not self._violations("from ..cli import run_command", "/repo/src/coder_eval/cli/report_command.py")

ISOLATION = "/repo/src/coder_eval/isolation/docker_runner.py"

def test_the_docker_driver_is_core(self):
"""`isolation/` was in neither rule's reach: the directory-list predicate
named ten packages and `isolation` was not one, so the driver that runs
the whole evaluation loop in a container could import anything."""
assert self._violations("from ..cli import run_command", self.ISOLATION)
assert self._violations("from ..cli import run_command", CORE_ISOLATION)


@pytest.mark.lint
Expand Down Expand Up @@ -2223,14 +2226,9 @@ def test_wholesale_module_import_into_core_violates(self):
def test_a_non_core_file_is_exempt(self):
assert not self._violations("from coder_eval.reports import format_score", self.NON_CORE)

ISOLATION = "/repo/src/coder_eval/isolation/docker_runner.py"

def test_the_docker_driver_is_core(self):
"""`isolation/` was in neither rule's reach: the directory-list predicate
named ten packages and `isolation` was not one, so the driver that runs
the whole evaluation loop in a container could import anything."""
assert self._violations("from ..reports import format_score", self.ISOLATION)
assert not self._violations("from ..reports import write_task_html", self.ISOLATION)
assert self._violations("from ..reports import format_score", CORE_ISOLATION)
assert not self._violations("from ..reports import write_task_html", CORE_ISOLATION)

def test_every_allowlisted_name_resolves_in_the_package(self):
"""Staleness guard: a renamed writer must not leave a dead entry silencing
Expand Down Expand Up @@ -2324,7 +2322,11 @@ def test_every_module_is_classified_by_its_top_level_package(self):

@pytest.mark.parametrize(
"path",
["/Users/religa/src/exp/coder_eval/conftest.py", "/home/dev/projects/coder_eval/conftest.py"],
[
# A `src` component that is NOT the package's parent, and none at all.
"/home/dev/src/exp/coder_eval/conftest.py",
"/home/dev/projects/coder_eval/conftest.py",
],
)
def test_a_repo_root_file_is_not_core(self, path):
"""The checkout directory is itself named `coder_eval`, so the unanchored
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lint_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def test_ce009_allows_subclass_inheriting_forbid_from_same_file(tmp_path: Path)
assert violations == []


def test_ce008_skips_files_outside_scope(tmp_path: Path) -> None:
def test_ce009_skips_files_outside_scope(tmp_path: Path) -> None:
"""Files outside tasks.py / criteria.py are not flagged (results.py uses extra='allow')."""
from tests.lint.rules.yaml_models_forbid_extras import YamlModelsForbidExtras

Expand Down