fix: harden task recovery and DR contract handling

This commit is contained in:
2026-09-20 13:36:48 +08:00
parent 492676344a
commit f9d8feb6f0
49 changed files with 2083 additions and 165 deletions
@@ -0,0 +1,16 @@
#include <bt_executor/recovery_policy.hpp>
#include <cassert>
#include <string>
int main() {
using namespace bt_executor;
assert(!recovery_authorized("", ""));
assert(!recovery_authorized("short", "short"));
assert(recovery_authorized("sixteen-byte-key!", "sixteen-byte-key!"));
assert(!recovery_authorized("sixteen-byte-key!", "sixteen-byte-key?"));
assert(!recovery_authorized("sixteen-byte-key!", "sixteen-byte-key!x"));
assert(!recovery_authorized(std::string(1025,'x'),std::string(1025,'x')));
assert(!recovery_resume_permitted(false,false,false));
assert(!recovery_resume_permitted(true,true,false));
assert(recovery_resume_permitted(true,false,false));
assert(recovery_resume_permitted(false,true,true));
}