Skip to content

Report Supervisor failures correctly in filescan health checks - #1162

Merged
mmguero merged 2 commits into
cisagov:sylvesterkaczmarek-mergesfrom
sylvesterkaczmarek:fix/filescan-supervisor-health-states-20261006
Oct 7, 2026
Merged

mmguero merged 2 commits into
cisagov:sylvesterkaczmarek-mergesfrom
sylvesterkaczmarek:fix/filescan-supervisor-health-states-20261006

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Fixes #1159.

Match Supervisor states using the lowercase values already stored in Program.state, and read the documented stop field when recording an exited process. This activates the existing error-state and exit-code checks instead of silently treating optional failed processes as healthy.

The autostart policy, allowed exit codes, response schema and HTTP status behavior are unchanged. Process/config pairing and readiness policy are outside this correction.

Testing

python -m pytest -q filescan/python-filescan/tests/test_health_process_states.py

17 focused tests passed; 10 fail on unchanged source. Real Flask requests exercise FATAL/BACKOFF/UNKNOWN, allowed and unexpected exit codes, start/stop metadata, running and optional-process controls, aggregate health and RPC errors.

The external Supervisor interface is replaced before module import. No live XML-RPC service, scanner process, socket listener or container was started. Tests ran on macOS with Python 3.12; full deployment testing was not run.

New-test formatting, syntax checks and git diff --check pass. No dependency, workflow or version changes.

Thanks for taking a look.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@mmguero mmguero self-assigned this Oct 6, 2026
@mmguero mmguero added the pipeline Relating to carving (extraction) of files from traffic and the scanning of those files label Oct 6, 2026
@mmguero mmguero added this to Malcolm Oct 6, 2026
@mmguero mmguero added this to the v26.10.0 milestone Oct 6, 2026
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@mmguero
mmguero changed the base branch from main to sylvesterkaczmarek-merges October 7, 2026 15:32
@mmguero
mmguero merged commit 3add6dc into cisagov:sylvesterkaczmarek-merges Oct 7, 2026
@mmguero mmguero moved this from Done to Released in Malcolm Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pipeline Relating to carving (extraction) of files from traffic and the scanning of those files

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Filescan health skips Supervisor error states and exit status checks

2 participants