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
1,282 changes: 1,282 additions & 0 deletions cmd/codeaf/appworkstreams_conformance_test.go

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions cmd/codeaf/testdata/workstreams-wire/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# workstreams-wire

The examples the desk's contract carries; regenerate when the contract changes:

python3 -I extract.py <the contract's markdown> .

`contract.json` holds the method index, the event, the error codes, the enums and every
field table (type, required). Each other file holds one method's or event's examples.
`appworkstreams_conformance_test.go` sends the examples through the wire handler and
compares each answer's shape with them. Values may differ; shapes may not.
42 changes: 42 additions & 0 deletions cmd/codeaf/testdata/workstreams-wire/collections.add.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"method": "collections.add",
"examples": {
"params": [
{
"id": "ws_8f2c1a",
"refs": [
{
"kind": "factory_job",
"id": "1107",
"factory": "f_local"
}
]
}
],
"result": [
{
"added": [
{
"kind": "factory_job",
"id": "1107",
"factory": "f_local",
"added_at": "2026-11-02T14:05:00Z"
}
],
"already": []
}
],
"error": [
{
"code": "in_other_workstream",
"message": "that job belongs to another workstream",
"detail": {
"factory": "f_local",
"job": 1107,
"workstream_id": "ws_92b7",
"workstream_name": "Account migration"
}
}
]
}
}
Loading
Loading