@plumbus/ai-decision-laya 0.3.0-beta.0 → 0.3.0-beta.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/CHANGELOG.md +12 -1
- package/README.md +163 -21
- package/dist/.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/service/test_audit_round_two.py +8 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumbus/ai-decision-laya",
|
|
3
|
-
"version": "0.3.0-beta.
|
|
3
|
+
"version": "0.3.0-beta.1",
|
|
4
4
|
"description": "Self-hosted Laya typed decision adapter and Python reference service for Plumbus.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@types/node": "^25.4.0",
|
|
44
44
|
"typescript": "^5.7.0",
|
|
45
45
|
"vitest": "^3.2.4",
|
|
46
|
-
"@plumbus/core": "0.8.0-beta.
|
|
46
|
+
"@plumbus/core": "0.8.0-beta.10"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@plumbus/ai-decision": "~0.3.0-beta.
|
|
49
|
+
"@plumbus/ai-decision": "~0.3.0-beta.1"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsc -b",
|
|
@@ -43,14 +43,6 @@ class ServiceRoundTwo(unittest.TestCase):
|
|
|
43
43
|
finally:
|
|
44
44
|
conn.close()
|
|
45
45
|
|
|
46
|
-
def refused(self, address):
|
|
47
|
-
# Over capacity the server answers at accept without reading a request, so a client
|
|
48
|
-
# still sending one can be reset before it reads the 503. Connect and only read.
|
|
49
|
-
with socket.create_connection(address, timeout=2) as sock:
|
|
50
|
-
response = http.client.HTTPResponse(sock)
|
|
51
|
-
response.begin()
|
|
52
|
-
return response.status, json.loads(response.read())
|
|
53
|
-
|
|
54
46
|
def test_L23_missing_length_cannot_start_inference(self):
|
|
55
47
|
self.assertEqual(self.send(length=None)[0], 400)
|
|
56
48
|
self.assertEqual(self.backend.calls, [])
|
|
@@ -116,7 +108,14 @@ class ServiceRoundTwo(unittest.TestCase):
|
|
|
116
108
|
first.start()
|
|
117
109
|
try:
|
|
118
110
|
self.assertTrue(entered.wait(1))
|
|
119
|
-
|
|
111
|
+
# Capacity is rejected before request bytes are read. Sending a body
|
|
112
|
+
# here races the server closing the rejected connection.
|
|
113
|
+
with socket.create_connection(server.server_address, timeout=2) as rejected:
|
|
114
|
+
response = http.client.HTTPResponse(rejected)
|
|
115
|
+
response.begin()
|
|
116
|
+
self.assertEqual(response.status, 503)
|
|
117
|
+
self.assertEqual(response.getheader("Retry-After"), "1")
|
|
118
|
+
self.assertEqual(json.loads(response.read()), {"error": "Service connection capacity reached"})
|
|
120
119
|
finish.set()
|
|
121
120
|
first.join(2)
|
|
122
121
|
self.assertEqual(results, [200])
|