Skip to content

Commit 921b43c

Browse files
committed
fix: deliver the diagnostics this branch added, and say it readably
The bulk document sweep reports which of the ids it was given matched nothing, but only the v2 contract declared the field. The internal contract is a plain object, so its response validator dropped it — the surface that already logged the misses server-side still told its callers nothing. It is declared now, and required, because both selections always return one. Its count keeps its internal name. The v2 wire renamed it, and the internal contract passes the use case through verbatim, so the two never agreed and the internal name still matches its source; six call sites read it. The name guard added here refused control characters but not the two Unicode line separators, which the storage key strips the same way and a terminal renders as a break — the same divergence between stored and shown that the guard exists to stop. It now refuses the set the config writer already refuses for its own reasons, and the message no longer calls a separator a control character. A sweep selected by --select-all sends no ids, so measuring the request by its id count read a whole-knowledge-base no-op as nothing having been asked. Every sibling either requires ids or measures the miss from the response, so this was the only one. The archived half of four scope descriptions dropped its relative pronoun and read as nonsense once a second clause was added. Rewritten as one passive clause across all four, with a restore named only where one exists, and pinned so a reword of any single one cannot bring the others back.
1 parent 6972149 commit 921b43c

21 files changed

Lines changed: 204 additions & 48 deletions

apps/docs/content/docs/en/cli/files.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Also available as `sim files folders ls`.
107107
| `--search <value>` | No | Case-insensitive substring match against the folder name. |
108108
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
109109
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
110-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
110+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders soft-deleted by a recursive delete, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
111111

112112
</CommandTable>
113113

@@ -194,7 +194,7 @@ sim files describe <fileId> [options]
194194

195195
| Option | Required | Description |
196196
| --- | --- | --- |
197-
| `--scope <value>` | No | Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file a delete soft-deleted; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both. Accepted values: `active`, `archived`. |
197+
| `--scope <value>` | No | Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file soft-deleted by a delete; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both. Accepted values: `active`, `archived`. |
198198

199199
</CommandTable>
200200

@@ -260,7 +260,7 @@ sim files list [options]
260260
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
261261
| `--recursive` | No | Whether the folder filter includes files in subfolders. Defaults to true when a search is set, false otherwise, so listing a folder shows that folder while searching one looks through everything in it. Ignored when no folder filter is set, which already spans the workspace. |
262262
| `--no-recursive` | No | Send --recursive as false. |
263-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
263+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live files, `archived` for files soft-deleted by a delete, which a restore can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
264264
| `--search <value>` | No | Case-insensitive substring match against the file name. |
265265
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
266266
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |

apps/docs/content/docs/en/cli/knowledge.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ sim knowledge list [options]
10011001

10021002
| Option | Required | Description |
10031003
| --- | --- | --- |
1004-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases a delete archived and the restore operation can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
1004+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
10051005
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
10061006
| `--search <value>` | No | Case-insensitive substring match against the resource name. |
10071007
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |

apps/docs/content/docs/en/cli/reference.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ Also available as `sim files folders ls`.
787787
| `--search <value>` | No | Case-insensitive substring match against the folder name. |
788788
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
789789
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
790-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
790+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders soft-deleted by a recursive delete, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
791791

792792
</CommandTable>
793793

@@ -882,7 +882,7 @@ sim files describe <fileId> [options]
882882

883883
| Option | Required | Description |
884884
| --- | --- | --- |
885-
| `--scope <value>` | No | Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file a delete soft-deleted; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both. Accepted values: `active`, `archived`. |
885+
| `--scope <value>` | No | Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file soft-deleted by a delete; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both. Accepted values: `active`, `archived`. |
886886

887887
</CommandTable>
888888

@@ -952,7 +952,7 @@ sim files list [options]
952952
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
953953
| `--recursive` | No | Whether the folder filter includes files in subfolders. Defaults to true when a search is set, false otherwise, so listing a folder shows that folder while searching one looks through everything in it. Ignored when no folder filter is set, which already spans the workspace. |
954954
| `--no-recursive` | No | Send --recursive as false. |
955-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
955+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live files, `archived` for files soft-deleted by a delete, which a restore can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
956956
| `--search <value>` | No | Case-insensitive substring match against the file name. |
957957
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
958958
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
@@ -2239,7 +2239,7 @@ sim knowledge list [options]
22392239

