Skip to content

IC: dev freeze for v7.0.2-rc1 - #529

Merged
jphickey merged 33 commits into
mainfrom
dev
Oct 15, 2026
Merged

jphickey merged 33 commits into
mainfrom
dev

Conversation

@jphickey

Copy link
Copy Markdown
Contributor

Initial merge in preparation for v7.0.2-rc1

Snapshot of the current development branch (2026-10-15) for
final testing prior to the release candidate.

jphickey and others added 30 commits May 13, 2026 09:10
Reset MISSION_REV to 0xFF and build number to 1.
Initiate post v7.0.1 development cycle
…updated-static-analysis-workflow

Part cFS/workflows#129, Use Updated Static Analysis Workflow
…eletepipe-disableengine-v2

Fix #497, Suppressed ignored return value warning in codeSonar for CFE_SB_DeletePipe() in fsw/src/cf_cfdp.c
…-getsize

Fix #502, Initialize Variable msg_size in cf_cfdp_sbintf.c
…ecialty PR templates in the default PR template.
Part nasa/cFS#1079, Adding specialty PR templates and links to the specialty PR templates in the default PR template.
Updates all code to follow the same pattern:
 - channel numbers are used only in CMD/TLM/Tables (external)
 - channel number is converted to a pointer, with error checking
 - only channel pointer is used therein

This change removes all ambiguity about whether the passed-in value is
range checked or not.  Repeated conversions between channel number and
channel pointer are removed, and code is much simpler as a result.

Also fixes #288
Incorporates review feedback to re-instate the data clearing that
occured during CF_InitEngine, but do so in a way that preserves the
configuration data that is already populated.
Fix #90, standardize patterns across all internal functions
Part nasa/cFS#1079, adding further guidance to the pull request templates
Refactor the cf_cmd.c to reduce complexity of various functions

This removes multiple variations on how the loops over multiple entities
are being performed in command handlers, creating standard patterns for
all commands.

The index specifier value of 0 is reserved to mean "all" for any command
which accepts this type of wildcard value.  All singluar item specifiers
should be 1-based.

For all commands accepting a channel number, the value of "all" (0) is
permitted whenever feasible.  The only exception is TxFile which is only
valid for a single specific channel.  All other commands will accept
"all" and go through the same ForEachChannel loop to perform the same
operation on all channels.  This removes a lot of inconsistencies in how
this channel number had been interpreted.

For other indices such as Queue selections, direction specifiers,
polling dirs, and any other index - 0 will mean "all" and will be
processed consistently across all commands.

IMPORTANT: this changes some command definitions where "0" was a valid
value.  Enumerations are changed so that all valid (singular) values
start at 1, and 0 is reserved to mean "all" or will be rejected as
invalid if the command does not permit operation on multiple channels.
A File Data PDU carrying an offset but no file data decodes to data_len 0,
because the decoder takes the data length from whatever remains in the PDU
(CF_CODEC_GET_REMAIN) and nothing rejects an empty remainder. The receive path
then calls CF_ChunkListAdd with size 0, and CF_Chunks_CombineNext computes
chunk_end == chunk->offset, which trips CF_Assert(chunk_end > chunk->offset).

The sender reaches the same call with size 0 as well: a NAK segment request
with offset_start == offset_end passes both of the checks in
CF_CFDP_S_ProcessNak, which reject only offset_end < offset_start and
offset_end > fsize.

In a debug build either path aborts. In a normal build CF_Assert compiles away
and the empty chunk is stored, where it takes a slot in the fixed chunk list
and splits the surrounding gap in two, so a NAK asks for two segments where one
would do. Since both the gap computation and the NAK segment list are capped,
those extra segments crowd out real ones.

An empty range covers no data, so the fix drops it in CF_ChunkListAdd. That
covers both callers and leaves the tracked byte coverage unchanged.

Testing performed:

Built fsw/src/cf_chunk.c standalone against minimal headers, since the assert
behavior differs between a debug and a normal build.

```
clang -std=c99 -DCF_DEBUG_BUILD -I stub -I fsw/src -o h_debug harness.c fsw/src/cf_chunk.c
clang -std=c99 -I stub -I fsw/src -o h_normal harness.c fsw/src/cf_chunk.c
```

Before: the debug build aborts on CF_ChunkListAdd(list, 100, 0) with
"Assertion failed: (chunk_end > chunk->offset)" (SIGABRT, exit 134). The normal
build stores the empty chunk, and 62 empty ranges fill a 58 entry list.

After: the debug build exits 0, the empty range is not stored, and the list
holds only the one real chunk.

Over 20000 randomized rounds of mixed adds (about a quarter of them empty),
comparing a list built with the empty ranges against one built without them:
tracked byte coverage was identical in every round both before and after the
fix, the gap count differed in 16548 rounds before the fix (up to 11 extra
segments) and in 0 rounds after, and CF_Assert was violated 67216 times before
and 0 times after.

The new unit test asserts 7 conditions; 5 of them fail against the unpatched
CF_ChunkListAdd and all pass against the patched one.

Expected behavior changes:

Behavior Change: an empty range passed to CF_ChunkListAdd is ignored rather
than stored. Zero-length File Data PDUs and zero-length NAK segment requests
no longer consume a chunk list entry or fragment a gap.

This contribution was prepared with AI assistance.
…range

Fix #517, Ignore empty ranges in CF_ChunkListAdd
Fix #515, reduce cyclic complexity of command handlers
Adds an argument translator for CF commands using the previous
definitions.

All commands which had the definition modified as part of #516 are
changed to point at a compatibility shim instead of invoking the command
directly.  New (temporary) command codes are added to invoke the "non-shim"
command directly.

This should all be considered deprecated from the start and removed in a
future update.  This is purely to preserve compatibility with existing
scripts.
Remove compound key check in channel translation (does not apply outside
of transactions)
jphickey and others added 3 commits October 5, 2026 11:00
Fix #521, command compatibility layer for CF
Added clarification to make about cFS being a demonstration bundle.
Added link to the mission ready cFS bundle.
Added Known Issues section.
Added Getting Help section.
Removed About cFS section.
Part #1132, CF Update README.md for v7.0.2rc1.
@jphickey
jphickey merged commit 90b0455 into main Oct 15, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants