Page MenuHomePhabricator

Handle debug logs and subcalls that have been buffered with better state machine handling
Open, HighPublic

Description

Description

Conceivably, a debug log or subcall could get so large as to be buffered and split into two logical writes to the Node stdio handlers. In this case, the evaluator would currently fail to parse the split output as JSON.

The state machines should instead explicitly handle start and end calls by joining all buffered outputs received between a single start and end. This would require a bit of overhead: we would need to replace simple Arrays with explicit state machine objects with handlers for start and end events.

This case is quite rare. If we decide to move forward with the Rust rewrite, then this work should wait for the Rust evaluator and need not be done in Node.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • good states

Completion checklist