22402240
| Option | Required | Description |
22412241
| --- | --- | --- |
2242-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases a delete archived and the restore operation can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
2242+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
22432243
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
22442244
| `--search <value>` | No | Case-insensitive substring match against the resource name. |
22452245
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
@@ -4155,7 +4155,7 @@ sim tables list [options]
41554155

41564156
| Option | Required | Description |
41574157
| --- | --- | --- |
4158-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live tables, `archived` for tables a delete archived and a table restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
4158+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live tables, `archived` for tables archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
41594159
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
41604160
| `--search <value>` | No | Case-insensitive substring match against the resource name. |
41614161
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
@@ -5420,7 +5420,7 @@ sim workflows list [options]
54205420

54215421
| Option | Required | Description |
54225422
| --- | --- | --- |
5423-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows a `DELETE` archived. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
5423+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
54245424
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
54255425
| `--deployed-only` | No | Return only workflows with an active deployment when true. |
54265426
| `--no-deployed-only` | No | Send --deployed-only as false. |

apps/docs/content/docs/en/cli/tables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ sim tables list [options]
10871087

10881088
| Option | Required | Description |
10891089
| --- | --- | --- |
1090-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live tables, `archived` for tables a delete archived and a table restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
1090+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live tables, `archived` for tables archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
10911091
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
10921092
| `--search <value>` | No | Case-insensitive substring match against the resource name. |
10931093
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |

apps/docs/content/docs/en/cli/workflows.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ sim workflows list [options]
777777

778778
| Option | Required | Description |
779779
| --- | --- | --- |
780-
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows a `DELETE` archived. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
780+
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
781781
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
782782
| `--deployed-only` | No | Return only workflows with an active deployment when true. |
783783
| `--no-deployed-only` | No | Send --deployed-only as false. |

apps/docs/openapi-v2-files-audit.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@
9393
"name": "scope",
9494
"in": "query",
9595
"required": false,
96-
"description": "Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.",
96+
"description": "Which lifecycle set to list: `active` (default) for live files, `archived` for files soft-deleted by a delete, which a restore can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.",
9797
"schema": {
9898
"default": "active",
99-
"description": "Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.",
99+
"description": "Which lifecycle set to list: `active` (default) for live files, `archived` for files soft-deleted by a delete, which a restore can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too.",
100100
"type": "string",
101101
"enum": ["active", "archived"]
102102
}
@@ -1384,10 +1384,10 @@
13841384
"name": "scope",
13851385
"in": "query",
13861386
"required": false,
1387-
"description": "Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file a delete soft-deleted; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both.",
1387+
"description": "Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file soft-deleted by a delete; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both.",
13881388
"schema": {
13891389
"default": "active",
1390-
"description": "Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file a delete soft-deleted; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both.",
1390+
"description": "Which lifecycle set to read from: `active` (default) resolves live files only and returns `404` for a file soft-deleted by a delete; `archived` also resolves soft-deleted files, so metadata stays readable before the file is restored. Authorization is identical for both.",
13911391
"type": "string",
13921392
"enum": ["active", "archived"]
13931393
}
@@ -2144,10 +2144,10 @@
21442144
"name": "scope",
21452145
"in": "query",
21462146
"required": false,
2147-
"description": "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.",
2147+
"description": "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders soft-deleted by a recursive delete, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.",
21482148
"schema": {
21492149
"default": "active",
2150-
"description": "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.",
2150+
"description": "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders soft-deleted by a recursive delete, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.",
21512151
"type": "string",
21522152
"enum": ["active", "archived"]
21532153
}

apps/docs/openapi-v2-knowledge.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
"name": "scope",
5656
"in": "query",
5757
"required": false,
58-
"description": "Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases a delete archived and the restore operation can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too.",
58+
"description": "Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too.",
5959
"schema": {
6060
"default": "active",
61-
"description": "Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases a delete archived and the restore operation can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too.",
61+
"description": "Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases archived by a delete, which a restore can bring back. The folder filter resolves against active folders only, so pairing it with `archived` returns an empty page when the containing folder was archived too.",
6262
"type": "string",
6363
"enum": ["active", "archived"]
6464
}

0 commit comments

Comments
 (0)