Repository navigation
Commit f7c448e
Correct three claims in the extension bundle docs
The `SessionExtensionComponents` doctest took its codec capsule off a
`SessionContext()` that was dropped on the same line. An FFI codec holds its
task-context provider weakly, so that capsule names a session that is already
gone — the doctest only reads an id back so it passes, but it is the exact
shape the FFI guide warns against. It now keeps the context in a name.
`SessionPlannerExportable` called returning `fallback` a wrap that "contributes
nothing". It is not: the capsule the first bundle receives wraps the session's
planner for export, so handing it back installs it as a foreign planner and
every later plan crosses an FFI boundary that was not there before. `None` is
the no-op. Corrected in the protocol docstring, the FFI guide's canonical
section, and the `_PlannerExtension` test helper that repeated the claim.
`__post_init__` walked a written-out list of field names. It now walks
`dataclasses.fields`, filtered on the `_codecs` suffix so a codec field added
later is normalized without anyone remembering to name it, and a future field
that is not a codec collection is left alone.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 0868f39 commit f7c448e
3 files changed
Lines changed: 39 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
415 | 420 | | |
416 | 421 | | |
417 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
| |||
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
186 | 200 | | |
187 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
188 | 205 | | |
189 | 206 | | |
190 | 207 | | |
| |||
257 | 274 | | |
258 | 275 | | |
259 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
260 | 283 | | |
261 | 284 | | |
262 | 285 | | |
| |||
274 | 297 | | |
275 | 298 | | |
276 | 299 | | |
277 | | - | |
278 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
279 | 303 | | |
280 | 304 | | |
281 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | | - | |
939 | | - | |
940 | | - | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
941 | 943 | | |
942 | 944 | | |
943 | 945 | | |
| |||
0 commit comments