claude-dev-env 8.46.28 → 8.46.29

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "8.46.28",
3
+ "version": "8.46.29",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,9 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import importlib.util
5
+ import importlib.machinery
6
6
  import os
7
7
  import subprocess
8
+ import types
8
9
  from dataclasses import dataclass, field
9
10
  from datetime import datetime, timedelta, timezone
10
11
  from enum import Enum
@@ -63,11 +64,12 @@ def codex_usage_limit_signatures() -> tuple[str, ...]:
63
64
  ImportError: The marker module cannot be loaded.
64
65
  """
65
66
  constants_path = Path(__file__).resolve().parents[2] / "_shared" / "pr-loop" / "scripts" / "codex_review_scripts_constants" / "classifier_constants.py"
66
- specification = importlib.util.spec_from_file_location("account_broker_codex_classifier_constants", constants_path)
67
- if specification is None or specification.loader is None:
68
- raise ImportError(f"cannot load usage markers from {constants_path}")
69
- module = importlib.util.module_from_spec(specification)
70
- specification.loader.exec_module(module)
67
+ loader = importlib.machinery.SourceFileLoader("account_broker_codex_classifier_constants", str(constants_path))
68
+ module = types.ModuleType(loader.name)
69
+ try:
70
+ loader.exec_module(module)
71
+ except OSError as error:
72
+ raise ImportError(f"cannot load usage markers from {constants_path}") from error
71
73
  return module.ALL_USAGE_LIMIT_MARKERS
72
74
 
73
75
 
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import dataclasses
6
6
  from datetime import datetime, timedelta, timezone
7
+ from pathlib import Path
7
8
 
8
9
  import pytest
9
10
 
@@ -58,6 +59,18 @@ def test_codex_usage_limit_signatures_loads_classifier_markers() -> None:
58
59
  assert "http 429" in signatures
59
60
 
60
61
 
62
+ def test_codex_usage_limit_signatures_raises_import_error_when_markers_are_missing(
63
+ monkeypatch: pytest.MonkeyPatch, tmp_path: Path
64
+ ) -> None:
65
+ monkeypatch.setattr(broker_constants, "__file__", str(tmp_path / "scripts" / "constants" / "module.py"))
66
+
67
+ with pytest.raises(ImportError, match="cannot load usage markers from") as raised:
68
+ broker_constants.codex_usage_limit_signatures()
69
+
70
+ assert str(tmp_path) in str(raised.value)
71
+ assert isinstance(raised.value.__cause__, FileNotFoundError)
72
+
73
+
61
74
  def test_utc_time_text_converts_an_offset_timestamp() -> None:
62
75
  moment = datetime(2026, 10, 3, 7, 30, tzinfo=timezone(timedelta(hours=-4)))
63
76