popSerializable_directiveHandler FW_ASSERTs on whatever status serialOut_out returns (FpySequencerDirectives.cpp:1796), but when serialOut[i] is connected to a typed input port — the normal flight wiring — the generated invokeSerial deserializes the port arguments and returns a failure status for a value that is too short, so a sequence can abort the sequencer with SIGABRT instead of failing the sequence. The compiler cannot prevent it, because write_to_port's value parameter is SIZED and port signatures are unknown to it (#179), and the WasmSequencer handles the same status gracefully with SerialPortSendFailed + hostResponseFailure (WasmSequencerInterpreter.cpp:492). The fix is for the directive to return a DirectiveErrorCode (there is no code for this case yet) rather than assert; note that a value that is too long is silently accepted with the extra bytes ignored.
Reproduced by wiring serial port 0 to the tester's typed Fw.Time input port (11 serialized bytes) in test/harness/FpySequencerTester.cpp:
seq.set_serialOut_OutputPort(0, this->get_timeGetIn_InputPort(0));
write_to_port(Svc.Fpy.SerialPortIndex.EXAMPLE_PORT_0, U8(1))
Assert: ".../Svc/FpySequencer/FpySequencerDirectives.cpp:1796" 5 # FW_DESERIALIZE_SIZE_MISMATCH
FpyHarness: .../Fw/Types/Assert.cpp:128: void Fw::defaultSwAssert(...): Assertion `false' failed.
Same class as #200 and #193 (sequence content reaching an FW_ASSERT in flight code).
popSerializable_directiveHandlerFW_ASSERTs on whatever statusserialOut_outreturns (FpySequencerDirectives.cpp:1796), but whenserialOut[i]is connected to a typed input port — the normal flight wiring — the generatedinvokeSerialdeserializes the port arguments and returns a failure status for a value that is too short, so a sequence can abort the sequencer with SIGABRT instead of failing the sequence. The compiler cannot prevent it, becausewrite_to_port's value parameter isSIZEDand port signatures are unknown to it (#179), and the WasmSequencer handles the same status gracefully withSerialPortSendFailed+hostResponseFailure(WasmSequencerInterpreter.cpp:492). The fix is for the directive to return aDirectiveErrorCode(there is no code for this case yet) rather than assert; note that a value that is too long is silently accepted with the extra bytes ignored.Reproduced by wiring serial port 0 to the tester's typed
Fw.Timeinput port (11 serialized bytes) intest/harness/FpySequencerTester.cpp:Same class as #200 and #193 (sequence content reaching an FW_ASSERT in flight code).