feat(insight): add async export scheduling - #702
Conversation
0bbf504 to
6b73e82
Compare
|
/ai review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/ai review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9e0e717 to
2e7049c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| self._queue.append((_RECORD, None)) | ||
| else: | ||
| self._move_record_token_to_back() | ||
| self._pending = record |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_hhdiypndoo4kuhjkuxlfcqckuf
[P2] Release superseded records after dropping the lane lock. Replacing _pending decrements the previous record while _cond is held. Supported transformed/non-JSON values may define __del__, so the checkpoint thread can run arbitrary blocking code here; a finalizer that re-enters this lane deadlocks on the non-reentrant lock. Retain the displaced record until after the with block, similarly defer pending cleanup in _disable_locked, and add a finalizer re-entry regression.
| stack.extend(item) | ||
| else: | ||
| memo[identity] = item | ||
| return copy.deepcopy(record, memo) |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_54if3osmob4i3ya37qb2nfe6ew
[P2] Keep deeply nested records isolated between exporter lanes. This recursive deepcopy raises for sufficiently deep built-in containers, after which _export_one passes the original canonical record to every lane. Concurrent exporters can then mutate or normalize the same object, producing timing-dependent or corrupted output. Clone built-in containers iteratively while preserving aliases and cycles, and add a two-lane deep-record test where one exporter mutates its input.
Codex AI reviewTwo P2 scheduler issues remain in Reviewed commit |
|
Superseded by #719, which re-authors the async exporter around one plugin worker and one latest-pending slot with a much smaller diff. |
Summary
Design
export_timeout_secondsdefaults to 5 seconds and bounds caller wait for drain plus flushValidation
afc10fe: no remaining or new Critical/High findingsLatest review fixes
no linked issue: #687 tracks broader Workflow Insight follow-up work