test: add C portable fault classifier module#79
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14eccf3113
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return FAULT_CLASSIFIER_INVALID_CONFIG; | ||
| } | ||
|
|
||
| if (sample_age_ms > config->stale_timeout_ms) { |
There was a problem hiding this comment.
Classify timeout-boundary samples as stale
Use >= for the stale-age check so samples at exactly stale_timeout_ms are treated as stale; with the current > condition, sample_age_ms == stale_timeout_ms returns FAULT_CLASSIFIER_OK, which is inconsistent with the existing watchdog timeout semantics (elapsed_ms_u32 uses >= and backend fault checks trigger at the configured timeout). In scenarios where age lands exactly on the boundary, this delays stale-fault detection by one tick.
Useful? React with 👍 / 👎.
Summary
Adds a small deterministic pure-C fault classifier module with host-native Unity coverage. This change is software-only and does not add new hardware evidence.
Changes
fault_classifier.h/fault_classifier.cundercomponents/app_core.Validation Tasks
git status --short --branchgit diff --checkplatformio test -e nativescripts/check_app_core_includes.sh