Skip to content

Conversation

@sergio-correia
Copy link
Contributor

@sergio-correia sergio-correia commented Jul 14, 2025

This commit refactors the main attestation logic into a state machine, simplifying the main function and making the agent's state

The state machine handles the agent's lifecycle, from registration to attestation.

@sergio-correia sergio-correia marked this pull request as draft July 14, 2025 21:15
@codecov
Copy link

codecov bot commented Jul 14, 2025

Codecov Report

Attention: Patch coverage is 13.95349% with 111 lines in your changes missing coverage. Please review.

Project coverage is 57.77%. Comparing base (b3300fb) to head (089183b).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
keylime-push-model-agent/src/state_machine.rs 11.40% 101 Missing ⚠️
keylime-push-model-agent/src/main.rs 22.22% 7 Missing ⚠️
keylime-push-model-agent/src/attestation.rs 33.33% 2 Missing ⚠️
keylime-push-model-agent/src/url_selector.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
e2e-testsuite 57.77% <13.95%> (-0.59%) ⬇️
upstream-unit-tests 57.77% <13.95%> (-0.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
keylime-push-model-agent/src/url_selector.rs 63.33% <66.66%> (-3.34%) ⬇️
keylime-push-model-agent/src/attestation.rs 40.97% <33.33%> (-0.17%) ⬇️
keylime-push-model-agent/src/main.rs 41.53% <22.22%> (-4.26%) ⬇️
keylime-push-model-agent/src/state_machine.rs 11.40% <11.40%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sergio-correia sergio-correia force-pushed the states branch 3 times, most recently from 6e3453e to bbc7277 Compare July 17, 2025 10:48
@sergio-correia sergio-correia changed the title [WIP] push-model: Refactor attestation logic into a state machine push-model: refactor attestation logic into a state machine Jul 17, 2025
@sergio-correia sergio-correia marked this pull request as ready for review July 17, 2025 12:11
Copy link
Contributor

@ansasaki ansasaki left a comment

Choose a reason for hiding this comment

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

LGTM!

This commit refactors the main attestation logic into a state machine,
simplifying the main function and making the agent's state explicit.

The state machine handles the agent's lifecycle, from registration
to attestation, and includes improved URL validation.

Signed-off-by: Sergio Correia <scorreia@redhat.com>
@ansasaki ansasaki merged commit 67b8b4c into keylime:master Jul 17, 2025
6 of 9 checks passed
@sergio-correia sergio-correia deleted the states branch August 18, 2025 13:29
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.

3 participants