claude-dev-env 8.68.0 → 8.68.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "8.68.0",
3
+ "version": "8.68.1",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,6 +19,7 @@ a workflow runner.
19
19
  from __future__ import annotations
20
20
 
21
21
  import functools
22
+ import http.client
22
23
  import json
23
24
  import os
24
25
  import urllib.error
@@ -126,7 +127,12 @@ def request_json(
126
127
  try:
127
128
  with urllib.request.urlopen(request, timeout=REQUEST_TIMEOUT_SECONDS) as reply:
128
129
  return _decoded_answer(url, reply.status, reply.read())
129
- except (urllib.error.URLError, OSError, ValueError) as failure:
130
+ except (
131
+ urllib.error.URLError,
132
+ OSError,
133
+ ValueError,
134
+ http.client.HTTPException,
135
+ ) as failure:
130
136
  raise GitHubError(str(failure)) from failure
131
137
 
132
138
 
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import http.client
3
4
  import json
4
5
  import os
5
6
  import sys
@@ -379,3 +380,23 @@ def should_read_a_bot_comment_carrying_a_passed_marker_as_a_notice(
379
380
  )
380
381
 
381
382
  assert [each.is_notice for each in all_comments] == [True]
383
+
384
+
385
+ class TruncatedReply:
386
+ status = 200
387
+
388
+ def read(self) -> bytes:
389
+ raise http.client.IncompleteRead(b"{", 39041)
390
+
391
+
392
+ def should_report_a_reply_cut_short_as_a_github_error(
393
+ monkeypatch: pytest.MonkeyPatch,
394
+ ) -> None:
395
+ @contextmanager
396
+ def fake_urlopen(request: object, timeout: int = 0) -> Iterator[TruncatedReply]:
397
+ yield TruncatedReply()
398
+
399
+ monkeypatch.setattr(reader.urllib.request, "urlopen", fake_urlopen)
400
+
401
+ with pytest.raises(GitHubError, match="IncompleteRead"):
402
+ reader.read_pull_request("jl-cmd/claude-dev-env", 4347, TOKEN)