Commit eb7ba24
[SDK/Factories] Stop the factory guide inviting an invented limit (#2353)
* [SDK/Factories] Stop the factory guide inviting an invented limit
Both guide documents are served verbatim to the model by the
factories_manage "guide" operation, and read literally they tell it to pick
a resource ceiling for a factory whose cost it cannot estimate.
factories.md opened on a defineFactory sample with all four ceilings filled
in, which teaches the numbers as much as the syntax, and the Scaling section
of factory-patterns.md answered "there is no built-in concurrency cap" with
"so declare one before fanning out widely". A guessed ceiling does not make
a run safer: it stops a healthy run partway with factory_limit_reached,
after that run has already taken the user's approval and spent credits, and
the caller then raises the ceiling a step at a time.
Drop limits from the opening sample and document the declaration syntax in
the Resource limits section instead, where the rule sits next to it. State
that a ceiling comes from real knowledge of the cost or from the user, and
that omitting limits does not remove oversight, since a run still needs an
approval whose prompt shows the effective limits. Redirect the Scaling
remedy from declaring a cap to bounding the fan-out with the factory's own
counters.
The API documentation is unchanged: every limit keeps its own description,
and limits stay declarable for an author who does know the cost profile.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs(factories): fix limit fallback and approval claims in Resource limits
Address review feedback on the Resource limits section:
- "an omitted limit leaves that dimension unbounded" contradicted the
documented `maxConcurrentSubagents` -> `maxTotalSubagents` fallback in
factory-patterns.md. Note the exception so a declared total cap is not
read as leaving concurrency unbounded.
- "the run still needs an approval" is only true for the model-initiated
`run_factory` path. SDK-initiated `run` and `resume` do not request
permission (src/factory.ts:292, and the Run and resume section says the
same), so qualify the claim instead of promising SDK callers a safeguard
that does not exist.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: examon <examon@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 4472fcb commit eb7ba24
3 files changed
Lines changed: 37 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
| |||
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
124 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
406 | 434 | | |
407 | 435 | | |
408 | 436 | | |
| |||
0 commit comments