Commit f459152
fix: five defects in the declarative builder, all silent in production
Reported by a consumer converting a multi-device adapter onto the
builder, each with a runnable reproduction. All five verified against the
reproductions before and after.
#72 conditionally_settable was inert: _materialize never read it. The
property did come out not-settable, which is the half that looked
right; the entity_setter was registered only when settable was true,
so the caller's later set_settable(True) opened a /set topic with no
translator behind it. The property advertised that it accepts
commands and discarded them, which is the exact failure the field
exists to avoid, one step further along. The translator is now wired
at build time even though the property starts not-settable.
The test that shipped with the feature asserted only the
not-settable half. A test written from the design rationale checks
the rationale, not the feature.
#77 A value the model already held never reached the wire. The binding
is on-change and a fresh twin starts empty, so a producer whose
model predates the tree announced its declared default on every
property, and it did not self-heal, because set_value fires only on
an actual change. Reachable only since 0.22.0: before the reuse fix
the model property was replaced, so twin and model started equally
empty. Also: a declared initial_value now seeds rather than
overwrites, since a live model value is fresher than a declaration.
#73 remove() raised when the producer's model had already dropped the
group. delete_group removes it BEFORE firing GROUP_DELETED and
dispatch is synchronous, so a consumer driving remove() from that
event always hit it, after device.delete() and before the
bookkeeping pop: gone from the broker, still a corpse in the builder
short-circuiting the next add().
#75 remove() left deferred descendants queued, so resolve_deferred()
rebuilt a device that had been torn down.
#76 add() recorded bookkeeping after materializing, so a raise left a
live broker-visible device with no record, and the same window
admitted re-entry from a producer observing its own model.
Closes #72
Closes #73
Closes #75
Closes #76
Closes #77
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 4bb4577 commit f459152
4 files changed
Lines changed: 292 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
7 | 19 | | |
8 | 20 | | |
9 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
309 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
310 | 315 | | |
311 | 316 | | |
312 | 317 | | |
| |||
333 | 338 | | |
334 | 339 | | |
335 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
336 | 349 | | |
337 | 350 | | |
338 | 351 | | |
339 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
340 | 358 | | |
341 | 359 | | |
342 | 360 | | |
| |||
381 | 399 | | |
382 | 400 | | |
383 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
384 | 406 | | |
385 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
386 | 410 | | |
387 | 411 | | |
388 | 412 | | |
| |||
560 | 584 | | |
561 | 585 | | |
562 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
563 | 598 | | |
564 | 599 | | |
565 | 600 | | |
| |||
572 | 607 | | |
573 | 608 | | |
574 | 609 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
579 | 613 | | |
580 | 614 | | |
581 | 615 | | |
| |||
609 | 643 | | |
610 | 644 | | |
611 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
612 | 652 | | |
613 | 653 | | |
614 | | - | |
615 | | - | |
616 | | - | |
| 654 | + | |
617 | 655 | | |
618 | 656 | | |
619 | 657 | | |
620 | 658 | | |
621 | 659 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
629 | 678 | | |
630 | 679 | | |
631 | 680 | | |
| |||
724 | 773 | | |
725 | 774 | | |
726 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
727 | 786 | | |
728 | 787 | | |
729 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
0 commit comments