Commit b9b3d80
committed
feat: use Rust engine trace instead of Python-side tracking
Replace the handcrafted Python input_sources / _build_input_path trace
with the Rust engine's built-in execution trace. The engine already
records every step (variable resolution, operations, requirement checks,
definition lookups) via its TraceBuilder — we just weren't using it.
Changes:
- Add evaluate_with_trace() PyO3 binding to regelrecht engine that
calls evaluate_law_with_trace() and returns the trace as JSON string
- RegelrechtServices.evaluate() now calls evaluate_with_trace() and
logs the full trace tree via IndentLogger for the demo UI
- Remove _build_input_path() and input_sources tracking (was duplicate
of what the engine already does)
- Web adapter converts the Rust trace tree to PathNode objects for
extract_value_tree / render_path templates
- Cross-law pre-resolution traces now show recursive sub-evaluations
with full detail (operations, comparisons, definitions)
The trace now shows the same depth as the old Python engine: every
GREATER_OR_EQUAL, SUBTRACT_DATE, IF/THEN/ELSE, AND/OR, definition
lookup, and data source resolution.
Also: fix case-insensitive BSN lookup in cross-law parameter references
(web UI passes BSN uppercase, YAML uses $bsn lowercase).
340/340 BDD scenarios pass (1m55s, down from 2m34s).1 parent 184733c commit b9b3d80
2 files changed
Lines changed: 81 additions & 117 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | 783 | | |
787 | 784 | | |
788 | 785 | | |
| |||
791 | 788 | | |
792 | 789 | | |
793 | 790 | | |
794 | | - | |
795 | 791 | | |
796 | 792 | | |
797 | 793 | | |
| |||
817 | 813 | | |
818 | 814 | | |
819 | 815 | | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | 816 | | |
827 | 817 | | |
828 | | - | |
829 | 818 | | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | 819 | | |
834 | 820 | | |
835 | 821 | | |
836 | | - | |
837 | 822 | | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | 823 | | |
847 | 824 | | |
848 | 825 | | |
| |||
853 | 830 | | |
854 | 831 | | |
855 | 832 | | |
856 | | - | |
| 833 | + | |
857 | 834 | | |
858 | 835 | | |
859 | 836 | | |
860 | 837 | | |
861 | 838 | | |
862 | 839 | | |
863 | | - | |
| 840 | + | |
| 841 | + | |
864 | 842 | | |
865 | | - | |
866 | | - | |
| 843 | + | |
| 844 | + | |
867 | 845 | | |
868 | 846 | | |
869 | 847 | | |
870 | 848 | | |
871 | 849 | | |
872 | 850 | | |
873 | 851 | | |
874 | | - | |
| 852 | + | |
875 | 853 | | |
876 | 854 | | |
877 | 855 | | |
| |||
889 | 867 | | |
890 | 868 | | |
891 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
892 | 874 | | |
893 | 875 | | |
894 | 876 | | |
895 | 877 | | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | 878 | | |
900 | 879 | | |
901 | 880 | | |
902 | | - | |
| 881 | + | |
903 | 882 | | |
904 | | - | |
| 883 | + | |
905 | 884 | | |
906 | 885 | | |
907 | 886 | | |
908 | 887 | | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
950 | 912 | | |
951 | 913 | | |
952 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
128 | 92 | | |
129 | 93 | | |
130 | 94 | | |
| |||
135 | 99 | | |
136 | 100 | | |
137 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments