test(tools): pin the argument-annotation nesting cap, the worst of the three sites
The 182 the cap is chosen against had no direct case: the existing tests cover the root chain and the TypedDict field, both of which start one bracket lower. An array-rooted parameters schema reaches it from a plain ToolSdkSchema literal, no raw register() needed. Exactly 180 arrays over a const scalar is the worst case itself -- the root frame starts at listDepth 0, so every list[ still emits and the innermost Literal[ is reached rather than degraded; one deeper is where the item degrades. Name the subscript tool-name comment in pyScalar's docstring: it quotes through the same JSON.stringify call and inherits the same escapes and the same pass-throughs.
This commit is contained in:
@@ -277,7 +277,9 @@ function childClassName(base: string, segment: string): string {
|
||||
* escape denoting the same character, so the emitted `Literal[...]` both
|
||||
* parses and decodes back to the value the schema declared. DEL and the C1
|
||||
* controls do reach it raw — legal but invisible, byte-for-byte as in the TS
|
||||
* flavor; escaping them is a both-flavors change.
|
||||
* flavor; escaping them is a both-flavors change. The subscript tool-name
|
||||
* comment quotes its name through the same call and inherits both halves,
|
||||
* escapes and pass-throughs alike.
|
||||
*/
|
||||
function pyScalar(value: JsonSchemaScalar): string {
|
||||
if (value === true) return 'True'
|
||||
|
||||
Reference in New Issue
Block a user