Commit e4b9112
committed
fix(v9.1.0): close PR #514 external audit findings
External audit closed-out:
HIGH-001 — multi-generation drain barrier. The single-slot
`prev_drained: Mutex<Option<Arc<AtomicBool>>>` overwrote on every
retire, so a stacked stop/start/stop where the earlier session was
still draining when the later one retired silently lost the earlier
flag. `await_drain()` then returned `true` based on the latest
generation while the earlier callback could still fire on a freed
FFI `ctx` — a use-after-free hazard under reconnect-storm scenarios.
Replaced with `Mutex<Vec<Arc<AtomicBool>>>` on both `ThetaDataDx`
and `TdxFpssHandle`; every retired session's flag is pushed onto
the Vec, and `await_drain()` / `tdx_*_free` walk the full set with
lazy GC. Soak coverage at
`streaming_soak_tests::multi_gen_drain_waits_for_all_retired_sessions`
drives three flags through the production poll cadence with a
staggered drain order so the pre-fix code path is a hard regression
gate.
MED-001 — WS payload now carries `unresolved_contract_id` for
pre-`ContractAssigned` ticks. The decoder builds an unresolved-
contract sentinel whose `symbol` is `__pending:<id>` (the canonical
`sec_type == SecType::Unknown` check still gates consumer code
paths); the WS formatter detects the prefix, emits
`contract: {"status": "pending"}`, and surfaces the parsed wire id
as a top-level integer. Public SDK callback signature unchanged.
LOW-001 — WS `/subscribe` option path now runs the canonical
Gregorian validator alongside the bounds check. Impossible dates
like `20260230` (Feb 30) or `20260431` (Apr 31) no longer leak
through.
REPO-MED-001 — documented the explicit-handoff contract on Python
and TypeScript `stop_streaming`, `shutdown`, and `reconnect`.
Sourced from the codegen surface (`sdk_surface.toml` +
`build_support/sdk_surface/{python,typescript}.rs`) so the
generated `streaming_methods.rs` files stay in sync.
CHANGELOG, `.github/release-notes/v9.1.0.md`, and
`docs-site/docs/changelog.md` updated. Codegen `--check` clean,
banned-vocab grep zero matches, full workspace tests green.1 parent 6845f4a commit e4b9112
17 files changed
Lines changed: 932 additions & 198 deletions
File tree
- .github/release-notes
- crates/thetadatadx
- build_support/sdk_surface
- src
- fpss
- docs-site/docs
- ffi/src
- sdks
- cpp/include
- python/src
- typescript/src
- tools/server/src/ws
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
213 | 245 | | |
214 | 246 | | |
215 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 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 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
174 | 219 | | |
175 | 220 | | |
176 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
259 | 277 | | |
260 | 278 | | |
261 | 279 | | |
| |||
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
193 | 210 | | |
194 | 211 | | |
195 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
224 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
| |||
0 commit comments