Repository navigation
Fix design-decision must-fix review findings (ComStub, EventManager, CmdSequencer, ValidateFile, FileHandlingCfdp BASE_ID) - #5710
Conversation
…ager severity drop, CmdSequencer CS_STEP guard and CS_RUN state reset, ValidateFile status handling, FileHandlingCfdp BASE_ID Co-Authored-By: michael.d.starch <michael.d.starch@jpl.nasa.gov>
Coverage report — base
|
| Module | Line | Δ | Function | Δ | Branch | Δ |
|---|---|---|---|---|---|---|
Svc/EventManager |
89.36 | -2.95 | 88.89 | +0.00 | 87.72 | -3.02 |
Fw/DataStructures |
97.87 | -0.53 | 97.14 | +0.00 | 82.48 | -0.73 |
Modules changed
| Module | Line | Δ | Function | Δ | Branch | Δ |
|---|---|---|---|---|---|---|
Svc/EventManager |
89.36 | -2.95 | 88.89 | +0.00 | 87.72 | -3.02 |
Fw/DataStructures |
97.87 | -0.53 | 97.14 | +0.00 | 82.48 | -0.73 |
Svc/CmdSequencer |
92.93 | -0.30 | 98.08 | +0.00 | 82.93 | -0.52 |
Os |
19.55 | +0.01 | 22.48 | +0.00 | 17.34 | +0.00 |
Svc/ComStub |
98.57 | +0.04 | 100.00 | +0.00 | 85.19 | +0.00 |
Os/Posix |
64.56 | +0.40 | 85.26 | +0.00 | 45.92 | +0.23 |
New modules
| Module | Line | Function | Branch |
|---|---|---|---|
Fw/Prm |
0.00 | 0.00 | 0.00 |
Modules without UTs
CFDP/Checksum/GTest, Drv/LinuxGpioDriver, Drv/LinuxI2cDriver, Drv/LinuxSpiDriver, Drv/LinuxUartDriver, Drv/Ports/DataTypes, FppTestProject/FppTest/topology/async, FppTestProject/FppTest/topology/components/Comp, FppTestProject/FppTest/topology/components/Framework, FppTestProject/FppTest/topology/components/Receiver, FppTestProject/FppTest/topology/components/Sender, FppTestProject/FppTest/topology/guarded, FppTestProject/FppTest/topology/sync, FppTestProject/FppTest/topology/top_ports, FppTestProject/FppTest/topology/types, Fw/Com, Fw/Comp, Fw/FilePacket/GTest, Fw/Fpy, Fw/Obj, Fw/Port, Fw/Sm, Fw/Test, Fw/Types/GTest, Os/Models, Svc/Ccsds/Types, Svc/FatalHandler, Svc/Subtopologies/CdhCore, Svc/Subtopologies/ComCcsds, Svc/Subtopologies/ComCcsdsSdls, Svc/Subtopologies/ComFprime, Svc/Subtopologies/ComLoggerTee, Svc/Subtopologies/DataProducts, Svc/Subtopologies/DpCompression, Svc/Subtopologies/FileHandling, Svc/Subtopologies/FileHandlingCfdp, Svc/Subtopologies/FileHandlingCfdp/FileHandlingCfdpConfig, TestDeploymentsProject/Ref/DpDemo, TestDeploymentsProject/Ref/PingReceiver, TestDeploymentsProject/Ref/RecvBuffApp, TestDeploymentsProject/Ref/SendBuffApp, TestDeploymentsProject/Ref/Top, TestDeploymentsProject/Ref/TypeDemo, cmake/test/data/TestConfigDeployment, cmake/test/data/TestDeployment/TestBuildAutocoder, cmake/test/data/TestDeployment/TestHeaderAutocoder, cmake/test/data/TestDeployment/TestLinkDepends, cmake/test/data/TestDeployment/TestRelative, cmake/test/data/test-fprime-library/TestLibrary/TestComponent, cmake/test/data/test-fprime-library2/TestLibrary2/TestComponent
Change Description
Fixes six must-fix findings from an AI full-codebase review that required design decisions (reviewed and decided with @LeStarch):
Svc/ComStub/ComStub.cpp(finding 5678543bc488): on SEND_RETRY exhaustion (both the synchronous send loop andhandleAsyncRetry), setm_reinitialize = trueso a driver reconnect emits the recoverySUCCESSrequired by the Communication Adapter Protocol. Previously retry exhaustion emittedFAILUREwith no recovery path, pausingSvc::ComQueuepermanently.Svc/EventManager/EventManager.cpp:36(5019873bcde7): replace theFW_ASSERT(severity.isValid())inLogRecv_handlerwith validate-and-drop (log viaFw::Logger, return), matching the existing serialize-failure drop path. Events may arrive from external sources (e.g. a hub bridging another address space), so a corrupted severity byte should not reboot the flight computer.Svc/CmdSequencer/CmdSequencerImpl.cppCS_STEP_cmdHandler(800033fbf000): guard onMANUAL == m_stepModein addition toRUNNING; in AUTO mode emitCS_InvalidModeand respondEXECUTION_ERROR. Matches the documented "Valid only if CmdSequencer is in MANUAL run mode" contract and prevents two sequence commands being outstanding at once.Svc/CmdSequencer/CmdSequencerImpl.cppCS_RUN_cmdHandler(5c998a1ed755): onloadFilefailure, resetm_blockState/m_opCode/m_cmdSeqbefore respondingEXECUTION_ERROR, so a staleBLOCKcannot cause a later port-driven run to emit a duplicatecmdResponse_outfor the already-answered command.Os/ValidateFileCommon.cpptranslateStatus(6157b569613d): returnValidateFile::OTHER_ERRORin the twodefault:cases instead of asserting. POSIX open/read legitimately produce unlisted statuses (e.g.NOT_SUPPORTED/ENOSYS,INVALID_ARGUMENT/EINVAL), andValidateFile::validateruns on ground-commanded files.Svc/Subtopologies/FileHandlingCfdp/FileHandlingCfdpConfig/FileHandlingCfdpConfig.fpp:3(a231ff188910): changeBASE_IDfrom0x06000000(collides withComCcsdsSdlsConfig.BASE_ID) to0x07000000, the next unused base in the subtopology family.Rationale
These findings were held out of the earlier batch PRs (#5705, #5706, #5707) because each required a design/policy decision; each resolution above was reviewed and approved by the project maintainer before implementation.
Testing/Review Recommendations
fprime-util generate && fprime-util buildpasses.Svc_ComStub_ut_exe,Svc_EventManager_ut_exe,Svc_CmdSequencer_ut_exe,Os_ut_exe.Future Work
A separate PR will address DpCatalog
fillBinaryTreedirectory-listing capacity handling (finding 31e3a5a5ecfb) via chunked re-listing.AI Usage (see policy)
Findings originate from an AI full-codebase review; fixes were implemented by an AI agent under maintainer direction, with each resolution explicitly approved by the maintainer. IAMAI
This PR was written by Devin 👼
Requested by: michael.d.starch@jpl.nasa.gov (michael.d.starch)