Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,11 @@ metadata outside signed records. See [storage integration](../docs/design/storag
Taxonomy consumer fixtures live in `testdata/taxonomy/`: classification and preset expectations,
profiles, Gateway snapshots and receipts. Their handwritten malformed inputs are exercised by
both language readers. They are harness inputs and expected behavior, not serialized schema records.
`vectors/taxonomy/declarations.json` and `profiles.json` carry actual closed taxonomy records.
The `rehearsal` rows of `tools.json` hold the ADR-0027 amendment's (#241) host declarations of a
rehearse check, admitted with its hints and approval or refused for its description.
`vectors/taxonomy/declarations.json` and `profiles.json` carry actual closed taxonomy records;
`declarations.json` `refused` carries four host declarations both validators refuse, each with
its reason (a host `evaluate`, and `rehearse` under read, with read-external and with act).

The #171 dialect draft schema additionally admits `originalField`, `originalRevision`,
`conversionContract` and `retainedRead` definitions. New factory candidates retain the
Expand Down
29 changes: 28 additions & 1 deletion contract/schemas/tool-taxonomy.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"verify",
"test",
"analyze",
"advise"
"advise",
"rehearse"
]
},
"experimental": {
Expand Down Expand Up @@ -149,6 +150,32 @@
}
}
},
{
"if": {
"required": [
"operation",
"checkKind"
],
"properties": {
"operation": {
"const": "check"
},
"checkKind": {
"const": "rehearse"
}
}
},
"then": {
"properties": {
"effect": {
"enum": [
"pure",
"read"
]
}
}
}
},
{
"if": {
"properties": {
Expand Down
232 changes: 231 additions & 1 deletion contract/testdata/taxonomy/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,26 @@
"review": true,
"work": true
},
{
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
},
"approval": "none",
"review": true,
"work": true
},
{
"taxonomy": {
"operation": "check",
"effect": "pure",
"checkKind": "rehearse"
},
"approval": "none",
"review": true,
"work": true
},
{
"taxonomy": {
"operation": "transform",
Expand Down Expand Up @@ -452,5 +472,215 @@
},
"allowed": true
}
]
],
"rehearsal": {
"admitted": [
{
"declaration": {
"name": "graph_rehearse",
"description": "Rehearsal, non-binding: evaluate every node of one declared saved graph with the given inputs. Nothing is recorded and the result grants no authority.",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"approval": "none",
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"review": true,
"work": true
},
{
"declaration": {
"name": "graph_rehearse",
"description": "Rehearsal, non-binding",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"approval": "none",
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"review": true,
"work": true
}
],
"refused": [
{
"declaration": {
"name": "graph_rehearse",
"description": "Evaluate every node of one declared saved graph with the given inputs.",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"problem": "a rehearse check's description must begin \"Rehearsal, non-binding\""
},
{
"declaration": {
"name": "graph_rehearse",
"description": "Evaluate one declared saved graph with the given inputs. Rehearsal, non-binding.",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"problem": "a rehearse check's description must begin \"Rehearsal, non-binding\""
},
{
"declaration": {
"name": "graph_rehearse",
"description": "rehearsal, non-binding: evaluate every node of one declared saved graph with the given inputs.",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"problem": "a rehearse check's description must begin \"Rehearsal, non-binding\""
},
{
"declaration": {
"name": "graph_rehearse",
"description": "Rehearsal, non-bindingly binding: evaluate every node of one declared saved graph with the given inputs.",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"problem": "a rehearse check's description must begin \"Rehearsal, non-binding\""
},
{
"declaration": {
"name": "graph_rehearse",
"inputSchema": {
"type": "object",
"properties": {
"graph": {
"type": "string"
},
"inputs": {
"type": "object"
}
},
"required": [
"graph",
"inputs"
]
},
"taxonomy": {
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
}
},
"problem": "a rehearse check's description must begin \"Rehearsal, non-binding\""
}
]
}
}
45 changes: 44 additions & 1 deletion contract/vectors/taxonomy/declarations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Handwritten owner taxonomy schema records; behavior and malformed inputs are in contract/testdata/taxonomy.",
"description": "Handwritten owner taxonomy schema records; behavior and malformed inputs are in contract/testdata/taxonomy. The two rehearse records are the ADR-0027 amendment's (#241): a non-binding rehearsal declares check with effect read or pure. refused are host declarations both validators refuse, each with the reason they state (problem): evaluate with read, which only the gated Runtime path may declare (the schema admits it as a record; the owner decides), rehearse under read, rehearse with read-external and rehearse with act; the last three fail the schema too. Written by hand; toolTaxonomy.test.ts and go/context/tooltaxonomy_test.go hold both validators to each.",
"schema": "tool-taxonomy.json",
"source": {
"harness": {
Expand Down Expand Up @@ -53,6 +53,16 @@
"effect": "pure",
"checkKind": "advise"
},
{
"operation": "check",
"effect": "read",
"checkKind": "rehearse"
},
{
"operation": "check",
"effect": "pure",
"checkKind": "rehearse"
},
{
"operation": "transform",
"effect": "pure"
Expand Down Expand Up @@ -83,5 +93,38 @@
"operation": "ask",
"effect": "pure"
}
],
"refused": [
{
"taxonomy": {
"operation": "evaluate",
"effect": "read"
},
"problem": "only the gated runtime may declare evaluate"
},
{
"taxonomy": {
"operation": "read",
"effect": "read",
"checkKind": "rehearse"
},
"problem": "tool taxonomy checkKind contradicts its operation"
},
{
"taxonomy": {
"operation": "check",
"effect": "read-external",
"checkKind": "rehearse"
},
"problem": "tool taxonomy rehearse admits only a pure or read effect"
},
{
"taxonomy": {
"operation": "check",
"effect": "act",
"checkKind": "rehearse"
},
"problem": "tool taxonomy rehearse admits only a pure or read effect"
}
]
}
Loading
Loading