azriel91 / peace

Zero Stress Automation
https://peace.mk
Apache License 2.0
110 stars 1 forks source link

Guard `ApplyCmd::exec` if stored states out of sync with discovered states #135

Closed azriel91 closed 1 year ago

azriel91 commented 1 year ago

Closes #59.

This allows developers to control whether out-of-sync states indicates execution should stop, or continue by design.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 86.62% and project coverage change: -1.54 :warning:

Comparison is base (f993198) 90.75% compared to head (c25664b) 89.21%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #135 +/- ## ========================================== - Coverage 90.75% 89.21% -1.54% ========================================== Files 345 359 +14 Lines 31083 32877 +1794 ========================================== + Hits 28210 29332 +1122 - Misses 2873 3545 +672 ``` | [Impacted Files](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh) | Coverage Δ | | |---|---|---| | [crate/rt/src/cmds/cmd\_base.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnQvc3JjL2NtZHMvY21kX2Jhc2UucnM=) | `97.50% <ø> (+7.50%)` | :arrow_up: | | [crate/rt/src/cmds/states\_current\_read\_cmd.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnQvc3JjL2NtZHMvc3RhdGVzX2N1cnJlbnRfcmVhZF9jbWQucnM=) | `100.00% <ø> (ø)` | | | [crate/rt/src/cmds/states\_goal\_read\_cmd.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnQvc3JjL2NtZHMvc3RhdGVzX2dvYWxfcmVhZF9jbWQucnM=) | `100.00% <ø> (ø)` | | | [.../src/cmds/sub/apply\_cmd/apply\_stored\_state\_sync.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnQvc3JjL2NtZHMvc3ViL2FwcGx5X2NtZC9hcHBseV9zdG9yZWRfc3RhdGVfc3luYy5ycw==) | `0.00% <0.00%> (ø)` | | | [crate/rt\_model\_core/src/error.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnRfbW9kZWxfY29yZS9zcmMvZXJyb3IucnM=) | `1.51% <ø> (ø)` | | | [crate/rt\_model\_core/src/error/apply\_cmd\_error.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnRfbW9kZWxfY29yZS9zcmMvZXJyb3IvYXBwbHlfY21kX2Vycm9yLnJz) | `0.00% <0.00%> (ø)` | | | [...te/rt\_model\_core/src/error/state\_downcast\_error.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnRfbW9kZWxfY29yZS9zcmMvZXJyb3Ivc3RhdGVfZG93bmNhc3RfZXJyb3IucnM=) | `0.00% <0.00%> (ø)` | | | [...e/rt\_model\_core/src/state\_stored\_and\_discovered.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-Y3JhdGUvcnRfbW9kZWxfY29yZS9zcmMvc3RhdGVfc3RvcmVkX2FuZF9kaXNjb3ZlcmVkLnJz) | `0.00% <0.00%> (ø)` | | | [items/file\_download/src/file\_download\_state.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-aXRlbXMvZmlsZV9kb3dubG9hZC9zcmMvZmlsZV9kb3dubG9hZF9zdGF0ZS5ycw==) | `0.00% <0.00%> (ø)` | | | [items/sh\_cmd/src/sh\_cmd\_data.rs](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh#diff-aXRlbXMvc2hfY21kL3NyYy9zaF9jbWRfZGF0YS5ycw==) | `25.00% <0.00%> (ø)` | | | ... and [17 more](https://app.codecov.io/gh/azriel91/peace/pull/135?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh) | | ... and [14 files with indirect coverage changes](https://app.codecov.io/gh/azriel91/peace/pull/135/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azriel+Hoh)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.