You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop response ID field and restructure TestCase type (#12)
Remove ID field from responses while keeping it required in requests. Response IDs are unnecessary since test cases are executed sequentially against handlers.
Restructure TestCase to use explicit Request and Response fields instead of flat structure, making validation against future JSON schemas easier.
Copy file name to clipboardExpand all lines: docs/handler-spec.md
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,6 @@ Handlers communicate with the test runner via **stdin/stdout**:
30
30
31
31
```json
32
32
{
33
-
"id": "unique-request-id",
34
33
"result": null,
35
34
"error": {
36
35
"code": {
@@ -42,7 +41,6 @@ Handlers communicate with the test runner via **stdin/stdout**:
42
41
```
43
42
44
43
**Fields:**
45
-
-`id` (string, required): Must match the request ID
46
44
-`result` (any, optional): The return value, or `null` for void/nullptr operations. Must be `null` on error
47
45
-`error` (object, optional): Error details. Must be `null` on success. An empty object `{}` is used to indicate an error is raised without further details, it is NOT equivalent to `null`
48
46
-`code` (object, optional): Error code details
@@ -55,9 +53,8 @@ Handlers communicate with the test runner via **stdin/stdout**:
55
53
56
54
1.**Input Processing**: Read JSON requests line-by-line from stdin
57
55
2.**Response Order**: Responses must match request order (process sequentially)
58
-
3.**ID Matching**: Response `id` must exactly match the request `id`
59
-
4.**Error Handling**: Return error responses for invalid requests or failed operations
60
-
5.**Exit Behavior**: Exit cleanly when stdin closes
56
+
3.**Error Handling**: Return error responses for invalid requests or failed operations
57
+
4.**Exit Behavior**: Exit cleanly when stdin closes
61
58
62
59
## Test Suites and Expected Responses
63
60
@@ -73,14 +70,12 @@ Test cases where the script verification operation executes successfully and ret
73
70
**Expected Response Format:**
74
71
```json
75
72
{
76
-
"id": "test-id",
77
73
"result": true
78
74
}
79
75
```
80
76
or
81
77
```json
82
78
{
83
-
"id": "test-id",
84
79
"result": false
85
80
}
86
81
```
@@ -95,7 +90,6 @@ Test cases where the verification operation fails to determine validity of the s
0 commit comments