Skip to content

Fix #20, app checksum handling after restart - #157

Open
chillfig wants to merge 2 commits into
nasa:devfrom
chillfig:fix-20-app-restart-checksum
Open

chillfig wants to merge 2 commits into
nasa:devfrom
chillfig:fix-20-app-restart-checksum

Conversation

@chillfig

@chillfig chillfig commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

name: FSW Code Change
about: Flight Software code changes
labels: fsw

Description of Change

Resolve application and library identity and code range before each checksum chunk. On a new ES resource ID, discard partial progress and the old baseline, then report the reset through an informational event. Preserve corruption detection for unchanged instances and update results-table schemas, regression tests, and documentation.

Linked Issue

Closes #20

Requirements Impact

  • Requirement ID(s):
  • Requirements updated as necessary
  • Existing requirements are still satisfied by this change

Testing Evidence

Unit Tests (UT Assert)

Unit test result:
image

New tests:

  • CS_ComputeApp_Test_RelocatedAppRebaseline()
image
  • CS_ComputeApp_Test_RelocatedMidPassRestarts()
image
  • CS_ComputeApp_Test_SameAddressReloadRestarts()
image
  • CS_ComputeApp_Test_UnchangedInstanceCorruption()
image
  • CS_ComputeApp_Test_UnchangedInstanceResumes()
image
  • CS_ComputeApp_Test_LookupFailureThenReload()
image
  • CS_ComputeApp_Test_InvalidAddressThenRecovery()
image
  • CS_ComputeApp_Test_SameInstanceMappingChange()
image
  • CS_ComputeApp_Test_LibraryReload()
image
  • CS_RecomputeAppChildTask_Test_ReloadDuringRecompute()
image

COSMOS Test Suite

N/A

Areas of Expertise Touched

  • ASTRO
  • CI/CD
  • COSMOS
  • Cybersecurity
  • Docker
  • EDS
  • Git
  • PSPs
  • SBN
  • SMP
  • Tables
  • TSN
  • Unit Tests
  • Other

Author Checklist

  • Linked GitHub issue is referenced above
  • Code has been formatted with .clang-format
  • Static analysis workflows ran and passed
  • Unit tests (UT Assert) updated/added to cover code changes
  • Unit test workflows ran and passed
  • COSMOS test suite was run; tests updated/added if relevant changes were made
  • Requirements have been reviewed; updated or confirmed still satisfied (see above)
  • Testing evidence is included above
  • Self-review of the diff completed

Reviewer Checklist

  • Code logic is correct and matches the stated intent
  • Code is readable, maintainable, and follows project conventions (ask your lead if you are unsure of where to find these conventions)
  • .clang-format has been applied
  • Static analysis results reviewed and acceptable
  • The change has been exercised by the unit tests (not just that tests pass — the new/changed code paths are actually covered)
  • COSMOS test suite was executed against this change and results reviewed (or confirmed N/A with justification)
  • Reviewer has independently verified the change behaves as described (e.g., by running the tests locally, reviewing CI output in detail, or performing additional ad-hoc testing as warranted)
  • Memory safety reviewed (allocation, bounds, lifetime, stack usage)
  • Requirements impact reviewed and appropriate
  • Error handling is appropriate
  • Appropriate Expert areas have been reviewed

Reviewer Testing Notes

  • Code logic is straightforward and makes sense
  • Code is very readable
  • Everything is formatted properly with clang
  • Analyzed https://github.com/nasa/CS/actions/runs/40563234455, and the cppcheck artifact reports 0 errors
  • I reviewed all the added unit tests and couldn't find a scenario that wasn't covered
  • COSMOS test not available
  • Local unit tests were reviewed and CI output was vetted
  • TBD
  • Requirements update was reviewed and approved
  • Error handling is good

@chillfig chillfig self-assigned this Oct 27, 2026
@chillfig chillfig added the bug label Oct 27, 2026
@chillfig
chillfig force-pushed the fix-20-app-restart-checksum branch from 9f44fcb to 358a46d Compare October 27, 2026 18:34
@chillfig
chillfig force-pushed the fix-20-app-restart-checksum branch from 358a46d to 40eb16b Compare October 27, 2026 18:47
@Cameron-Sykes
Cameron-Sykes self-requested a review November 2, 2026 17:49
Comment thread unit-test/cs_compute_tests.c Resolved
Comment thread unit-test/cs_compute_tests.c Resolved
Comment thread unit-test/cs_compute_tests.c Resolved
Comment thread unit-test/cs_compute_tests.c Resolved
Comment thread unit-test/cs_compute_tests.c Resolved
Comment thread unit-test/cs_compute_tests.c Resolved

@LuntCayden LuntCayden left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks solid. Once you address Cameron's feedback on test maintainability (extracting the magic numbers into variables and macros), this should be ready. The reload detection logic looks comprehensive and the test coverage is good.

@Cameron-Sykes

Copy link
Copy Markdown
Contributor

The code looks solid. Once you address Cameron's feedback on test maintainability (extracting the magic numbers into variables and macros), this should be ready. The reload detection logic looks comprehensive and the test coverage is good.

Hi @LuntCayden, I approved and feel that my issues were addressed. Can you resolve your requested change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checksum errors after restarting app

3 participants