claude-dev-env 8.53.0 → 8.53.1

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.
@@ -43,8 +43,7 @@ room.
43
43
 
44
44
  | Account | Has room while |
45
45
  |---|---|
46
- | main | under 90% of its week and under 50% of its 5-hour window |
47
- | second and each extra profile | under 95% of its week and under 90% of its 5-hour window |
46
+ | every account | under 99% of its week and under 95% of its 5-hour window |
48
47
 
49
48
  When no account has room, the job waits until the next account reset, or for one
50
49
  hour when no reset is known. An unreadable meter never picks its account, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "8.53.0",
3
+ "version": "8.53.1",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -130,16 +130,16 @@ WINDOWS_OS_NAME: str = "nt"
130
130
  TEXT_ENCODING: str = "utf-8"
131
131
  """Encoding for the launcher file and the JSON reports."""
132
132
 
133
- MAIN_WEEKLY_USED_CEILING_PERCENT: float = 90.0
133
+ MAIN_WEEKLY_USED_CEILING_PERCENT: float = 99.0
134
134
  """Main takes jobs only while its weekly use is under this percent."""
135
135
 
136
- MAIN_SESSION_USED_CEILING_PERCENT: float = 50.0
136
+ MAIN_SESSION_USED_CEILING_PERCENT: float = 95.0
137
137
  """Main takes jobs only while its 5-hour use is under this percent."""
138
138
 
139
- SECOND_WEEKLY_USED_CEILING_PERCENT: float = 95.0
139
+ SECOND_WEEKLY_USED_CEILING_PERCENT: float = 99.0
140
140
  """The second account takes jobs while its weekly use is under this percent."""
141
141
 
142
- SECOND_SESSION_USED_CEILING_PERCENT: float = 90.0
142
+ SECOND_SESSION_USED_CEILING_PERCENT: float = 95.0
143
143
  """The second account takes jobs while its 5-hour use is under this percent."""
144
144
 
145
145
  FULL_PERCENT: float = 100.0
@@ -1,4 +1,4 @@
1
- """The second-account thresholds keep the main account the protected one."""
1
+ """The picker report and meter keys stay distinct."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -11,18 +11,9 @@ from dev_env_scripts_constants.claude_account_constants import (
11
11
  JSON_SESSION_USED_PERCENT_KEY,
12
12
  JSON_WEEKLY_RESETS_AT_KEY,
13
13
  JSON_WEEKLY_USED_PERCENT_KEY,
14
- MAIN_SESSION_USED_CEILING_PERCENT,
15
- MAIN_WEEKLY_USED_CEILING_PERCENT,
16
- SECOND_SESSION_USED_CEILING_PERCENT,
17
- SECOND_WEEKLY_USED_CEILING_PERCENT,
18
14
  )
19
15
 
20
16
 
21
- def test_main_ceilings_sit_below_the_second_account_ceilings() -> None:
22
- assert MAIN_WEEKLY_USED_CEILING_PERCENT < SECOND_WEEKLY_USED_CEILING_PERCENT
23
- assert MAIN_SESSION_USED_CEILING_PERCENT < SECOND_SESSION_USED_CEILING_PERCENT
24
-
25
-
26
17
  def test_picker_report_keys_never_collide() -> None:
27
18
  all_report_keys = [
28
19
  JSON_ACCOUNT_KEY,
@@ -112,8 +112,8 @@ def test_should_keep_list_order_when_tighter_windows_tie() -> None:
112
112
  @pytest.mark.parametrize(
113
113
  ("weekly_reset", "weekly_left", "short_left"),
114
114
  (
115
- (NOW + timedelta(hours=4), 10, 80),
116
- (NOW + timedelta(hours=4), 20, 50),
115
+ (NOW + timedelta(hours=4), 1, 80),
116
+ (NOW + timedelta(hours=4), 20, 5),
117
117
  ),
118
118
  )
119
119
  def test_should_guard_main_at_each_limit(
@@ -158,7 +158,7 @@ def test_should_pick_an_extra_with_more_room_than_main() -> None:
158
158
  assert decision.account == extra.account
159
159
 
160
160
 
161
- @pytest.mark.parametrize(("main_short_left", "expected_name"), ((51, "main"), (50, "extra")))
161
+ @pytest.mark.parametrize(("main_short_left", "expected_name"), ((6, "main"), (5, "extra")))
162
162
  def test_should_pick_main_only_while_under_its_5_hour_ceiling(
163
163
  main_short_left: float, expected_name: str
164
164
  ) -> None:
@@ -166,7 +166,7 @@ def test_should_pick_main_only_while_under_its_5_hour_ceiling(
166
166
  _account("main", Product.CLAUDE, main=True),
167
167
  _meters(main_short_left, 95, weekly_reset=NOW + timedelta(days=5)),
168
168
  )
169
- extra = Reading(_account("extra", Product.CLAUDE), _meters(20, 20))
169
+ extra = Reading(_account("extra", Product.CLAUDE), _meters(20, 2))
170
170
 
171
171
  decision = choose_from_readings(Product.CLAUDE, (main, extra), now=NOW)
172
172
 
@@ -190,7 +190,7 @@ def test_should_wait_for_main_5_hour_reset_while_its_week_resets_days_away() ->
190
190
  short_reset = NOW + timedelta(hours=2)
191
191
  main = Reading(
192
192
  _account("main", Product.CLAUDE, main=True),
193
- _meters(40, 50, short_reset=short_reset, weekly_reset=NOW + timedelta(days=3)),
193
+ _meters(5, 50, short_reset=short_reset, weekly_reset=NOW + timedelta(days=3)),
194
194
  )
195
195
 
196
196
  decision = choose_from_readings(Product.CLAUDE, (main,), now=NOW)
@@ -202,8 +202,8 @@ def test_should_wait_for_main_5_hour_reset_while_its_week_resets_days_away() ->
202
202
  @pytest.mark.parametrize(
203
203
  ("short_left", "weekly_left", "weekly_reset", "expected_reset"),
204
204
  (
205
- (40, 20, NOW + timedelta(hours=4), NOW + timedelta(hours=2)),
206
- (80, 5, NOW + timedelta(hours=4), NOW + timedelta(hours=4)),
205
+ (5, 20, NOW + timedelta(hours=4), NOW + timedelta(hours=2)),
206
+ (80, 1, NOW + timedelta(hours=4), NOW + timedelta(hours=4)),
207
207
  ),
208
208
  )
209
209
  def test_should_wait_for_the_meter_or_window_that_blocks_main(
@@ -292,7 +292,7 @@ def test_should_wait_until_both_blocking_windows_reset() -> None:
292
292
 
293
293
  def test_should_use_claude_extra_floors_and_wait_for_unread() -> None:
294
294
  blocked = Reading(
295
- _account("blocked", Product.CLAUDE), _meters(10, 5)
295
+ _account("blocked", Product.CLAUDE), _meters(5, 1)
296
296
  )
297
297
  unread = Reading(_account("unread", Product.CLAUDE), None)
298
298
 
@@ -462,14 +462,14 @@ _EV_CLAUDE = _account("ev", Product.CLAUDE)
462
462
  id="every-meter-unreadable",
463
463
  ),
464
464
  pytest.param(
465
- (Reading(_MAIN_CLAUDE, _meters(40, 50, short_reset=NOW + timedelta(minutes=30))), Reading(_EV_CLAUDE, None)),
465
+ (Reading(_MAIN_CLAUDE, _meters(5, 50, short_reset=NOW + timedelta(minutes=30))), Reading(_EV_CLAUDE, None)),
466
466
  {},
467
467
  "no readable account has room; meter unreadable for ev; next reset at 2026-10-03T00:30:00+00:00",
468
468
  NOW + timedelta(minutes=30),
469
469
  id="unreadable-beside-a-reset-before-the-check",
470
470
  ),
471
471
  pytest.param(
472
- (Reading(_MAIN_CLAUDE, _meters(40, 50, short_reset=NOW + timedelta(hours=2))), Reading(_EV_CLAUDE, None)),
472
+ (Reading(_MAIN_CLAUDE, _meters(5, 50, short_reset=NOW + timedelta(hours=2))), Reading(_EV_CLAUDE, None)),
473
473
  {},
474
474
  "no readable account has room; meter unreadable for ev; next check at 2026-10-03T01:00:00+00:00",
475
475
  NOW + timedelta(hours=1),
@@ -484,7 +484,7 @@ _EV_CLAUDE = _account("ev", Product.CLAUDE)
484
484
  ),
485
485
  pytest.param(
486
486
  (
487
- Reading(_MAIN_CLAUDE, _meters(40, 50, short_reset=NOW + timedelta(hours=2))),
487
+ Reading(_MAIN_CLAUDE, _meters(5, 50, short_reset=NOW + timedelta(hours=2))),
488
488
  Reading(_EV_CLAUDE, _meters(5, 80, short_reset=NOW + timedelta(hours=3))),
489
489
  ),
490
490
  {},
@@ -493,7 +493,7 @@ _EV_CLAUDE = _account("ev", Product.CLAUDE)
493
493
  id="every-meter-read-with-known-resets",
494
494
  ),
495
495
  pytest.param(
496
- (Reading(_MAIN_CLAUDE, Meters(40, None, 50, None)),),
496
+ (Reading(_MAIN_CLAUDE, Meters(5, None, 50, None)),),
497
497
  {},
498
498
  "no account has room; next check at 2026-10-03T01:00:00+00:00",
499
499
  NOW + timedelta(hours=1),