Skip to content

Commit b6c31e7

Browse files
authored
Merge pull request #16 from commandlayer/codex/fix-analyze.request.schema.json-mode-enum-ambiguity
Fix analyze mode enum ambiguity, normalize v1.1.0 invalid fixtures, and update checksum default
2 parents cf8ae91 + 296fc6b commit b6c31e7

File tree

43 files changed

+160
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+160
-135
lines changed

checksums.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ b451b0c05cb77f7ad66906f351b560400447de136c1ad2ce27c63fc3bcaf0d9a schemas/v1.0.0
2424
ccb7f20562d2e34dff73a17794aabcf98f25f659e83a790e42cf9a31e97460b3 schemas/v1.0.0/commons/summarize/receipts/summarize.receipt.schema.json
2525
be565b5a72dc03a1517a9c2ea0a0842c86def2e58e8471f81e3cac6262bffb68 schemas/v1.0.0/commons/summarize/requests/summarize.request.schema.json
2626
4760c15bc2985b35be8a333859e0b2e97617735be0d0222722b162de47caf940 schemas/v1.1.0/commons/analyze/analyze.receipt.schema.json
27-
7f3c2254410e5a552905810a5a4e564af97b82bd7122d92af7d5ca9c43438caa schemas/v1.1.0/commons/analyze/analyze.request.schema.json
27+
e8c4c23353c0df05a3b4b361b7780ef536b5609126880a91943f866184c3b58e schemas/v1.1.0/commons/analyze/analyze.request.schema.json
2828
6aeb33050633f712dfcaabc8e57ba058275e44653407bb766f0417cb5bfd8c2b schemas/v1.1.0/commons/classify/classify.receipt.schema.json
2929
476253e821ff4e7dfa441e5604c6efc29d12729bcb50e8a02db86fbd121240ab schemas/v1.1.0/commons/classify/classify.request.schema.json
3030
13a2f4d9083e1e5ed6bd6b98e05736e7791bfd62b109b4090ab4abff75572ad5 schemas/v1.1.0/commons/clean/clean.receipt.schema.json
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// INVALID analyze.receipt #1 — bad timestamp, malformed hash, short signature
1+
// INVALID analyze.receipt #1 — malformed request_hash pattern
22

33
export const analyzeReceiptInvalid1: any = {
44
"verb": "analyze",
55
"version": "1.1.0",
66
"status": "ok",
7-
"timestamp": "not-a-date",
8-
"request_hash": "sha256:xyz",
9-
"signature": "short",
10-
"error": "ok receipts should not rely on error only"
7+
"timestamp": "2026-03-18T12:05:00Z",
8+
"agent": "analyzeagent.eth",
9+
"request_hash": "sha256:1234",
10+
"summary": "Extracted the dominant control failures and rollout blockers.",
11+
"signature": "MEUCIGdY9f8wq2dL4rN6sT7uV1xY3zA5bC7dE9fG1hJ2kL3mAiEAzQ7wX9yB2cD4eF6gH8iJ0kL2mN4pQ6rS8tU0vW2xY4"
1112
};
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
// INVALID analyze.receipt #2 — error status without required error field
1+
// INVALID analyze.receipt #2 — error status requires an error message
22

33
export const analyzeReceiptInvalid2: any = {
44
"verb": "analyze",
55
"version": "1.1.0",
66
"status": "error",
77
"timestamp": "2026-03-18T12:05:00Z",
8+
"agent": "analyzeagent.eth",
89
"request_hash": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
910
"signature": "sigBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
1011
};
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// INVALID analyze.request #1 — wrong verb + wrong input type + unsupported mode
1+
// INVALID analyze.request #1 — unsupported mode enum value
22

