Exercise a protocol 11 host through real order cancellation
This commit is contained in:
commit
5c309b2a9f
19 files changed
+2977
-90
No files matched your search
@@ -180,8 +180,8 @@ Test CheckpointTests::test_authentic_v1_import_and_authenticated_schema_body_pai
|
||||
}
|
||||
auto imported = decoded(old_checkpoint(0), catalog);
|
||||
auto current = encoded(*imported.world, rules);
|
||||
require(static_cast<unsigned char>(current[8]) == 2 &&
|
||||
static_cast<unsigned char>(current[layout(current).body_begin + 8]) == 14,
|
||||
require(static_cast<unsigned char>(current[8]) == 3 &&
|
||||
static_cast<unsigned char>(current[layout(current).body_begin + 8]) == 15,
|
||||
"new checkpoint lacks the current schema/body pair");
|
||||
auto false_legacy = current;
|
||||
change(false_legacy, 8, std::uint32_t{1}); rehash(false_legacy);
|
||||
@@ -211,7 +211,7 @@ Test CheckpointTests::test_round_trip_preserves_identity_and_legacy_world_bytes(
|
||||
require(saved_state(*restored.world) == before && saved_state(world) == before,
|
||||
"checkpoint changed the original or restored canonical state");
|
||||
std::ostringstream modern(std::ios::binary);
|
||||
world.write_save(modern, WorldSaveFormat::Current14);
|
||||
world.write_save(modern, WorldSaveFormat::Current15);
|
||||
require(bytes.substr(layout(bytes).body_begin, modern.str().size()) == modern.str(),
|
||||
"checkpoint did not use the current world serialization");
|
||||
require(before.substr(0, 8) == "SETTLERS" && static_cast<unsigned char>(before[8]) == 13,
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
#include "settlement/core/checkpoint.hpp"
|
||||
#include "fixtures/custody_v14/fixtures.hpp"
|
||||
|
||||
#include <Void/Binary/Reader.hpp>
|
||||
#include <Void/Binary/Writer.hpp>
|
||||
#include <Void/Core/Hash.hpp>
|
||||
#include <Void/Crypto/Crypto.hpp>
|
||||
#include <Void/Testing/Suite.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace {
|
||||
using namespace settlement;
|
||||
using Void::Testing::Test;
|
||||
void require(bool condition, std::string_view message) {
|
||||
if (!condition) throw std::runtime_error(std::string(message));
|
||||
}
|
||||
std::string unhex(std::string_view hex) {
|
||||
const auto digit = [](char c) { return c <= '9' ? c - '0' : c - 'a' + 10; };
|
||||
std::string result;
|
||||
for (std::size_t i = 0; i < hex.size(); i += 2) result.push_back(static_cast<char>(digit(hex[i]) * 16 + digit(hex[i + 1])));
|
||||
return result;
|
||||
}
|
||||
std::string raw(const World& world, WorldSaveFormat format = WorldSaveFormat::Current15) {
|
||||
std::ostringstream stream(std::ios::binary); world.write_save(stream, format); return stream.str();
|
||||
}
|
||||
WorldCheckpoint load(std::string_view bytes, std::size_t workers = 1) {
|
||||
const auto catalog = builtin_rule_packages();
|
||||
auto result = decode_checkpoint(bytes, *catalog, workers,
|
||||
workers == 1 ? ExecutionMode::SerialReference : ExecutionMode::Parallel);
|
||||
if (!result) throw std::runtime_error(result.error().message);
|
||||
return std::move(*result);
|
||||
}
|
||||
std::string save(const WorldCheckpoint& saved) {
|
||||
auto result = encode_checkpoint(*saved.world, saved.world_id, saved.city, saved.rules);
|
||||
if (!result) throw std::runtime_error(result.error().message);
|
||||
return std::move(*result);
|
||||
}
|
||||
const custody_v14::Fixture& fixture(std::string_view name) {
|
||||
for (const auto& entry : custody_v14::fixtures) if (entry.name == name) return entry;
|
||||
throw std::runtime_error("missing historical fixture");
|
||||
}
|
||||
std::size_t body_begin(std::string_view bytes) {
|
||||
Void::Binary::Reader reader(std::as_bytes(std::span{bytes.data(), bytes.size()}).subspan(12));
|
||||
return 24 + reader.readLittle<std::uint32_t>().value();
|
||||
}
|
||||
template<class T> void change(std::string& bytes, std::size_t offset, T value) {
|
||||
Void::Binary::Writer writer(std::as_writable_bytes(std::span{bytes.data(), bytes.size()}).subspan(offset));
|
||||
require(writer.writeLittle(value).has_value(), "mutation exceeded frame");
|
||||
}
|
||||
void rehash(std::string& bytes) {
|
||||
auto hasher = Void::Crypto::Hasher::create(Void::Crypto::HashAlgorithm::Sha256);
|
||||
require(hasher && hasher->update(std::string_view(bytes).substr(0,bytes.size()-32)), "hash failed");
|
||||
auto digest = hasher->finalize(); require(digest.has_value(), "hash finalization failed");
|
||||
std::memcpy(bytes.data()+bytes.size()-32, digest->data(), 32);
|
||||
}
|
||||
void reject(std::string bytes) {
|
||||
rehash(bytes);
|
||||
auto catalog = builtin_rule_packages();
|
||||
require(!decode_checkpoint(bytes,*catalog,1,ExecutionMode::SerialReference), "authenticated malformed custody was accepted");
|
||||
}
|
||||
void legacy_reject(const World& world) {
|
||||
for (auto format : {WorldSaveFormat::Legacy13, WorldSaveFormat::Current14}) {
|
||||
std::ostringstream out(std::ios::binary);
|
||||
bool failed = false;
|
||||
try { world.write_save(out,format); } catch (const UnsupportedLegacyState&) { failed=true; }
|
||||
require(failed && out.str().empty(), "unsupported projection wrote a prefix or lost typed error");
|
||||
}
|
||||
}
|
||||
struct [[= Void::Testing::name("CustodyMigrationTests")]] CustodyMigrationTests : Void::Testing::Suite<CustodyMigrationTests> {
|
||||
[[= Void::Testing::tag("custody-migration")]] Test authentic_historical_phases_keep_eighty_tick_projection();
|
||||
[[= Void::Testing::tag("custody-migration")]] Test opening_stock_and_admission_are_reconstructed_without_receipts();
|
||||
[[= Void::Testing::tag("custody-migration")]] Test modern_frames_reject_identity_balance_and_pair_corruption();
|
||||
[[= Void::Testing::tag("custody-migration")]] Test cancellation_is_durable_and_legacy_refusal_is_before_output();
|
||||
[[= Void::Testing::tag("custody-migration")]] Test completed_receipts_keep_retired_stock_and_order_references();
|
||||
[[= Void::Testing::tag("custody-migration")]] Test single_finished_material_and_partial_return_use_modern_format();
|
||||
[[= Void::Testing::tag("custody-migration")]] Test suspended_sites_and_zero_completion_use_modern_format();
|
||||
};
|
||||
Test CustodyMigrationTests::authentic_historical_phases_keep_eighty_tick_projection() {
|
||||
for (const auto& original : custody_v14::fixtures) {
|
||||
const auto bytes=unhex(original.checkpoint);
|
||||
const auto digest=Void::Crypto::sha256(std::string_view(bytes));
|
||||
require(digest.has_value(), "fixture hashing failed");
|
||||
const auto expected_digest=unhex(original.sha256);
|
||||
require(std::ranges::equal(*digest,std::as_bytes(std::span{expected_digest.data(),expected_digest.size()})), "historical fixture SHA differs");
|
||||
for (auto workers : {1U,2U,6U,12U}) {
|
||||
auto restored=load(bytes,workers);
|
||||
require(raw(*restored.world,WorldSaveFormat::Current14)==bytes.substr(body_begin(bytes),bytes.size()-body_begin(bytes)-32), original.name);
|
||||
for (std::size_t tick=0;tick<original.ticks.size();++tick) {
|
||||
require(Void::Hash::fnv1a64(raw(*restored.world,WorldSaveFormat::Legacy13))==original.ticks[tick],
|
||||
std::string(original.name)+" historical tick "+std::to_string(tick));
|
||||
const auto modern=save(restored);
|
||||
auto roundtrip=load(modern,workers);
|
||||
require(save(roundtrip)==modern,"modern migration roundtrip changed canonical bytes");
|
||||
restored.world->step();
|
||||
roundtrip.world->step();
|
||||
require(raw(*roundtrip.world)==raw(*restored.world), "modern continuation diverged");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Test CustodyMigrationTests::opening_stock_and_admission_are_reconstructed_without_receipts() {
|
||||
for(const auto& original:custody_v14::fixtures) {
|
||||
auto restored=load(unhex(original.checkpoint)); const auto& world=*restored.world;
|
||||
world.validate_custody();
|
||||
require(world.custody_receipts().empty(),"migration invented historical receipts");
|
||||
const auto& actor=world.agents().front();
|
||||
require(actor.execution && actor.next_admission==2 && actor.execution->next_operation==1,"active legacy admission was not marked consumed");
|
||||
CustodyRequest retry;retry.key={CustodyKeyKind::Admission,actor.id,1};
|
||||
require(restored.world->custody_request(retry).status==CustodyStatus::Stale,"migrated admission was executed again");
|
||||
if(original.name=="cabin-working") {
|
||||
const auto& input=world.production_orders().front().input;
|
||||
require(input.item_count(ItemType::Plank)==3&&input.item_count(ItemType::StoneBlock)==2&&actor.inventory.empty(),"implicit worksite stock was not restored");
|
||||
require(world.item_balances()[2].opening==3&&world.item_balances()[3].opening==2,"opening was measured before worksite restoration");
|
||||
}
|
||||
if(original.name.starts_with("direct-")) require(world.production_orders().front().input.empty(),"direct recipe debited input during migration");
|
||||
}
|
||||
}
|
||||
Test CustodyMigrationTests::modern_frames_reject_identity_balance_and_pair_corruption() {
|
||||
auto restored=load(unhex(fixture("cabin-before-pickup").checkpoint));
|
||||
const auto good=save(restored), before=raw(*restored.world);
|
||||
const auto extension=body_begin(good)+raw(*restored.world,WorldSaveFormat::Current14).size();
|
||||
for(auto offset:{extension,extension+8,extension+16}) {
|
||||
auto bad=good;change(bad,offset,std::uint64_t{0});reject(std::move(bad));
|
||||
}
|
||||
auto duplicate=good;change(duplicate,extension+24+8,std::uint64_t{1});reject(std::move(duplicate));
|
||||
auto bad_balance=good; // Last 11*64 bytes before receipt count are the balance ledger.
|
||||
const auto balance=good.size()-32-4-item_type_count*64;
|
||||
change(bad_balance,balance,std::uint64_t{1});reject(std::move(bad_balance));
|
||||
for(auto schema:{1U,2U}){auto bad=good;change(bad,8,schema);reject(std::move(bad));}
|
||||
auto false_three=unhex(fixture("cabin-working").checkpoint);change(false_three,8,3U);reject(std::move(false_three));
|
||||
require(raw(*restored.world)==before,"decoding corrupt candidate mutated active owner");
|
||||
}
|
||||
Test CustodyMigrationTests::cancellation_is_durable_and_legacy_refusal_is_before_output() {
|
||||
for(auto name:{"cabin-between-stops","cabin-to-site","cabin-working"}) {
|
||||
auto restored=load(unhex(fixture(name).checkpoint));
|
||||
const auto id=restored.world->production_orders().front().id;
|
||||
require(restored.world->cancel_production(id)==CommandStatus::Accepted,"cancel refused historical active construction");
|
||||
legacy_reject(*restored.world);
|
||||
const auto bytes=save(restored);auto loaded=load(bytes);
|
||||
require(save(loaded)==bytes,"return cargo lost in modern checkpoint");
|
||||
for(int tick=0;tick<80;++tick){restored.world->step();loaded.world->step();require(raw(*restored.world)==raw(*loaded.world),"return differed after restore");}
|
||||
}
|
||||
}
|
||||
Test CustodyMigrationTests::completed_receipts_keep_retired_stock_and_order_references() {
|
||||
auto restored=load(unhex(fixture("cabin-working").checkpoint));
|
||||
require(restored.world->cancel_production(restored.world->production_orders().front().id)==CommandStatus::Accepted,"fixture active order removal failed");
|
||||
require(!restored.world->custody_receipts().empty(),"fixture did not create cancellation receipt");
|
||||
const auto remembered=restored.world->custody_receipts().back();
|
||||
for(int tick=0;tick<80;++tick)restored.world->step();
|
||||
const auto bytes=save(restored);auto loaded=load(bytes);
|
||||
require(loaded.world->custody_request(remembered->request)==remembered->result,"historical result was lost after referenced stock/order retirement");
|
||||
}
|
||||
Test CustodyMigrationTests::single_finished_material_and_partial_return_use_modern_format() {
|
||||
for (auto item : {ItemType::Plank, ItemType::StoneBlock}) {
|
||||
auto metadata = load(unhex(fixture("cabin-working").checkpoint));
|
||||
auto world = std::make_unique<World>(43,20,8,1,ExecutionMode::SerialReference);
|
||||
const auto first=world->add_storage({3,3},20), second=world->add_storage({8,3},20);
|
||||
world->stock_storage(first,item,1);
|
||||
world->stock_storage(second,ItemType::Plank,item==ItemType::Plank?2:3);
|
||||
world->stock_storage(second,ItemType::StoneBlock,item==ItemType::StoneBlock?1:2);
|
||||
static_cast<void>(world->spawn_agent({1,3}));world->queue_production({14,3},RecipeId::BuildCabin);
|
||||
for(int tick=0;tick<10&&world->agents().front().inventory.empty();++tick)world->step();
|
||||
require(world->agents().front().inventory.item_count(item)==1,"fixture missed single-item pickup");
|
||||
require(world->cancel_production(world->production_orders().front().id)==CommandStatus::Accepted,"single cargo cancellation failed");
|
||||
legacy_reject(*world);metadata.world=std::move(world);
|
||||
const auto encoded=save(metadata);require(save(load(encoded))==encoded,"single finished material did not roundtrip");
|
||||
}
|
||||
for (bool partial : {false,true}) {
|
||||
auto restored=load(unhex(fixture("cabin-working").checkpoint));
|
||||
restored.world->stock_storage(restored.world->storages()[0].id,ItemType::Wood,partial?19:20);
|
||||
restored.world->stock_storage(restored.world->storages()[1].id,ItemType::Wood,20);
|
||||
require(restored.world->cancel_production(restored.world->production_orders().front().id)==CommandStatus::Accepted,"full-store cancellation failed");
|
||||
for(int tick=0;tick<40;++tick)restored.world->step();
|
||||
require(restored.world->agents().front().inventory.item_count(ItemType::Plank)==(partial?2U:3U),"return did not respect exact available capacity");
|
||||
require(restored.world->agents().front().inventory.item_count(ItemType::StoneBlock)==2,"mixed return dropped second item");
|
||||
legacy_reject(*restored.world);const auto encoded=save(restored);require(save(load(encoded))==encoded,"partial or blocked return did not roundtrip");
|
||||
}
|
||||
}
|
||||
Test CustodyMigrationTests::suspended_sites_and_zero_completion_use_modern_format() {
|
||||
for(bool bed:{false,true}) {
|
||||
auto metadata=load(unhex(fixture("cabin-working").checkpoint));
|
||||
auto world=std::make_unique<World>(43,20,8,1,ExecutionMode::SerialReference);
|
||||
world->start_scenario({2,2});const auto storage=world->add_storage({3,3},20);
|
||||
world->stock_storage(storage,ItemType::Wood,bed?1:2);static_cast<void>(world->spawn_agent({1,3}));
|
||||
if(bed)require(world->apply_command({1,1,CommandKind::PlaceBed,{6,3}}).status==CommandStatus::Accepted,"bed placement failed");
|
||||
else world->queue_production({6,3},RecipeId::BuildLoom);
|
||||
for(int tick=0;tick<45;++tick)world->step();
|
||||
require(world->cancel_production(world->production_orders().front().id)==CommandStatus::Accepted,"residual site cancellation failed");
|
||||
require(world->production_orders().front().suspended,"residual site was not suspended");
|
||||
legacy_reject(*world);metadata.world=std::move(world);
|
||||
const auto encoded=save(metadata);auto loaded=load(encoded);require(save(loaded)==encoded,"suspended site did not roundtrip");
|
||||
require(loaded.world->resume_production(loaded.world->production_orders().front().id)==CommandStatus::Accepted,"suspended site cannot resume after restore");
|
||||
}
|
||||
auto metadata=load(unhex(fixture("cabin-working").checkpoint));
|
||||
auto encoded=save(metadata);
|
||||
// The historical prefix is kept in raw15. Parse its first agent timer rather
|
||||
// than relying on native object layout; this is a valid pending completion.
|
||||
const auto body=body_begin(encoded);
|
||||
Void::Binary::Reader reader(std::as_bytes(std::span{encoded.data(),encoded.size()}).subspan(body));
|
||||
require(reader.skip(20).has_value(),"missing dimensions");
|
||||
const auto width=reader.readLittle<std::uint32_t>().value(),height=reader.readLittle<std::uint32_t>().value();
|
||||
require(reader.skip(81+static_cast<std::size_t>(width)*height+4+25).has_value(),"missing first agent");
|
||||
const auto route=reader.readLittle<std::uint32_t>().value();
|
||||
require(reader.skip(static_cast<std::size_t>(route)*8+8).has_value(),"missing first route");
|
||||
change(encoded,body+reader.position(),std::uint32_t{0});rehash(encoded);
|
||||
auto pending=load(encoded);legacy_reject(*pending.world);
|
||||
require(save(pending)==encoded,"pending zero timer did not roundtrip");
|
||||
pending.world->step();pending.world->validate_custody();
|
||||
}
|
||||
} // namespace
|
||||
@@ -0,0 +1,187 @@
|
||||
#include "settlement/core/world.hpp"
|
||||
#include <Void/Testing/Suite.hpp>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
using namespace settlement;
|
||||
using Void::Testing::Test;
|
||||
void require(bool ok, const char* message) { if (!ok) throw std::runtime_error(message); }
|
||||
void ticks(World& world, int count) { for (int i = 0; i < count; ++i) { world.step(); world.validate_custody(); } }
|
||||
std::unique_ptr<World> cabin(std::uint32_t stock = 3) {
|
||||
auto w = std::make_unique<World>(7, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
auto storage = w->add_storage({3, 3}, 50);
|
||||
w->stock_storage(storage, ItemType::Plank, stock);
|
||||
w->stock_storage(storage, ItemType::StoneBlock, 2);
|
||||
(void)w->spawn_agent({1, 3});
|
||||
w->queue_production({16, 3}, RecipeId::BuildCabin);
|
||||
return w;
|
||||
}
|
||||
struct [[= Void::Testing::name("CustodyTests")]] CustodyTests : Void::Testing::Suite<CustodyTests> {
|
||||
[[= Void::Testing::tag("custody")]] Test ownership_delivery_and_consumption();
|
||||
[[= Void::Testing::tag("custody")]] Test cancel_site_returns_all_types();
|
||||
[[= Void::Testing::tag("custody")]] Test split_merge_and_snapshot();
|
||||
[[= Void::Testing::tag("custody")]] Test exact_receipt_and_conflict();
|
||||
[[= Void::Testing::tag("custody")]] Test original_colony_continuous_balance();
|
||||
[[= Void::Testing::tag("custody")]] Test five_sources();
|
||||
[[= Void::Testing::tag("custody")]] Test blocked_return_retains_every_item();
|
||||
[[= Void::Testing::tag("custody")]] Test suspended_bed_and_loom_resume();
|
||||
[[= Void::Testing::tag("custody")]] Test admission_exhaustion_and_receipt_eviction();
|
||||
[[= Void::Testing::tag("custody")]] Test recipes_meals_and_harvest_balance();
|
||||
[[= Void::Testing::tag("custody-metrics")]] Test snapshot_metrics();
|
||||
};
|
||||
Test CustodyTests::ownership_delivery_and_consumption() {
|
||||
auto w = cabin();
|
||||
const auto plank = w->storages()[0].items[0].id;
|
||||
ticks(*w, 2);
|
||||
require(w->agents()[0].inventory.stack_id(ItemType::Plank) == plank, "whole pickup changed ID");
|
||||
for (int i = 0; i < 20 && w->agents()[0].state != AgentState::Working; ++i) ticks(*w, 1);
|
||||
require(w->production_orders()[0].input.stack_id(ItemType::Plank) == plank, "site lost ID");
|
||||
require(w->production_orders()[0].input.item_count(ItemType::Plank) == 3, "site lost physical count");
|
||||
ticks(*w, 40);
|
||||
require(w->production_orders()[0].state == JobState::Completed, "construction incomplete");
|
||||
require(w->item_balances()[2].installation == 3, "installation sink missing");
|
||||
}
|
||||
Test CustodyTests::cancel_site_returns_all_types() {
|
||||
auto w = cabin();
|
||||
ticks(*w, 16);
|
||||
require(w->cancel_production(w->production_orders()[0].id) == CommandStatus::Accepted, "cancel refused");
|
||||
w->validate_custody();
|
||||
require(w->agents()[0].state == AgentState::Returning && !w->legacy_representable(), "cancel phase lost");
|
||||
ticks(*w, 40);
|
||||
require(w->agents()[0].inventory.empty() && w->storages()[0].item_count(ItemType::Plank) == 3 &&
|
||||
w->storages()[0].item_count(ItemType::StoneBlock) == 2, "return lost cargo");
|
||||
}
|
||||
Test CustodyTests::split_merge_and_snapshot() {
|
||||
auto w = cabin(5);
|
||||
const auto original = w->storages()[0].items[0].id;
|
||||
auto snapshot = w->capture();
|
||||
ticks(*w, 2);
|
||||
require(w->storages()[0].items[0].id == original && w->agents()[0].inventory.stack_id(ItemType::Plank) != original, "split identity wrong");
|
||||
require(snapshot->storages()[0].item_count(ItemType::Plank) == 5 && snapshot->custody_receipts().empty(), "snapshot mutated");
|
||||
require(w->cancel_production(w->production_orders()[0].id) == CommandStatus::Accepted, "cancel refused");
|
||||
ticks(*w, 10);
|
||||
require(w->storages()[0].items[0].id == original && w->storages()[0].item_count(ItemType::Plank) == 5, "merge identity wrong");
|
||||
}
|
||||
Test CustodyTests::exact_receipt_and_conflict() {
|
||||
auto w = cabin(); ticks(*w, 1);
|
||||
auto receipt = *w->custody_receipts().front();
|
||||
require(w->custody_request(receipt.request) == receipt.result, "exact retry differed");
|
||||
++receipt.request.destination;
|
||||
require(w->custody_request(receipt.request).status == CustodyStatus::Conflict, "changed retry accepted");
|
||||
receipt.request.key.ordinal += 100;
|
||||
require(w->custody_request(receipt.request).status == CustodyStatus::Future, "future retry accepted");
|
||||
ticks(*w, 60);
|
||||
}
|
||||
Test CustodyTests::original_colony_continuous_balance() {
|
||||
auto w = make_first_colony(1, BedConstructionMode::Staged, ExecutionMode::SerialReference);
|
||||
w->validate_custody();
|
||||
ticks(*w, 1000);
|
||||
}
|
||||
Test CustodyTests::five_sources() {
|
||||
auto w = std::make_unique<World>(7, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
const auto store = w->add_storage({3 + i, 3}, 10);
|
||||
w->stock_storage(store, i < 3 ? ItemType::Plank : ItemType::StoneBlock, 1);
|
||||
}
|
||||
(void)w->spawn_agent({1, 3}); w->queue_production({16, 3}, RecipeId::BuildCabin);
|
||||
ticks(*w, 1);
|
||||
require(w->custody_receipts()[0]->request.line_count == 5, "admission omitted sources");
|
||||
ticks(*w, 80);
|
||||
require(w->production_orders()[0].state == JobState::Completed, "five-source cabin incomplete");
|
||||
}
|
||||
|
||||
Test CustodyTests::blocked_return_retains_every_item() {
|
||||
auto w = cabin(); ticks(*w, 16);
|
||||
require(w->cancel_production(w->production_orders()[0].id) == CommandStatus::Accepted, "cancel refused");
|
||||
auto& store = const_cast<Storage&>(w->storages()[0]); store.capacity = 1;
|
||||
ticks(*w, 40);
|
||||
require(w->agents()[0].state == AgentState::Returning && w->agents()[0].execution &&
|
||||
w->agents()[0].execution->blocked == CustodyStatus::NoDestination, "blocked return lost execution");
|
||||
require(w->agents()[0].inventory.item_count(ItemType::Plank) == 2 &&
|
||||
w->agents()[0].inventory.item_count(ItemType::StoneBlock) == 2, "partial return lost items");
|
||||
auto id = w->add_storage({4, 3}, 20);
|
||||
ticks(*w, 20);
|
||||
require(w->agents()[0].inventory.empty() && w->find_storage(id)->total_items() == 4, "unblocked return incomplete");
|
||||
}
|
||||
Test CustodyTests::suspended_bed_and_loom_resume() {
|
||||
World w(9, 20, 20, 1, ExecutionMode::SerialReference);
|
||||
const auto store = w.add_storage({2, 2}, 30);
|
||||
w.stock_storage(store, ItemType::Wood, 4); w.stock_storage(store, ItemType::Cloth, 2);
|
||||
const auto actor = w.spawn_agent({2, 2}); (void)actor; w.start_scenario({8, 8});
|
||||
require(w.apply_command({1, 1, CommandKind::PlaceBed, {4, 2}}).status == CommandStatus::Accepted, "bed placement refused");
|
||||
const auto id = w.production_orders()[0].id;
|
||||
for (int i = 0; i < 80 && w.find_production(id)->bed_stage == BedStage::Foundation; ++i) ticks(w, 1);
|
||||
require(w.find_production(id)->bed_stage == BedStage::Bedding, "bed foundation absent");
|
||||
require(w.cancel_production(id) == CommandStatus::Accepted && w.find_production(id)->suspended, "partial bed not suspended");
|
||||
ticks(w, 20); require(!w.legacy_representable(), "suspended bed projected");
|
||||
require(w.resume_production(id) == CommandStatus::Accepted, "resume refused");
|
||||
ticks(w, 100); require(w.find_production(id)->state == JobState::Completed, "bed resumed wrong stage");
|
||||
require(w.item_balances()[0].installation == 1 && w.item_balances()[5].installation == 2, "bed installed twice");
|
||||
require(w.cancel_production(id) == CommandStatus::Busy, "completed bed canceled");
|
||||
w.queue_production({6, 2}, RecipeId::WeaveCloth); const auto loom = w.production_orders().back().id;
|
||||
require(w.cancel_production(loom) == CommandStatus::Accepted && w.find_production(loom)->suspended, "loom not retained");
|
||||
w.stock_storage(store, ItemType::Flax, 1);
|
||||
require(w.resume_production(loom) == CommandStatus::Accepted, "loom resume refused");
|
||||
ticks(w, 60); require(w.find_storage(store)->item_count(ItemType::Cloth) == 1, "loom failed after resume");
|
||||
}
|
||||
Test CustodyTests::admission_exhaustion_and_receipt_eviction() {
|
||||
auto w = cabin();
|
||||
auto& actor = const_cast<Agent&>(w->agents()[0]); actor.next_admission = std::numeric_limits<std::uint64_t>::max();
|
||||
ticks(*w, 2);
|
||||
require(!actor.execution && w->custody_receipts().empty() && w->storages()[0].items[0].reserved == 0, "exhausted admission mutated stock");
|
||||
World loom(1, 16, 16, 1, ExecutionMode::SerialReference);
|
||||
const auto store = loom.add_storage({2, 2}, 4000); loom.stock_storage(store, ItemType::Flax, 3000);
|
||||
(void)loom.spawn_agent({3, 2}); loom.queue_production({3, 2}, RecipeId::WeaveCloth);
|
||||
loom.step(); auto first = *loom.custody_receipts()[0]; auto snapshot = loom.capture();
|
||||
for (int i = 0; i < 26000; ++i) loom.step();
|
||||
loom.validate_custody();
|
||||
require(loom.custody_receipts().size() == custody_receipt_limit &&
|
||||
loom.custody_request(first.request).status == CustodyStatus::Stale, "evicted admission not stale");
|
||||
require(snapshot->custody_receipts()[0]->request == first.request && snapshot->custody_receipts()[0]->result == first.result,
|
||||
"retained snapshot receipt mutated");
|
||||
for (const auto& receipt : loom.custody_receipts()) require(loom.custody_request(receipt->request) == receipt->result, "retained replay differed");
|
||||
}
|
||||
Test CustodyTests::recipes_meals_and_harvest_balance() {
|
||||
World w(1, 20, 20, 1, ExecutionMode::SerialReference);
|
||||
const auto store = w.add_storage({2, 2}, 100);
|
||||
const auto pantry = w.add_storage({2, 3}, 20, StorageKind::Pantry);
|
||||
w.stock_storage(store, ItemType::Wood, 10); w.stock_storage(store, ItemType::Stone, 3);
|
||||
w.stock_storage(pantry, ItemType::Berries, 4);
|
||||
(void)w.spawn_agent({2, 2}); (void)w.add_resource_node({3, 3}, ItemType::Wood, 5);
|
||||
w.queue_production({4, 2}, RecipeId::SawPlank); w.queue_production({5, 2}, RecipeId::CutStoneBlock);
|
||||
w.enable_hunger(); ticks(w, 300);
|
||||
require(w.meals_eaten() > 0 && w.item_balances()[0].harvest == 5 && w.item_balances()[0].recipe_input == 1 &&
|
||||
w.item_balances()[2].recipe_output == 1 && w.item_balances()[3].recipe_output == 1, "recipe/source/sink path omitted");
|
||||
}
|
||||
Test CustodyTests::snapshot_metrics() {
|
||||
for (bool full : {false, true}) {
|
||||
World w(1, 512, 512, 1, ExecutionMode::SerialReference);
|
||||
if (full) {
|
||||
auto store = w.add_storage({1, 1}, 4000); w.stock_storage(store, ItemType::Flax, 3000);
|
||||
(void)w.spawn_agent({2, 1}); w.queue_production({2, 1}, RecipeId::WeaveCloth);
|
||||
for (int i = 0; i < 26000; ++i) w.step();
|
||||
}
|
||||
while (w.agents().size() < 500) (void)w.spawn_agent({1, 1});
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
auto store = w.add_storage({i % 500, i / 500 + 5}, 1000);
|
||||
for (std::size_t j = 1; j <= item_type_count; ++j) if (static_cast<ItemType>(j) != ItemType::Berries)
|
||||
w.stock_storage(store, static_cast<ItemType>(j), 1);
|
||||
}
|
||||
while (w.production_orders().size() < 2000) w.queue_production({3, 3}, RecipeId::SawPlank);
|
||||
w.validate_custody();
|
||||
std::vector<double> samples;
|
||||
for (int i = 0; i < 101; ++i) {
|
||||
const auto begin = std::chrono::steady_clock::now(); auto snapshot = w.capture();
|
||||
samples.push_back(std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - begin).count());
|
||||
}
|
||||
std::sort(samples.begin(), samples.end()); std::ostringstream bytes; w.write_save(bytes);
|
||||
std::cout << "custody metrics residents=500 stacks=" << (full ? 10002 : 10000) << " orders=2000 receipts=" << w.custody_receipts().size()
|
||||
<< " capture_ms_p50=" << samples[50] << " p95=" << samples[95] << " raw13_bytes=" << bytes.str().size() << '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# Frozen schema 2 migration corpus
|
||||
|
||||
`fixtures.hpp` contains 13 authentic checkpoints and FNV-1a hashes of 80 subsequent raw13 states for each. They were emitted by `capture.cpp`, compiled exclusively against source and headers at `f6493e2d1cdb9e07eb18b9901fd8878b5d3fa51e`, using the pinned VoidLibrary `7b0fea6095f603f9e1904f66dfdc7752f4be4792`, Windows x64 GCC 16.2 and Wine 11. Each fixture includes its full SHA-256. These bytes were captured before the custody implementation and are never regenerated by the current writer.
|
||||
|
||||
Seed is 43. UUID is `91020304-0506-4708-890a-0b0c0d0e0f10`, city 7, built-in rules. The probe records exact states before pickup, between stops, approaching the worksite, Working with implicit consumed delivery, three direct recipes, finished carpenter cargo without a production link, harvesting, harvested cargo, both meal phases and tending. The `.continuation13` probe output stores 80 length-prefixed raw13 frames (32-bit little-endian lengths).
|
||||
|
||||
Reproduce in a separate historical checkout at that exact commit, build its `settlement_core`, then compile this probe with that checkout's headers and library. Pass an existing directory prefix including its trailing separator. Do not use current headers or objects with the historical probe. The generated fixture header retains only checkpoints and per-tick hashes; complete raw frames and build logs are verification artifacts outside the repository.
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
#include "settlement/core/checkpoint.hpp"
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <set>
|
||||
using namespace settlement;
|
||||
constexpr Void::Uuid::Uuid uuid{{0x91,2,3,4,5,6,0x47,8,0x89,10,11,12,13,14,15,16}};
|
||||
std::string prefix;
|
||||
void capture(const World& world, const std::string& name) {
|
||||
auto rules=default_rules_manifest(); auto data=encode_checkpoint(world,uuid,7,*rules);
|
||||
if(!data) throw std::runtime_error(data.error().message);
|
||||
std::ofstream(prefix+name+".checkpoint",std::ios::binary).write(data->data(),data->size());
|
||||
std::ofstream raw(prefix+name+".raw14",std::ios::binary); world.write_save(raw,WorldSaveFormat::Current14);raw.close();
|
||||
std::ofstream legacy(prefix+name+".raw13",std::ios::binary); world.write_save(legacy,WorldSaveFormat::Legacy13);legacy.close();
|
||||
const auto&a=world.agents().front();
|
||||
std::cout<<name<<" tick="<<world.tick()<<" agent_state="<<int(a.state)<<" production="<<a.production_id<<" inventory=";
|
||||
for(unsigned i=1;i<=item_type_count;++i)std::cout<<a.inventory.item_count(ItemType(i))<<',';
|
||||
std::cout<<" stops="<<(world.production_orders().empty()?0:world.production_orders().front().delivery_stops.size())<<"\n";
|
||||
std::ostringstream frozen(std::ios::binary); world.write_save(frozen,WorldSaveFormat::Current14); std::istringstream input(frozen.str(),std::ios::binary); auto copy=World::read_save(input,1,ExecutionMode::SerialReference); std::ofstream continuation(prefix+name+".continuation13",std::ios::binary);
|
||||
for(unsigned i=0;i<80;++i){std::ostringstream frame(std::ios::binary); copy->write_save(frame,WorldSaveFormat::Legacy13); const auto bytes=frame.str(); std::uint32_t count=bytes.size(); continuation.write(reinterpret_cast<const char*>(&count),4); continuation.write(bytes.data(),bytes.size()); copy->step();}
|
||||
}
|
||||
int main(int argc,char**argv){
|
||||
if(argc!=2)return 2;prefix=argv[1];
|
||||
World w(43,20,8,1,ExecutionMode::SerialReference);
|
||||
auto a=w.add_storage({3,3},20),b=w.add_storage({8,3},20);
|
||||
w.stock_storage(a,ItemType::Plank,3);w.stock_storage(b,ItemType::StoneBlock,2);
|
||||
(void)w.spawn_agent({1,3}); w.queue_production({14,3},RecipeId::BuildCabin);
|
||||
std::set<std::string> seen;
|
||||
for(unsigned i=0;i<80;++i){w.step();const auto&agent=w.agents().front();const auto&o=w.production_orders().front();
|
||||
std::string name;
|
||||
if(agent.state==AgentState::FetchingMaterials)name="cabin-before-pickup";
|
||||
if(agent.state==AgentState::Hauling&&o.collected_stops==1)name="cabin-between-stops";
|
||||
if(agent.state==AgentState::Hauling&&o.collected_stops==2)name="cabin-to-site";
|
||||
if(agent.state==AgentState::Working)name="cabin-working";
|
||||
if(!name.empty()&&seen.insert(name).second)capture(w,name);
|
||||
}
|
||||
for(auto recipe:{RecipeId::SawPlank,RecipeId::CutStoneBlock,RecipeId::WeaveCloth}){
|
||||
World d(43,20,8,1,ExecutionMode::SerialReference);auto s=d.add_storage({3,3},20);
|
||||
d.stock_storage(s,recipe==RecipeId::SawPlank?ItemType::Wood:recipe==RecipeId::CutStoneBlock?ItemType::Stone:ItemType::Flax,1);
|
||||
(void)d.spawn_agent({2,3});d.queue_production({6,3},recipe);
|
||||
for(int i=0;i<40;++i){d.step();if(d.agents().front().state==AgentState::Working){capture(d,"direct-"+std::to_string(int(recipe)));break;}}
|
||||
}
|
||||
World c(43,24,24,1,ExecutionMode::SerialReference);c.start_scenario({2,2});auto s=c.add_storage({3,3},20);c.stock_storage(s,ItemType::Wood,5);
|
||||
const auto carpenter=c.spawn_agent({2,3}); (void)c.apply_command({1,1,CommandKind::AssignProfession,{},static_cast<std::uint8_t>(Profession::Carpenter),{},carpenter});c.queue_production(*c.carpenter_workshop(),RecipeId::CraftWoodenDoor);
|
||||
for(int i=0;i<120;++i){c.step();if(c.agents().front().state==AgentState::Hauling&&c.agents().front().production_id==0&&c.agents().front().inventory.item_count(ItemType::WoodenDoor)){capture(c,"carpenter-output");break;}}
|
||||
|
||||
World h(43,20,8,1,ExecutionMode::SerialReference);(void)h.add_storage({14,3},20);(void)h.add_resource_node({3,3},ItemType::Wood,1);(void)h.spawn_agent({1,3});
|
||||
bool gathering=false,hauling=false;
|
||||
for(int i=0;i<60;++i){h.step();if(!gathering&&h.agents().front().state==AgentState::Gathering){capture(h,"harvest-gathering");gathering=true;}if(!hauling&&h.agents().front().state==AgentState::Hauling){capture(h,"harvest-hauled");hauling=true;}}
|
||||
World m(43,20,8,1,ExecutionMode::SerialReference);auto pantry=m.add_storage({14,3},20,StorageKind::Pantry);m.stock_storage(pantry,ItemType::Berries,5);(void)m.spawn_agent({1,3});m.enable_hunger();
|
||||
bool going=false,eating=false;
|
||||
for(int i=0;i<220;++i){m.step();if(!going&&m.agents().front().state==AgentState::GoingToEat){capture(m,"meal-going");going=true;}if(!eating&&m.agents().front().state==AgentState::Eating){capture(m,"meal-eating");eating=true;}}
|
||||
World t(43,20,8,1,ExecutionMode::SerialReference);t.start_scenario({2,2});(void)t.spawn_agent({1,3});(void)t.apply_command({1,1,CommandKind::PlaceTreePlot,{5,3}});
|
||||
bool tending=false;
|
||||
for(int i=0;i<60;++i){t.step();if(t.agents().front().state==AgentState::Gathering&&t.agents().front().storage_id==0){capture(t,"tending");tending=true;break;}}
|
||||
return seen.size()==4&&gathering&&hauling&&going&&eating&&tending?0:3;
|
||||
}
|
||||
+541
@@ -0,0 +1,541 @@
|
||||
// Frozen output of f6493e2d1cdb9e07eb18b9901fd8878b5d3fa51e; see capture.cpp.
|
||||
#pragma once
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
namespace custody_v14 {
|
||||
struct Fixture { std::string_view name, sha256, checkpoint; std::array<std::uint64_t,80> ticks; };
|
||||
inline constexpr std::array<Fixture,13> fixtures{{
|
||||
{"cabin-before-pickup", "6fb53ddaf7d666a5e5b0e899ffbad1d7137dea4e7a037fcf824f521cf5f0b531",
|
||||
"53544843484b505402000000b6000000cf020000000000009102030405064708890a0b0c0d0e0f1007000000000000000100"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000001000000000000000500000000000000"
|
||||
"2300000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000003"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000002000000030000000500000000"
|
||||
"00000000020000000200000003000000030000000300000001000000000000001c0000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0100000000000000000000000000000000000000000002000000010000000000000003000000030000001400000000000000"
|
||||
"0001000000030300000003000000020000000000000008000000030000001400000000000000000100000004020000000200"
|
||||
"00000100000001000000000000000e0000000300000002010200000001000000000000000303000000020000000000000004"
|
||||
"0200000002000000010000000000000005000000040000000300000005000000030000000600000003000000070000000300"
|
||||
"0000080000000300000002000000000000000600000009000000030000000a000000030000000b000000030000000c000000"
|
||||
"030000000d000000030000000e00000003000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000089063e25ca59b04935ace8779f45e200ab2acbca2dc88fec7e"
|
||||
"c5f3504eda9248"
|
||||
, {
|
||||
0x599836ebcd30a29fULL, 0xcaac4531bb7bcf12ULL, 0xe100830a1464be03ULL, 0x027cbdd51f3b01c8ULL,
|
||||
0x1df54a0c813e02d9ULL, 0x770d4f71d98b81f6ULL, 0x1a291bf5fa80794eULL, 0xd66ea3ba081db91dULL,
|
||||
0x8373c6a20d010194ULL, 0xadddce31831e3cabULL, 0x17dcacae773a6e1aULL, 0xb7dcf72a67c28f09ULL,
|
||||
0x2b7379835239007dULL, 0xb581902af1f964a5ULL, 0xe6bb81ec4d2a4351ULL, 0xc9af37bf6bd67281ULL,
|
||||
0xc3565d7aa175849dULL, 0x4d6474224135e8c5ULL, 0xcea8c74d08b63769ULL, 0xfc9083bebbf8ed39ULL,
|
||||
0x94f2e4644ed7432dULL, 0x27ca7a848c14c2a5ULL, 0xa2268d43d90f4401ULL, 0xcbf17ad8282e5291ULL,
|
||||
0xdbb636c9dfd9f8edULL, 0x6e8dccea1d177865ULL, 0xefd22014e497c709ULL, 0x92c8073c7dcaac39ULL,
|
||||
0x8e8a57a7244dff5dULL, 0xa38a4398de1e3425ULL, 0xd4c4355a394f12d1ULL, 0xb32f60f8bad1de21ULL,
|
||||
0xacd686b3f070f03dULL, 0xc1d672a5aa412505ULL, 0x431ac5d071c173a9ULL, 0xe610acf80af458d9ULL,
|
||||
0x0964e2e7b7e27f6dULL, 0x9c3c7907f51ffee5ULL, 0x8ba6b67d280aafa1ULL, 0x4063795b91398ed1ULL,
|
||||
0x6681875fe5343f60ULL, 0xe9be99df149af205ULL, 0xc48ba8b0a8d56182ULL, 0xeaacd0ee5560795fULL,
|
||||
0x44d6d03be494df34ULL, 0xe2e0fdde315410b9ULL, 0x7d59e1a2ab98dc56ULL, 0x96639e9fe22a5203ULL,
|
||||
0x75f2d8f87f7c8c38ULL, 0xc2d8882fdfd29b5dULL, 0x259190664a78239aULL, 0x324e15c71a395c77ULL,
|
||||
0x6f153cf79c35aaecULL, 0xa12dd10bdf333b31ULL, 0x1eb3f4656731424eULL, 0xffb3418445bf349bULL,
|
||||
0xdf427bdce3116ed0ULL, 0xd1ff457831b6a835ULL, 0x14556cf5e3bd2eb2ULL, 0x3a7695339048468fULL,
|
||||
0x94a094811f7cac64ULL, 0xcb21a9774e6fc6e9ULL, 0xf61ad61fa9760bc6ULL, 0x3cc530cc6eb4baf3ULL,
|
||||
0x1c546b250c06f528ULL, 0x01b101b04e90ed4dULL, 0x646a09e6b936758aULL, 0x01a6d82b69b927a7ULL,
|
||||
0x1576cf2428c013dcULL, 0xb70f1a548afc2ae1ULL, 0x5d8c6de5d5ef943eULL, 0x15948accf188244bULL,
|
||||
0xf523c5258eda5e80ULL, 0x7860d7a4be411125ULL, 0x532de676527b80a2ULL, 0x794f0eb3ff06987fULL,
|
||||
0xd3790e018e3afe54ULL, 0x71833ba3dafa2fd9ULL, 0x0bfc1f68553efb76ULL, 0x2505dc658bd07123ULL,
|
||||
}},
|
||||
{"cabin-between-stops", "daca83d48f48b53f986305655017c01e4d40a73e7085d81088e5f71f7073ef4b",
|
||||
"53544843484b505402000000b6000000b6020000000000009102030405064708890a0b0c0d0e0f1007000000000000000200"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000002000000000000000500000000000000"
|
||||
"2300000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000003"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000003000000030000000400000000"
|
||||
"0000000005000000040000000300000005000000030000000600000003000000070000000300000008000000030000000000"
|
||||
"0000000000001c00000000000000000000000000000000000000000000000000000003000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000002000000"
|
||||
"0100000000000000030000000300000014000000000000000000000000020000000000000008000000030000001400000000"
|
||||
"00000000010000000402000000020000000100000001000000000000000e0000000300000002010200000001000000000000"
|
||||
"0003030000000200000000000000040200000002000000010000000000000000000000020000000000000006000000090000"
|
||||
"00030000000a000000030000000b000000030000000c000000030000000d000000030000000e000000030000000100000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"bfc296aeae849041ff62087240ac2f981e75d1791610f8f7c3bcc5e9792e6320"
|
||||
, {
|
||||
0xcaac4531bb7bcf12ULL, 0xe100830a1464be03ULL, 0x027cbdd51f3b01c8ULL, 0x1df54a0c813e02d9ULL,
|
||||
0x770d4f71d98b81f6ULL, 0x1a291bf5fa80794eULL, 0xd66ea3ba081db91dULL, 0x8373c6a20d010194ULL,
|
||||
0xadddce31831e3cabULL, 0x17dcacae773a6e1aULL, 0xb7dcf72a67c28f09ULL, 0x2b7379835239007dULL,
|
||||
0xb581902af1f964a5ULL, 0xe6bb81ec4d2a4351ULL, 0xc9af37bf6bd67281ULL, 0xc3565d7aa175849dULL,
|
||||
0x4d6474224135e8c5ULL, 0xcea8c74d08b63769ULL, 0xfc9083bebbf8ed39ULL, 0x94f2e4644ed7432dULL,
|
||||
0x27ca7a848c14c2a5ULL, 0xa2268d43d90f4401ULL, 0xcbf17ad8282e5291ULL, 0xdbb636c9dfd9f8edULL,
|
||||
0x6e8dccea1d177865ULL, 0xefd22014e497c709ULL, 0x92c8073c7dcaac39ULL, 0x8e8a57a7244dff5dULL,
|
||||
0xa38a4398de1e3425ULL, 0xd4c4355a394f12d1ULL, 0xb32f60f8bad1de21ULL, 0xacd686b3f070f03dULL,
|
||||
0xc1d672a5aa412505ULL, 0x431ac5d071c173a9ULL, 0xe610acf80af458d9ULL, 0x0964e2e7b7e27f6dULL,
|
||||
0x9c3c7907f51ffee5ULL, 0x8ba6b67d280aafa1ULL, 0x4063795b91398ed1ULL, 0x6681875fe5343f60ULL,
|
||||
0xe9be99df149af205ULL, 0xc48ba8b0a8d56182ULL, 0xeaacd0ee5560795fULL, 0x44d6d03be494df34ULL,
|
||||
0xe2e0fdde315410b9ULL, 0x7d59e1a2ab98dc56ULL, 0x96639e9fe22a5203ULL, 0x75f2d8f87f7c8c38ULL,
|
||||
0xc2d8882fdfd29b5dULL, 0x259190664a78239aULL, 0x324e15c71a395c77ULL, 0x6f153cf79c35aaecULL,
|
||||
0xa12dd10bdf333b31ULL, 0x1eb3f4656731424eULL, 0xffb3418445bf349bULL, 0xdf427bdce3116ed0ULL,
|
||||
0xd1ff457831b6a835ULL, 0x14556cf5e3bd2eb2ULL, 0x3a7695339048468fULL, 0x94a094811f7cac64ULL,
|
||||
0xcb21a9774e6fc6e9ULL, 0xf61ad61fa9760bc6ULL, 0x3cc530cc6eb4baf3ULL, 0x1c546b250c06f528ULL,
|
||||
0x01b101b04e90ed4dULL, 0x646a09e6b936758aULL, 0x01a6d82b69b927a7ULL, 0x1576cf2428c013dcULL,
|
||||
0xb70f1a548afc2ae1ULL, 0x5d8c6de5d5ef943eULL, 0x15948accf188244bULL, 0xf523c5258eda5e80ULL,
|
||||
0x7860d7a4be411125ULL, 0x532de676527b80a2ULL, 0x794f0eb3ff06987fULL, 0xd3790e018e3afe54ULL,
|
||||
0x71833ba3dafa2fd9ULL, 0x0bfc1f68553efb76ULL, 0x2505dc658bd07123ULL, 0x049516be2922ab58ULL,
|
||||
}},
|
||||
{"cabin-to-site", "86b61386600533badf032b4a17ac75c38a302f4c2b78fed37a38a76232360178",
|
||||
"53544843484b505402000000b600000085020000000000009102030405064708890a0b0c0d0e0f1007000000000000000700"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000007000000000000000500000000000000"
|
||||
"2300000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000003"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000008000000030000000400000000"
|
||||
"000000000600000009000000030000000a000000030000000b000000030000000c000000030000000d000000030000000e00"
|
||||
"00000300000000000000000000001c0000000000000000000000000000000000000000000000000000000300000002000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000"
|
||||
"0000000002000000010000000000000003000000030000001400000000000000000000000002000000000000000800000003"
|
||||
"000000140000000000000000000000000100000001000000000000000e000000030000000201020000000100000000000000"
|
||||
"0303000000020000000000000004020000000200000001000000000000000000000002000000000000000000000002000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"00232dd846a1a33102aa254a632f5ad28dd7c9da49baab15e4af6c417b21fe8b28"
|
||||
, {
|
||||
0x1a291bf5fa80794eULL, 0xd66ea3ba081db91dULL, 0x8373c6a20d010194ULL, 0xadddce31831e3cabULL,
|
||||
0x17dcacae773a6e1aULL, 0xb7dcf72a67c28f09ULL, 0x2b7379835239007dULL, 0xb581902af1f964a5ULL,
|
||||
0xe6bb81ec4d2a4351ULL, 0xc9af37bf6bd67281ULL, 0xc3565d7aa175849dULL, 0x4d6474224135e8c5ULL,
|
||||
0xcea8c74d08b63769ULL, 0xfc9083bebbf8ed39ULL, 0x94f2e4644ed7432dULL, 0x27ca7a848c14c2a5ULL,
|
||||
0xa2268d43d90f4401ULL, 0xcbf17ad8282e5291ULL, 0xdbb636c9dfd9f8edULL, 0x6e8dccea1d177865ULL,
|
||||
0xefd22014e497c709ULL, 0x92c8073c7dcaac39ULL, 0x8e8a57a7244dff5dULL, 0xa38a4398de1e3425ULL,
|
||||
0xd4c4355a394f12d1ULL, 0xb32f60f8bad1de21ULL, 0xacd686b3f070f03dULL, 0xc1d672a5aa412505ULL,
|
||||
0x431ac5d071c173a9ULL, 0xe610acf80af458d9ULL, 0x0964e2e7b7e27f6dULL, 0x9c3c7907f51ffee5ULL,
|
||||
0x8ba6b67d280aafa1ULL, 0x4063795b91398ed1ULL, 0x6681875fe5343f60ULL, 0xe9be99df149af205ULL,
|
||||
0xc48ba8b0a8d56182ULL, 0xeaacd0ee5560795fULL, 0x44d6d03be494df34ULL, 0xe2e0fdde315410b9ULL,
|
||||
0x7d59e1a2ab98dc56ULL, 0x96639e9fe22a5203ULL, 0x75f2d8f87f7c8c38ULL, 0xc2d8882fdfd29b5dULL,
|
||||
0x259190664a78239aULL, 0x324e15c71a395c77ULL, 0x6f153cf79c35aaecULL, 0xa12dd10bdf333b31ULL,
|
||||
0x1eb3f4656731424eULL, 0xffb3418445bf349bULL, 0xdf427bdce3116ed0ULL, 0xd1ff457831b6a835ULL,
|
||||
0x14556cf5e3bd2eb2ULL, 0x3a7695339048468fULL, 0x94a094811f7cac64ULL, 0xcb21a9774e6fc6e9ULL,
|
||||
0xf61ad61fa9760bc6ULL, 0x3cc530cc6eb4baf3ULL, 0x1c546b250c06f528ULL, 0x01b101b04e90ed4dULL,
|
||||
0x646a09e6b936758aULL, 0x01a6d82b69b927a7ULL, 0x1576cf2428c013dcULL, 0xb70f1a548afc2ae1ULL,
|
||||
0x5d8c6de5d5ef943eULL, 0x15948accf188244bULL, 0xf523c5258eda5e80ULL, 0x7860d7a4be411125ULL,
|
||||
0x532de676527b80a2ULL, 0x794f0eb3ff06987fULL, 0xd3790e018e3afe54ULL, 0x71833ba3dafa2fd9ULL,
|
||||
0x0bfc1f68553efb76ULL, 0x2505dc658bd07123ULL, 0x049516be2922ab58ULL, 0x517ac5f58978ba7dULL,
|
||||
0xb433ce2bf41e42baULL, 0xc0f0538cc3df7b97ULL, 0xfdb77abd45dbca0cULL, 0x2fd00ed188d95a51ULL,
|
||||
}},
|
||||
{"cabin-working", "f443380bc6ff9c74d2a24d80d0261b6cd9f7560796ae76548f2b7aa24e3ef505",
|
||||
"53544843484b505402000000b60000003d020000000000009102030405064708890a0b0c0d0e0f1007000000000000000d00"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b0000000000000014000000080000000d000000000000000500000000000000"
|
||||
"2300000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000003"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000100000001000000000000000e000000030000000200000000"
|
||||
"000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000"
|
||||
"0000000000000200000001000000000000000300000003000000140000000000000000000000000200000000000000080000"
|
||||
"0003000000140000000000000000000000000100000001000000000000000e00000003000000020102000000010000000000"
|
||||
"0000030300000002000000000000000402000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000009318a0b695a881878b8800d4ac312fa11b89fe3b0"
|
||||
"62514839b4bc0b5ac25594"
|
||||
, {
|
||||
0x2b7379835239007dULL, 0xb581902af1f964a5ULL, 0xe6bb81ec4d2a4351ULL, 0xc9af37bf6bd67281ULL,
|
||||
0xc3565d7aa175849dULL, 0x4d6474224135e8c5ULL, 0xcea8c74d08b63769ULL, 0xfc9083bebbf8ed39ULL,
|
||||
0x94f2e4644ed7432dULL, 0x27ca7a848c14c2a5ULL, 0xa2268d43d90f4401ULL, 0xcbf17ad8282e5291ULL,
|
||||
0xdbb636c9dfd9f8edULL, 0x6e8dccea1d177865ULL, 0xefd22014e497c709ULL, 0x92c8073c7dcaac39ULL,
|
||||
0x8e8a57a7244dff5dULL, 0xa38a4398de1e3425ULL, 0xd4c4355a394f12d1ULL, 0xb32f60f8bad1de21ULL,
|
||||
0xacd686b3f070f03dULL, 0xc1d672a5aa412505ULL, 0x431ac5d071c173a9ULL, 0xe610acf80af458d9ULL,
|
||||
0x0964e2e7b7e27f6dULL, 0x9c3c7907f51ffee5ULL, 0x8ba6b67d280aafa1ULL, 0x4063795b91398ed1ULL,
|
||||
0x6681875fe5343f60ULL, 0xe9be99df149af205ULL, 0xc48ba8b0a8d56182ULL, 0xeaacd0ee5560795fULL,
|
||||
0x44d6d03be494df34ULL, 0xe2e0fdde315410b9ULL, 0x7d59e1a2ab98dc56ULL, 0x96639e9fe22a5203ULL,
|
||||
0x75f2d8f87f7c8c38ULL, 0xc2d8882fdfd29b5dULL, 0x259190664a78239aULL, 0x324e15c71a395c77ULL,
|
||||
0x6f153cf79c35aaecULL, 0xa12dd10bdf333b31ULL, 0x1eb3f4656731424eULL, 0xffb3418445bf349bULL,
|
||||
0xdf427bdce3116ed0ULL, 0xd1ff457831b6a835ULL, 0x14556cf5e3bd2eb2ULL, 0x3a7695339048468fULL,
|
||||
0x94a094811f7cac64ULL, 0xcb21a9774e6fc6e9ULL, 0xf61ad61fa9760bc6ULL, 0x3cc530cc6eb4baf3ULL,
|
||||
0x1c546b250c06f528ULL, 0x01b101b04e90ed4dULL, 0x646a09e6b936758aULL, 0x01a6d82b69b927a7ULL,
|
||||
0x1576cf2428c013dcULL, 0xb70f1a548afc2ae1ULL, 0x5d8c6de5d5ef943eULL, 0x15948accf188244bULL,
|
||||
0xf523c5258eda5e80ULL, 0x7860d7a4be411125ULL, 0x532de676527b80a2ULL, 0x794f0eb3ff06987fULL,
|
||||
0xd3790e018e3afe54ULL, 0x71833ba3dafa2fd9ULL, 0x0bfc1f68553efb76ULL, 0x2505dc658bd07123ULL,
|
||||
0x049516be2922ab58ULL, 0x517ac5f58978ba7dULL, 0xb433ce2bf41e42baULL, 0xc0f0538cc3df7b97ULL,
|
||||
0xfdb77abd45dbca0cULL, 0x2fd00ed188d95a51ULL, 0xad56322b10d7616eULL, 0x8e557f49ef6553bbULL,
|
||||
0x6de4b9a28cb78df0ULL, 0x60a1833ddb5cc755ULL, 0xa2f7aabb8d634dd2ULL, 0xc918d2f939ee65afULL,
|
||||
}},
|
||||
{"carpenter-output", "6a401e39d87c97a16fbe4e7bc4a5d7cc88f6f26b176b2551102e66aa14ace446",
|
||||
"53544843484b505402000000b6000000bf030000000000009102030405064708890a0b0c0d0e0f1007000000000000001100"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000180000001800000011000000000000000400000000000000"
|
||||
"0b00000000000000000000000000000000000000000000000102000000000000000100000000000000010000000000000002"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000000"
|
||||
"0000000200000002000000040000000000000000020000000300000002000000030000000300000000000000000000000000"
|
||||
"0000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000001000000"
|
||||
"0000000000000000000000000000000000000000000000003600110000050000000000000000010000000100000000000000"
|
||||
"0300000003000000140000000100000000010000000103000000000000000100000001000000000000000200000002000000"
|
||||
"0e02000000000000000000000000000000000000000000000000000001000000020000000200000001000000000000000000"
|
||||
"000000000000010000000000000001abbc5e54e4c970fef93640a799432f9b3e1e0a0c462351d36c6d1bb3992b331b"
|
||||
, {
|
||||
0xa6ec0093d932ebd8ULL, 0x87baf2e646efc9a5ULL, 0x1ab6ff5ac2d06a08ULL, 0x5b21ac6329697a51ULL,
|
||||
0x892f269f06860362ULL, 0x0ce6c8acfd0548abULL, 0x10128ab0047f29e4ULL, 0xcc8b9971929bb83dULL,
|
||||
0xb18f7c65729d2eaeULL, 0x6cff10cc2991c957ULL, 0xee671e7028e38f80ULL, 0x836fd8346ea210a9ULL,
|
||||
0x3b1e5c33e40d38baULL, 0xe2891c128cba04c3ULL, 0xab7996b49c542e9cULL, 0xfce08ee5878a2fb5ULL,
|
||||
0xc8857c8fb93a4a66ULL, 0x5bcafda5a7a0d4cfULL, 0x9068789e8a217ab8ULL, 0x731f33f4164b9621ULL,
|
||||
0xb33de24022b9c652ULL, 0x6bd1afe2193ce33bULL, 0xa1f25e81be2bc454ULL, 0x401ed1b4b68ba8cdULL,
|
||||
0xbf6fdd789c7567deULL, 0x277fa8b37cd738a7ULL, 0xe79f2e754b0372b0ULL, 0x5e5b4caafb0549f9ULL,
|
||||
0xede1e8920bdd2beaULL, 0x2545a8b9b6961593ULL, 0x68186f9c92fabe0cULL, 0xd7cc035c13ed6905ULL,
|
||||
0x85245577afe0d9d6ULL, 0x0bf76d05f70a191fULL, 0x016493e3d5aabc68ULL, 0x4e0aa86aa2aecf71ULL,
|
||||
0x6fdcbb28196055c2ULL, 0xb6fb2618e466474bULL, 0x68e55ff0b8ae7ec4ULL, 0x61f7a5cf724460ddULL,
|
||||
0x0a6251a626cc838eULL, 0x026b1d2a093a71f7ULL, 0xe1501a77a228e4a0ULL, 0x7658d43be7e765c9ULL,
|
||||
0x2e07583b5d528ddaULL, 0xd572181a05ff59e3ULL, 0xb30ae3ca1d51d9bcULL, 0xca772914473b3355ULL,
|
||||
0x03131d7a6972f2c6ULL, 0x296197d46751d86fULL, 0xcaf619893a5a2318ULL, 0x71139dc19b0aeac1ULL,
|
||||
0x443b4551b6f17632ULL, 0x69c619af9dfc37dbULL, 0xac222fcda9561bb4ULL, 0x86e7da1dcd2f53edULL,
|
||||
0x3bc4ef7c28f4c1beULL, 0xe06df1d434cfe647ULL, 0x275b095bac0978d0ULL, 0x9e1727915c0b5019ULL,
|
||||
0x34aaf0fb2280d70aULL, 0x6c0eb122cd39c0b3ULL, 0xaee17805a99e692cULL, 0xa5629d8ad39e6ca5ULL,
|
||||
0xbfb1f66260198236ULL, 0x90b9689924d6c63fULL, 0x0b94652fc0d513c8ULL, 0x4bff1238276e2411ULL,
|
||||
0x00da1e39ad9805a2ULL, 0x8491c047a4174aebULL, 0xe53a71f4452dd8a4ULL, 0x1ae5eef02a3d0e7dULL,
|
||||
0x86b763a9b34bdd6eULL, 0xbb59664ac1331f97ULL, 0x9a3e63985a219240ULL, 0x2f471d5c9fe01369ULL,
|
||||
0x2bfbc208e211e27aULL, 0xd36681e78abeae83ULL, 0xf9d3ec3333f584dcULL, 0x170e96d694ff8575ULL,
|
||||
}},
|
||||
{"direct-0", "ae9fb9da88ee94c6e06905ab4dbedc291ad42fd81dfd8f5e7c1d23ffbe5b0ad4",
|
||||
"53544843484b505402000000b60000003c020000000000009102030405064708890a0b0c0d0e0f1007000000000000000400"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000004000000000000000100000000000000"
|
||||
"0500000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000002"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000006000000030000000200000000"
|
||||
"0000000004000000030000000300000004000000030000000500000003000000060000000300000004000000000000000b00"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000001000000000000000000000000000000000000000000010000000100000000000000"
|
||||
"0300000003000000140000000000000000010000000101000000010000000100000001000000000000000600000003000000"
|
||||
"0001010000000100000000000000010100000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000007a31faff08de99b99ec1e7f1a71b99f6c6bbf004087d"
|
||||
"dd0b81acf4ca14acd130"
|
||||
, {
|
||||
0xcb3aa5dfb03965c9ULL, 0xeabf911762701811ULL, 0x3267ff311c8f5285ULL, 0xc9a54b382b66e91dULL,
|
||||
0x3eadc9b41b6a79c1ULL, 0x88d52de6de23fa69ULL, 0xda6625e9c8402245ULL, 0xdf431e91a4cc8a4dULL,
|
||||
0x88968629292726d9ULL, 0x90616d8a80511ad1ULL, 0xefc3df7a957d1395ULL, 0x1e8ec6e4dc12bf8eULL,
|
||||
0xdaf77dfbd58cb967ULL, 0x611d034605ba46f0ULL, 0x2fe16de272eb1379ULL, 0xd3cfbd66bb79843aULL,
|
||||
0x91b047e412719a33ULL, 0x1a8b985c61eb123cULL, 0xf23946c97dcc7825ULL, 0x3f4e05a9cdb2c0f6ULL,
|
||||
0xbcc048eb14dcb00fULL, 0x08ff6dc7f49a22f8ULL, 0x4b90993f02ab24c1ULL, 0xb5988855fac97ae2ULL,
|
||||
0x737912d351c190dbULL, 0xfc54634ba13b08e4ULL, 0xd40211b8bd1c6ecdULL, 0x2116d0990d02b79eULL,
|
||||
0x514c488aa75ce6b7ULL, 0x63a50cfa36aa3f00ULL, 0xa636387144bb40c9ULL, 0xd657c71aec697c4aULL,
|
||||
0x9438519843619243ULL, 0x1d13a21092db0a4cULL, 0xf4c1507daebc7035ULL, 0xb5a2d0389f82ee46ULL,
|
||||
0x33151379e6acdd5fULL, 0x7f543856c66a5048ULL, 0x4e18a2f3339b1cd1ULL, 0xb820920a2bb972f2ULL,
|
||||
0x76011c8782b188ebULL, 0xfedc6cffd22b00f4ULL, 0xd68a1b6cee0c66ddULL, 0x976b9b27ded2e4eeULL,
|
||||
0x53d4523ed84cdec7ULL, 0xd9f9d789087a6c50ULL, 0xa8be422575ab38d9ULL, 0x4cac91a9be39a99aULL,
|
||||
0x0a8d1c271531bf93ULL, 0x93686c9f64ab379cULL, 0x6b161b0c808c9d85ULL, 0xb82ad9ecd072e656ULL,
|
||||
0x359d1d2e179cd56fULL, 0x81dc420af75a4858ULL, 0xc46d6d82056b4a21ULL, 0x2e755c98fd89a042ULL,
|
||||
0xec55e7165481b63bULL, 0x7531378ea3fb2e44ULL, 0x4cdee5fbbfdc942dULL, 0x99f3a4dc0fc2dcfeULL,
|
||||
0xe6b5cbc19f1c7697ULL, 0xf90e90312e69cee0ULL, 0x3b9fbba83c7ad0a9ULL, 0x6bc14a51e4290c2aULL,
|
||||
0x29a1d4cf3b212223ULL, 0xb27d25478a9a9a2cULL, 0x8a2ad3b4a67c0015ULL, 0x4b0c536f97427e26ULL,
|
||||
0xc87e96b0de6c6d3fULL, 0x14bdbb8dbe29e028ULL, 0xe382262a2b5aacb1ULL, 0x4d8a1541237902d2ULL,
|
||||
0x0b6a9fbe7a7118cbULL, 0x9445f036c9ea90d4ULL, 0x6bf39ea3e5cbf6bdULL, 0x2cd51e5ed69274ceULL,
|
||||
0xe93dd575d00c6ea7ULL, 0x6f635ac00039fc30ULL, 0x3e27c55c6d6ac8b9ULL, 0xe21614e0b5f9397aULL,
|
||||
}},
|
||||
{"direct-1", "452313012591f9337c1410095355887d778a47c225d09b3fe550d9f8ec2cc67a",
|
||||
"53544843484b505402000000b60000003c020000000000009102030405064708890a0b0c0d0e0f1007000000000000000400"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000004000000000000000100000000000000"
|
||||
"0500000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000002"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000006000000030000000200000000"
|
||||
"0000000004000000030000000300000004000000030000000500000003000000060000000300000004000000000000000f00"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000001000000000000000000000000000000000000000000010000000100000000000000"
|
||||
"0300000003000000140000000000000000010000000201000000010000000100000001000000000000000600000003000000"
|
||||
"0101010000000100000000000000020100000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"00000000000000000000000000000000000000000000000000000000d4e59fb1f410d7b6ab8e531ff066559d5d44677d61c6"
|
||||
"544d069a18fd0269e030"
|
||||
, {
|
||||
0x37ae3152f9978e76ULL, 0x57331c8aabce40beULL, 0x1351af3574563b7aULL, 0xaa8efb3c832dd212ULL,
|
||||
0xc09abf5a0172a736ULL, 0xdfcf4f278ad81e4eULL, 0xa5d66bbb835d0672ULL, 0xd5a638c8993d780aULL,
|
||||
0xf50a119c72854f86ULL, 0xfcd4f8fdc9af437eULL, 0xd0ad8f7eed43fc8aULL, 0x5030d7afa10ed4d2ULL,
|
||||
0x3d54d6a175847066ULL, 0x44cf6298a3dd292eULL, 0x0ad67f2c9c621152ULL, 0xcd445e1c36765956ULL,
|
||||
0x1d1b333928ab77cbULL, 0x8f20ad074bb134a4ULL, 0xf8c4a61402cfa309ULL, 0x2f038e4a264230aaULL,
|
||||
0x29580d1fd74f61dfULL, 0x9c67a99332277128ULL, 0x5bdb109eaa1bb50dULL, 0xaf0d290b75c64ffeULL,
|
||||
0xfee3fe2867fb6e73ULL, 0x70e977f68b012b4cULL, 0xda8d7103421f99b1ULL, 0x10cc593965922752ULL,
|
||||
0xbde40cbf69cf9887ULL, 0xf70d48c574378d30ULL, 0xb680afd0ec2bd115ULL, 0xcfcc67d067665166ULL,
|
||||
0x1fa33ced599b6fdbULL, 0x91a8b6bb7ca12cb4ULL, 0xfb4cafc833bf9b19ULL, 0xa55858d8f8125dfaULL,
|
||||
0x9facd7aea91f8f2fULL, 0x12bc742203f79e78ULL, 0x5e631a52db0bad1dULL, 0xb19532bfa6b6480eULL,
|
||||
0x016c07dc98eb6683ULL, 0x737181aabbf1235cULL, 0xdd157ab7730f91c1ULL, 0x872123c8376254a2ULL,
|
||||
0xc06c16739abf9097ULL, 0x6d6213544607ba80ULL, 0xb908b9851d1bc925ULL, 0x4621325f39367eb6ULL,
|
||||
0x95f8077c2b6b9d2bULL, 0x07fd814a4e715a04ULL, 0x71a17a57058fc869ULL, 0xa7e0628d2902560aULL,
|
||||
0xa234e162da0f873fULL, 0x15447dd634e79688ULL, 0xd4b7e4e1acdbda6dULL, 0x27e9fd4e7886755eULL,
|
||||
0x77c0d26b6abb93d3ULL, 0xe9c64c398dc150acULL, 0x536a454644dfbf11ULL, 0x89a92d7c68524cb2ULL,
|
||||
0x534d8ff6618f2867ULL, 0x8c76cbfc6bf71d10ULL, 0x4bea3307e3eb60f5ULL, 0x6535eb075f25e146ULL,
|
||||
0xb50cc024515affbbULL, 0x271239f27460bc94ULL, 0x90b632ff2b7f2af9ULL, 0x3ac1dc0fefd1eddaULL,
|
||||
0x35165ae5a0df1f0fULL, 0xa825f758fbb72e58ULL, 0xf3cc9d89d2cb3cfdULL, 0x46feb5f69e75d7eeULL,
|
||||
0x96d58b1390aaf663ULL, 0x08db04e1b3b0b33cULL, 0x727efdee6acf21a1ULL, 0x1c8aa6ff2f21e482ULL,
|
||||
0x55d599aa927f2077ULL, 0x02cb968b3dc74a60ULL, 0x4e723cbc14db5905ULL, 0xdb8ab59630f60e96ULL,
|
||||
}},
|
||||
{"direct-4", "34fddc7587d05b995c207d9db896146154ace52dc152e62004efac370c1258ec",
|
||||
"53544843484b505402000000b60000003c020000000000009102030405064708890a0b0c0d0e0f1007000000000000000400"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000004000000000000000200000000000000"
|
||||
"0900000000000000000000000000000000000000000000000002000000000000000100000000000000010000000000000002"
|
||||
"0000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000006000000030000000200000000"
|
||||
"0000000004000000030000000300000004000000030000000500000003000000060000000300000004000000000000000b00"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000001000000000000000000000000000000000000000000010000000100000000000000"
|
||||
"0300000003000000140000000000000000010000000701000000010000000100000001000000000000000600000003000000"
|
||||
"0401010000000100000000000000070100000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"00000000000000000000000000000000000000000000000000000000db4ee0a01a3bdbe2c73bce9fb3c27baca13e5aaa12a1"
|
||||
"d06e25ec370dcebd6e75"
|
||||
, {
|
||||
0x390c415e34d0166aULL, 0x554a4dca2da2d072ULL, 0x0a6d78876d939f76ULL, 0x3746c232f2e153feULL,
|
||||
0x1dac5cc0bc01befaULL, 0x2230655659c7bab2ULL, 0xc98216266ea8b8ceULL, 0xcb18300291d12896ULL,
|
||||
0x8c028e6e517d8faaULL, 0x15e0477b18051b22ULL, 0xcb03723857f5ea26ULL, 0x550bb6fd219fa238ULL,
|
||||
0x6cf696b2deed2d21ULL, 0xb5fe1220613db27aULL, 0x134d258ced91df3bULL, 0xca82240862b0591cULL,
|
||||
0x9e3eceaeb9118035ULL, 0xf8bc7d34089f3e3eULL, 0xd1d2bf535ea84f7fULL, 0xb666fe781169bcf0ULL,
|
||||
0x0e2358ec20130a79ULL, 0x572ad459a2638fd2ULL, 0xb479e7c62eb7bc93ULL, 0x6baee641a3d63674ULL,
|
||||
0x3f6b90e7fa375d8dULL, 0x6002defff95500f6ULL, 0xace5e1f9f03e4777ULL, 0x5793c0b1528f9a48ULL,
|
||||
0xe34b6141b0bd5a71ULL, 0xb8861bd4922daa8aULL, 0x15d52f411e81d74bULL, 0xcd0a2dbc93a0512cULL,
|
||||
0xa0c6d862ea017845ULL, 0xfb4486e8398f364eULL, 0x482789e230787ccfULL, 0x2cbbc906e339ea40ULL,
|
||||
0x8478237af1e337c9ULL, 0x59b2de0dd35387e2ULL, 0xb701f17a5fa7b4a3ULL, 0x6e36eff5d4c62e84ULL,
|
||||
0x41f39a9c2b27559dULL, 0xd657a98ecb252e46ULL, 0xaf6debae212e3f87ULL, 0xcde88b40245fc798ULL,
|
||||
0xe5d36af5e1ad5281ULL, 0x2edae66363fdd7daULL, 0x8c29f9cff052049bULL, 0x435ef84b65707e7cULL,
|
||||
0x171ba2f1bbd1a595ULL, 0x719951770b5f639eULL, 0x4aaf9396616874dfULL, 0x2f43d2bb1429e250ULL,
|
||||
0x87002d2f22d32fd9ULL, 0xd007a89ca523b532ULL, 0x2d56bc093177e1f3ULL, 0xe48bba84a6965bd4ULL,
|
||||
0xb848652afcf782edULL, 0xd8dfb342fc152656ULL, 0x25c2b63cf2fe6cd7ULL, 0xd07094f4554fbfa8ULL,
|
||||
0x78b4e478a87cea51ULL, 0x4def9f0b89ed3a6aULL, 0xab3eb2781641672bULL, 0x6273b0f38b5fe10cULL,
|
||||
0x36305b99e1c10825ULL, 0x90ae0a1f314ec62eULL, 0xdd910d1928380cafULL, 0xc2254c3ddaf97a20ULL,
|
||||
0x19e1a6b1e9a2c7a9ULL, 0xef1c6144cb1317c2ULL, 0x4c6b74b157674483ULL, 0x03a0732ccc85be64ULL,
|
||||
0xd75d1dd322e6e57dULL, 0x6bc12cc5c2e4be26ULL, 0x44d76ee518edcf67ULL, 0x63520e771c1f5778ULL,
|
||||
0x7b3cee2cd96ce261ULL, 0xc444699a5bbd67baULL, 0x21937d06e811947bULL, 0xd8c87b825d300e5cULL,
|
||||
}},
|
||||
{"harvest-gathering", "2983ac00f777101dd7d71bd7379764ac32aa2330608fed9a4bf4dc1f2ee01426",
|
||||
"53544843484b505402000000b600000069020000000000009102030405064708890a0b0c0d0e0f1007000000000000000200"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000002000000000000000200000000000000"
|
||||
"0f00000000000000000000000000000000000000000000000002000000000000000100000000000000020000000000000002"
|
||||
"0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000003000000030000000300000000"
|
||||
"0000000002000000020000000300000003000000030000000200000000000000020000000100000000000000010000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000"
|
||||
"0400000003000000050000000300000006000000030000000700000003000000080000000300000009000000030000000a00"
|
||||
"0000030000000b000000030000000c000000030000000d000000030000000e00000003000000000000000000000000000000"
|
||||
"0000000000000100000001000000000000000300000003000000010100000001000000010000000100000000000000000001"
|
||||
"00000001000000000000000e0000000300000014000000010000000000000000000000000000000000000000000000000000"
|
||||
"00000000000000000000000000000000000000000000006719c2fed4abf63ffe4456b03d95b13c12ef3078097d13e1a1b74a"
|
||||
"bb30b5cf17"
|
||||
, {
|
||||
0x4034a5761e22ecabULL, 0xf78178bf59b905d9ULL, 0x5fd5644d1fa59357ULL, 0xaa768617a1b90374ULL,
|
||||
0x6ceeba0f2fe9089dULL, 0xee339afe091ed342ULL, 0xaeb06ae4ea87af53ULL, 0x7b6079611fd6a880ULL,
|
||||
0xbbc9c0a6facb2499ULL, 0xe75c76afc2037eceULL, 0xec829e3d4f72762fULL, 0x07bfb4a042a471ecULL,
|
||||
0x55e6cc33aa390f75ULL, 0x3e52625e8b2045b6ULL, 0x4f7d9d5bcf978d4dULL, 0x303f84c95c235208ULL,
|
||||
0xb2896b1b8df536cfULL, 0xc0fc67ce76a32cbaULL, 0x421810bd51ac0c71ULL, 0x32d353a79afcd8dcULL,
|
||||
0x9dd13f2ee856f313ULL, 0xac443be1d104e8feULL, 0x61a1fa6a365c4a35ULL, 0xd6d4e506f73bbaf0ULL,
|
||||
0x51cc2c0b015adcd7ULL, 0x603f28bdea08d2c2ULL, 0x543c6dcbb870c959ULL, 0xfdbfa374e6fab424ULL,
|
||||
0x44669f6c836f5bfbULL, 0x52d99c1f6c1d51e6ULL, 0x6404d71cb094997dULL, 0x44c6be8a3d205e38ULL,
|
||||
0x06f612cf620661bfULL, 0x15690f824ab457aaULL, 0x9684b87125bd3761ULL, 0x873ffb5b6f0e03ccULL,
|
||||
0xb25878efc953ff43ULL, 0xc0cb75a2b201f52eULL, 0x7629342b17595665ULL, 0x2b418cbacb4ce5e0ULL,
|
||||
0x665365cbe257e907ULL, 0x74c6627ecb05def2ULL, 0xa8a9157f8c81f449ULL, 0x522c4b28bb0bdf14ULL,
|
||||
0x98d34720578086ebULL, 0xa74643d3402e7cd6ULL, 0xb8717ed084a5c46dULL, 0x9933663e11318928ULL,
|
||||
0x1b7d4c9043036defULL, 0x29f049432bb163daULL, 0xab0bf23206ba4391ULL, 0x9bc7351c500b0ffcULL,
|
||||
0x06c520a39d652a33ULL, 0x15381d568613201eULL, 0xca95dbdeeb6a8155ULL, 0x3fc8c67bac49f210ULL,
|
||||
0xbac00d7fb66913f7ULL, 0xc9330a329f1709e2ULL, 0xbd304f406d7f0079ULL, 0x66b384e99c08eb44ULL,
|
||||
0xad5a80e1387d931bULL, 0xbbcd7d94212b8906ULL, 0x292932be9169f41dULL, 0x09eb1a2c1df5b8d8ULL,
|
||||
0xcc1a6e7142dbbc5fULL, 0xda8d6b242b89b24aULL, 0x5ba9141306929201ULL, 0x4c6456fd4fe35e6cULL,
|
||||
0x777cd491aa2959e3ULL, 0x85efd14492d74fceULL, 0x3b4d8fccf82eb105ULL, 0xf065e85cac224080ULL,
|
||||
0x2b77c16dc32d43a7ULL, 0x39eabe20abdb3992ULL, 0x6dcd71216d574ee9ULL, 0x1750a6ca9be139b4ULL,
|
||||
0x5df7a2c23855e18bULL, 0x6c6a9f752103d776ULL, 0x7d95da72657b1f0dULL, 0x5e57c1dff206e3c8ULL,
|
||||
}},
|
||||
{"harvest-hauled", "038b7ae299004c672e20cefb6c50ab9bacd6f83606ceca83d9d5edd20ff8cfad",
|
||||
"53544843484b505402000000b600000059020000000000009102030405064708890a0b0c0d0e0f1007000000000000000400"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000004000000000000000200000000000000"
|
||||
"0f00000000000000000000000000000000000000000000000002000000000000000100000000000000020000000000000002"
|
||||
"0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000003000000030000000400000000"
|
||||
"000000000b000000040000000300000005000000030000000600000003000000070000000300000008000000030000000900"
|
||||
"0000030000000a000000030000000b000000030000000c000000030000000d000000030000000e0000000300000000000000"
|
||||
"0000000000000000000000000000000001000000000000000100000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000000"
|
||||
"0000030000000300000001000000000100000000000000010000000000000000000100000001000000000000000e00000003"
|
||||
"0000001400000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"00000000000000df9205984b13c7ea46ccd323ab458977e4ea273b047760dbebb30e7fd311d16f"
|
||||
, {
|
||||
0x5fd5644d1fa59357ULL, 0xaa768617a1b90374ULL, 0x6ceeba0f2fe9089dULL, 0xee339afe091ed342ULL,
|
||||
0xaeb06ae4ea87af53ULL, 0x7b6079611fd6a880ULL, 0xbbc9c0a6facb2499ULL, 0xe75c76afc2037eceULL,
|
||||
0xec829e3d4f72762fULL, 0x07bfb4a042a471ecULL, 0x55e6cc33aa390f75ULL, 0x3e52625e8b2045b6ULL,
|
||||
0x4f7d9d5bcf978d4dULL, 0x303f84c95c235208ULL, 0xb2896b1b8df536cfULL, 0xc0fc67ce76a32cbaULL,
|
||||
0x421810bd51ac0c71ULL, 0x32d353a79afcd8dcULL, 0x9dd13f2ee856f313ULL, 0xac443be1d104e8feULL,
|
||||
0x61a1fa6a365c4a35ULL, 0xd6d4e506f73bbaf0ULL, 0x51cc2c0b015adcd7ULL, 0x603f28bdea08d2c2ULL,
|
||||
0x543c6dcbb870c959ULL, 0xfdbfa374e6fab424ULL, 0x44669f6c836f5bfbULL, 0x52d99c1f6c1d51e6ULL,
|
||||
0x6404d71cb094997dULL, 0x44c6be8a3d205e38ULL, 0x06f612cf620661bfULL, 0x15690f824ab457aaULL,
|
||||
0x9684b87125bd3761ULL, 0x873ffb5b6f0e03ccULL, 0xb25878efc953ff43ULL, 0xc0cb75a2b201f52eULL,
|
||||
0x7629342b17595665ULL, 0x2b418cbacb4ce5e0ULL, 0x665365cbe257e907ULL, 0x74c6627ecb05def2ULL,
|
||||
0xa8a9157f8c81f449ULL, 0x522c4b28bb0bdf14ULL, 0x98d34720578086ebULL, 0xa74643d3402e7cd6ULL,
|
||||
0xb8717ed084a5c46dULL, 0x9933663e11318928ULL, 0x1b7d4c9043036defULL, 0x29f049432bb163daULL,
|
||||
0xab0bf23206ba4391ULL, 0x9bc7351c500b0ffcULL, 0x06c520a39d652a33ULL, 0x15381d568613201eULL,
|
||||
0xca95dbdeeb6a8155ULL, 0x3fc8c67bac49f210ULL, 0xbac00d7fb66913f7ULL, 0xc9330a329f1709e2ULL,
|
||||
0xbd304f406d7f0079ULL, 0x66b384e99c08eb44ULL, 0xad5a80e1387d931bULL, 0xbbcd7d94212b8906ULL,
|
||||
0x292932be9169f41dULL, 0x09eb1a2c1df5b8d8ULL, 0xcc1a6e7142dbbc5fULL, 0xda8d6b242b89b24aULL,
|
||||
0x5ba9141306929201ULL, 0x4c6456fd4fe35e6cULL, 0x777cd491aa2959e3ULL, 0x85efd14492d74fceULL,
|
||||
0x3b4d8fccf82eb105ULL, 0xf065e85cac224080ULL, 0x2b77c16dc32d43a7ULL, 0x39eabe20abdb3992ULL,
|
||||
0x6dcd71216d574ee9ULL, 0x1750a6ca9be139b4ULL, 0x5df7a2c23855e18bULL, 0x6c6a9f752103d776ULL,
|
||||
0x7d95da72657b1f0dULL, 0x5e57c1dff206e3c8ULL, 0xe0a1a83223d8c88fULL, 0xef14a4e50c86be7aULL,
|
||||
}},
|
||||
{"meal-eating", "6ef841c3978ffb1cc6c622485ae00f612b8df62e728a00998dff39c4cb23dd86",
|
||||
"53544843484b505402000000b6000000e3010000000000009102030405064708890a0b0c0d0e0f1007000000000000009b00"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b0000000000000014000000080000009b000000000000000100000000000000"
|
||||
"0e00000000000000000000000000000000000000000000000102000000000000000100000000000000010000000000000002"
|
||||
"0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000100000001000000000000000e000000030000000700000000"
|
||||
"0000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000001000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000"
|
||||
"0000000000000100000001000000000000000e00000003000000140000000000000001010000000504000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000000000cbca12e9de2b541fa0a67c"
|
||||
"950419717981e249938bede98f7bc5ac8b21bb41e4"
|
||||
, {
|
||||
0x0eae6cbd44a5eb4cULL, 0x666bd2a801c60dc5ULL, 0xaa5ed34a6065dbaaULL, 0x0de79ba8983d3fb3ULL,
|
||||
0x99ab26421b611ba8ULL, 0xc09e84ec6875f729ULL, 0xec94b6b0b80ab7b5ULL, 0xf98239f36dc2c19dULL,
|
||||
0xd44d9d9512ae9821ULL, 0xa5f198ebe67c6949ULL, 0x6960ffccf032887dULL, 0x892b7289233b1e85ULL,
|
||||
0xa0d41230356d6121ULL, 0xccf5a29ed61d7299ULL, 0x38d1425618c651e5ULL, 0x47a8b158ccfd867dULL,
|
||||
0x227414fa71e95d01ULL, 0x997c1739f8dc3b99ULL, 0xb78777324f6d4d5dULL, 0x7cb5f0d7359af0d5ULL,
|
||||
0x07c728f9efefcf21ULL, 0xce1cfa5e52220209ULL, 0x84c0a7e6fb14fc35ULL, 0x91ae2b29b0cd061dULL,
|
||||
0x6c798ecb55b8dca1ULL, 0xb3700e5dd0287429ULL, 0x018cf103333cccfdULL, 0x96a9e7fb0ce72965ULL,
|
||||
0x390003667877a5a1ULL, 0x652193d51927b719ULL, 0x464fb7c802725cc5ULL, 0xdfd4a28f1007cafdULL,
|
||||
0xbaa00630b4f3a181ULL, 0x31a808703be68019ULL, 0x4fb36868927791ddULL, 0x14e1e20d78a53555ULL,
|
||||
0x9ff31a3032fa13a1ULL, 0x44f1d52f88f4cf69ULL, 0x70e806f3d8898ff5ULL, 0x7dd58a368e4199ddULL,
|
||||
0x6dfbe560e5e9e3a1ULL, 0x3f9fe0b7b9b7b4c9ULL, 0x030f4798c36dd3fdULL, 0x0d7ec2cc43b9f6c5ULL,
|
||||
0x3a8259fc08a8aca1ULL, 0x5148f2e1f69c4ad9ULL, 0xd27f8a21ec019d65ULL, 0xe156f924a038d1fdULL,
|
||||
0xa6c7653d92683541ULL, 0x1dcf677d195b13d9ULL, 0x3bdac7756fec259dULL, 0x166438a308d63c55ULL,
|
||||
0xa17570c5c32b1aa1ULL, 0x67cb422a255d4d89ULL, 0x0913f82a1b93d475ULL, 0x16017b6cd14bde5dULL,
|
||||
0x0627d69728f42821ULL, 0x37c35ea0f0a74c69ULL, 0x9b3b38cf0678187dULL, 0x30582fc6e02274e5ULL,
|
||||
0xd2ae4b324bb2f121ULL, 0xe974e41839a68f59ULL, 0xcaa3080b22f13505ULL, 0x7982ea5ae343167dULL,
|
||||
0x3ef35673d57279c1ULL, 0xb5fb58b35c655859ULL, 0xd406b8abb2f66a1dULL, 0xae9029d94be080d5ULL,
|
||||
0x39a161fc06355f21ULL, 0x8aa4af24c1c5cba9ULL, 0xb69ae0e9115a8c35ULL, 0x98d2751a6199af9dULL,
|
||||
0x739dd8bc06858621ULL, 0x6ff7c3243fcc3dc9ULL, 0x33672a0549825cfdULL, 0x287badb017120c85ULL,
|
||||
0x40244d5729444f21ULL, 0x96fbccd72f6d4719ULL, 0x02d76c8e72162665ULL, 0x11aedb91264d5afdULL,
|
||||
}},
|
||||
{"meal-going", "2bf42eb752cdbb6d06a69cfe3f7eb68cbf0686d5ec855b986599b2f4b589390d",
|
||||
"53544843484b505402000000b60000004b020000000000009102030405064708890a0b0c0d0e0f1007000000000000008f00"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b0000000000000014000000080000008f000000000000000100000000000000"
|
||||
"0e00000000000000000000000000000000000000000000000102000000000000000100000000000000010000000000000002"
|
||||
"0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000002000000030000000600000000"
|
||||
"000000000d000000020000000300000003000000030000000400000003000000050000000300000006000000030000000700"
|
||||
"000003000000080000000300000009000000030000000a000000030000000b000000030000000c000000030000000d000000"
|
||||
"030000000e000000030000000100000000000000000000000000000000000000010000000000000000000000000000000000"
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b4000000"
|
||||
"000000000000000000000100000001000000000000000e000000030000001400000000000000010100000005050000000100"
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000919d8854127c30"
|
||||
"0dbea118a7d16c7f0c3044dd54f2148b20800d6204105412e3"
|
||||
, {
|
||||
0xfd9dfc2a0c96299dULL, 0x055fa24bd46f74c7ULL, 0xc3a99a4764c3bac9ULL, 0x788d6816d3b41547ULL,
|
||||
0xabaedc2e42067cddULL, 0xad632a0f1d2c4b17ULL, 0xc9b73d3b4e831031ULL, 0x7d5bc37e22cdc2f7ULL,
|
||||
0xcc366163e21db0fdULL, 0xe24026ad5ef92427ULL, 0xa4867348eeb2b129ULL, 0x165dc919e3326217ULL,
|
||||
0x0eae6cbd44a5eb4cULL, 0x666bd2a801c60dc5ULL, 0xaa5ed34a6065dbaaULL, 0x0de79ba8983d3fb3ULL,
|
||||
0x99ab26421b611ba8ULL, 0xc09e84ec6875f729ULL, 0xec94b6b0b80ab7b5ULL, 0xf98239f36dc2c19dULL,
|
||||
0xd44d9d9512ae9821ULL, 0xa5f198ebe67c6949ULL, 0x6960ffccf032887dULL, 0x892b7289233b1e85ULL,
|
||||
0xa0d41230356d6121ULL, 0xccf5a29ed61d7299ULL, 0x38d1425618c651e5ULL, 0x47a8b158ccfd867dULL,
|
||||
0x227414fa71e95d01ULL, 0x997c1739f8dc3b99ULL, 0xb78777324f6d4d5dULL, 0x7cb5f0d7359af0d5ULL,
|
||||
0x07c728f9efefcf21ULL, 0xce1cfa5e52220209ULL, 0x84c0a7e6fb14fc35ULL, 0x91ae2b29b0cd061dULL,
|
||||
0x6c798ecb55b8dca1ULL, 0xb3700e5dd0287429ULL, 0x018cf103333cccfdULL, 0x96a9e7fb0ce72965ULL,
|
||||
0x390003667877a5a1ULL, 0x652193d51927b719ULL, 0x464fb7c802725cc5ULL, 0xdfd4a28f1007cafdULL,
|
||||
0xbaa00630b4f3a181ULL, 0x31a808703be68019ULL, 0x4fb36868927791ddULL, 0x14e1e20d78a53555ULL,
|
||||
0x9ff31a3032fa13a1ULL, 0x44f1d52f88f4cf69ULL, 0x70e806f3d8898ff5ULL, 0x7dd58a368e4199ddULL,
|
||||
0x6dfbe560e5e9e3a1ULL, 0x3f9fe0b7b9b7b4c9ULL, 0x030f4798c36dd3fdULL, 0x0d7ec2cc43b9f6c5ULL,
|
||||
0x3a8259fc08a8aca1ULL, 0x5148f2e1f69c4ad9ULL, 0xd27f8a21ec019d65ULL, 0xe156f924a038d1fdULL,
|
||||
0xa6c7653d92683541ULL, 0x1dcf677d195b13d9ULL, 0x3bdac7756fec259dULL, 0x166438a308d63c55ULL,
|
||||
0xa17570c5c32b1aa1ULL, 0x67cb422a255d4d89ULL, 0x0913f82a1b93d475ULL, 0x16017b6cd14bde5dULL,
|
||||
0x0627d69728f42821ULL, 0x37c35ea0f0a74c69ULL, 0x9b3b38cf0678187dULL, 0x30582fc6e02274e5ULL,
|
||||
0xd2ae4b324bb2f121ULL, 0xe974e41839a68f59ULL, 0xcaa3080b22f13505ULL, 0x7982ea5ae343167dULL,
|
||||
0x3ef35673d57279c1ULL, 0xb5fb58b35c655859ULL, 0xd406b8abb2f66a1dULL, 0xae9029d94be080d5ULL,
|
||||
}},
|
||||
{"tending", "3827f807449b4eef713945b5e196e082e48e10d7971587e8281f3f858f76c475",
|
||||
"53544843484b505402000000b600000004020000000000009102030405064708890a0b0c0d0e0f1007000000000000000400"
|
||||
"00000000000006d39e42fa79f06859b9bee1dcb08088142cb83e8cdcf72dc0984cfc62cd83d1020000001100736574746c65"
|
||||
"6d656e742e636f6c6f6e790500312e302e3008e18a58989430c5435a2de6fb8f6a27a912b4d2970c1b965282408880d2c089"
|
||||
"0f00736574746c656d656e742e636f72650500312e302e3061b36b8a230eebbe862e696603e021ace7151a9faf0ab3c069ab"
|
||||
"7124188d337f534554544c4552530e0000002b00000000000000140000000800000004000000000000000100000000000000"
|
||||
"0500000000000000000000000000000000000000000000000102000000000000000100000000000000020000000000000001"
|
||||
"0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000001000000010000000000000005000000030000000300000000"
|
||||
"0000000004000000020000000300000003000000030000000400000003000000050000000300000004000000000000000500"
|
||||
"0000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000002900040000000000000001000000010000000000000005000000"
|
||||
"0300000001000000000600000001000000010200000000000000000000000000000000010000000200000002000000010000"
|
||||
"00000000000000000000000000010000000000000001b4030ca9d1f16481a8e535b4d15d5386c3373d95462d4d421acb8c39"
|
||||
"bffd838c"
|
||||
, {
|
||||
0x40e38438faf94b0bULL, 0x14761863e62e2a4dULL, 0xe6cd2e9002d72edbULL, 0x05e511dfedbab179ULL,
|
||||
0xa31d1be8a64993d3ULL, 0x2689b1c58ae359daULL, 0x0a35fc84aa4f48c7ULL, 0xfcb493ac0b7a9ca0ULL,
|
||||
0xa5b6852baae0b5d5ULL, 0x475c01f9c9b77106ULL, 0x8f687924c6abc753ULL, 0xda1797bdf654a5fcULL,
|
||||
0x06e3f4bcdb5865e1ULL, 0xcfc208819fd468a2ULL, 0x8f5cf81cd325dcefULL, 0xab87d8ad5efdc448ULL,
|
||||
0x9596d5a2eab7763dULL, 0xc5aea624fbd7c04eULL, 0xd450e36c43ad31dbULL, 0xa28d719e4a7f7b04ULL,
|
||||
0x9397942622050189ULL, 0xed40d75b33713baaULL, 0x8b456815cce24137ULL, 0x914e242111a8c7d0ULL,
|
||||
0x2ccbce0483ab8405ULL, 0xbbfc27d8b7020bb6ULL, 0x332345807b3a2dc3ULL, 0x9762664544b614ecULL,
|
||||
0x80116ad6bde724d1ULL, 0x68fb7be5021b5cf2ULL, 0xfc7eb3a74944f05fULL, 0x67bda54ab54433f8ULL,
|
||||
0x58e78171ef50baedULL, 0x88ff51f4007104feULL, 0x59ed9f385b844e8bULL, 0x3d906a7dcfbe2e34ULL,
|
||||
0x1aacdcfefacfcfb9ULL, 0x7d5eec1f9d8fca7aULL, 0x4d8111fad96086a7ULL, 0x55025b12df1abec0ULL,
|
||||
0xc29ec7a141fddb35ULL, 0x8c1fa47cb9bc6066ULL, 0xd42c1ba7b6b0b6b3ULL, 0x0a89ff17710cfe1cULL,
|
||||
0x3d5c395e0c4893c1ULL, 0x130d1df7cee5a682ULL, 0xb9c9822e97a65f4fULL, 0xc26a3ddb3fe313e8ULL,
|
||||
0xcc0f1a441ba7a41dULL, 0xfc26eac62cc7ee2eULL, 0xefc098d519d6a5bbULL, 0xdfd2a9ccc358e324ULL,
|
||||
0xb07fd69bb92226e9ULL, 0x519a59517381094aULL, 0xa6b51d7ea30bb517ULL, 0xb43c43de5efdc2f0ULL,
|
||||
0x7016e37ab2bcc1e5ULL, 0xff473d4ee6134996ULL, 0x766e5af6aa4b6ba3ULL, 0xaccc3e6664a7b30cULL,
|
||||
0xc302fb492ed47b31ULL, 0x1fc6fc206a2749d2ULL, 0xb34a33e2b150dd3fULL, 0x6f49b0cbe9ae8d98ULL,
|
||||
0x8e54ca4832dab44dULL, 0x0caacdd834d6e0deULL, 0x810f8a2cdff9866bULL, 0xab721e2bcde3c154ULL,
|
||||
0x9d91429d9d844719ULL, 0xe0ad724af039639aULL, 0x74a2fcef5dd5be87ULL, 0xc2e40ec0dd4051e0ULL,
|
||||
0x5e61b8a44f430e15ULL, 0xb3418f713e319846ULL, 0x3c07f20dfe9e7413ULL, 0xa04712d2c81a5b3cULL,
|
||||
0x72c982344fd28d21ULL, 0x2caac15025f78162ULL, 0x558c7331a4eb922fULL, 0xfc64d6ec78b13188ULL,
|
||||
}},
|
||||
}};
|
||||
} // namespace custody_v14
|
||||
@@ -0,0 +1,269 @@
|
||||
#include "settlement/core/simulation_runtime.hpp"
|
||||
|
||||
#include <Void/Testing/Suite.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <thread>
|
||||
|
||||
namespace {
|
||||
using namespace settlement;
|
||||
using Void::Testing::Test;
|
||||
using namespace std::chrono_literals;
|
||||
constexpr TrustedClient host{colony_host};
|
||||
|
||||
void require(bool condition, const char* message = "production command invariant failed") {
|
||||
if (!condition) throw std::runtime_error(message);
|
||||
}
|
||||
|
||||
SessionIdentity identity() {
|
||||
SessionIdentity result;
|
||||
result.world.bytes.back() = 61;
|
||||
result.session.bytes.back() = 62;
|
||||
return result;
|
||||
}
|
||||
|
||||
CommandEnvelope envelope(std::uint64_t request, SessionPayload payload, SessionIdentity context = identity()) {
|
||||
return {command_envelope_version, context.world, context.session, context.city, request, std::move(payload)};
|
||||
}
|
||||
|
||||
DispatchReceipt send(World& world, CommandDispatcher& dispatcher, SessionPayload payload) {
|
||||
return dispatcher.dispatch(world, host, envelope(dispatcher.next_request(host), std::move(payload)));
|
||||
}
|
||||
|
||||
void accepted(const DispatchReceipt& receipt) {
|
||||
require(receipt.status == DispatchStatus::Completed && receipt.command_status == CommandStatus::Accepted,
|
||||
"production command was not accepted");
|
||||
}
|
||||
|
||||
template<class Predicate>
|
||||
void step_until(World& world, Predicate done) {
|
||||
for (int tick = 0; tick < 600 && !done(); ++tick) world.step();
|
||||
require(done(), "actual work did not reach the required phase");
|
||||
world.validate_custody();
|
||||
}
|
||||
|
||||
std::unique_ptr<World> cabin() {
|
||||
auto world = std::make_unique<World>(43, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
const auto store = world->add_storage({3, 3}, 20);
|
||||
world->stock_storage(store, ItemType::Plank, 3);
|
||||
world->stock_storage(store, ItemType::StoneBlock, 2);
|
||||
static_cast<void>(world->spawn_agent({1, 3}));
|
||||
world->queue_production({14, 3}, RecipeId::BuildCabin);
|
||||
return world;
|
||||
}
|
||||
|
||||
RuntimeResult finish(RuntimeSubmission submission) {
|
||||
require(submission.admission == RuntimeAdmission::Accepted);
|
||||
require(submission.completion.wait_for(5s) == std::future_status::ready);
|
||||
auto result = submission.completion.get();
|
||||
require(result.outcome == RuntimeOutcome::Completed && result.receipt.has_value());
|
||||
return result;
|
||||
}
|
||||
|
||||
struct [[= Void::Testing::name("ProductionCommandsTests")]] ProductionCommandsTests
|
||||
: Void::Testing::Suite<ProductionCommandsTests> {
|
||||
[[= Void::Testing::tag("production-command")]] Test exact_results_and_conflicts_use_durable_ids();
|
||||
[[= Void::Testing::tag("production-command")]] Test context_and_guest_denials_leave_orders_untouched();
|
||||
[[= Void::Testing::tag("production-command")]] Test cancel_at_each_phase_returns_actual_cargo_once();
|
||||
[[= Void::Testing::tag("production-command")]] Test full_storage_preserves_return_until_space_exists();
|
||||
[[= Void::Testing::tag("production-command")]] Test resume_keeps_partial_bed_and_installed_loom_identity();
|
||||
[[= Void::Testing::tag("production-command")]] Test runtime_publishes_and_retains_modern_receipts();
|
||||
};
|
||||
|
||||
Test ProductionCommandsTests::exact_results_and_conflicts_use_durable_ids() {
|
||||
World world(43, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
world.queue_production({8, 8}, RecipeId::BuildCabin);
|
||||
world.queue_production({8, 8}, RecipeId::BuildCabin);
|
||||
const auto first = world.production_orders().front().id;
|
||||
const auto second = world.production_orders().back().id;
|
||||
CommandDispatcher dispatcher(identity());
|
||||
const auto cancel = envelope(1, CancelProductionPayload{first});
|
||||
const auto result = dispatcher.dispatch(world, host, cancel);
|
||||
accepted(result);
|
||||
require(result.revision == 1 && world.find_production(first) == nullptr && world.find_production(second),
|
||||
"cancel selected by vector position or cell instead of exact durable id");
|
||||
require(dispatcher.dispatch(world, host, cancel) == result && dispatcher.lookup(host, cancel) == result);
|
||||
for (const SessionPayload changed : {SessionPayload{CancelProductionPayload{second}},
|
||||
SessionPayload{ResumeProductionPayload{first}}, SessionPayload{CommandPayload{}},
|
||||
SessionPayload{LegacyCabinPayload{{8, 8}, {2, 2}, {3, 2}}}}) {
|
||||
require(dispatcher.dispatch(world, host, envelope(1, changed)).status == DispatchStatus::Conflict,
|
||||
"same request accepted a different id or payload variant");
|
||||
}
|
||||
const auto refused = envelope(2, ResumeProductionPayload{first});
|
||||
const auto rejection = dispatcher.dispatch(world, host, refused);
|
||||
require(rejection.status == DispatchStatus::Completed && rejection.command_status == CommandStatus::InvalidTarget &&
|
||||
rejection.revision == 1 && dispatcher.dispatch(world, host, refused) == rejection);
|
||||
const auto zero = envelope(3, CancelProductionPayload{0});
|
||||
const auto zero_result = dispatcher.dispatch(world, host, zero);
|
||||
require(zero_result.command_status == CommandStatus::InvalidTarget && dispatcher.dispatch(world, host, zero) == zero_result);
|
||||
accepted(send(world, dispatcher, CancelProductionPayload{second}));
|
||||
require(world.production_orders().empty() && dispatcher.revision() == 2 &&
|
||||
world.next_command_sequence(1) == 1 && world.next_command_sequence(2) == 1,
|
||||
"modern command changed legacy accepted-command numbering");
|
||||
require(dispatcher.dispatch(world, host, cancel) == result, "removed target lost the original retained receipt");
|
||||
world.validate_custody();
|
||||
}
|
||||
|
||||
Test ProductionCommandsTests::context_and_guest_denials_leave_orders_untouched() {
|
||||
World world(43, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
world.queue_production({8, 8}, RecipeId::BuildCabin);
|
||||
const auto id = world.production_orders().front().id;
|
||||
CommandDispatcher dispatcher(identity());
|
||||
auto command = envelope(1, CancelProductionPayload{id});
|
||||
command.world.bytes.back() ^= 1;
|
||||
require(dispatcher.dispatch(world, host, command).status == DispatchStatus::WrongWorld);
|
||||
command = envelope(1, CancelProductionPayload{id});
|
||||
command.session.bytes.back() ^= 1;
|
||||
require(dispatcher.dispatch(world, host, command).status == DispatchStatus::StaleSession);
|
||||
command = envelope(1, CancelProductionPayload{id});
|
||||
require(dispatcher.dispatch(world, {0}, command).status == DispatchStatus::UnauthorizedClient);
|
||||
require(dispatcher.dispatch(world, {3}, command).status == DispatchStatus::UnauthorizedClient);
|
||||
require(dispatcher.receipt_count(host) == 0 && dispatcher.revision() == 0 && world.find_production(id));
|
||||
const auto guest_result = dispatcher.dispatch(world, {2}, command);
|
||||
require(guest_result.command_status == CommandStatus::Unauthorized &&
|
||||
dispatcher.dispatch(world, {2}, command) == guest_result);
|
||||
const auto guest_resume = envelope(2, ResumeProductionPayload{id});
|
||||
require(dispatcher.dispatch(world, {2}, guest_resume).command_status == CommandStatus::Unauthorized);
|
||||
command.city = 2;
|
||||
const auto denied = dispatcher.dispatch(world, host, command);
|
||||
require(denied.command_status == CommandStatus::Unauthorized && denied.revision == 0 &&
|
||||
dispatcher.dispatch(world, host, command) == denied && world.find_production(id));
|
||||
command.city = 1;
|
||||
require(dispatcher.dispatch(world, host, command).status == DispatchStatus::Conflict);
|
||||
command.request = 2;
|
||||
accepted(dispatcher.dispatch(world, host, command));
|
||||
command.world.bytes.back() ^= 1;
|
||||
require(dispatcher.dispatch(world, host, command).status == DispatchStatus::WrongWorld,
|
||||
"cached receipt bypassed world identity check");
|
||||
require(world.next_command_sequence(1) == 1 && world.next_command_sequence(2) == 1);
|
||||
}
|
||||
|
||||
Test ProductionCommandsTests::cancel_at_each_phase_returns_actual_cargo_once() {
|
||||
for (int phase = 0; phase < 3; ++phase) {
|
||||
auto world = cabin();
|
||||
const auto id = world->production_orders().front().id;
|
||||
const auto storage = world->storages().front().id;
|
||||
step_until(*world, [&] {
|
||||
const auto& agent = world->agents().front();
|
||||
return phase == 0 ? agent.state == AgentState::FetchingMaterials && agent.inventory.empty() :
|
||||
phase == 1 ? !agent.inventory.empty() : agent.state == AgentState::Working;
|
||||
});
|
||||
CommandDispatcher dispatcher(identity());
|
||||
const auto sequence = world->next_command_sequence(1);
|
||||
require(send(*world, dispatcher, CommandPayload{CommandKind::DemolishObject, {3, 3}}).command_status == CommandStatus::Busy);
|
||||
require(send(*world, dispatcher, CommandPayload{CommandKind::MoveObject, {3, 3}, 0, {4, 3}}).command_status == CommandStatus::Busy);
|
||||
const auto cancel = envelope(dispatcher.next_request(host), CancelProductionPayload{id});
|
||||
const auto result = dispatcher.dispatch(*world, host, cancel);
|
||||
accepted(result);
|
||||
if (phase != 0) require(world->agents().front().state == AgentState::Returning &&
|
||||
!world->agents().front().inventory.empty(), "cancellation erased carried or worksite input");
|
||||
require(dispatcher.dispatch(*world, host, cancel) == result);
|
||||
step_until(*world, [&] { return world->agents().front().state != AgentState::Returning; });
|
||||
require(world->find_storage(storage)->item_count(ItemType::Plank) == 3 &&
|
||||
world->find_storage(storage)->item_count(ItemType::StoneBlock) == 2 &&
|
||||
world->agents().front().inventory.empty() && world->find_production(id) == nullptr,
|
||||
"cancelled material was lost, duplicated or left assigned");
|
||||
for (int tick = 0; tick < 4; ++tick) world->step();
|
||||
require(dispatcher.dispatch(*world, host, cancel) == result && world->next_command_sequence(1) == sequence &&
|
||||
world->find_storage(storage)->item_count(ItemType::Plank) == 3 &&
|
||||
world->find_storage(storage)->item_count(ItemType::StoneBlock) == 2);
|
||||
world->validate_custody();
|
||||
}
|
||||
}
|
||||
|
||||
Test ProductionCommandsTests::full_storage_preserves_return_until_space_exists() {
|
||||
auto world = cabin();
|
||||
const auto id = world->production_orders().front().id;
|
||||
const auto original = world->storages().front().id;
|
||||
step_until(*world, [&] { return !world->agents().front().inventory.empty(); });
|
||||
world->stock_storage(original, ItemType::Wood, 20);
|
||||
CommandDispatcher dispatcher(identity());
|
||||
accepted(send(*world, dispatcher, CancelProductionPayload{id}));
|
||||
for (int tick = 0; tick < 10; ++tick) world->step();
|
||||
const auto& waiting = world->agents().front();
|
||||
require(waiting.state == AgentState::Returning && waiting.execution &&
|
||||
(waiting.execution->blocked == CustodyStatus::NoDestination || waiting.execution->blocked == CustodyStatus::Capacity) &&
|
||||
waiting.inventory.item_count(ItemType::Plank) == 3 && waiting.inventory.item_count(ItemType::StoneBlock) == 2,
|
||||
"full storage did not preserve the cargo and meaningful blocked reason");
|
||||
const auto destination = world->add_storage({4, 3}, 5);
|
||||
step_until(*world, [&] { return world->agents().front().state != AgentState::Returning; });
|
||||
require(world->find_storage(destination)->item_count(ItemType::Plank) == 3 &&
|
||||
world->find_storage(destination)->item_count(ItemType::StoneBlock) == 2 &&
|
||||
world->find_storage(original)->item_count(ItemType::Wood) == 20);
|
||||
}
|
||||
|
||||
Test ProductionCommandsTests::resume_keeps_partial_bed_and_installed_loom_identity() {
|
||||
for (const bool bed : {true, false}) {
|
||||
World world(43, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
world.start_scenario({2, 2});
|
||||
const auto storage = world.add_storage({3, 3}, 20);
|
||||
world.stock_storage(storage, ItemType::Wood, 2);
|
||||
static_cast<void>(world.spawn_agent({1, 3}));
|
||||
CommandDispatcher dispatcher(identity());
|
||||
if (bed) {
|
||||
accepted(send(world, dispatcher, CommandPayload{CommandKind::PlaceBed, {9, 3}}));
|
||||
} else {
|
||||
world.queue_production({9, 3}, RecipeId::BuildLoom);
|
||||
}
|
||||
const auto id = world.production_orders().back().id;
|
||||
step_until(world, [&] {
|
||||
const auto* order = world.find_production(id);
|
||||
return bed ? order->bed_stage == BedStage::Bedding : order->recipe == RecipeId::WeaveCloth;
|
||||
});
|
||||
const auto before_cancel = world.capture();
|
||||
const auto stage = world.find_production(id)->bed_stage;
|
||||
const auto sequence = world.next_command_sequence(1);
|
||||
accepted(send(world, dispatcher, CancelProductionPayload{id}));
|
||||
require(world.find_production(id) && world.find_production(id)->suspended &&
|
||||
world.find_production(id)->bed_stage == stage && !world.can_place_storage({9, 3}),
|
||||
"cancel removed installed progress or its occupied site");
|
||||
for (int tick = 0; tick < 5; ++tick) world.step();
|
||||
const auto resume = envelope(dispatcher.next_request(host), ResumeProductionPayload{id});
|
||||
const auto resumed = dispatcher.dispatch(world, host, resume);
|
||||
accepted(resumed);
|
||||
require(world.find_production(id) && !world.find_production(id)->suspended &&
|
||||
world.find_production(id)->bed_stage == stage && dispatcher.dispatch(world, host, resume) == resumed &&
|
||||
world.next_command_sequence(1) == sequence && !before_cancel->find_production(id)->suspended);
|
||||
world.stock_storage(storage, bed ? ItemType::Cloth : ItemType::Flax, 2);
|
||||
step_until(world, [&] { return bed ? world.find_production(id)->state == JobState::Completed :
|
||||
world.find_storage(storage)->item_count(ItemType::Cloth) > 0; });
|
||||
require(world.find_storage(storage)->item_count(ItemType::Wood) == (bed ? 1U : 0U),
|
||||
"resume charged for an already installed stage twice");
|
||||
if (bed) {
|
||||
const auto refused = send(world, dispatcher, CancelProductionPayload{id});
|
||||
require(refused.command_status == CommandStatus::InvalidTarget,
|
||||
"completed final bed accepted cancel");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Test ProductionCommandsTests::runtime_publishes_and_retains_modern_receipts() {
|
||||
auto world = cabin();
|
||||
step_until(*world, [&] { return !world->agents().front().inventory.empty(); });
|
||||
const auto id = world->production_orders().front().id;
|
||||
const auto rules = default_rules_manifest();
|
||||
require(rules.has_value());
|
||||
SimulationRuntime runtime(WorldCheckpoint{std::move(world), identity().world, 1, *rules}, {.ticking = false});
|
||||
const auto opening = runtime.latest();
|
||||
const auto cancel = envelope(1, CancelProductionPayload{id}, opening->identity);
|
||||
const auto first = finish(runtime.try_submit(host, cancel));
|
||||
accepted(*first.receipt);
|
||||
require(first.snapshot->world->find_production(id) == nullptr &&
|
||||
first.snapshot->world->agents().front().state == AgentState::Returning &&
|
||||
opening->world->find_production(id) && opening->world->agents().front().state != AgentState::Returning,
|
||||
"modern runtime effect was not published with independent old snapshot");
|
||||
const auto repeat = finish(runtime.try_submit(host, cancel));
|
||||
require(repeat.receipt == first.receipt && runtime.lookup(host, cancel) == first.receipt &&
|
||||
repeat.snapshot->revision == first.snapshot->revision && repeat.snapshot->next_requests[0] == 2);
|
||||
const auto changed = finish(runtime.try_submit(host, envelope(1, ResumeProductionPayload{id}, opening->identity)));
|
||||
require(changed.receipt->status == DispatchStatus::Conflict);
|
||||
const auto refusal = envelope(2, ResumeProductionPayload{id}, opening->identity);
|
||||
const auto denied = finish(runtime.try_submit(host, refusal));
|
||||
require(denied.receipt->command_status == CommandStatus::InvalidTarget &&
|
||||
finish(runtime.try_submit(host, refusal)).receipt == denied.receipt &&
|
||||
runtime.latest()->world->next_command_sequence(1) == 1 && runtime.view().state == RuntimeState::Running);
|
||||
runtime.latest()->world->validate_custody();
|
||||
}
|
||||
} // namespace
|
||||
@@ -0,0 +1,275 @@
|
||||
// Exercise the real private Win32 controls and modal handlers in their own
|
||||
// executable, without adding test hooks to the shipping UI or wire protocol.
|
||||
#include "../app/viewer_win32.cpp"
|
||||
#include <Void/Testing/Suite.hpp>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
|
||||
namespace production_controls {
|
||||
using namespace settlement;
|
||||
using Void::Testing::Test;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
void require(bool condition, const char* message = "production controls invariant failed") {
|
||||
if (!condition) throw std::runtime_error(message);
|
||||
}
|
||||
|
||||
constexpr UINT_PTR drive_timer = 904;
|
||||
struct MenuStep { UINT command; std::function<void()> before_select; };
|
||||
std::vector<MenuStep> steps;
|
||||
std::vector<std::vector<std::wstring>> observed_menus;
|
||||
HMENU active_menu = nullptr;
|
||||
std::string driver_error;
|
||||
unsigned timer_attempts = 0;
|
||||
|
||||
void key(std::vector<INPUT>& input, WORD code) {
|
||||
INPUT down{};
|
||||
down.type = INPUT_KEYBOARD;
|
||||
down.ki.wVk = code;
|
||||
input.push_back(down);
|
||||
down.ki.dwFlags = KEYEVENTF_KEYUP;
|
||||
input.push_back(down);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK test_window_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) {
|
||||
if (message == WM_INITMENUPOPUP) {
|
||||
active_menu = reinterpret_cast<HMENU>(wparam);
|
||||
std::vector<std::wstring> labels;
|
||||
for (int index = 0; index < GetMenuItemCount(active_menu); ++index) {
|
||||
wchar_t label[512]{};
|
||||
GetMenuStringW(active_menu, static_cast<UINT>(index), label, 512, MF_BYPOSITION);
|
||||
labels.emplace_back(label);
|
||||
}
|
||||
observed_menus.push_back(std::move(labels));
|
||||
}
|
||||
if (message == WM_TIMER && wparam == drive_timer) {
|
||||
if (++timer_attempts > 100) {
|
||||
driver_error = "real popup did not accept the scripted input";
|
||||
KillTimer(window, drive_timer);
|
||||
EndMenu();
|
||||
return 0;
|
||||
}
|
||||
if (!active_menu || steps.empty()) return 0;
|
||||
const auto menu = std::exchange(active_menu, nullptr);
|
||||
auto step = std::move(steps.front());
|
||||
steps.erase(steps.begin());
|
||||
int target = -1;
|
||||
for (int index = 0; index < GetMenuItemCount(menu); ++index) {
|
||||
if (GetMenuItemID(menu, index) == step.command) { target = index; break; }
|
||||
}
|
||||
if (target < 0) {
|
||||
driver_error = "expected action absent from actual popup";
|
||||
EndMenu();
|
||||
return 0;
|
||||
}
|
||||
if (step.before_select) step.before_select();
|
||||
std::vector<INPUT> input;
|
||||
key(input, VK_HOME);
|
||||
for (int index = 0; index < target; ++index) {
|
||||
if ((GetMenuState(menu, static_cast<UINT>(index), MF_BYPOSITION) & MF_SEPARATOR) == 0) key(input, VK_DOWN);
|
||||
}
|
||||
key(input, VK_RETURN);
|
||||
if (SendInput(static_cast<UINT>(input.size()), input.data(), sizeof(INPUT)) != input.size()) {
|
||||
driver_error = "SendInput failed for actual popup";
|
||||
EndMenu();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return window_proc(window, message, wparam, lparam);
|
||||
}
|
||||
|
||||
struct Window {
|
||||
HWND handle = nullptr;
|
||||
std::filesystem::path user_data;
|
||||
std::wstring old_user_data;
|
||||
explicit Window(std::unique_ptr<World> initial) {
|
||||
const auto uuid = Void::Uuid::try_v4();
|
||||
require(uuid.has_value());
|
||||
user_data = std::filesystem::temp_directory_path() / ("settlement-order-controls-" + uuid->to_string());
|
||||
require(std::filesystem::create_directory(user_data));
|
||||
wchar_t old[32768]{};
|
||||
const auto size = GetEnvironmentVariableW(L"LOCALAPPDATA", old, 32768);
|
||||
old_user_data.assign(old, size < 32768 ? size : 0);
|
||||
require(SetEnvironmentVariableW(L"LOCALAPPDATA", user_data.c_str()));
|
||||
auto rules = default_rules_manifest();
|
||||
require(rules.has_value());
|
||||
session = std::make_unique<settlement::viewer::ViewerSession>(
|
||||
WorldCheckpoint{std::move(initial), *uuid, 1, *rules}, 1);
|
||||
world = session->world();
|
||||
showing_title = true;
|
||||
has_session = true;
|
||||
lan = std::make_unique<settlement::viewer::LanSession>();
|
||||
displayed_lan_state = LanState::Offline;
|
||||
placement_mode = PlacementMode::None;
|
||||
placement_message.clear();
|
||||
steps.clear();
|
||||
observed_menus.clear();
|
||||
active_menu = nullptr;
|
||||
driver_error.clear();
|
||||
timer_attempts = 0;
|
||||
INITCOMMONCONTROLSEX controls{sizeof(controls), ICC_LISTVIEW_CLASSES | ICC_BAR_CLASSES};
|
||||
require(InitCommonControlsEx(&controls));
|
||||
WNDCLASSW type{};
|
||||
type.lpfnWndProc = test_window_proc;
|
||||
type.hInstance = GetModuleHandleW(nullptr);
|
||||
type.lpszClassName = L"SettlementProductionControlsTest";
|
||||
type.hCursor = LoadCursorW(nullptr, IDC_ARROW);
|
||||
require(RegisterClassW(&type) || GetLastError() == ERROR_CLASS_ALREADY_EXISTS);
|
||||
handle = CreateWindowExW(0, type.lpszClassName, L"Production controls test",
|
||||
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 32, 32, 1120, 752, nullptr, nullptr, type.hInstance, nullptr);
|
||||
require(handle != nullptr);
|
||||
show_title_screen(handle, false);
|
||||
file_dialog_active = true; // Freeze ticks while exercising UI receipt delivery.
|
||||
KillTimer(handle, timer_id);
|
||||
session->set_ticking(false);
|
||||
ShowWindow(handle, SW_SHOW);
|
||||
UpdateWindow(handle);
|
||||
SetForegroundWindow(handle);
|
||||
}
|
||||
~Window() {
|
||||
if (handle) DestroyWindow(handle);
|
||||
session.reset();
|
||||
world.reset();
|
||||
file_dialog_active = false;
|
||||
MSG message{};
|
||||
while (PeekMessageW(&message, nullptr, 0, 0, PM_REMOVE)) {}
|
||||
SetEnvironmentVariableW(L"LOCALAPPDATA", old_user_data.empty() ? nullptr : old_user_data.c_str());
|
||||
std::error_code error;
|
||||
std::filesystem::remove_all(user_data, error);
|
||||
}
|
||||
void menu(std::vector<MenuStep> actions, const std::function<void()>& open) {
|
||||
steps = std::move(actions);
|
||||
require(SetTimer(handle, drive_timer, 50, nullptr) != 0);
|
||||
open();
|
||||
KillTimer(handle, drive_timer);
|
||||
require(driver_error.empty(), driver_error.c_str());
|
||||
require(steps.empty(), "not all popup pages were reachable");
|
||||
}
|
||||
void pump_until(const std::function<bool()>& done) {
|
||||
const auto deadline = std::chrono::steady_clock::now() + 5s;
|
||||
while (!done()) {
|
||||
SendMessageW(handle, WM_TIMER, timer_id, 0);
|
||||
require(std::chrono::steady_clock::now() < deadline, "UI receipt/replacement did not finish");
|
||||
std::this_thread::yield();
|
||||
}
|
||||
}
|
||||
void activate_tool() {
|
||||
menu({{manage_orders_id, {}}}, [&] { SendMessageW(work_list_button, BM_CLICK, 0, 0); });
|
||||
// The normal work menu posts WM_COMMAND after closing its popup.
|
||||
MSG message{};
|
||||
while (PeekMessageW(&message, nullptr, 0, 0, PM_REMOVE)) {
|
||||
TranslateMessage(&message);
|
||||
DispatchMessageW(&message);
|
||||
}
|
||||
require(placement_mode == PlacementMode::ManageOrders, "Работы menu did not activate order management");
|
||||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<World> orders(unsigned count = 2) {
|
||||
auto result = std::make_unique<World>(43, 32, 32, 1, ExecutionMode::SerialReference);
|
||||
for (unsigned index = 0; index < count; ++index) result->queue_production({8, 8}, RecipeId::BuildCabin);
|
||||
return result;
|
||||
}
|
||||
|
||||
struct [[= Void::Testing::name("ProductionControlsTests")]] ProductionControlsTests
|
||||
: Void::Testing::Suite<ProductionControlsTests> {
|
||||
[[= Void::Testing::tag("production-controls")]] Test real_work_menu_selects_exact_id_and_waits_for_receipt();
|
||||
[[= Void::Testing::tag("production-controls")]] Test every_order_remains_accessible_across_popup_pages();
|
||||
[[= Void::Testing::tag("production-controls")]] Test replacement_during_popup_cannot_cancel_in_new_world();
|
||||
[[= Void::Testing::tag("production-controls")]] Test legacy_guest_has_no_action_or_modern_submission();
|
||||
[[= Void::Testing::tag("production-controls")]] Test returning_resident_explains_wait_for_storage();
|
||||
};
|
||||
|
||||
Test ProductionControlsTests::real_work_menu_selects_exact_id_and_waits_for_receipt() {
|
||||
Window fixture(orders());
|
||||
const auto first = world->production_orders().front().id;
|
||||
const auto second = world->production_orders().back().id;
|
||||
fixture.activate_tool();
|
||||
fixture.menu({{2, {}}}, [&] { edit_at_cell(fixture.handle, {8, 8}); });
|
||||
require(world->find_production(second) && world->find_production(first) &&
|
||||
placement_message.find(L"ожидает подтверждения") != std::wstring::npos,
|
||||
"UI forged success before a committed receipt");
|
||||
require(observed_menus.back().at(1).find(L"Отменить: Построить домик №" + std::to_wstring(second)) != std::wstring::npos &&
|
||||
observed_menus.back().at(1).find(L"[9, 9]") != std::wstring::npos,
|
||||
"actual popup lost the order name, durable id or user-facing position");
|
||||
fixture.pump_until([&] { return !world->find_production(second); });
|
||||
require(world->find_production(first) && placement_message.find(L"Заказ отменён") != std::wstring::npos &&
|
||||
session->runtime().latest()->next_requests[0] == 2 && world->next_command_sequence(1) == 1);
|
||||
}
|
||||
|
||||
Test ProductionControlsTests::every_order_remains_accessible_across_popup_pages() {
|
||||
Window fixture(orders(35));
|
||||
const auto last = world->production_orders().back().id;
|
||||
fixture.activate_tool();
|
||||
fixture.menu({{101, {}}, {101, {}}, {3, {}}}, [&] { edit_at_cell(fixture.handle, {8, 8}); });
|
||||
fixture.pump_until([&] { return !world->find_production(last); });
|
||||
require(world->production_orders().size() == 34 && world->production_orders().front().id == 1);
|
||||
for (const auto& page : observed_menus) require(page.size() <= 19, "popup page exceeded its bounded display size");
|
||||
}
|
||||
|
||||
Test ProductionControlsTests::replacement_during_popup_cannot_cancel_in_new_world() {
|
||||
for (const bool complete_replacement : {false, true}) {
|
||||
Window fixture(orders());
|
||||
const auto opening = session->runtime().latest();
|
||||
fixture.activate_tool();
|
||||
fixture.menu({{1, [&] {
|
||||
session->new_colony();
|
||||
if (complete_replacement) {
|
||||
const auto deadline = std::chrono::steady_clock::now() + 5s;
|
||||
while (session->changing_world()) {
|
||||
static_cast<void>(session->poll());
|
||||
require(std::chrono::steady_clock::now() < deadline);
|
||||
std::this_thread::yield();
|
||||
}
|
||||
world = session->world();
|
||||
}
|
||||
}}}, [&] { edit_at_cell(fixture.handle, {8, 8}); });
|
||||
fixture.pump_until([&] { return !session->changing_world(); });
|
||||
const auto current = session->runtime().latest();
|
||||
require(current->identity != opening->identity && current->next_requests[0] == 1 &&
|
||||
current->world->next_command_sequence(1) == 1,
|
||||
"stale popup enqueued a production command into the new session");
|
||||
require(opening->world->production_orders().size() == 2, "modal selection invalidated pinned snapshot");
|
||||
}
|
||||
}
|
||||
|
||||
Test ProductionControlsTests::legacy_guest_has_no_action_or_modern_submission() {
|
||||
Window fixture(orders());
|
||||
session->enter_guest();
|
||||
lan->join("127.0.0.1", "000000", 1);
|
||||
require(lan->is_guest() && session->guest());
|
||||
const auto before = session->runtime().latest();
|
||||
const auto menu = create_work_menu();
|
||||
require(menu != nullptr && GetMenuState(menu, manage_orders_id, MF_BYCOMMAND) == static_cast<UINT>(-1),
|
||||
"legacy guest saw the modern management action");
|
||||
DestroyMenu(menu);
|
||||
SendMessageW(fixture.handle, WM_COMMAND, manage_orders_id, 0);
|
||||
require(placement_mode != PlacementMode::ManageOrders && !can_manage_orders());
|
||||
placement_mode = PlacementMode::ManageOrders;
|
||||
edit_at_cell(fixture.handle, {8, 8});
|
||||
require(!enqueue_command(CancelProductionPayload{1}) && !enqueue_command(ResumeProductionPayload{1}) &&
|
||||
session->runtime().latest() == before && guest_intents.empty(),
|
||||
"legacy guest admitted a modern order payload");
|
||||
}
|
||||
|
||||
Test ProductionControlsTests::returning_resident_explains_wait_for_storage() {
|
||||
auto initial = orders(1);
|
||||
const auto storage = initial->add_storage({3, 3}, 5);
|
||||
initial->stock_storage(storage, ItemType::Plank, 3);
|
||||
initial->stock_storage(storage, ItemType::StoneBlock, 2);
|
||||
const auto resident = initial->spawn_agent({1, 3});
|
||||
for (int tick = 0; tick < 100 && initial->agents().front().inventory.empty(); ++tick) initial->step();
|
||||
require(!initial->agents().front().inventory.empty());
|
||||
initial->stock_storage(storage, ItemType::Wood, 5);
|
||||
require(initial->cancel_production(initial->production_orders().front().id) == CommandStatus::Accepted);
|
||||
for (int tick = 0; tick < 5; ++tick) initial->step();
|
||||
Window fixture(std::move(initial));
|
||||
selected_resident = resident;
|
||||
const auto details = resident_details();
|
||||
require(details.find(L"Возвращает материалы") != std::wstring::npos &&
|
||||
(details.find(L"нет доступного склада с местом") != std::wstring::npos ||
|
||||
details.find(L"на складе недостаточно места") != std::wstring::npos) &&
|
||||
details.find(L"доски ×3") != std::wstring::npos && details.find(L"блоки ×2") != std::wstring::npos,
|
||||
"real returning resident did not expose actual cargo and waiting reason");
|
||||
}
|
||||
} // namespace production_controls
|
||||
Reference in new issue
Block a user