Repository navigation
Conversation
In fill_with_idle_packet the EPP branch was an empty TODO that still consumed the if condition, so a configuration that permitted EPP idle packets (alongside the required SPP) skipped the SPP fill chain entirely: the partially-filled frame was never padded, check_and_send_vc never saw it full, and a sendNow frame was silently withheld until unrelated later data arrived. Implement the EPP idle fill per CCSDS 133.1-B-3: an Encapsulation Idle Packet of exactly the remainder size, using the smallest header that can carry it (the one-octet packet for a 1-byte remainder, a two-octet header up to 255 bytes, a four-octet header beyond; the M_PDU payload is bounded to U16, so the eight-octet header is never needed), with header-inclusive Packet Length fields as AosDeframer::sizeEppPacket decodes them. EPP is preferred whenever permitted, since the one-octet minimum means the fill always completes the frame in place and never stripes onto the next frame as the minimum-size SPP fill may have to. configure() now accepts SPP and/or EPP instead of requiring SPP. Documents the selection in the SDD and covers the header shapes, the SPP|EPP repro, and the configure validation with unit tests. Fixes nasa#5881
lestarch-autobot
left a comment
There was a problem hiding this comment.
Automated review summary (run 1)
Per-agent results
Findings open at the reviewed head, by tag; everything ever raised is under Since last run.
| Agent | must fix | suggestion | could fix | future work | outstanding | Verdict |
|---|---|---|---|---|---|---|
| Security Vulnerabilities | 0 | 0 | 0 | 0 | 0 | Go |
| Supply Chain / Runner Safety | 0 | 0 | 0 | 0 | 0 | Go |
| F Prime C/C++ Design | 0 | 1 | 2 | 0 | 3 | Go |
| Documentation Currency | 0 | 0 | 0 | 0 | 0 | Go |
| Design | 0 | 1 | 0 | 0 | 1 | Go |
| Architecture | 0 | 0 | 0 | 0 | 0 | Go |
| Test Quality | 0 | 1 | 1 | 0 | 2 | Go |
| Correctness | 0 | 0 | 0 | 0 | 0 | Go |
| Operational | 0 | 1 | 0 | 0 | 1 | Go |
| Maintainability | 1 | 0 | 2 | 0 | 3 | No-Go |
| CI safety | — | — | — | — | — | Go |
| Totals (consolidated) | 1 | 3 | 5 | 0 | 9 | No-Go |
The Operational row counts its concurrence on the Design thread at docs/sdd.md:22; Totals count that shared thread once.
Supply-chain surfaces
| Surface | Outstanding |
|---|---|
| Dependencies | clean |
| Vendored / submodule | clean |
| Build / test infrastructure | clean |
| Workflows / actions / scripts | clean |
| Generator output | clean |
| Prompt-injection | clean |
| Review-system integrity | clean |
Outstanding must-fix items (1)
Maintainability
checkEppIdleFilledFrameisvoidbut its declaration comment says it "returns the frame for further checks"; the helper hands the frame back to the component viadataReturnIn(AosFramerTester.hpp:63) — #6333 (comment)
Severity reconciliation (0 promoted)
| Finding | Reviewer tag | Summary tag | Consequence | Link |
|---|---|---|---|---|
EPP header-shape boundary (255/256-byte remainder) not exercised by testEppIdleFill |
suggestion | suggestion (not promoted) | test-coverage gap; no §14 consequence stated | #6333 (comment) |
EPP-only configure positive case asserts nothing observable |
could fix | could fix (not promoted) | no-crash test; no §14 consequence stated | #6333 (comment) |
SDD omits that the peer AosDeframer must enable EPP in pvnMask to accept EPP idle fill (Design, concurred by Operational) |
suggestion | suggestion (not promoted) | rationale calls it a documentation gap, not a sentence the PR made false; unthrottled DisabledPvn warning is a configuration-pairing hazard, not a ground-driven assert |
#6333 (comment) |
Code comment cites AosDeframer::sizeEppPacket as decoding the idle packet's length field, which it never reads |
could fix | could fix (not promoted) | misleading inline comment; §14's false-claim row covers SDD / user manual / Doxygen surfaces, not a .cpp body comment |
#6333 (comment) |
Idle-pattern fill loop duplicated between serialize_idle_spp_packet and serialize_idle_epp_packet |
could fix | could fix (not promoted) | duplication / fragile-edit hazard; no §14 consequence stated | #6333 (comment) |
CPP-19: status / headerLength declared without initializers in serialize_idle_epp_packet |
suggestion | suggestion (not promoted) | rationale states every branch assigns before use — no uninitialized read today | #6333 (comment) |
CPP-30: 0x7 EPP PVN literal where ComCfg::Pvn::ENCAPSULATION_PACKET_PROTOCOL exists |
could fix | could fix (not promoted) | named-constant hygiene; no §14 consequence stated | #6333 (comment) |
CPP-33: EPP idle encoder inlined in AosFramer instead of Svc/Ccsds/Utils/IdlePacket |
could fix | could fix (not promoted) | missed-reuse / placement; no §14 consequence stated | #6333 (comment) |
Merge readiness
Merge readiness: No-Go — Maintainability has 1 outstanding must-fix (misleading doc comment on checkEppIdleFilledFrame, AosFramerTester.hpp:63); all other lenses report Go and CI safety is Go.
One stale comment between this idle fill and a clean downlink — tidy it and the frames are go for launch.
- Move the Encapsulation Idle Packet encoder to Svc/Ccsds/Utils/IdlePacket, beside the shared SPP idle serializer: status-return style, explicit initializers, one DATA_PATTERN, and the PVN built from ComCfg::Pvn::ENCAPSULATION_PACKET_PROTOCOL instead of a literal; AosFramer asserts on the returned status. Corrects the comment that implied AosDeframer decodes the idle Packet Length (an Idle Protocol ID marks the last packet in the frame) - SDD: state the receive-side pairing constraint — permitting EPP requires every receiver of the virtual channel to accept PVN 7; keep the SPP default otherwise - Tests: cover both sides of the 255/256 header-shape boundary, assert the stored idlePvns bitfield on the accepting configure path, and fix the helper comment that claimed a return value
|
All run-1 findings addressed in 1e82343:
|
| Fw::SerializeStatus serialize(Fw::SerialBufferBase& serializer, FwSizeType size); | ||
|
|
||
| //! Minimum EPP idle packet size: the one-octet packet (CCSDS 133.1-B-3 4.1.2.8.2) | ||
| constexpr FwSizeType EPP_MIN_SIZE = 1; |
There was a problem hiding this comment.
[Maintainability] could fix maint-unclear-naming: EPP_MIN_SIZE / EPP_MAX_SIZE sit beside the unprefixed MIN_SIZE / MAX_SIZE / serialize, which are now the SPP-only variants.
With the namespace documented as "SPP and EPP", the bare names read as the namespace-wide bounds, but MIN_SIZE is 7 while a valid EPP fill is 1 byte: a caller that guards serializeEpp with size >= MIN_SIZE compiles and silently rejects 1-6 byte remainders. Either prefix the SPP trio (SPP_MIN_SIZE, SPP_MAX_SIZE, serializeSpp; ripples to existing callers) or say "SPP" in the three existing doc comments so the two families are distinguishable.
lestarch-autobot
left a comment
There was a problem hiding this comment.
Automated review summary (run 2)
Per-agent results
Findings open at the reviewed head, by tag; everything ever raised is under Since last run.
| Agent | must fix | suggestion | could fix | future work | outstanding | Verdict |
|---|---|---|---|---|---|---|
| Security Vulnerabilities | 0 | 0 | 0 | 0 | 0 | Go |
| Supply Chain / Runner Safety | 0 | 0 | 0 | 0 | 0 | Go |
| F Prime C/C++ Design | 0 | 0 | 0 | 0 | 0 | Go |
| Documentation Currency | 0 | 0 | 0 | 0 | 0 | Go |
| Design | 0 | 0 | 0 | 0 | 0 | Go |
| Architecture | 0 | 0 | 0 | 0 | 0 | Go |
| Test Quality | 0 | 0 | 0 | 0 | 0 | Go |
| Correctness | 0 | 0 | 0 | 0 | 0 | Go |
| Operational | 0 | 0 | 0 | 0 | 0 | Go |
| Maintainability | 0 | 0 | 1 | 0 | 1 | Go |
| CI safety | — | — | — | — | — | Go |
| Totals | 0 | 0 | 1 | 0 | 1 | Go |
Since last run
| Agent | raised (all runs) | resolved | still open | newly added | incorrect-fix follow-ups | improperly resolved | disagreements escalated |
|---|---|---|---|---|---|---|---|
| Security Vulnerabilities | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Supply Chain / Runner Safety | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| F Prime C/C++ Design | 3 | 3 | 0 | 0 | 0 | 0 | 0 |
| Documentation Currency | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Design | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
| Architecture | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Test Quality | 2 | 2 | 0 | 0 | 0 | 0 | 0 |
| Correctness | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Operational | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
| Maintainability | 4 | 3 | 0 | 1 | 0 | 0 | 0 |
Duplicates consolidated this run: 0 (threads closed by the §5h post-pass)
Supply-chain surfaces
| Surface | Outstanding |
|---|---|
| Dependencies | clean |
| Vendored / submodule | clean |
| Build / test infrastructure | clean |
| Workflows / actions / scripts | clean |
| Generator output | clean |
| Prompt-injection | clean |
| Review-system integrity | clean |
Severity reconciliation (0 promoted)
| Finding | Reviewer tag | Summary tag | Consequence | Link |
|---|---|---|---|---|
EPP_MIN_SIZE / EPP_MAX_SIZE sit beside the unprefixed SPP-only MIN_SIZE / MAX_SIZE / serialize in IdlePacket.hpp |
could fix | could fix (not promoted) | naming-ambiguity hazard for a hypothetical future caller ("a caller that guards … compiles and silently rejects"); no existing false claim, assert, or failed-operation status is stated | #6333 (comment) |
Merge readiness
Merge readiness: Go — all ten lenses completed at 1e82343 with Verdict Go; the single run-1 must-fix (AosFramerTester.hpp:63 comment) and the eight other run-1 threads are resolved, leaving one Maintainability could-fix open. CI safety is Go. Core maintainers @LeStarch and @thomas-bc have been requested for human review.
Every thread settled and the idle fill in place — this frame is cleared for the maintainers' pass.
Change Description
Implements EPP idle fill in
Svc::Ccsds::AosFramer, following the direction @Willmac16 gave on #6053 ("why not write proper EPP Idle Serialization") rather than rejecting the configuration:serialize_idle_epp_packet()builds an Encapsulation Idle Packet (CCSDS 133.1-B-3, Protocol IDidle) of exactly the remainder size, with the smallest header that can carry it: the one-octet packet (Length of LengthZero) for a 1-byte remainder, a two-octet header (One) up to 255 bytes, and a four-octet header (Two, with a zero UDF/Protocol ID Extension octet) above that. Packet Length fields hold the header-inclusive total, matching whatAosDeframer::sizeEppPacketdecodes. The eight-octet header is never needed since the M_PDU payload is bounded to U16 by the existing assert infill_with_idle_packet.fill_with_idle_packet()now prefers EPP wheneverEPP_MASKis permitted: since the minimum EPP is one octet, the fill always completes the current frame in place and never stripes onto the next frame the way the minimum-size (7-byte) SPP fill may have to. SPP-only configurations keep the existing behavior. This replaces the empty branch that consumed the condition and leftsendNowframes unpadded and withheld (the bug in Svc/Ccsds/AosFramer: EPP idle-fill branch swallows the condition and leaves frames unpadded #5881).configure()now accepts any combination of SPP/EPP with at least one bit set and no invalid bits (PvnBitfield::VALID_MASK), instead of requiring SPP.Unit tests:
testEppIdleFill(EPP-only, now a legal configuration): remainders that exercise all three header shapes, including the 1-byte remainder SPP cannot express without striping; checks header bytes, header-inclusive length fields, idle pattern fill, and that thesendNowframe is actually emitted.testEppPreferredOverSpp: the exact repro from Svc/Ccsds/AosFramer: EPP idle-fill branch swallows the condition and leaves frames unpadded #5881 (SPP_MASK | EPP_MASK), which previously emitted no frame.testIdlePvnsValidation: no-protocol and invalid-bit configurations assert; EPP-only configures cleanly.Rationale
Fixes #5881 (CCB: Approved). In
fill_with_idle_packetthe EPP branch was an empty TODO that still consumed theifcondition, so any configuration withEPP_MASKset skipped the SPP fill chain entirely: the partially-filled frame was never padded,check_and_send_vcnever saw it full, and asendNowframe was silently withheld until unrelated later data arrived.Testing/Review Recommendations
fprime-util checkinSvc/Ccsds/AosFramerpasses on Linux x86_64 with the sanitizers enabled by the UT build.Review focus: the header-shape selection boundaries (1 / ≤255 / >255) and the header-inclusive length convention — both were written against
AosDeframer::sizeEppPacket, which treats a Protocol ID ofidleas end-of-frame, so any of these fills terminates extraction as expected on the receive side.Future Work
#5888 (duplicate SUCCESS on
comStatusOutduring tail-packing) is in the same component and tracked separately.Contributor Checklist
AI Usage (see policy)
An AI coding assistant was used, under my direction, to draft the implementation, the unit tests, and the SDD update. All changes were reviewed by me and verified by building and running the full
Svc/Ccsds/AosFramerunit test suite locally.AGENTS.md).