33
export const analyzeRequestInvalid1: any = {
4-
"verb": "summarize",
4+
"verb": "analyze",
55
"version": "1.1.0",
6-
"input": {
7-
"text": "This should be a string."
8-
},
6+
"input": "Review the incident notes and group the findings by control domain.",
97
"mode": "bullet-points"
108
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// INVALID analyze.request #2 — missing required input and wrong version type
1+
// INVALID analyze.request #2 — missing required input
22

33
export const analyzeRequestInvalid2: any = {
44
"verb": "analyze",
5-
"version": 110,
5+
"version": "1.1.0",
66
"mode": "extract"
77
};

examples/v1.1.0/commons/analyze/ts/valid/analyze.request.valid.1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// VALID analyze.request #1 — aligned with schemas/v1.1.0/commons/analyze/analyze.request.schema.json
22

3-
export type AnalyzeMode = "classify" | "extract" | "score" | "synthesize";
3+
export type AnalyzeMode = "categorize" | "extract" | "score" | "synthesize";
44

55
export interface AnalyzeRequest {
66
verb: "analyze";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"verb": "classify",
3+
"version": "1.1.0",
4+
"status": "ok",
5+
"timestamp": "2026-03-18T12:14:09Z",
6+
"agent": "classifyagent.eth",
7+
"request_hash": "sha256:76c06ca1a9ca0d0aa1c7e25f548ffaf2168e95d8f289d9622b391ac5f3d5f8ec",
8+
"summary": "routing_issue"
9+
}
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
// INVALID classify.receipt #1 — bad timestamp, malformed hash, short signature
1+
// INVALID classify.receipt #1 — ok status requires a string summary
22

33
export const classifyReceiptInvalid1: any = {
44
"verb": "classify",
55
"version": "1.1.0",
66
"status": "ok",
7-
"timestamp": "not-a-date",
8-
"request_hash": "sha256:xyz",
9-
"signature": "short",
10-
"error": "ok receipts should not rely on error only"
7+
"timestamp": "2026-03-18T12:10:00Z",
8+
"agent": "classifyagent.eth",
9+
"request_hash": "sha256:3d5224e3ebc7f6ab9e9a6a2114a5f7d01c6847c8df0e3fd53c0e5d117f6ab9dd",
10+
"summary": [
11+
"billing_issue"
12+
],
13+
"signature": "MEYCIQDf3h7kL9mN2pQ4rS6tU8vW0xY2zA4bC6dE8fG0hJ1kLwIhAO5pQ7rS9tU1vW3xY5zB7cD9eF1gH3iJ5kL7mN9pQ1"
1114
};
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// INVALID classify.request #1 — wrong verb + wrong input type + unsupported mode
1+
// INVALID classify.request #1 — unsupported mode enum value
22

33
export const classifyRequestInvalid1: any = {
4-
"verb": "summarize",
4+
"verb": "classify",
55
"version": "1.1.0",
6-
"input": {
7-
"text": "This should be a string."
8-
},
6+
"input": "Route this ticket as billing, bug, or account access.",
97
"mode": "ordinal"
108
};
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// INVALID clean.receipt #1 — bad timestamp, malformed hash, short signature
1+
// INVALID clean.receipt #1 — timestamp must satisfy date-time format
22

33
export const cleanReceiptInvalid1: any = {
44
"verb": "clean",
55
"version": "1.1.0",
66
"status": "ok",
7-
"timestamp": "not-a-date",
8-
"request_hash": "sha256:xyz",
9-
"signature": "short",
10-
"error": "ok receipts should not rely on error only"
7+
"timestamp": "2026/03/18 12:20:00 UTC",
8+
"agent": "cleanagent.eth",
9+
"request_hash": "sha256:37f8c2f8ef1d3819a3d8f4a662637df84256d4d2d95f0f00fd770af409f4233f",
10+
"summary": "Removed script tags, normalized whitespace, and preserved visible text.",
11+
"signature": "MEUCIB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3eE5gH7iJ9kLAiEAqS6uV8wY0zB2dD4fF6hH8jJ0lL2nP4rT6vX8zA1cC3"
1112
};

0 commit comments

Comments
 (0)