Commit 8cfac54
refactor(ogc): keep snapshot semantics for ChunkInterrupted partial state
Revert the live-view change (item 3 of #346): restore exc.partial_frame /
exc.partial_response as raise-time snapshots rather than properties that
delegate to exc.call.
Snapshot is the better contract for an exception — a record of the failure
moment, not a live handle:
- In a resume loop each interruption stays a faithful record of what it saw.
Live-view aliased every exception to the one shared call, so after a second
failure exc1.partial_frame and exc2.partial_frame returned the same (later)
state.
- After a successful resume, live-view's .partial_frame returned the COMPLETE
result — a field named "partial" that no longer was.
- Exception payloads shouldn't mutate after you catch them (cf.
CalledProcessError.output).
Removing the delegation also drops the properties and the _pickled_* /
__getstate__ snapshot machinery it required: partial_frame/partial_response
are plain instance attributes again, pickled by the base __getstate__
(net -21 lines in interruptions.py).
No behavior change versus released main — this PR is unmerged, so live-view
never shipped. #346 is now a true no-behavioral-change refactor.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent fda9170 commit 8cfac54
2 files changed
Lines changed: 54 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
147 | 135 | | |
148 | 136 | | |
149 | 137 | | |
150 | 138 | | |
151 | 139 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
166 | 145 | | |
167 | 146 | | |
168 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
964 | 966 | | |
965 | 967 | | |
966 | 968 | | |
| |||
977 | 979 | | |
978 | 980 | | |
979 | 981 | | |
980 | | - | |
981 | | - | |
| 982 | + | |
| 983 | + | |
982 | 984 | | |
983 | | - | |
| 985 | + | |
984 | 986 | | |
985 | 987 | | |
986 | | - | |
| 988 | + | |
987 | 989 | | |
988 | | - | |
989 | | - | |
| 990 | + | |
| 991 | + | |
990 | 992 | | |
991 | 993 | | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
998 | 1003 | | |
999 | 1004 | | |
1000 | 1005 | | |
| |||
1017 | 1022 | | |
1018 | 1023 | | |
1019 | 1024 | | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1025 | 1031 | | |
1026 | 1032 | | |
1027 | 1033 | | |
| |||
0 commit comments