claude-dev-env 8.46.1 → 8.46.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,7 +61,6 @@ def test_should_keep_every_constant_free_of_a_sonnet_model_id() -> None:
|
|
|
61
61
|
each_file.name
|
|
62
62
|
for each_file in CONSTANTS_DIRECTORY.glob("*.py")
|
|
63
63
|
if not each_file.name.startswith("test_")
|
|
64
|
-
and each_file.name != "subagent_model_pin_hook_constants.py"
|
|
65
64
|
and "claude-sonnet" in each_file.read_text(encoding="utf-8")
|
|
66
65
|
]
|
|
67
66
|
assert all_offending_files == []
|
package/package.json
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import ast
|
|
6
|
-
import os
|
|
7
6
|
import re
|
|
8
7
|
from collections import Counter
|
|
9
8
|
from pathlib import Path
|
|
10
9
|
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
11
12
|
|
|
12
13
|
_PACKAGE_ROOT = Path(__file__).resolve().parents[2]
|
|
13
14
|
_REPOSITORY_ROOT = _PACKAGE_ROOT.parent.parent
|
|
@@ -118,28 +119,31 @@ def _collect_citation_texts() -> list[tuple[Path, str]]:
|
|
|
118
119
|
|
|
119
120
|
def test_should_resolve_code_rules_anchors_and_sections() -> None:
|
|
120
121
|
index_text = _INDEX_PATH.read_text(encoding="utf-8")
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
_assert_citations_resolve(index_text, _collect_citation_texts())
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def test_should_report_dead_code_rules_anchor() -> None:
|
|
126
|
+
index_text = _INDEX_PATH.read_text(encoding="utf-8")
|
|
127
|
+
dead_citation = (_INDEX_PATH, "CODE_RULES.md" + "#no-such-heading")
|
|
128
|
+
with pytest.raises(AssertionError, match="dead CODE_RULES anchor #no-such-heading"):
|
|
129
|
+
_assert_citations_resolve(index_text, [dead_citation])
|
|
126
130
|
|
|
127
131
|
|
|
128
|
-
def _assert_destination_resolves(
|
|
132
|
+
def _assert_destination_resolves(markdown_path: Path, destination: str) -> None:
|
|
129
133
|
if "://" in destination or destination.startswith("#"):
|
|
130
134
|
return
|
|
131
135
|
path_text, _, anchor_text = destination.partition("#")
|
|
132
|
-
destination_path =
|
|
133
|
-
assert destination_path.is_file(), f"{
|
|
136
|
+
destination_path = markdown_path.parent / path_text
|
|
137
|
+
assert destination_path.is_file(), f"{markdown_path}: {destination}"
|
|
134
138
|
if anchor_text:
|
|
135
139
|
destination_text = destination_path.read_text(encoding="utf-8")
|
|
136
140
|
assert anchor_text in _heading_slugs(destination_text), (
|
|
137
|
-
f"{
|
|
141
|
+
f"{markdown_path}: {destination}"
|
|
138
142
|
)
|
|
139
143
|
|
|
140
144
|
|
|
141
|
-
def
|
|
142
|
-
for
|
|
143
|
-
|
|
144
|
-
for each_destination in _MARKDOWN_LINK.findall(
|
|
145
|
-
_assert_destination_resolves(
|
|
145
|
+
def test_should_resolve_every_index_and_family_relative_link() -> None:
|
|
146
|
+
for each_markdown_path in [_INDEX_PATH, *_FAMILY_DIRECTORY.glob("*.md")]:
|
|
147
|
+
markdown_text = each_markdown_path.read_text(encoding="utf-8")
|
|
148
|
+
for each_destination in _MARKDOWN_LINK.findall(markdown_text):
|
|
149
|
+
_assert_destination_resolves(each_markdown_path, each_destination)
|