Commit 03f402e
authored
feat(server): Align condition and template depth limits (#166)
## Summary
- increase the shared condition nesting depth limit from 6 to 12
- make `MAX_TEMPLATE_DEFINITION_DEPTH` derive from `MAX_CONDITION_DEPTH`
so both limits stay aligned
- expand the condition-depth model test to verify depth 12 succeeds and
depth 13 still fails
## Why
The condition-tree limit had been raised independently, but the template
definition depth used a separate constant value. Referencing the shared
constant removes drift and keeps template-backed controls aligned with
the same supported nesting depth.
## Impact
Template-backed and non-template control validation now share one source
of truth for depth limits. Future changes to the condition limit will
automatically apply to template definition depth as well.
## Validation
- `make test TEST= models/tests/test_controls.py` (this invoked the
repo's full default `make test` chain and passed across models,
telemetry, server, engine, Python SDK, and builtin evaluators)
- `make models-test`1 parent d7f309a commit 03f402e
File tree
2 files changed
+19
-6
lines changed- models
- src/agent_control_models
- tests
2 files changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | | - | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
524 | 525 | | |
525 | 526 | | |
526 | 527 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | 528 | | |
531 | 529 | | |
532 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
167 | 182 | | |
168 | | - | |
| 183 | + | |
169 | 184 | | |
170 | 185 | | |
171 | 186 | | |
172 | 187 | | |
173 | | - | |
| 188 | + | |
174 | 189 | | |
175 | 190 | | |
176 | 191 | | |
| |||
0 commit comments