Avoid redundant source graphs in process tokenization results - #1003
bradhilton wants to merge 7 commits into
Conversation
a8b55d4 to
7624d05
Compare
7624d05 to
df88edb
Compare
|
Closing this unmerged draft and retaining ordinary pickle for process-result transfer. Current main at d22abdc already serializes the full result with The reproduced blockers are semantic:
The latest isolated successor passed 842 controls, including the eight discriminators that failed on the preceding source, but the independent audit reproduction still invalidates it. All source versions, reproductions, review findings and bounded-run evidence are retained. The earlier constructed-case timing improvement is not evidence that a correct general implementation is ready, and is not a production performance claim. Further transfer improvements should preserve the ordinary pickle route and its value, alias, callback and exception behavior. This generic elision design will not be merged. |
Process tokenization sends the worker's trajectory and exchange graph back to a parent that already owns and rebinds those sources. This change uses private source references for eligible results, reducing redundant serialization while retaining ordinary pickle for unsupported graphs. There is no new public option.
Parent and worker eligibility checks cover reconstruction callbacks, instance attribute resolution, finalizers, concrete source-field roles, aliases and shared model state. Schema discovery reads only supported passive metadata and runs afresh for each transfer, so declaration changes between transfers cannot retain stale eligibility. Customized descriptors, containers or keys take the ordinary path without added callbacks. A private byte frame distinguishes optimized results before reconstruction, and the reader releases its source callback with the unpickler even on errors.
Parent and worker use the same internal codec version. Graphs, classes and registrations must remain stable during transfer; inspected framework/stdlib bases and normal generated enum state must be unmodified. The ordinary serializer includes merged #1011, #1012 and #1013 and is unchanged by this PR.
Validation at
5ddf81f859e940c9488e64dfc7195189b5def507: all 815 related cases have exact passing observations across finite executions. The initial parallel attempt had six existing 30-second process waits time out and two shard cutoffs; all eight cases subsequently passed unchanged in isolated executions. Those initial failures remain recorded, and their timing cause is unproved. Six new declaration-change and actual-spawn regressions fail semantically on the parent; twelve additional warm-alias cases establish conservative fallback, with twelve preserved controls. Formatting, lint, type checks and the 264-model schema check pass. Independent source receiving verifies parent/worker transitions and ordinary callback, alias and error behavior.Held draft pending fresh cumulative model reviews, exact-head CI, focused frozen-provider receiving and current-source performance evidence. Historical d67 timings on constructed data do not measure this source. Earlier rejected or incomplete observations—including an unclassified prior 420-second attempt—remain retained. This draft has not been adopted by qualification runs.
Current source hold: real-spawn public cases show that narrowed parent declarations can differ from the worker declarations throughout an otherwise stable transfer. Parent preflight can omit a source-wrapper descriptor, allowing optimized decoding to suppress its callback or turn its error into success. Exact
5ddf81f8is not ready for merge or adoption; source and historical evidence are retained unchanged.