Commit 328da19
committed
Addresses the first four recommendations in
`reports/model-bindings-quality-evaluation-report.md`. Each item is
struck through in the report with a `**Resolved**` note.
Empty-steps decode failures surface under `ModelValidationError` rather
than v0's `DecodeValidationError`. The v1 binding splits decode-stage
(schema-level) failures from model-stage (structural-invariant)
failures, with the empty-steps check living in the model validator —
this is a deliberate v0 divergence, not a bug.
* spec's 'Exceptions' section updated: corrected empty-steps example,
divergence note explaining the split and recommended catch-tuple
* strengthened the existing regression test in test_parse.py to assert
the full message body per the AGENTS.md test quality standard
The Python str-Enum shim for `TemplateSpecificationVersion` was
already removed in a prior change; the Rust pyclass at
`openjd._openjd_rs.TemplateSpecificationVersion` is the single
canonical class, re-exported identity-preserving from
`openjd.model._v1`. The regression test had become passing (no
`xfail` marker) but was still parked in `test_known_gaps.py`.
* test moved to test_version_enums.py::TestTemplateSpecificationVersion
::test_template_specification_version_returned_from_decode with
strengthened identity / value / string-equality assertions
* spec's 'Pickle Support' section: stale 'str-Enum shim' paragraph
corrected — pickle goes directly through the module-level
`_reconstruct_enum` helper; pickle table now lists both
spec-revision enums explicitly
The upstream `MergedParameterDefinition::default` is `Option<String>` —
every variant is stringified through `default_value()`. The binding
contract per the spec is that callers receive the default in its
native Python type (`int` for INT, `float` for FLOAT, `list[T]` for
LIST[T], etc.).
* new `default_to_native` helper in create_job_fns.rs dispatches on
`JobParameterType` and parses the stringified default back via
`str::parse` / `serde_json::from_str`; parsing failures fall back
to the raw string as a defensive guard
* pre-existing parametrized expectations in
test_merge_job_parameters.py::TestMergeTemplates_v2023_09 updated
to native form (`'default': 8` vs `'default': '8'`)
* two int/float xfail tests moved out of test_known_gaps.py and
expanded into a full TestMergeDefaultNativeTypes class covering
all 10 type variants with type-identity assertions
The upstream `MergedParameterDefinition` struct does not surface a
description field — only `name` / `param_type` / `default` /
`object_type` / `data_flow` / `source` / merged constraints. v0
carried it on the typed pyclass merged result, so v1 was losing
per-parameter human-readable text that downstream tooling
(deadline-cli's parameter-prompt UI) relies on for parameter labels.
* py_merge_job_parameter_definitions now walks env templates in order
then the job template, building a name→description `HashMap`. Later
descriptions overwrite earlier ones, matching how the upstream merge
tracks `default`
* the merged dict carries the `description` key only when at least
one contributing template provided one (consistent with how
`default` / `objectType` / `dataFlow` are conditionally emitted)
* spec's 'Return shape' key list now lists `description` with its
last-wins ordering semantics
* xfail test moved out of test_known_gaps.py and expanded into a
5-case TestMergeDescriptionPropagation class
* python -m pytest test/openjd/model_v0 test/openjd/model_v1 → 3269
passed (+5 from the new tests), 0 xfails
* python -m pytest test/ → 5131 passed, 24 skipped, 3 unrelated
`expr` xfails
* cargo clippy --manifest-path rust-bindings/Cargo.toml --all-targets
-- -D warnings → clean
* No public binding signatures changed; _openjd_rs.pyi unchanged
Signed-off-by: Mark <399551+mwiebe@users.noreply.github.com>
1 parent 455c5af commit 328da19
7 files changed
Lines changed: 511 additions & 169 deletions
File tree
- reports
- rust-bindings/src/model
- specs
- test/openjd/model_v1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
461 | | - | |
462 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
463 | 475 | | |
464 | 476 | | |
465 | 477 | | |
| |||
472 | 484 | | |
473 | 485 | | |
474 | 486 | | |
475 | | - | |
476 | | - | |
477 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
478 | 507 | | |
479 | 508 | | |
480 | 509 | | |
| |||
484 | 513 | | |
485 | 514 | | |
486 | 515 | | |
487 | | - | |
488 | | - | |
489 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
490 | 540 | | |
491 | 541 | | |
492 | 542 | | |
| |||
495 | 545 | | |
496 | 546 | | |
497 | 547 | | |
498 | | - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
499 | 568 | | |
500 | 569 | | |
501 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
191 | 216 | | |
192 | 217 | | |
193 | 218 | | |
194 | 219 | | |
195 | 220 | | |
196 | 221 | | |
197 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
198 | 227 | | |
199 | 228 | | |
200 | 229 | | |
| |||
208 | 237 | | |
209 | 238 | | |
210 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
211 | 315 | | |
212 | 316 | | |
213 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
327 | 334 | | |
328 | 335 | | |
329 | 336 | | |
| |||
342 | 349 | | |
343 | 350 | | |
344 | 351 | | |
345 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
346 | 355 | | |
347 | 356 | | |
348 | 357 | | |
| |||
1386 | 1395 | | |
1387 | 1396 | | |
1388 | 1397 | | |
1389 | | - | |
| 1398 | + | |
1390 | 1399 | | |
1391 | | - | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1392 | 1404 | | |
1393 | 1405 | | |
1394 | 1406 | | |
1395 | 1407 | | |
1396 | 1408 | | |
1397 | | - | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1398 | 1415 | | |
1399 | 1416 | | |
1400 | 1417 | | |
1401 | 1418 | | |
1402 | 1419 | | |
1403 | 1420 | | |
1404 | | - | |
1405 | | - | |
| 1421 | + | |
| 1422 | + | |
1406 | 1423 | | |
1407 | 1424 | | |
1408 | 1425 | | |
| |||
1412 | 1429 | | |
1413 | 1430 | | |
1414 | 1431 | | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
1415 | 1454 | | |
1416 | 1455 | | |
1417 | 1456 | | |
| |||
1472 | 1511 | | |
1473 | 1512 | | |
1474 | 1513 | | |
| 1514 | + | |
| 1515 | + | |
1475 | 1516 | | |
1476 | 1517 | | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1481 | 1523 | | |
1482 | 1524 | | |
1483 | 1525 | | |
| |||
0 commit comments