Compare commits
60
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2017e5685a | ||
|
|
17389b23d7 | ||
|
|
7a7ff32e14 | ||
|
|
e7046a92a1 | ||
|
|
ee1eca7571 | ||
|
|
1ca481b8f9 | ||
|
|
6d1123e172 | ||
|
|
6279a60bf7 | ||
|
|
0d71bcf5d8 | ||
|
|
a47e850bb4 | ||
|
|
455630fb39 | ||
|
|
1cf8bd08fc | ||
|
|
e9e7e8276e | ||
|
|
048268a27e | ||
|
|
ef980af125 | ||
|
|
5a64a27d17 | ||
|
|
37fb6a897d | ||
|
|
180506d414 | ||
|
|
f6493e2d1c | ||
|
|
66af7c5bb9 | ||
|
|
3c997ed236 | ||
|
|
e6a01bedcc | ||
|
|
db0a8720a6 | ||
|
|
b7f18c094b | ||
|
|
535424196e | ||
|
|
a8cd7bb415 | ||
|
|
2a3ec924de | ||
|
|
9a248c31ac | ||
|
|
275956395d | ||
|
|
2a5df1a18b | ||
|
|
aa4e271ab4 | ||
|
|
eef69caa0e | ||
|
|
09545bfe85 | ||
|
|
60154bd5f0 | ||
|
|
4ba64f7e62 | ||
|
|
ce814767fb | ||
|
|
a063894637 | ||
|
|
c2d9d8d51a | ||
|
|
8260e09be7 | ||
|
|
512c9ef033 | ||
|
|
8c4c1fe235 | ||
|
|
7979fff16c | ||
|
|
a4cf99c265 | ||
|
|
ce3a7dc937 | ||
|
|
2224299589 | ||
|
|
db4ac304b8 | ||
|
|
15da3f4336 | ||
|
|
1fa37d8e87 | ||
|
|
4921dffe71 | ||
|
|
645abefac5 | ||
|
|
fd17a2f3ff | ||
|
|
3844ebb205 | ||
|
|
84a78eff8a | ||
|
|
cf0cc2f32c | ||
|
|
68f91a236a | ||
|
|
de38aff2ff | ||
|
|
8d2870a6f8 | ||
|
|
904bdf8827 | ||
|
|
0deacb3662 | ||
|
|
083b84e11a |
No files matched your search
@@ -0,0 +1,5 @@
|
||||
# Зависимость от VoidLibrary
|
||||
|
||||
Для каждой технической возможности игры сначала проверь опубликованный API, тесты и поведение VoidLibrary. Если подходящая возможность уже существует, используй её. Установи точный закреплённый коммит из `CMakeLists.txt` и проверь поддержку Windows x64 и нужные гарантии. Если нужная возможность уже есть в более новой версии библиотеки, планируй проверяемое обновление зависимости.
|
||||
|
||||
Если возможности или части нужного контракта в библиотеке нет и она будет реализована в этом репозитории, найди существующий issue в **Void/Library** или создай там issue на её добавление. Свяжи URL с локальной задачей и местом реализации, включая проверку, по которой локальный код затем можно заменить библиотечным. Повторно используй совпадающий issue. Вопрос о включении возможности решают сопровождающие библиотеки. [Порядок проверки и состав текущей зависимости](docs/plan/void-library.md)
|
||||
+113
-34
@@ -1,12 +1,56 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 4.0)
|
||||
|
||||
project(stonehearth_like_sim VERSION 0.1.0 LANGUAGES CXX)
|
||||
project(stonehearth_like_sim VERSION 0.1.0 LANGUAGES C CXX)
|
||||
|
||||
if(NOT WIN32)
|
||||
message(FATAL_ERROR "Stonehearth-like Simulation Engine requires a Windows target.")
|
||||
endif()
|
||||
|
||||
include(CTest)
|
||||
if(BUILD_TESTING AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16))
|
||||
message(FATAL_ERROR "The reflection test suites need GCC 16 or later. Set BUILD_TESTING=OFF to build the game alone.")
|
||||
endif()
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(void_library
|
||||
GIT_REPOSITORY https://git.faumaray.com/Void/Library
|
||||
GIT_TAG 7b0fea6095f603f9e1904f66dfdc7752f4be4792
|
||||
SYSTEM
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
function(add_void_library)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
set(VOID_ENABLE_TESTING OFF)
|
||||
set(VOID_ENABLE_BENCHMARKS OFF)
|
||||
set(VOID_ENABLED_MODULES Algorithms Async Binary Core Crypto Data Math Text Time)
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_OpenSSL ON)
|
||||
if(BUILD_TESTING)
|
||||
list(APPEND VOID_ENABLED_MODULES Testing)
|
||||
endif()
|
||||
FetchContent_MakeAvailable(void_library)
|
||||
endfunction()
|
||||
add_void_library()
|
||||
|
||||
if(BUILD_TESTING AND NOT VOID_HAS_CXX26_REFLECTION)
|
||||
message(FATAL_ERROR "The reflection test suites need working C++26 reflection support.")
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
add_library(settlement_core
|
||||
engine/src/checkpoint.cpp
|
||||
engine/src/checkpoint_files.cpp
|
||||
engine/src/colony_profile.cpp
|
||||
engine/src/command_dispatcher.cpp
|
||||
engine/src/first_colony.cpp
|
||||
engine/src/inventory_transaction.cpp
|
||||
engine/src/rules_manifest.cpp
|
||||
engine/src/save_service_win32.cpp
|
||||
engine/src/simulation_runtime.cpp
|
||||
engine/src/voxel_navigation.cpp
|
||||
engine/src/worker_pool.cpp
|
||||
engine/src/voxel_region.cpp
|
||||
engine/src/world.cpp
|
||||
engine/src/world_save.cpp
|
||||
)
|
||||
@@ -16,8 +60,11 @@ target_include_directories(settlement_core
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/engine/include
|
||||
)
|
||||
|
||||
target_compile_features(settlement_core PUBLIC cxx_std_20)
|
||||
target_link_libraries(settlement_core PUBLIC Threads::Threads)
|
||||
target_compile_features(settlement_core PUBLIC cxx_std_23)
|
||||
target_link_libraries(settlement_core
|
||||
PUBLIC Threads::Threads Void::Async Void::Core Void::Time
|
||||
PRIVATE Void::Algorithms Void::Binary Void::Crypto Void::Data Void::Math Void::Text
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(settlement_core PRIVATE /W4 /permissive-)
|
||||
@@ -34,23 +81,36 @@ target_link_libraries(settlement_sim PRIVATE settlement_core)
|
||||
add_executable(settlement_colony_benchmark benchmarks/colony.cpp)
|
||||
target_link_libraries(settlement_colony_benchmark PRIVATE settlement_core)
|
||||
|
||||
if(WIN32)
|
||||
enable_language(RC)
|
||||
add_executable(settlement_viewer WIN32
|
||||
app/d3d_scene_win32.cpp
|
||||
app/viewer_win32.cpp
|
||||
app/lan_session_win32.cpp
|
||||
app/house_icons.rc
|
||||
)
|
||||
target_link_libraries(settlement_viewer PRIVATE settlement_core user32 gdi32 comctl32 comdlg32 ws2_32 bcrypt iphlpapi
|
||||
d3d11 d3dcompiler)
|
||||
if(NOT MSVC)
|
||||
target_link_options(settlement_viewer PRIVATE -municode)
|
||||
target_compile_options(settlement_viewer PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-Wall;-Wextra;-Wpedantic;-Wconversion;-Wshadow>)
|
||||
else()
|
||||
target_compile_options(settlement_viewer PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/W4;/permissive->)
|
||||
endif()
|
||||
add_library(settlement_lan STATIC
|
||||
app/lan_session_win32.cpp
|
||||
app/lan_wire.cpp
|
||||
)
|
||||
target_include_directories(settlement_lan PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/app)
|
||||
target_link_libraries(settlement_lan
|
||||
PUBLIC settlement_core
|
||||
PRIVATE Void::Binary ws2_32 bcrypt iphlpapi
|
||||
)
|
||||
|
||||
enable_language(RC)
|
||||
add_library(settlement_client STATIC app/viewer_session.cpp)
|
||||
target_include_directories(settlement_client PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/app)
|
||||
target_link_libraries(settlement_client PUBLIC settlement_core)
|
||||
add_executable(settlement_viewer WIN32
|
||||
app/d3d_scene_win32.cpp
|
||||
app/viewer_win32.cpp
|
||||
app/house_icons.rc
|
||||
)
|
||||
target_link_libraries(settlement_viewer PRIVATE settlement_client settlement_lan user32 gdi32 comctl32 comdlg32 d3d11 d3dcompiler)
|
||||
if(MSVC)
|
||||
target_compile_options(settlement_client PRIVATE /W4 /permissive-)
|
||||
target_compile_options(settlement_lan PRIVATE /W4 /permissive-)
|
||||
target_compile_options(settlement_viewer PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/W4;/permissive->)
|
||||
else()
|
||||
target_compile_options(settlement_client PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
|
||||
target_compile_options(settlement_lan PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
|
||||
target_link_options(settlement_viewer PRIVATE -municode)
|
||||
target_compile_options(settlement_viewer PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-Wall;-Wextra;-Wpedantic;-Wconversion;-Wshadow>)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
@@ -59,22 +119,41 @@ else()
|
||||
target_compile_options(settlement_sim PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
|
||||
endif()
|
||||
|
||||
include(CTest)
|
||||
if(BUILD_TESTING)
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
message(FATAL_ERROR "The reflection test suites need GCC 16 or later. Set BUILD_TESTING=OFF to build the game alone.")
|
||||
endif()
|
||||
add_executable(settlement_core_tests
|
||||
tests/checkpoint_tests.cpp
|
||||
tests/checkpoint_file_tests.cpp
|
||||
tests/core_tests.cpp
|
||||
tests/executor_tests.cpp
|
||||
tests/identity_tests.cpp
|
||||
tests/production_identity_tests.cpp
|
||||
tests/profile_tests.cpp
|
||||
tests/quantity_transaction_tests.cpp
|
||||
tests/replay_tests.cpp
|
||||
tests/rules_tests.cpp
|
||||
tests/runtime_tests.cpp
|
||||
tests/save_service_tests.cpp
|
||||
tests/session_tests.cpp
|
||||
tests/snapshot_tests.cpp
|
||||
tests/voxel_navigation_tests.cpp
|
||||
tests/voxel_region_tests.cpp
|
||||
tests/test_main.cpp
|
||||
)
|
||||
target_compile_options(settlement_core_tests PRIVATE -std=c++26 -freflection)
|
||||
target_link_libraries(settlement_core_tests PRIVATE settlement_core)
|
||||
target_link_libraries(settlement_core_tests PRIVATE settlement_core Void::Testing)
|
||||
add_test(NAME settlement_core_tests COMMAND settlement_core_tests)
|
||||
if(WIN32)
|
||||
add_executable(settlement_lan_tests tests/lan_tests.cpp app/lan_session_win32.cpp)
|
||||
target_compile_options(settlement_lan_tests PRIVATE -std=c++26 -freflection)
|
||||
target_include_directories(settlement_lan_tests PRIVATE app)
|
||||
target_link_libraries(settlement_lan_tests PRIVATE settlement_core ws2_32 bcrypt iphlpapi)
|
||||
add_test(NAME settlement_lan_tests COMMAND settlement_lan_tests)
|
||||
endif()
|
||||
|
||||
add_executable(settlement_lan_tests tests/lan_tests.cpp tests/test_main.cpp)
|
||||
target_link_libraries(settlement_lan_tests PRIVATE settlement_lan Void::Testing)
|
||||
add_test(NAME settlement_lan_tests COMMAND settlement_lan_tests)
|
||||
|
||||
add_executable(settlement_viewer_frame_smoke
|
||||
tests/viewer_frame_smoke.cpp app/d3d_scene_win32.cpp app/house_icons.rc)
|
||||
target_link_libraries(settlement_viewer_frame_smoke PRIVATE settlement_client settlement_lan
|
||||
user32 gdi32 comctl32 comdlg32 d3d11 d3dcompiler)
|
||||
add_test(NAME settlement_viewer_frame_smoke COMMAND settlement_viewer_frame_smoke)
|
||||
set_tests_properties(settlement_viewer_frame_smoke PROPERTIES TIMEOUT 90 SKIP_RETURN_CODE 77)
|
||||
|
||||
add_executable(settlement_viewer_tests tests/viewer_session_tests.cpp tests/test_main.cpp)
|
||||
target_link_libraries(settlement_viewer_tests PRIVATE settlement_client Void::Testing)
|
||||
add_test(NAME settlement_viewer_tests COMMAND settlement_viewer_tests)
|
||||
endif()
|
||||
@@ -1,91 +1,79 @@
|
||||
# План Stonehearth-like Simulation Engine
|
||||
# Мастер-план самостоятельной воксельной игры о поселении
|
||||
|
||||
## Цель
|
||||
**Первое публичное демо — «Дом на склоне».** Три поселенца выкапывают часть склона, заготавливают дерево и камень, строят двухэтажный дом, обставляют его, едят и спят. Игрок может сохранить партию, пока строитель несёт материал на второй этаж, загрузить её и увидеть, как поселенцы заканчивают дом. Этот сценарий связывает стоимость движка, игровых механик и производства контента с результатом, который можно дать игроку. [Подробный план демо](docs/plan/milestones/M03.md)
|
||||
|
||||
Самостоятельная C++-игра о поселении с повторяемой симуляцией, многопоточным расчётом и 3D-клиентом. Это отдельный проект, не совместимый движок для Stonehearth. Код и игровые ресурсы Stonehearth не включаются.
|
||||
**Версия 1.0** — отдельная игра для Windows x64, покрывающая каждое различимое выпущенное игровое поведение Stonehearth 1.1 и полного ACE серии 0.9.6.22 по публичным свидетельствам к 2 декабря 2026 года. Покрытие включает ветви развития, производственные цепочки и различные исходы встреч. У игры будут собственные название, мир, сценарии и оформление. Код и материалы Stonehearth и ACE исключены. Допускаются собственные и независимо лицензированные модели, анимация, звук, музыка и шрифты. [Реестр поведения и источников](docs/plan/parity.md) · [Производство материалов](docs/plan/systems/S20.md)
|
||||
|
||||
## Этапы
|
||||
## Исходная сборка
|
||||
|
||||
### P0 — Инструменты и границы проекта
|
||||
За основу берём проект на коммите `083b84e`. Сохраняем полезные части C++, Win32/D3D11, тестов и сборки на CMake 4 с закреплённой VoidLibrary. В проверенной кросс-сборке Windows x64 Release под Wine прошли 28 тестов ядра и 4 теста LAN. У прототипа есть добыча, доставка, мастерские, мебель, комнаты, сон, голод и общая колония на двоих. Сохранения формата 13 остаются у старой сборки. Воксели получают собственный формат и поколение сетевого протокола. [Сборка](CMakeLists.txt) · [Архив P0–P5](docs/plan/history/prototype-p0-p5.md) · [Состояние прототипа](docs/roadmap-status.md)
|
||||
|
||||
- [x] Отдельный каталог, CMake, C++20, лицензия и базовая структура.
|
||||
- [x] Portable-установщик MSYS2 UCRT64 с GCC 16 и сборка с CTest.
|
||||
- [ ] CI для Windows и Linux.
|
||||
- [x] Не включать код и ресурсы Stonehearth.
|
||||
Координаты симуляции сейчас плоские. Визуальная стена комнаты ещё пропускает жителя. Выбор некоторых заданий, поиск путей и движения используют пул, а выдача производственных заказов и общие изменения имеют последовательные стадии. Клиент шагает из оконного таймера. Поэтому M01 отделяет такт от UI, а M02 связывает коллизию, маршрут и построенную геометрию. Старое предложение индексировать заказы переходит в S04 с проверкой на живой экономике. [Модель мира](engine/include/settlement/core/world.hpp) · [Такт](engine/src/world.cpp) · [Поведение клиента](docs/viewer.md)
|
||||
|
||||
### P1 — Повторяемое ядро симуляции
|
||||
## Решения для всех подсистем
|
||||
|
||||
- [x] Фиксированные тики и seed мира.
|
||||
- [x] Целочисленная карта и стабильный порядок симуляции.
|
||||
- [x] Резервирование работы, маршруты A*, перемещение и завершение заданий.
|
||||
- [x] Версионированный формат сохранения и загрузки мира.
|
||||
- [x] Версионированный формат команд и снимков для первого подключения по локальной сети.
|
||||
- [x] Общая обработка команд двух игроков с порядком применения, проверкой прав и защитой от повторов.
|
||||
| Решение | Обязательство |
|
||||
|---|---|
|
||||
| Многопоточность | Авторитетный мир продвигается фиксированными тактами. Независимые расчёты выполняются параллельно по данным или регионам. Порядок применения конфликтующих предложений воспроизводим. Рендер, сеть и запись на диск читают опубликованные снимки. Профилирование проверяет полезную работу и задержки при той же истории мира. |
|
||||
| Масштаб | 500 полноценно моделируемых жителей **суммарно по миру**, включая все населённые регионы вне кадра. Цели для среднего ПК — 20 тактов/с и 1080p60. При 2 500 жителях измеряются пределы и целостность состояния. |
|
||||
| Мир | Редактируемые воксели допускают пещеры, навесы, многоэтажные здания и маршруты между этажами. Режимы версии 1.0 — конечная карта, расширяющийся фронтир и связанные регионы. Камера и симуляция имеют отдельные основания загружать чанк. |
|
||||
| Правила и моды | Игрок комбинирует совместимые модули при создании мира. Версии, зависимости и контрольные суммы входят в сохранение и проверку подключения. SDK даёт определения контента и ограниченные скрипты. Выбранный технический вариант — Lua 5.4.9 и собственный игровой API. |
|
||||
| Сеть | Одиночная игра работает автономно. До восьми игроков вместе с хозяином управляют общим городом или отдельными союзными поселениями. Прямые подключения по LAN и интернету. Публичный кооператив после одиночного демо, выделенный Windows-сервер после 1.0. |
|
||||
| VoidLibrary | Для каждой возможности проверить публичный API и пригодность на Windows. Если возможность есть, использовать её. Для отсутствующей возможности, реализуемой в игре, найти или создать issue **в Void/Library**, приложить ссылку к задаче и локальной реализации. Совпадающую существующую задачу использовать повторно. [Порядок и проверенная матрица](docs/plan/void-library.md) |
|
||||
| Стоимость и порядок | Один разработчик с агентами, без календарных обещаний. Оригинальные новые идеи за пределами согласованных режимов мира и кооператива идут после паритета. После M03 пересчитать оценку по фактическим затратам на код, контент и отладку. |
|
||||
|
||||
### P2 — Ресурсы, нагрузка и измерения
|
||||
## План этапов
|
||||
|
||||
- [x] Источники дерева и камня с резервированием ресурса.
|
||||
- [x] Жители добывают ресурс и доставляют его на склад.
|
||||
- [x] Инвентарь склада со стеками предметов и ограничением вместимости.
|
||||
- [x] Метрики тиков, запросов A* и посещённых узлов.
|
||||
- [x] Сценарий сравнения 50 и 2500 жителей.
|
||||
- [x] Профилирование отдельных подсистем и сценарии на 50/100/250/500 жителях.
|
||||
- [x] Кэш маршрутов для полей, складов, мастерских, еды и сна с обновлением при изменении карты.
|
||||
- [x] Индекс доступных ресурсных поручений по профессиям.
|
||||
- [ ] Индекс производственных заказов и пространственный индекс заданий.
|
||||
Результаты первого этапа доступны в [сверке базовых выпусков](docs/plan/base-evidence.md), [сверке ACE](docs/plan/ace-evidence.md), [ведомости материалов](docs/art/demo-inventory.md) и [передаче исходной сборки и контрольной сцены](docs/plan/prototype-handoff.md).
|
||||
|
||||
### P3 — Многопоточность
|
||||
Номер задаёт порядок демонстрации. Планы систем развиваются через несколько этапов. Например, M03 реализует доставку для одного дома, M04 расширяет её до устойчивой экономики, M08 проверяет отправку груза в другой регион.
|
||||
|
||||
- [x] Пул потоков для независимого выбора заданий, A* и продвижения жителей.
|
||||
- [x] Стабильное применение результатов в конце шага симуляции.
|
||||
- [x] Многопоточный режим с двумя и более рабочими потоками; проверка игровых результатов и загрузки.
|
||||
- [x] Автоматический выбор числа потоков в Windows-клиенте и параметр для командных бенчмарков.
|
||||
- [x] Повторный замер времени тика после расширения систем ресурсов.
|
||||
| Этап | Зависит от | Что должно получиться |
|
||||
|---|---|---|
|
||||
| [M00. Инвентаризация и происхождение](docs/plan/milestones/M00.md) | Исходная сборка | Для обнаруженных механик указаны версия, первичный источник, самостоятельный эквивалент и проверка либо конкретный пробел в свидетельстве. У материалов демо прослеживается происхождение. |
|
||||
| [M01. Авторитетная симуляция](docs/plan/milestones/M01.md) | M00 | Один журнал команд воспроизводится потактно в последовательном эталоне и на 2, 6 и 12 рабочих потоках. Снимки читают независимый клиент и внутренняя сетевая проверка. |
|
||||
| [M02. Объёмный мир и маршруты](docs/plan/milestones/M02.md) | M01 | Житель входит в дверь, поднимается по лестнице и меняет маршрут после перекрытия прохода. Редактирование работает на стыке чанков и переживает загрузку. |
|
||||
| [M03. Первое демо «Дом на склоне»](docs/plan/milestones/M03.md) | M02 | Игрок начинает партию с тремя жителями, добывает материалы и заселяет обставленный двухэтажный дом. Сохранение прерывает доставку и стройку, после загрузки дом всё равно достраивается. |
|
||||
| [M04. Самодостаточное поселение](docs/plan/milestones/M04.md) | M03 | Колония переживает несколько урожаев и принимает нового жителя за счёт собственного производства. Отмена заказа или потеря склада освобождает резервы и сохраняет груз. |
|
||||
| [M05. Климат, вода и живая природа](docs/plan/milestones/M05.md) | M02 и M04 | Вода проходит в соседний чанк, поле реагирует на орошение и смену сезона, пастбище и запасы продолжают жить вне экрана. |
|
||||
| [M06. Город, культуры и торговля](docs/plan/milestones/M06.md) | M04 и M05 | Самостоятельно созданные культуры развивают экономику разными путями. Торговая операция изменяет запасы, оплату и репутацию однократно. |
|
||||
| [M07. Оборона и кампании](docs/plan/milestones/M07.md) | M04–M06 | Встреча имеет последствия для жителей, мирная ветвь достижима, сохранение на развилке восстанавливает участников и выдаёт награду один раз. |
|
||||
| [M08. Фронтир и связанные регионы](docs/plan/milestones/M08.md) | M02, M04 и M06 | Один формат мира обслуживает конечную карту, расширение при исследовании и связанные регионы. При прерывании перехода у жителя и имущества остаётся один владелец. |
|
||||
| [M09. Кооператив игроков](docs/plan/milestones/M09.md) | M08 и внутренняя проверка M01 | Хозяин и до семи гостей ведут общий город или отдельные союзные города по LAN и интернету. Повторный вход и загрузка прошлой партии сохраняют права и имущество. |
|
||||
| [M10. Моды и игровой контент](docs/plan/milestones/M10.md) | M07–M09 и интерфейс M01 | Автор создаёт профессию, рецепт и событие по документации. Сохранение и кооператив работают с зафиксированным совместимым комплектом модулей. |
|
||||
| [M11. Приёмка и выпуск 1.0](docs/plan/milestones/M11.md) | M00–M10 | На Windows пройдены обе большие контрольные партии, тест установки и реестр обязательного поведения. Подтверждено право распространения каждого материала релиза. |
|
||||
| [M12. Выделенный Windows-сервер](docs/plan/milestones/M12.md) | После 1.0 | Тот же мир продолжает работать после ухода последнего игрока. Штатный и аварийный перезапуск сохраняют города, права, транзит и заказы. |
|
||||
|
||||
### P4 — Игровой клиент
|
||||
## План систем
|
||||
|
||||
- [x] Windows-клиент с отображением карты, маршрутов и жителей.
|
||||
- [x] Отображение источников ресурсов, складов и текущих запасов.
|
||||
- [x] Камера с перемещением и масштабированием относительно курсора.
|
||||
- [x] Нижняя панель с жителями, добычей, участками и строительством.
|
||||
- [x] Нижние кнопки «Работы» и приоритета с настраиваемым масштабом панели.
|
||||
- [x] Главное меню со списком сохранений, продолжением партии и управлением кооперативом.
|
||||
- [x] Меню Esc с паузой, сохранениями, выходом в главное меню и завершением игры.
|
||||
- [x] Игровая карта на Direct3D 11 с глубиной и базовыми объёмными моделями.
|
||||
- [ ] Расширение набора 3D-моделей и освещения.
|
||||
- [x] Постановка чертежа домика мышью в Windows-клиенте.
|
||||
- [x] Редактируемая раскладка кроватей и станков с предпросмотром, списком материалов и подтверждением.
|
||||
- [x] Прямоугольные чертежи комнат с полом, стенами, выбором стороны входа и поэтапной стройкой.
|
||||
- [ ] Маршруты через дверные проёмы и настройка формы комнаты.
|
||||
- [ ] Интерфейс для остальных типов работ и зданий.
|
||||
| Система | Ответственность |
|
||||
|---|---|
|
||||
| [S01. Такт и многопоточный расчёт](docs/plan/systems/S01.md) | Фазы, владение данными, повторяемость и снимки |
|
||||
| [S02. Воксельный мир и генерация](docs/plan/systems/S02.md) | Координаты, версия генератора, изменения чанков |
|
||||
| [S03. Навигация и доступность](docs/plan/systems/S03.md) | Проходы, опоры, вертикальные переходы, рабочие позиции |
|
||||
| [S04. Работы и резервы](docs/plan/systems/S04.md) | Поиск кандидатов, устойчивый арбитраж, отмена |
|
||||
| [S05. Жизнь жителей](docs/plan/systems/S05.md) | Распорядок, потребности, настроение и прерывание работы |
|
||||
| [S06. Предметы и логистика](docs/plan/systems/S06.md) | Стеки, качество, вместимость, владелец груза |
|
||||
| [S07. Профессии и производство](docs/plan/systems/S07.md) | Обучение, инструменты, заказы, заменяемые ингредиенты |
|
||||
| [S08. Строительство и шаблоны](docs/plan/systems/S08.md) | Редактирование, зависимости стройки, доступ к этажам |
|
||||
| [S09. Климат и жидкости](docs/plan/systems/S09.md) | Календарь, ток воды, источники, межчанковый обмен |
|
||||
| [S10. Земледелие и животные](docs/plan/systems/S10.md) | Посев, сбор, стадо, рыболовство и опыление |
|
||||
| [S11. Поселения, культуры и торговля](docs/plan/systems/S11.md) | Рост города, собственность, цены, обмен и репутация |
|
||||
| [S12. Оборона, здоровье и лечение](docs/plan/systems/S12.md) | Отряды, тревога, помощь раненым, восстановление |
|
||||
| [S13. События и кампании](docs/plan/systems/S13.md) | Условия, ветви, участники, расписание и награды |
|
||||
| [S14. Регионы и переходы](docs/plan/systems/S14.md) | Резидентность симуляции, путешествие, передача владения |
|
||||
| [S15. Сохранения и воспроизведение](docs/plan/systems/S15.md) | Публикация полной версии, загрузка, журнал и проверка состояния |
|
||||
| [S16. Сеть и права](docs/plan/systems/S16.md) | Хост, идентичность игрока, права на город и актуальность сессии |
|
||||
| [S17. D3D11 и камера](docs/plan/systems/S17.md) | Снимки, подготовка геометрии, срезы и освещение |
|
||||
| [S18. Интерфейс и ввод](docs/plan/systems/S18.md) | Команды на карте, доступность, объяснение задержек |
|
||||
| [S19. Модули правил и SDK](docs/plan/systems/S19.md) | Зависимости, собственный API скриптов, лимиты и совместимость |
|
||||
| [S20. Художественные материалы и звук](docs/plan/systems/S20.md) | Производство, происхождение, анимация и аудио |
|
||||
| [S21. Проверки, измерения и поставка](docs/plan/systems/S21.md) | Игровые сценарии, нативные измерения, упаковка Windows |
|
||||
|
||||
### P5 — Игровые системы и совместная игра
|
||||
## Критерии приёмки
|
||||
|
||||
- [x] Базовые предметы дерева и камня; склады хранят их в стеках.
|
||||
- [x] Личный инвентарь жителя для еды и грузов.
|
||||
- [ ] Предметы с уникальными свойствами.
|
||||
- [x] Базовые рецепты, ремесло и строительство из доставленных ресурсов.
|
||||
- [x] Доставка материалов со складов на стройплощадку.
|
||||
- [x] Сборка спального места по деталям с выбором основы и отдельной доставкой на каждый этап.
|
||||
- [x] Голод и сбор еды в кладовую.
|
||||
- [x] Усталость, сон в назначенной кровати и отдых на земле.
|
||||
- [x] Возобновляемые поля ягод и посадки деревьев, шахты для добычи камня.
|
||||
- [x] Перенос и снос доступных объектов с проверкой резерва и маршрутов.
|
||||
- [x] Назначение профессий и группировка приказов по типу работы.
|
||||
- [x] Производство ткани из льна для спальных мест.
|
||||
- [x] Посев полей и посадка деревьев как рабочие поручения.
|
||||
- [ ] Остальные потребности жителей и простые боевые события.
|
||||
- [x] Сохранение и загрузка из меню Windows-клиента.
|
||||
- [x] Кооператив на двоих по локальной сети с авторитетной симуляцией у хозяина и повторным подключением.
|
||||
- [ ] Проверить сетевую партию на двух компьютерах и улучшить отображение проблем с подключением.
|
||||
|
||||
## Ближайший этап
|
||||
|
||||
Ускорить выдачу работ в мастерских и на стройке. Начать с индекса активных заказов и сократить повторные проверки складов. Текущее состояние описано в [docs/roadmap-status.md](docs/roadmap-status.md).
|
||||
|
||||
### Рубеж первой играбельной версии
|
||||
|
||||
- [x] Начать с трёх поселенцев. Обеспечить каждому своё спальное место и собрать шесть свободных порций еды.
|
||||
- [x] Дать игроку выбирать ягодные кусты и места стройки, менять приоритеты работ и ставить время на паузу.
|
||||
- [x] Замедлять работу голодных жителей, чтобы снабжение влияло на темп стройки.
|
||||
- [x] Показывать прогресс и выполнение цели. Сохранять прогресс, приоритеты и номера команд обоих игроков.
|
||||
1. **Повторяемость.** Один seed, замороженный набор правил и журнал команд дают одинаковое каноническое состояние после каждого такта в последовательном эталоне и на 2, 6 и 12 рабочих потоках. Повторить с перестановкой завершений вычислений и чтения чанков, отменой, сохранением и загрузкой. Хеш включает резервы, запланированные события, случайность, транзит и состояние скриптов.
|
||||
2. **Игровой город.** Предложенный стенд — Windows x64, Ryzen 5 5600, Radeon RX 6600, 16 ГБ, SSD, 1080p, средние настройки. Контрольный мир 512×512×128, 256 активных чанков 32³, 500 жителей, 200 видны в начале, 10 000 стеков, 2 000 заданий, 32 768 активных водных вокселей и дополнительно 32 участника события.
|
||||
3. **Распределённый мир.** Те же суммарные нагрузки распределены по четырём регионам по 125 жителей. Хозяин и семь гостей строят, перемещаются и торгуют. Открыть 128 новых чанков, сохранить мир во время перехода и переподключить гостя. Должны сохраниться однократное владение грузом, права игроков и история принятых команд.
|
||||
4. **Измерения.** На каждый сценарий — три прогона по 30 минут после пяти минут прогрева. Устойчивые 20 тактов/с и 60 кадров/с, p95 такта до 50 мс, p95 кадра до 16,7 мс. Отдельно записать пики при сохранении, подключении и перестройке, отставание симуляции, размеры очередей, память и объём передачи. Параметры сцен служат воспроизводимости измерений.
|
||||
5. **Окончание этапа.** В отчёте указать коммит, состав партии, проверенные сценарии и оставшиеся пробелы. Закрыть обязательное поведение в реестре можно после проверки на собственной сборке. Для релиза обязательны нативные Windows-измерения, проверка установки и реальное межмашинное соединение. Исторический тест экономики на 500 жителей и тест 2 500 общих заданий относятся к разным нагрузкам. [Экономика прототипа](benchmarks/colony-performance.md) · [Синтетическая нагрузка](benchmarks/parallel-workers.md)
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
Это отдельный проект, не запускающий Stonehearth и не содержащий её код или ресурсы. Совместимость с её сохранениями и модами не является целью.
|
||||
|
||||
Дальнейшая разработка описана в [мастер-плане воксельной игры](PLAN.md). Он ведёт к планам этапов, систем, игровой приёмке и правилам использования VoidLibrary.
|
||||
|
||||
## Текущий прототип
|
||||
|
||||
Headless-симуляция включает сеточную карту с препятствиями, поселение в центральном лагере и рабочие задания, размещённые вокруг него. Жители выбирают ближайшую доступную работу, прокладывают к ней маршрут A*, идут по карте и выполняют работу за 20–80 тактов. После завершения задание снимается с доски.
|
||||
@@ -44,7 +46,9 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\tools\render-svg-to-pn
|
||||
|
||||
## Сборка Windows на MSYS2 UCRT64
|
||||
|
||||
Требуется 64-битная Windows. Скрипт установки разворачивает MSYS2 в `.tools/toolchain/msys64`, проверяет SHA-256 архива и устанавливает GCC 16, CMake и Ninja через UCRT64. Если MSYS2 уже установлен, передайте его каталог обоим скриптам через `-Msys2Root` или задайте `SETTLEMENT_MSYS2_ROOT`.
|
||||
Требуется 64-битная Windows. Скрипт установки разворачивает MSYS2 в `.tools/toolchain/msys64`, проверяет SHA-256 архива и устанавливает GCC 16 или новее, CMake 4.0 или новее, Ninja, Git и `windres`. Если MSYS2 уже установлен, передайте его каталог обоим скриптам через `-Msys2Root` или задайте `SETTLEMENT_MSYS2_ROOT`.
|
||||
|
||||
Для установки MSYS2 рекомендуется короткий путь из символов ASCII без пробелов. [Рекомендации MSYS2](https://www.msys2.org/docs/installer/#what-are-the-installation-folder-recommendations)
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\setup-toolchain.ps1
|
||||
@@ -53,7 +57,17 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\build.ps1
|
||||
|
||||
Сборка запускает CTest и помещает проверенные исполняемые файлы и библиотеки GCC в `build/`. Просмотрщик запускается из `build/settlement_viewer.exe`.
|
||||
|
||||
Тесты используют C++26 и `-freflection`. `Void::Testing::Suite<T>` находит методы с возвращаемым типом `Test`. Необязательный `setup()` выполняется перед каждым запускаемым тестом. Метки задаются через `[[= Void::Testing::tag("construction")]]`, а `[[= Void::Testing::skip("причина")]]` пропускает тест с пояснением. Чтобы запустить только тесты строительства, выполните `build/settlement_core_tests.exe --tag construction`. Для сборки игры на другом компиляторе через CMake есть `-DBUILD_TESTING=OFF`.
|
||||
При настройке CMake скачивает Void Library через Git и использует коммит `7b0fea6095f603f9e1904f66dfdc7752f4be4792`. Для сборки без доступа к репозиторию передайте путь к заранее подготовленной копии этого коммита. [Репозиторий Void Library](https://git.faumaray.com/Void/Library)
|
||||
|
||||
```powershell
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\build.ps1 -VoidLibrarySource 'C:\sources\Void Library'
|
||||
```
|
||||
|
||||
При прямом вызове CMake задайте `-DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH=<путь>`. Для возврата к загрузке через Git очистите эту переменную CMake. Скрипт `build.ps1` делает это автоматически при запуске без `-VoidLibrarySource`.
|
||||
|
||||
Void Library требует поддержки C++26. Тесты ядра и LAN используют рефлексию C++26. `Void::Testing::Suite<T>` регистрирует методы без аргументов с возвращаемым типом `Void::Testing::Test`. Необязательный `setup()` выполняется перед каждым запускаемым тестом. Метки задаются через `[[= Void::Testing::tag("construction")]]`, а `[[= Void::Testing::skip("причина")]]` пропускает тест с пояснением. Чтобы запустить только тесты строительства, выполните `build/settlement_core_tests.exe --tag construction`. Для сборки игры без тестов задайте `-DBUILD_TESTING=OFF` при прямом вызове CMake.
|
||||
|
||||
Потактную проверку симуляции можно запустить командой `build\settlement_core_tests.exe --tag replay`. Она сравнивает последовательную партию с исполнением на 2, 6 и 12 рабочих потоках и с продолжением из сохранения. [Сценарий M01](docs/plan/milestones/M01.md)
|
||||
|
||||
## Структура
|
||||
|
||||
|
||||
+44
-19
@@ -486,6 +486,11 @@ float4 paint(Pixel input) : SV_Target { return float4(input.color, 1.0); }
|
||||
|
||||
} // namespace
|
||||
|
||||
class PreparedGeometry {
|
||||
public:
|
||||
Mesh mesh;
|
||||
};
|
||||
|
||||
struct D3DScene::Backend {
|
||||
ComPtr<ID3D11Device> device;
|
||||
ComPtr<ID3D11DeviceContext> context;
|
||||
@@ -501,10 +506,11 @@ struct D3DScene::Backend {
|
||||
ComPtr<ID3D11Buffer> geometry;
|
||||
UINT buffer_bytes = 0;
|
||||
int width = 0, height = 0;
|
||||
Mesh mesh;
|
||||
std::shared_ptr<const PreparedGeometry> uploaded;
|
||||
|
||||
bool resize(int w, int h) {
|
||||
if (w == width && h == height && target_view && depth_view) return true;
|
||||
uploaded.reset();
|
||||
context->OMSetRenderTargets(0, nullptr, nullptr);
|
||||
target_texture.Reset();
|
||||
target_view.Reset();
|
||||
@@ -532,7 +538,7 @@ struct D3DScene::Backend {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool upload_geometry() {
|
||||
bool upload_geometry(const Mesh& mesh) {
|
||||
const auto bytes = mesh.vertices.size() * sizeof(Vertex);
|
||||
if (bytes > std::numeric_limits<UINT>::max()) return false;
|
||||
if (bytes > buffer_bytes) {
|
||||
@@ -578,7 +584,7 @@ D3DScene::D3DScene() = default;
|
||||
D3DScene::~D3DScene() = default;
|
||||
|
||||
bool D3DScene::initialize(HWND target, bool software) {
|
||||
auto graphics = std::make_unique<Backend>();
|
||||
auto graphics = std::make_shared<Backend>();
|
||||
const auto driver = software ? D3D_DRIVER_TYPE_WARP : D3D_DRIVER_TYPE_HARDWARE;
|
||||
constexpr D3D_FEATURE_LEVEL levels[] = {D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0};
|
||||
constexpr UINT flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||
@@ -628,24 +634,41 @@ bool D3DScene::initialize(HWND target, bool software) {
|
||||
bool D3DScene::ready() const noexcept { return backend_ != nullptr; }
|
||||
void D3DScene::reset() noexcept { backend_.reset(); }
|
||||
|
||||
bool D3DScene::render(const World& world, const SceneView& view, std::vector<std::uint32_t>* capture) {
|
||||
if (!backend_ || view.width <= 0 || view.height <= 0) return false;
|
||||
auto& graphics = *backend_;
|
||||
if (!graphics.resize(view.width, view.height)) return false;
|
||||
graphics.mesh.vertices.clear();
|
||||
terrain(graphics.mesh, world, view);
|
||||
resources(graphics.mesh, world);
|
||||
construction(graphics.mesh, world, view.building_view);
|
||||
std::shared_ptr<const PreparedGeometry> D3DScene::prepare(const World& world, const SceneView& view) {
|
||||
auto prepared = std::make_shared<PreparedGeometry>();
|
||||
terrain(prepared->mesh, world, view);
|
||||
resources(prepared->mesh, world);
|
||||
construction(prepared->mesh, world, view.building_view);
|
||||
for (std::size_t index = 0; index < view.room_blueprints.size(); ++index) {
|
||||
if (view.moving_room == index) continue;
|
||||
const auto& plan = view.room_blueprints[index];
|
||||
draw_room_plan(graphics.mesh, plan, false, world.can_place_room(plan));
|
||||
draw_room_plan(prepared->mesh, plan, false, world.can_place_room(plan));
|
||||
}
|
||||
if (view.room_preview) draw_room_plan(prepared->mesh, *view.room_preview, true, view.valid_cursor);
|
||||
for (const auto& part : view.blueprint) draw_blueprint(prepared->mesh, part, false);
|
||||
if (view.preview) draw_blueprint(prepared->mesh, *view.preview, true);
|
||||
residents(prepared->mesh, world, view);
|
||||
return prepared;
|
||||
}
|
||||
|
||||
bool D3DScene::render(const World& world, const SceneView& view, std::vector<std::uint32_t>* capture) {
|
||||
if (!backend_ || view.width <= 0 || view.height <= 0) return false;
|
||||
return render(prepare(world, view), view, capture);
|
||||
}
|
||||
|
||||
bool D3DScene::render(std::shared_ptr<const PreparedGeometry> geometry, const SceneView& view,
|
||||
std::vector<std::uint32_t>* capture) {
|
||||
// Present may dispatch window messages, including destruction. Keep this
|
||||
// backend alive until the current submission has returned.
|
||||
const auto held_backend = backend_;
|
||||
if (!held_backend || !geometry || view.width <= 0 || view.height <= 0) return false;
|
||||
auto& graphics = *held_backend;
|
||||
if (!graphics.resize(view.width, view.height)) return false;
|
||||
if (graphics.uploaded != geometry) {
|
||||
if (!graphics.upload_geometry(geometry->mesh)) return false;
|
||||
graphics.uploaded = geometry;
|
||||
++uploads_;
|
||||
}
|
||||
if (view.room_preview) draw_room_plan(graphics.mesh, *view.room_preview, true, view.valid_cursor);
|
||||
for (const auto& part : view.blueprint) draw_blueprint(graphics.mesh, part, false);
|
||||
if (view.preview) draw_blueprint(graphics.mesh, *view.preview, true);
|
||||
residents(graphics.mesh, world, view);
|
||||
if (!graphics.upload_geometry()) return false;
|
||||
|
||||
auto* ctx = graphics.context.Get();
|
||||
constexpr float clear[] = {.83f, .87f, .79f, 1.f};
|
||||
@@ -666,9 +689,11 @@ bool D3DScene::render(const World& world, const SceneView& view, std::vector<std
|
||||
ctx->VSSetShader(graphics.vertex_shader.Get(), nullptr, 0);
|
||||
ctx->VSSetConstantBuffers(0, 1, graphics.camera.GetAddressOf());
|
||||
ctx->PSSetShader(graphics.pixel_shader.Get(), nullptr, 0);
|
||||
ctx->Draw(static_cast<UINT>(graphics.mesh.vertices.size()), 0);
|
||||
ctx->Draw(static_cast<UINT>(geometry->mesh.vertices.size()), 0);
|
||||
if (capture && !graphics.read_frame(*capture)) return false;
|
||||
return !graphics.swap_chain || SUCCEEDED(graphics.swap_chain->Present(0, 0));
|
||||
if (graphics.swap_chain && FAILED(graphics.swap_chain->Present(0, 0))) return false;
|
||||
++frames_;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace settlement::viewer
|
||||
+12
-1
@@ -40,18 +40,29 @@ struct SceneView {
|
||||
std::optional<std::size_t> moving_room;
|
||||
};
|
||||
|
||||
// Immutable CPU geometry can outlive the latest frame and any GPU backend.
|
||||
class PreparedGeometry;
|
||||
|
||||
class D3DScene {
|
||||
public:
|
||||
D3DScene();
|
||||
~D3DScene();
|
||||
D3DScene(const D3DScene&) = delete;
|
||||
D3DScene& operator=(const D3DScene&) = delete;
|
||||
bool initialize(HWND target, bool software = false);
|
||||
[[nodiscard]] bool ready() const noexcept;
|
||||
bool render(const World& world, const SceneView& view, std::vector<std::uint32_t>* capture = nullptr);
|
||||
[[nodiscard]] static std::shared_ptr<const PreparedGeometry> prepare(const World& world, const SceneView& view);
|
||||
bool render(std::shared_ptr<const PreparedGeometry> geometry, const SceneView& view,
|
||||
std::vector<std::uint32_t>* capture = nullptr);
|
||||
[[nodiscard]] std::uint64_t uploads() const noexcept { return uploads_; }
|
||||
[[nodiscard]] std::uint64_t frames() const noexcept { return frames_; }
|
||||
void reset() noexcept;
|
||||
|
||||
private:
|
||||
std::uint64_t uploads_ = 0, frames_ = 0;
|
||||
struct Backend;
|
||||
std::unique_ptr<Backend> backend_;
|
||||
std::shared_ptr<Backend> backend_;
|
||||
};
|
||||
|
||||
} // namespace settlement::viewer
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace settlement { class SimulationRuntime; }
|
||||
|
||||
namespace settlement::viewer {
|
||||
|
||||
enum class LanState { Offline, Hosting, HostConnected, Connecting, GuestConnected, GuestDisconnected };
|
||||
@@ -20,6 +22,15 @@ struct LanRejection {
|
||||
GridPosition destination;
|
||||
};
|
||||
|
||||
struct LanCommandResult {
|
||||
CommandStatus status;
|
||||
CommandKind kind;
|
||||
GridPosition cell;
|
||||
std::uint8_t value;
|
||||
GridPosition destination;
|
||||
AgentId resident;
|
||||
};
|
||||
|
||||
class LanSession {
|
||||
public:
|
||||
LanSession();
|
||||
@@ -39,7 +50,14 @@ public:
|
||||
[[nodiscard]] bool submit(CommandKind kind, GridPosition cell, std::uint8_t value,
|
||||
GridPosition destination = {}, AgentId resident = 0);
|
||||
[[nodiscard]] std::optional<LanRejection> take_rejection() noexcept;
|
||||
// poll_guest pauses further sends until this one retained result is drained.
|
||||
[[nodiscard]] std::optional<LanCommandResult> take_result() noexcept;
|
||||
[[nodiscard]] std::unique_ptr<World> poll(World& world);
|
||||
// Protocol 11 accepts the compiled default rules and a 32x32 active colony.
|
||||
// Calls never wait for the owner. An admitted guest operation survives peer
|
||||
// turnover, so poll_host must continue with the same owner until it settles.
|
||||
void poll_host(SimulationRuntime& runtime);
|
||||
[[nodiscard]] std::unique_ptr<World> poll_guest();
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
|
||||
+209
-109
@@ -5,14 +5,15 @@
|
||||
#include <iphlpapi.h>
|
||||
|
||||
#include "lan_session.hpp"
|
||||
#include "lan_wire.hpp"
|
||||
#include "settlement/core/simulation_runtime.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <bit>
|
||||
#include <charconv>
|
||||
#include <chrono>
|
||||
#include <deque>
|
||||
#include <limits>
|
||||
#include <spanstream>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string_view>
|
||||
@@ -24,11 +25,10 @@ namespace {
|
||||
|
||||
using Clock = std::chrono::steady_clock;
|
||||
using namespace std::chrono_literals;
|
||||
constexpr std::uint32_t protocol_version = 11;
|
||||
constexpr std::size_t frame_limit = 4 * 1024 * 1024;
|
||||
using lan_wire::guest_player;
|
||||
using lan_wire::Message;
|
||||
constexpr auto poll_budget = 16;
|
||||
constexpr std::size_t command_queue_limit = 32;
|
||||
enum class Message : std::uint8_t { Hello = 1, Snapshot, Command, Receipt, Reject, Ping };
|
||||
|
||||
struct Socket {
|
||||
SOCKET handle = INVALID_SOCKET;
|
||||
@@ -64,31 +64,6 @@ void tune_stream(SOCKET socket) {
|
||||
setsockopt(socket, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char*>(&enabled), sizeof(enabled));
|
||||
}
|
||||
|
||||
void append_number(std::string& bytes, std::uint64_t value, unsigned length) {
|
||||
for (unsigned i = 0; i < length; ++i) {
|
||||
bytes.push_back(std::bit_cast<char>(static_cast<std::uint8_t>(value)));
|
||||
value >>= 8U;
|
||||
}
|
||||
}
|
||||
|
||||
std::uint64_t number(std::string_view bytes) noexcept {
|
||||
std::uint64_t value = 0;
|
||||
for (std::size_t i = 0; i < bytes.size(); ++i) {
|
||||
value |= static_cast<std::uint64_t>(static_cast<unsigned char>(bytes[i])) << (8U * i);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
std::string frame(Message message, std::string_view payload = {}) {
|
||||
if (payload.size() >= frame_limit) throw std::runtime_error("The colony snapshot is too large for LAN play.");
|
||||
std::string bytes;
|
||||
bytes.reserve(5 + payload.size());
|
||||
append_number(bytes, 1 + payload.size(), 4);
|
||||
bytes.push_back(static_cast<char>(message));
|
||||
bytes.append(payload);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
struct Channel {
|
||||
Socket socket;
|
||||
std::string input;
|
||||
@@ -107,10 +82,10 @@ struct Channel {
|
||||
output.erase(0, sent);
|
||||
sent = 0;
|
||||
}
|
||||
if (output.size() + payload.size() + 5 > frame_limit + 1024) {
|
||||
if (output.size() + payload.size() + lan_wire::frame_header_size > lan_wire::frame_limit + 1024) {
|
||||
throw std::runtime_error("The peer is not receiving data fast enough.");
|
||||
}
|
||||
output += frame(message, payload);
|
||||
lan_wire::append_frame(output, message, payload);
|
||||
}
|
||||
|
||||
void flush() {
|
||||
@@ -141,18 +116,12 @@ struct Channel {
|
||||
if (count == 0) throw std::runtime_error("Connection closed.");
|
||||
last_received = Clock::now();
|
||||
input.append(bytes.data(), static_cast<std::size_t>(count));
|
||||
std::size_t cursor = 0;
|
||||
while (input.size() - cursor >= 4) {
|
||||
const std::string_view remaining(input.data() + cursor, input.size() - cursor);
|
||||
const auto length = number(remaining.substr(0, 4));
|
||||
if (length == 0 || length > frame_limit) throw std::runtime_error("Invalid LAN message size.");
|
||||
const auto end = 4 + static_cast<std::size_t>(length);
|
||||
if (remaining.size() < end) break;
|
||||
on_message(static_cast<Message>(static_cast<unsigned char>(remaining[4])),
|
||||
remaining.substr(5, static_cast<std::size_t>(length - 1)));
|
||||
cursor += end;
|
||||
std::size_t consumed = 0;
|
||||
while (const auto frame = lan_wire::next_frame(std::string_view(input).substr(consumed))) {
|
||||
on_message(frame->message, frame->payload);
|
||||
consumed += frame->size;
|
||||
}
|
||||
if (cursor != 0) input.erase(0, cursor);
|
||||
if (consumed != 0) input.erase(0, consumed);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -185,6 +154,12 @@ struct Action {
|
||||
} // namespace
|
||||
|
||||
struct LanSession::Impl {
|
||||
struct PendingCommand {
|
||||
std::future<RuntimeResult> completion;
|
||||
Void::Uuid::Uuid session;
|
||||
std::uint64_t peer_generation;
|
||||
};
|
||||
|
||||
bool winsock = false;
|
||||
Socket listener;
|
||||
Channel peer;
|
||||
@@ -199,12 +174,18 @@ struct LanSession::Impl {
|
||||
std::string notice;
|
||||
std::deque<Action> actions;
|
||||
std::optional<LanRejection> rejected_command;
|
||||
std::optional<LanCommandResult> command_result;
|
||||
bool result_backpressure = false;
|
||||
std::uint64_t guest_sequence = 0;
|
||||
Clock::time_point last_ping{};
|
||||
Clock::time_point last_snapshot{};
|
||||
std::uint64_t sent_tick = 0;
|
||||
std::uint64_t sent_host_sequence = 0;
|
||||
std::uint64_t sent_guest_sequence = 0;
|
||||
std::uint64_t peer_generation = 0;
|
||||
std::optional<Void::Uuid::Uuid> runtime_session;
|
||||
std::optional<RulesManifest> compatibility_rules;
|
||||
std::optional<PendingCommand> pending_command;
|
||||
|
||||
Impl() {
|
||||
WSADATA data{};
|
||||
@@ -217,14 +198,18 @@ struct LanSession::Impl {
|
||||
}
|
||||
|
||||
void drop_peer() noexcept {
|
||||
++peer_generation;
|
||||
peer = Channel{};
|
||||
connecting = authenticated = reject_pending = false;
|
||||
awaiting_receipt.reset();
|
||||
guest_sequence = 0;
|
||||
actions.clear();
|
||||
rejected_command.reset();
|
||||
command_result.reset();
|
||||
last_snapshot = {};
|
||||
last_ping = {};
|
||||
// pending_command belongs to the authenticated guest slot, even after
|
||||
// its socket disappears. A later peer waits for this result to settle.
|
||||
}
|
||||
|
||||
void accept_guest() {
|
||||
@@ -255,74 +240,149 @@ struct LanSession::Impl {
|
||||
connecting = false;
|
||||
}
|
||||
|
||||
void authenticate(Message message, std::string_view payload) {
|
||||
if (reject_pending) return;
|
||||
const auto hello = message == Message::Hello ? lan_wire::decode_hello(payload) : std::nullopt;
|
||||
if (!hello || hello->version != lan_wire::protocol_version || hello->key != key) {
|
||||
peer.queue(Message::Reject);
|
||||
reject_pending = true;
|
||||
return;
|
||||
}
|
||||
authenticated = true;
|
||||
notice.clear();
|
||||
}
|
||||
|
||||
void handle_host(World& world, Message message, std::string_view payload) {
|
||||
if (!authenticated) {
|
||||
if (reject_pending) return;
|
||||
if (message != Message::Hello || payload.size() != 12 ||
|
||||
number(payload.substr(0, 4)) != protocol_version || number(payload.substr(4)) != key) {
|
||||
peer.queue(Message::Reject);
|
||||
reject_pending = true;
|
||||
return;
|
||||
}
|
||||
authenticated = true;
|
||||
notice.clear();
|
||||
authenticate(message, payload);
|
||||
return;
|
||||
}
|
||||
if (message == Message::Ping && payload.empty()) return;
|
||||
if (message != Message::Command || payload.size() != 34) throw std::runtime_error("Invalid guest command.");
|
||||
const PlayerCommand command{2, number(payload.substr(0, 8)),
|
||||
static_cast<CommandKind>(static_cast<unsigned char>(payload[8])),
|
||||
{std::bit_cast<std::int32_t>(static_cast<std::uint32_t>(number(payload.substr(9, 4)))),
|
||||
std::bit_cast<std::int32_t>(static_cast<std::uint32_t>(number(payload.substr(13, 4))))},
|
||||
static_cast<std::uint8_t>(payload[17]),
|
||||
{std::bit_cast<std::int32_t>(static_cast<std::uint32_t>(number(payload.substr(18, 4)))),
|
||||
std::bit_cast<std::int32_t>(static_cast<std::uint32_t>(number(payload.substr(22, 4))))},
|
||||
number(payload.substr(26, 8))};
|
||||
const auto result = world.apply_command(command);
|
||||
std::string reply;
|
||||
append_number(reply, static_cast<std::uint8_t>(result.status), 1);
|
||||
append_number(reply, world.next_command_sequence(2), 8);
|
||||
peer.queue(Message::Receipt, reply);
|
||||
const auto command = message == Message::Command ? lan_wire::decode_command(payload) : std::nullopt;
|
||||
if (!command) throw std::runtime_error("Invalid guest command.");
|
||||
const auto result = world.apply_command(*command);
|
||||
const auto reply = lan_wire::encode_receipt({result.status, world.next_command_sequence(guest_player)});
|
||||
peer.queue(Message::Receipt, std::string_view(reply));
|
||||
}
|
||||
|
||||
void reply(CommandStatus status, const World& world) {
|
||||
const auto bytes = lan_wire::encode_receipt({status, world.next_command_sequence(guest_player)});
|
||||
peer.queue(Message::Receipt, std::string_view(bytes));
|
||||
}
|
||||
|
||||
void handle_runtime_host(SimulationRuntime& runtime, const PublishedSnapshot& snapshot,
|
||||
Message message, std::string_view payload) {
|
||||
if (!authenticated) {
|
||||
authenticate(message, payload);
|
||||
return;
|
||||
}
|
||||
if (message == Message::Ping && payload.empty()) return;
|
||||
const auto command = message == Message::Command ? lan_wire::decode_command(payload) : std::nullopt;
|
||||
if (!command) throw std::runtime_error("Invalid guest command.");
|
||||
if (pending_command) throw std::runtime_error("A guest command is already pending.");
|
||||
if (command->sequence != snapshot.world->next_command_sequence(guest_player)) {
|
||||
reply(CommandStatus::WrongSequence, *snapshot.world);
|
||||
return;
|
||||
}
|
||||
const auto& identity = snapshot.identity;
|
||||
const CommandEnvelope envelope{
|
||||
command_envelope_version, identity.world, identity.session, identity.city,
|
||||
snapshot.next_requests[guest_player - 1],
|
||||
CommandPayload{command->kind, command->cell, command->value, command->destination, command->resident}
|
||||
};
|
||||
auto submitted = runtime.try_submit({guest_player}, envelope);
|
||||
if (submitted.admission == RuntimeAdmission::Accepted) {
|
||||
pending_command.emplace(std::move(submitted.completion), identity.session, peer_generation);
|
||||
} else if (submitted.admission == RuntimeAdmission::Busy) {
|
||||
reply(CommandStatus::Busy, *snapshot.world);
|
||||
} else {
|
||||
throw std::runtime_error("The authoritative owner cannot accept guest commands.");
|
||||
}
|
||||
}
|
||||
|
||||
void complete_runtime_command() {
|
||||
if (!pending_command || pending_command->completion.wait_for(0s) != std::future_status::ready) return;
|
||||
auto pending = std::move(*pending_command);
|
||||
pending_command.reset();
|
||||
const auto result = pending.completion.get();
|
||||
if (pending.peer_generation != peer_generation || !authenticated ||
|
||||
!runtime_session || pending.session != *runtime_session) return;
|
||||
if (result.outcome != RuntimeOutcome::Completed || !result.receipt || !result.snapshot ||
|
||||
result.snapshot->identity.session != pending.session) {
|
||||
throw std::runtime_error("The authoritative guest command did not commit.");
|
||||
}
|
||||
const auto& receipt = *result.receipt;
|
||||
if (receipt.status == DispatchStatus::Completed) {
|
||||
reply(receipt.command_status, *result.snapshot->world);
|
||||
} else if (receipt.status == DispatchStatus::Busy) {
|
||||
reply(CommandStatus::Busy, *result.snapshot->world);
|
||||
} else {
|
||||
throw std::runtime_error("The guest command belongs to an obsolete or conflicting request.");
|
||||
}
|
||||
}
|
||||
|
||||
void bind_runtime(const RuntimeView& view) {
|
||||
if (!compatibility_rules) {
|
||||
auto rules = default_rules_manifest();
|
||||
if (!rules) throw std::runtime_error("Could not resolve the legacy LAN rules.");
|
||||
compatibility_rules = std::move(*rules);
|
||||
}
|
||||
if (view.state != RuntimeState::Running || !view.snapshot) {
|
||||
throw std::runtime_error("The authoritative owner is unavailable.");
|
||||
}
|
||||
const auto& snapshot = *view.snapshot;
|
||||
if (!snapshot.rules || *snapshot.rules != *compatibility_rules) {
|
||||
throw std::runtime_error("Protocol 11 requires the compiled default rules.");
|
||||
}
|
||||
if (!snapshot.world->scenario_active() || snapshot.world->width() != first_colony_map_size ||
|
||||
snapshot.world->height() != first_colony_map_size) {
|
||||
throw std::runtime_error("Protocol 11 requires a supported 32x32 colony.");
|
||||
}
|
||||
if (runtime_session && *runtime_session != snapshot.identity.session) drop_peer();
|
||||
runtime_session = snapshot.identity.session;
|
||||
}
|
||||
|
||||
void handle_guest(std::unique_ptr<World>& latest, Message message, std::string_view payload) {
|
||||
if (message == Message::Reject) throw std::runtime_error("Wrong game code or incompatible version.");
|
||||
if (message == Message::Snapshot) {
|
||||
std::istringstream data(std::string(payload), std::ios::binary);
|
||||
std::ispanstream data(payload);
|
||||
latest = World::read_save(data);
|
||||
if (!latest->scenario_active() || latest->width() != first_colony_map_size ||
|
||||
latest->height() != first_colony_map_size) {
|
||||
throw std::runtime_error("The host sent an unsupported colony.");
|
||||
}
|
||||
if (!authenticated) guest_sequence = latest->next_command_sequence(2);
|
||||
if (!authenticated) guest_sequence = latest->next_command_sequence(guest_player);
|
||||
authenticated = true;
|
||||
notice.clear();
|
||||
return;
|
||||
}
|
||||
if (message != Message::Receipt || payload.size() != 9 || !awaiting_receipt) {
|
||||
const auto receipt = message == Message::Receipt ? lan_wire::decode_receipt(payload) : std::nullopt;
|
||||
if (!receipt || !awaiting_receipt) {
|
||||
throw std::runtime_error("Invalid message from the host.");
|
||||
}
|
||||
const auto status = static_cast<CommandStatus>(static_cast<unsigned char>(payload[0]));
|
||||
const auto status = receipt->status;
|
||||
if (status > CommandStatus::Busy) throw std::runtime_error("Invalid command result.");
|
||||
command_result = LanCommandResult{status, awaiting_receipt->kind, awaiting_receipt->cell,
|
||||
awaiting_receipt->value, awaiting_receipt->destination, awaiting_receipt->resident};
|
||||
if (status != CommandStatus::Accepted) {
|
||||
rejected_command = LanRejection{status, awaiting_receipt->kind, awaiting_receipt->cell,
|
||||
awaiting_receipt->value, awaiting_receipt->destination};
|
||||
}
|
||||
guest_sequence = number(payload.substr(1));
|
||||
guest_sequence = receipt->next_sequence;
|
||||
awaiting_receipt.reset();
|
||||
}
|
||||
|
||||
void send_snapshot(const World& world, Clock::time_point now) {
|
||||
if (peer.pending()) return;
|
||||
const auto host_seq = world.next_command_sequence(1);
|
||||
const auto guest_seq = world.next_command_sequence(2);
|
||||
const auto guest_seq = world.next_command_sequence(guest_player);
|
||||
const bool changed = world.tick() != sent_tick || host_seq != sent_host_sequence || guest_seq != sent_guest_sequence;
|
||||
const auto elapsed = now - last_snapshot;
|
||||
if (last_snapshot != Clock::time_point{} && elapsed < 2s &&
|
||||
(!changed || (elapsed < 120ms && host_seq == sent_host_sequence && guest_seq == sent_guest_sequence))) return;
|
||||
std::ostringstream data(std::ios::binary);
|
||||
world.write_save(data);
|
||||
peer.queue(Message::Snapshot, data.str());
|
||||
peer.queue(Message::Snapshot, data.view());
|
||||
last_snapshot = now;
|
||||
sent_tick = world.tick();
|
||||
sent_host_sequence = host_seq;
|
||||
@@ -331,20 +391,39 @@ struct LanSession::Impl {
|
||||
|
||||
void send_action() {
|
||||
if (awaiting_receipt || actions.empty() || guest_sequence == 0 || peer.pending()) return;
|
||||
if (result_backpressure && command_result) return;
|
||||
const Action action = actions.front();
|
||||
std::string payload;
|
||||
append_number(payload, guest_sequence, 8);
|
||||
append_number(payload, static_cast<std::uint8_t>(action.kind), 1);
|
||||
append_number(payload, std::bit_cast<std::uint32_t>(action.cell.x), 4);
|
||||
append_number(payload, std::bit_cast<std::uint32_t>(action.cell.y), 4);
|
||||
append_number(payload, action.value, 1);
|
||||
append_number(payload, std::bit_cast<std::uint32_t>(action.destination.x), 4);
|
||||
append_number(payload, std::bit_cast<std::uint32_t>(action.destination.y), 4);
|
||||
append_number(payload, action.resident, 8);
|
||||
peer.queue(Message::Command, payload);
|
||||
const auto payload = lan_wire::encode_command(
|
||||
{guest_player, guest_sequence, action.kind, action.cell, action.value, action.destination, action.resident});
|
||||
peer.queue(Message::Command, std::string_view(payload));
|
||||
actions.pop_front();
|
||||
awaiting_receipt = action;
|
||||
}
|
||||
|
||||
template<class Receive, class SendHost>
|
||||
void poll_network(Receive receive, SendHost send_host, bool accept_allowed = true) {
|
||||
if (listener && accept_allowed) accept_guest();
|
||||
if (!peer.socket) return;
|
||||
const auto now = Clock::now();
|
||||
if ((!authenticated && now - peer.opened > 8s) ||
|
||||
(authenticated && now - peer.last_received > 15s)) {
|
||||
throw std::runtime_error("The peer did not respond.");
|
||||
}
|
||||
if (connecting) finish_connection();
|
||||
if (connecting) return;
|
||||
peer.receive(receive);
|
||||
if (authenticated && guest) {
|
||||
send_action();
|
||||
if (!peer.pending() && now - last_ping >= 2s) {
|
||||
peer.queue(Message::Ping);
|
||||
last_ping = now;
|
||||
}
|
||||
} else if (authenticated) {
|
||||
send_host(now);
|
||||
}
|
||||
peer.flush();
|
||||
if (reject_pending && !peer.pending()) drop_peer();
|
||||
}
|
||||
};
|
||||
|
||||
LanSession::LanSession() : impl_(std::make_unique<Impl>()) {}
|
||||
@@ -394,11 +473,9 @@ void LanSession::join(std::string address, std::string code, std::uint16_t port)
|
||||
tune_stream(socket.handle);
|
||||
const bool pending = connect(socket.handle, reinterpret_cast<const sockaddr*>(&remote), sizeof(remote)) != 0;
|
||||
if (pending && WSAGetLastError() != WSAEWOULDBLOCK) throw std::runtime_error("Could not connect to the host.");
|
||||
std::string identity;
|
||||
append_number(identity, protocol_version, 4);
|
||||
append_number(identity, key, 8);
|
||||
const auto identity = lan_wire::encode_hello({lan_wire::protocol_version, key});
|
||||
Channel channel(std::move(socket));
|
||||
channel.queue(Message::Hello, identity);
|
||||
channel.queue(Message::Hello, std::string_view(identity));
|
||||
leave();
|
||||
impl_->guest = true;
|
||||
impl_->connecting = pending;
|
||||
@@ -446,34 +523,57 @@ std::optional<LanRejection> LanSession::take_rejection() noexcept {
|
||||
return std::exchange(impl_->rejected_command, std::nullopt);
|
||||
}
|
||||
|
||||
std::optional<LanCommandResult> LanSession::take_result() noexcept {
|
||||
return std::exchange(impl_->command_result, std::nullopt);
|
||||
}
|
||||
|
||||
std::unique_ptr<World> LanSession::poll(World& world) {
|
||||
auto& connection = *impl_;
|
||||
connection.result_backpressure = false;
|
||||
std::unique_ptr<World> latest;
|
||||
try {
|
||||
if (connection.listener) connection.accept_guest();
|
||||
if (!connection.peer.socket) return nullptr;
|
||||
const auto now = Clock::now();
|
||||
if ((!connection.authenticated && now - connection.peer.opened > 8s) ||
|
||||
(connection.authenticated && now - connection.peer.last_received > 15s)) {
|
||||
throw std::runtime_error("The peer did not respond.");
|
||||
}
|
||||
if (connection.connecting) connection.finish_connection();
|
||||
if (connection.connecting) return nullptr;
|
||||
connection.peer.receive([&](Message message, std::string_view payload) {
|
||||
if (connection.pending_command) throw std::runtime_error("Continue polling the authoritative owner.");
|
||||
connection.poll_network([&](Message message, std::string_view payload) {
|
||||
if (connection.guest) connection.handle_guest(latest, message, payload);
|
||||
else connection.handle_host(world, message, payload);
|
||||
});
|
||||
if (connection.authenticated && connection.guest) {
|
||||
connection.send_action();
|
||||
if (!connection.peer.pending() && now - connection.last_ping >= 2s) {
|
||||
connection.peer.queue(Message::Ping);
|
||||
connection.last_ping = now;
|
||||
}
|
||||
} else if (connection.authenticated) {
|
||||
connection.send_snapshot(world, now);
|
||||
}
|
||||
connection.peer.flush();
|
||||
if (connection.reject_pending && !connection.peer.pending()) connection.drop_peer();
|
||||
}, [&](Clock::time_point now) { connection.send_snapshot(world, now); });
|
||||
} catch (const std::exception& error) {
|
||||
connection.notice = error.what();
|
||||
connection.drop_peer();
|
||||
latest.reset();
|
||||
}
|
||||
return latest;
|
||||
}
|
||||
|
||||
void LanSession::poll_host(SimulationRuntime& runtime) {
|
||||
auto& connection = *impl_;
|
||||
if (!connection.listener || connection.guest) return;
|
||||
try {
|
||||
connection.complete_runtime_command();
|
||||
// Completion may have published a newer next-request number. Re-read it
|
||||
// before admitting a reconnect or decoding any further guest intent.
|
||||
const auto view = runtime.view();
|
||||
connection.bind_runtime(view);
|
||||
connection.poll_network([&](Message message, std::string_view payload) {
|
||||
connection.handle_runtime_host(runtime, *view.snapshot, message, payload);
|
||||
}, [&](Clock::time_point now) {
|
||||
if (!connection.pending_command) connection.send_snapshot(*view.snapshot->world, now);
|
||||
}, !connection.pending_command);
|
||||
} catch (const std::exception& error) {
|
||||
connection.notice = error.what();
|
||||
connection.drop_peer();
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<World> LanSession::poll_guest() {
|
||||
auto& connection = *impl_;
|
||||
connection.result_backpressure = true;
|
||||
std::unique_ptr<World> latest;
|
||||
if (!connection.guest) return nullptr;
|
||||
try {
|
||||
connection.poll_network([&](Message message, std::string_view payload) {
|
||||
connection.handle_guest(latest, message, payload);
|
||||
}, [](Clock::time_point) {});
|
||||
} catch (const std::exception& error) {
|
||||
connection.notice = error.what();
|
||||
connection.drop_peer();
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
#include "lan_wire.hpp"
|
||||
|
||||
#include <Void/Binary/Reader.hpp>
|
||||
#include <Void/Binary/Writer.hpp>
|
||||
|
||||
#include <span>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace settlement::viewer::lan_wire {
|
||||
namespace {
|
||||
|
||||
template<std::size_t Size, class... Fields>
|
||||
std::array<char, Size> encode(Fields... fields) {
|
||||
static_assert((sizeof(Fields) + ...) == Size);
|
||||
std::array<char, Size> payload{};
|
||||
Void::Binary::Writer writer(std::as_writable_bytes(std::span{payload}));
|
||||
(writer.writeLittle(fields).value(), ...);
|
||||
return payload;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void append_frame(std::string& output, Message message, std::string_view payload) {
|
||||
if (payload.size() >= frame_limit) throw std::runtime_error("The colony snapshot is too large for LAN play.");
|
||||
const auto length = static_cast<std::uint32_t>(payload.size() + 1);
|
||||
const auto header = encode<frame_header_size>(length, static_cast<std::uint8_t>(message));
|
||||
output.reserve(output.size() + header.size() + payload.size());
|
||||
output.append(header.data(), header.size());
|
||||
output.append(payload);
|
||||
}
|
||||
|
||||
std::optional<Frame> next_frame(std::string_view input) {
|
||||
if (input.size() < sizeof(std::uint32_t)) return std::nullopt;
|
||||
Void::Binary::Reader reader(std::as_bytes(std::span{input}));
|
||||
const auto length = reader.readLittle<std::uint32_t>().value();
|
||||
if (length == 0 || length > frame_limit) throw std::runtime_error("Invalid LAN message size.");
|
||||
if (reader.remaining() < length) return std::nullopt;
|
||||
|
||||
const auto message = static_cast<Message>(reader.readLittle<std::uint8_t>().value());
|
||||
const auto payload = input.substr(reader.position(), length - 1);
|
||||
return Frame{message, payload, reader.position() + payload.size()};
|
||||
}
|
||||
|
||||
std::array<char, 12> encode_hello(Hello hello) {
|
||||
return encode<12>(hello.version, hello.key);
|
||||
}
|
||||
|
||||
std::optional<Hello> decode_hello(std::string_view payload) {
|
||||
if (payload.size() != 12) return std::nullopt;
|
||||
Void::Binary::Reader reader(std::as_bytes(std::span{payload}));
|
||||
return Hello{reader.readLittle<std::uint32_t>().value(), reader.readLittle<std::uint64_t>().value()};
|
||||
}
|
||||
|
||||
std::array<char, 34> encode_command(const PlayerCommand& command) {
|
||||
return encode<34>(command.sequence, static_cast<std::uint8_t>(command.kind), command.cell.x, command.cell.y,
|
||||
command.value, command.destination.x, command.destination.y, command.resident);
|
||||
}
|
||||
|
||||
std::optional<PlayerCommand> decode_command(std::string_view payload) {
|
||||
if (payload.size() != 34) return std::nullopt;
|
||||
Void::Binary::Reader reader(std::as_bytes(std::span{payload}));
|
||||
return PlayerCommand{guest_player,
|
||||
reader.readLittle<std::uint64_t>().value(),
|
||||
static_cast<CommandKind>(reader.readLittle<std::uint8_t>().value()),
|
||||
{reader.readLittle<std::int32_t>().value(), reader.readLittle<std::int32_t>().value()},
|
||||
reader.readLittle<std::uint8_t>().value(),
|
||||
{reader.readLittle<std::int32_t>().value(), reader.readLittle<std::int32_t>().value()},
|
||||
reader.readLittle<std::uint64_t>().value()};
|
||||
}
|
||||
|
||||
std::array<char, 9> encode_receipt(Receipt receipt) {
|
||||
return encode<9>(static_cast<std::uint8_t>(receipt.status), receipt.next_sequence);
|
||||
}
|
||||
|
||||
std::optional<Receipt> decode_receipt(std::string_view payload) {
|
||||
if (payload.size() != 9) return std::nullopt;
|
||||
Void::Binary::Reader reader(std::as_bytes(std::span{payload}));
|
||||
return Receipt{static_cast<CommandStatus>(reader.readLittle<std::uint8_t>().value()),
|
||||
reader.readLittle<std::uint64_t>().value()};
|
||||
}
|
||||
|
||||
} // namespace settlement::viewer::lan_wire
|
||||
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "settlement/core/world.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace settlement::viewer::lan_wire {
|
||||
|
||||
inline constexpr std::uint32_t protocol_version = 11;
|
||||
inline constexpr std::uint8_t guest_player = 2;
|
||||
inline constexpr std::size_t frame_limit = 4 * 1024 * 1024;
|
||||
inline constexpr std::size_t frame_header_size = sizeof(std::uint32_t) + sizeof(std::uint8_t);
|
||||
|
||||
enum class Message : std::uint8_t { Hello = 1, Snapshot, Command, Receipt, Reject, Ping };
|
||||
|
||||
struct Frame {
|
||||
Message message;
|
||||
std::string_view payload;
|
||||
std::size_t size;
|
||||
};
|
||||
|
||||
struct Hello {
|
||||
std::uint32_t version;
|
||||
std::uint64_t key;
|
||||
};
|
||||
|
||||
struct Receipt {
|
||||
CommandStatus status;
|
||||
std::uint64_t next_sequence;
|
||||
};
|
||||
|
||||
// The payload must be backed by storage separate from output.
|
||||
void append_frame(std::string& output, Message message, std::string_view payload = {});
|
||||
|
||||
// A complete frame borrows its payload from input. Invalid lengths throw even before the body arrives.
|
||||
[[nodiscard]] std::optional<Frame> next_frame(std::string_view input);
|
||||
|
||||
[[nodiscard]] std::array<char, 12> encode_hello(Hello hello);
|
||||
[[nodiscard]] std::optional<Hello> decode_hello(std::string_view payload);
|
||||
|
||||
[[nodiscard]] std::array<char, 34> encode_command(const PlayerCommand& command);
|
||||
[[nodiscard]] std::optional<PlayerCommand> decode_command(std::string_view payload);
|
||||
|
||||
[[nodiscard]] std::array<char, 9> encode_receipt(Receipt receipt);
|
||||
[[nodiscard]] std::optional<Receipt> decode_receipt(std::string_view payload);
|
||||
|
||||
} // namespace settlement::viewer::lan_wire
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include "settlement/core/colony_profile.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
@@ -19,6 +20,7 @@ constexpr int title_coop_id = 1103;
|
||||
constexpr int title_exit_id = 1104;
|
||||
constexpr int title_saves_id = 1105;
|
||||
constexpr int title_open_id = 1106;
|
||||
constexpr int title_rules_id = 1107;
|
||||
|
||||
inline std::filesystem::path saves_directory() {
|
||||
const DWORD length = GetEnvironmentVariableW(L"LOCALAPPDATA", nullptr, 0);
|
||||
@@ -51,6 +53,14 @@ public:
|
||||
0, 0, 0, 0, owner, id(title_saves_id), instance, nullptr);
|
||||
open_ = CreateWindowExW(0, L"BUTTON", L"Загрузить выбранное", WS_CHILD | WS_TABSTOP | BS_OWNERDRAW,
|
||||
0, 0, 0, 0, owner, id(title_open_id), instance, nullptr);
|
||||
rules_label_ = CreateWindowExW(0, L"STATIC", L"Правила только новой колонии:", WS_CHILD,
|
||||
0, 0, 0, 0, owner, nullptr, instance, nullptr);
|
||||
rules_ = CreateWindowExW(0, L"COMBOBOX", L"Правила новой колонии",
|
||||
WS_CHILD | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST,
|
||||
0, 0, 0, 0, owner, id(title_rules_id), instance, nullptr);
|
||||
SendMessageW(rules_, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"Поэтапная кровать: опора и 2 ткани"));
|
||||
SendMessageW(rules_, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"Простая кровать: 1 доска"));
|
||||
SendMessageW(rules_, CB_SETCURSEL, 0, 0);
|
||||
list_background_ = CreateSolidBrush(RGB(44, 63, 53));
|
||||
font_ = CreateFontW(-16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
|
||||
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, DEFAULT_PITCH | FF_SWISS, L"Segoe UI");
|
||||
@@ -58,6 +68,8 @@ public:
|
||||
for (const auto button : buttons_) SendMessageW(button, WM_SETFONT, font, FALSE);
|
||||
SendMessageW(saves_, WM_SETFONT, font, FALSE);
|
||||
SendMessageW(open_, WM_SETFONT, font, FALSE);
|
||||
SendMessageW(rules_label_, WM_SETFONT, font, FALSE);
|
||||
SendMessageW(rules_, WM_SETFONT, font, FALSE);
|
||||
}
|
||||
|
||||
void reload_saves() {
|
||||
@@ -90,6 +102,8 @@ public:
|
||||
for (const auto button : buttons_) ShowWindow(button, flags);
|
||||
ShowWindow(saves_, flags);
|
||||
ShowWindow(open_, flags);
|
||||
ShowWindow(rules_label_, flags);
|
||||
ShowWindow(rules_, flags);
|
||||
}
|
||||
|
||||
void update(bool can_resume, bool offline) const {
|
||||
@@ -98,6 +112,7 @@ public:
|
||||
EnableWindow(buttons_[title_browse_id - title_continue_id], offline);
|
||||
EnableWindow(open_, offline && selected_index() < saves.size());
|
||||
EnableWindow(saves_, offline);
|
||||
EnableWindow(rules_, offline);
|
||||
}
|
||||
|
||||
HBRUSH paint_list_background(HWND control, HDC dc) const {
|
||||
@@ -116,6 +131,10 @@ public:
|
||||
return saves.empty() ? std::nullopt : std::optional{saves.front().path};
|
||||
}
|
||||
|
||||
[[nodiscard]] ColonyProfile new_colony_profile() const {
|
||||
return SendMessageW(rules_, CB_GETCURSEL, 0, 0) == 1 ? ColonyProfile::PlankBeds : ColonyProfile::Default;
|
||||
}
|
||||
|
||||
void layout(int width, int height) const {
|
||||
const RECT panel = bounds(width, height);
|
||||
for (std::size_t i = 0; i < buttons_.size(); ++i) {
|
||||
@@ -123,6 +142,8 @@ public:
|
||||
}
|
||||
position(saves_, panel.left + 318, panel.top + 146, panel.right - panel.left - 346, 118);
|
||||
position(open_, panel.left + 318, panel.top + 274, panel.right - panel.left - 346, 33);
|
||||
position(rules_label_, panel.left + 28, panel.top + 358, panel.right - panel.left - 56, 23);
|
||||
position(rules_, panel.left + 28, panel.top + 383, panel.right - panel.left - 56, 100);
|
||||
}
|
||||
|
||||
void draw(HDC dc, int width, int height, const std::wstring& notice) const {
|
||||
@@ -160,7 +181,7 @@ public:
|
||||
DrawTextW(dc, saves.empty() ? L"Сохранения · список пуст" : L"Сохранения", -1,
|
||||
&saves_label, DT_SINGLELINE | DT_VCENTER);
|
||||
if (!notice.empty()) {
|
||||
RECT information{panel.left + 318, panel.top + 311, panel.right - 27, panel.bottom - 11};
|
||||
RECT information{panel.left + 318, panel.top + 311, panel.right - 27, panel.top + 355};
|
||||
DrawTextW(dc, notice.c_str(), -1, &information, DT_WORDBREAK | DT_NOPREFIX);
|
||||
}
|
||||
SetTextColor(dc, ink);
|
||||
@@ -209,7 +230,7 @@ private:
|
||||
|
||||
static RECT bounds(int width, int height) {
|
||||
constexpr int panel_width = 704;
|
||||
constexpr int panel_height = 365;
|
||||
constexpr int panel_height = 430;
|
||||
const int left = (width - panel_width) / 2;
|
||||
const int top = (height - panel_height) / 2;
|
||||
return {left, top, left + panel_width, top + panel_height};
|
||||
@@ -233,6 +254,8 @@ private:
|
||||
std::array<HWND, 5> buttons_{};
|
||||
HWND saves_ = nullptr;
|
||||
HWND open_ = nullptr;
|
||||
HWND rules_label_ = nullptr;
|
||||
HWND rules_ = nullptr;
|
||||
HBRUSH list_background_ = nullptr;
|
||||
HFONT font_ = nullptr;
|
||||
std::vector<SaveFile> saves;
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
#include "viewer_session.hpp"
|
||||
|
||||
#include <chrono>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
namespace settlement::viewer {
|
||||
namespace {
|
||||
|
||||
template<class T>
|
||||
bool ready(std::future<T>& completion) {
|
||||
return completion.valid() && completion.wait_for(std::chrono::seconds{0}) == std::future_status::ready;
|
||||
}
|
||||
|
||||
RulesManifest supported_rules() {
|
||||
auto manifest = default_rules_manifest();
|
||||
if (!manifest) throw std::runtime_error(manifest.error().message);
|
||||
return std::move(*manifest);
|
||||
}
|
||||
|
||||
void validate_supported(const WorldCheckpoint& candidate) {
|
||||
const auto valid = validate_colony_checkpoint(candidate);
|
||||
if (!valid) throw std::runtime_error(valid.error().message);
|
||||
if (!candidate.world || candidate.world->width() != first_colony_map_size ||
|
||||
candidate.world->height() != first_colony_map_size) {
|
||||
throw std::runtime_error("This viewer opens worlds with a 32 by 32 map.");
|
||||
}
|
||||
}
|
||||
|
||||
WorldCheckpoint validated_initial(WorldCheckpoint candidate) {
|
||||
validate_supported(candidate);
|
||||
return candidate;
|
||||
}
|
||||
|
||||
WorldCheckpoint initial_colony(std::size_t workers, ColonyProfile profile = ColonyProfile::Default) {
|
||||
auto candidate = make_colony_checkpoint(profile, workers);
|
||||
if (!candidate) throw std::runtime_error(candidate.error().message);
|
||||
return std::move(*candidate);
|
||||
}
|
||||
|
||||
RuntimeOptions suspended(RuntimeOptions options) {
|
||||
options.ticking = false;
|
||||
return options;
|
||||
}
|
||||
|
||||
std::string exception_message() {
|
||||
try { throw; }
|
||||
catch (const std::exception& error) { return error.what(); }
|
||||
catch (...) { return "The operation failed."; }
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
ViewerSession::ViewerSession(std::size_t workers, ViewerSessionOptions options)
|
||||
: ViewerSession(initial_colony(workers), workers, std::move(options)) {}
|
||||
|
||||
ViewerSession::ViewerSession(WorldCheckpoint initial, std::size_t workers, ViewerSessionOptions options)
|
||||
: workers_(workers), command_capacity_(options.command_capacity),
|
||||
supported_rules_(supported_rules()),
|
||||
runtime_(validated_initial(std::move(initial)), suspended(std::move(options.runtime))),
|
||||
files_(std::move(options.files)) {
|
||||
if (command_capacity_ == 0) throw std::invalid_argument("The command queue must have capacity.");
|
||||
}
|
||||
|
||||
ViewerSession::~ViewerSession() = default;
|
||||
|
||||
std::shared_ptr<const World> ViewerSession::world() const {
|
||||
return guest_ || (changing_world_ && guest_view_) ? guest_view_ : runtime_.latest()->world;
|
||||
}
|
||||
|
||||
bool ViewerSession::can_submit() const {
|
||||
return !guest_ && !changing_world_ && runtime_.view().state == RuntimeState::Running;
|
||||
}
|
||||
|
||||
bool ViewerSession::can_host_legacy() const {
|
||||
const auto current = runtime_.view();
|
||||
return !guest_ && !changing_world_ && current.state == RuntimeState::Running &&
|
||||
current.snapshot->rules && *current.snapshot->rules == supported_rules_;
|
||||
}
|
||||
|
||||
std::optional<std::uint64_t> ViewerSession::submit(SessionPayload payload) {
|
||||
if (!can_submit()) return std::nullopt;
|
||||
for (const auto& intent : intents_) {
|
||||
if (intent.payload == payload) return intent.id;
|
||||
}
|
||||
if (intents_.size() == command_capacity_ || next_intent_ == std::numeric_limits<std::uint64_t>::max()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto id = next_intent_;
|
||||
intents_.push_back({id, std::move(payload)});
|
||||
++next_intent_;
|
||||
return id;
|
||||
}
|
||||
|
||||
bool ViewerSession::pending(std::uint64_t id) const noexcept {
|
||||
for (const auto& intent : intents_) if (intent.id == id) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
LoadTicket ViewerSession::begin_change() {
|
||||
if (generation_ == std::numeric_limits<std::uint64_t>::max()) {
|
||||
throw std::overflow_error("The client operation counter is exhausted.");
|
||||
}
|
||||
auto ticket = runtime_.begin_load();
|
||||
if (!ticket) throw std::runtime_error("The simulation cannot accept a world change.");
|
||||
++generation_;
|
||||
intents_.clear();
|
||||
command_completion_ = {};
|
||||
preparing_.reset();
|
||||
installing_.reset();
|
||||
install_completion_ = {};
|
||||
events_.clear();
|
||||
changing_world_ = true;
|
||||
return *ticket;
|
||||
}
|
||||
|
||||
void ViewerSession::validate_candidate(const WorldCheckpoint& candidate) const {
|
||||
validate_supported(candidate);
|
||||
}
|
||||
|
||||
void ViewerSession::replace(WorldCheckpoint candidate) {
|
||||
validate_candidate(candidate);
|
||||
const auto ticket = begin_change();
|
||||
installing_.emplace(Installing{ticket, std::move(candidate)});
|
||||
}
|
||||
|
||||
void ViewerSession::new_colony(ColonyProfile profile) {
|
||||
replace(initial_colony(workers_, profile));
|
||||
}
|
||||
|
||||
void ViewerSession::load(const std::filesystem::path& path) {
|
||||
if (guest_) throw std::runtime_error("Only the host can load a world.");
|
||||
const auto ticket = begin_change();
|
||||
try {
|
||||
auto operation = files_.try_load(path, workers_);
|
||||
if (operation.admission != CheckpointLoadAdmission::Accepted) {
|
||||
throw std::runtime_error("The file reader is busy or unavailable. Try again.");
|
||||
}
|
||||
preparing_.emplace(Preparing{ticket, std::move(operation.completion)});
|
||||
} catch (...) {
|
||||
changing_world_ = false;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerSession::save(const std::filesystem::path& path) {
|
||||
if (guest_ || changing_world_) throw std::runtime_error("The current world cannot be saved yet.");
|
||||
poll_saves();
|
||||
const auto snapshot = runtime_.snapshot_for_save();
|
||||
if (!snapshot) throw std::runtime_error("Load a valid world before saving after a simulation failure.");
|
||||
// Reserve result tracking before accepting a write so allocation cannot lose
|
||||
// the newest request's completion or its originating session.
|
||||
saving_.reserve(saving_.size() + 1);
|
||||
auto operation = files_.try_save(path, *snapshot);
|
||||
if (operation.admission != SaveAdmission::Accepted) {
|
||||
throw std::runtime_error("The save queue is busy or unavailable. Try again.");
|
||||
}
|
||||
latest_save_ = operation.request_id;
|
||||
saving_.push_back({generation_, operation.request_id, (*snapshot)->identity.session,
|
||||
std::move(operation.completion)});
|
||||
}
|
||||
|
||||
void ViewerSession::enter_guest() {
|
||||
static_cast<void>(begin_change());
|
||||
guest_ = true;
|
||||
changing_world_ = false;
|
||||
guest_world_.reset();
|
||||
guest_view_.reset();
|
||||
}
|
||||
|
||||
void ViewerSession::receive_guest(std::unique_ptr<World> world) {
|
||||
if (!guest_ || !world) return;
|
||||
auto view = world->capture();
|
||||
guest_world_ = std::move(world);
|
||||
guest_view_ = std::move(view);
|
||||
}
|
||||
|
||||
void ViewerSession::leave_guest() {
|
||||
if (!guest_) return;
|
||||
if (guest_world_) {
|
||||
auto id = Void::Uuid::try_v4();
|
||||
if (!id) throw std::runtime_error("Could not create a world identity.");
|
||||
if (guest_world_->width() != first_colony_map_size || guest_world_->height() != first_colony_map_size) {
|
||||
throw std::runtime_error("This viewer opens worlds with a 32 by 32 map.");
|
||||
}
|
||||
// All fallible preparation precedes moving the last received world.
|
||||
auto rules = supported_rules_;
|
||||
const auto ticket = begin_change();
|
||||
installing_.emplace(Installing{ticket, {std::move(guest_world_), *id, 1, std::move(rules)}});
|
||||
} else {
|
||||
static_cast<void>(begin_change());
|
||||
changing_world_ = false;
|
||||
}
|
||||
guest_ = false;
|
||||
if (!changing_world_) guest_view_.reset();
|
||||
}
|
||||
|
||||
void ViewerSession::fail_change(std::string message) {
|
||||
preparing_.reset();
|
||||
installing_.reset();
|
||||
install_completion_ = {};
|
||||
changing_world_ = false;
|
||||
if (!guest_) guest_view_.reset();
|
||||
events_.push_back({ViewerEventKind::Error, 0, {}, CommandStatus::Unavailable, std::move(message)});
|
||||
}
|
||||
|
||||
void ViewerSession::poll_changes() {
|
||||
if (preparing_ && ready(preparing_->completion)) {
|
||||
const auto ticket = preparing_->ticket;
|
||||
auto prepared = preparing_->completion.get();
|
||||
preparing_.reset();
|
||||
if (runtime_.latest()->identity.session != ticket.expected_session) {
|
||||
fail_change("The load belongs to an earlier session.");
|
||||
return;
|
||||
}
|
||||
if (!prepared) {
|
||||
fail_change(prepared.error().message);
|
||||
return;
|
||||
}
|
||||
validate_candidate(*prepared);
|
||||
installing_.emplace(Installing{ticket, std::move(*prepared)});
|
||||
}
|
||||
if (installing_) {
|
||||
auto result = runtime_.try_install(installing_->ticket, installing_->candidate);
|
||||
if (result.admission == RuntimeAdmission::Accepted) {
|
||||
install_completion_ = std::move(result.completion);
|
||||
installing_.reset();
|
||||
} else if (result.admission != RuntimeAdmission::Busy) {
|
||||
fail_change("The simulation could not install this world.");
|
||||
}
|
||||
}
|
||||
if (ready(install_completion_)) {
|
||||
const auto result = install_completion_.get();
|
||||
changing_world_ = false;
|
||||
if (result.outcome == RuntimeOutcome::Completed && result.snapshot &&
|
||||
result.snapshot->identity.session == runtime_.latest()->identity.session) {
|
||||
guest_view_.reset();
|
||||
fault_reported_ = false;
|
||||
events_.push_back({ViewerEventKind::Replaced, 0, {}, CommandStatus::Unavailable, {}});
|
||||
} else {
|
||||
events_.push_back({ViewerEventKind::Error, 0, {}, CommandStatus::Unavailable,
|
||||
"The world change failed or was superseded. The current view is retained."});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerSession::poll_commands() {
|
||||
if (ready(command_completion_)) {
|
||||
auto result = command_completion_.get();
|
||||
if (!intents_.empty()) {
|
||||
auto intent = std::move(intents_.front());
|
||||
intents_.pop_front();
|
||||
const auto status = result.outcome == RuntimeOutcome::Completed && result.receipt &&
|
||||
result.receipt->status == DispatchStatus::Completed
|
||||
? result.receipt->command_status : CommandStatus::Unavailable;
|
||||
events_.push_back({ViewerEventKind::Command, intent.id, std::move(intent.payload), status, {}});
|
||||
}
|
||||
}
|
||||
if (command_completion_.valid() || intents_.empty() || !can_submit()) return;
|
||||
const auto current = runtime_.latest();
|
||||
const CommandEnvelope command{command_envelope_version, current->identity.world, current->identity.session,
|
||||
current->identity.city, current->next_requests[colony_host - 1], intents_.front().payload};
|
||||
auto result = runtime_.try_submit({colony_host}, command);
|
||||
if (result.admission == RuntimeAdmission::Accepted) {
|
||||
command_completion_ = std::move(result.completion);
|
||||
} else if (result.admission != RuntimeAdmission::Busy) {
|
||||
auto intent = std::move(intents_.front());
|
||||
intents_.pop_front();
|
||||
events_.push_back({ViewerEventKind::Command, intent.id, std::move(intent.payload), CommandStatus::Unavailable, {}});
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerSession::poll_saves() {
|
||||
for (auto item = saving_.begin(); item != saving_.end();) {
|
||||
if (!ready(item->completion)) {
|
||||
++item;
|
||||
continue;
|
||||
}
|
||||
const auto result = item->completion.get();
|
||||
if (item->generation == generation_ && item->request == latest_save_ &&
|
||||
item->session == runtime_.latest()->identity.session && !guest_) {
|
||||
events_.push_back({result.succeeded() ? ViewerEventKind::Saved : ViewerEventKind::Error,
|
||||
0, {}, CommandStatus::Unavailable,
|
||||
result.succeeded() ? "" : result.visible_on_disk
|
||||
? "The new save is visible, but its final disk status could not be confirmed."
|
||||
: "The save failed. The previous slot remains available."});
|
||||
}
|
||||
item = saving_.erase(item);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerSession::poll_ticking() {
|
||||
if (ready(ticking_completion_)) {
|
||||
const auto result = ticking_completion_.get();
|
||||
// The owner applies its ticking flag even while its world is faulted.
|
||||
if (result.outcome == RuntimeOutcome::Completed || result.outcome == RuntimeOutcome::Faulted) {
|
||||
applied_ticking_ = requested_ticking_;
|
||||
}
|
||||
}
|
||||
const bool desired = desired_ticking_ && !guest_ && !changing_world_;
|
||||
if (ticking_completion_.valid() || desired == applied_ticking_) return;
|
||||
auto result = runtime_.set_ticking(desired);
|
||||
if (result.admission == RuntimeAdmission::Accepted) {
|
||||
requested_ticking_ = desired;
|
||||
ticking_completion_ = std::move(result.completion);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ViewerEvent> ViewerSession::poll() {
|
||||
try {
|
||||
poll_changes();
|
||||
poll_commands();
|
||||
poll_saves();
|
||||
poll_ticking();
|
||||
} catch (...) {
|
||||
fail_change(exception_message());
|
||||
}
|
||||
if (!guest_ && runtime_.view().state == RuntimeState::Faulted && !fault_reported_) {
|
||||
fault_reported_ = true;
|
||||
intents_.clear();
|
||||
command_completion_ = {};
|
||||
events_.push_back({ViewerEventKind::Fault, 0, {}, CommandStatus::Unavailable,
|
||||
"The simulation stopped at its last completed state. Load a save to continue."});
|
||||
}
|
||||
return std::exchange(events_, {});
|
||||
}
|
||||
|
||||
} // namespace settlement::viewer
|
||||
@@ -0,0 +1,111 @@
|
||||
#pragma once
|
||||
|
||||
#include "settlement/core/checkpoint_files.hpp"
|
||||
#include "settlement/core/colony_profile.hpp"
|
||||
|
||||
#include <deque>
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace settlement::viewer {
|
||||
|
||||
enum class ViewerEventKind { Replaced, Command, Saved, Error, Fault };
|
||||
|
||||
struct ViewerEvent {
|
||||
ViewerEventKind kind;
|
||||
std::uint64_t command = 0;
|
||||
std::optional<SessionPayload> payload;
|
||||
CommandStatus status = CommandStatus::Unavailable;
|
||||
std::string message;
|
||||
};
|
||||
|
||||
struct ViewerSessionOptions {
|
||||
RuntimeOptions runtime;
|
||||
CheckpointFilesOptions files;
|
||||
std::size_t command_capacity = 64;
|
||||
};
|
||||
|
||||
// Called only by the UI thread. Polling owns completion delivery; rendering holds
|
||||
// an immutable view independently of owner progress and nested window messages.
|
||||
class ViewerSession {
|
||||
public:
|
||||
explicit ViewerSession(std::size_t workers, ViewerSessionOptions options = {});
|
||||
ViewerSession(WorldCheckpoint initial, std::size_t workers, ViewerSessionOptions options = {});
|
||||
~ViewerSession();
|
||||
|
||||
[[nodiscard]] SimulationRuntime& runtime() noexcept { return runtime_; }
|
||||
[[nodiscard]] std::shared_ptr<const World> world() const;
|
||||
[[nodiscard]] bool guest() const noexcept { return guest_; }
|
||||
[[nodiscard]] bool changing_world() const noexcept { return changing_world_; }
|
||||
[[nodiscard]] bool can_submit() const;
|
||||
[[nodiscard]] bool can_host_legacy() const;
|
||||
[[nodiscard]] std::uint64_t generation() const noexcept { return generation_; }
|
||||
[[nodiscard]] std::optional<std::uint64_t> submit(SessionPayload payload);
|
||||
[[nodiscard]] bool pending(std::uint64_t id) const noexcept;
|
||||
void set_ticking(bool enabled) noexcept { desired_ticking_ = enabled; }
|
||||
[[nodiscard]] std::vector<ViewerEvent> poll();
|
||||
|
||||
void new_colony(ColonyProfile profile = ColonyProfile::Default);
|
||||
void load(const std::filesystem::path& path);
|
||||
void save(const std::filesystem::path& path);
|
||||
void enter_guest();
|
||||
void receive_guest(std::unique_ptr<World> world);
|
||||
void leave_guest();
|
||||
|
||||
private:
|
||||
struct Intent {
|
||||
std::uint64_t id;
|
||||
SessionPayload payload;
|
||||
};
|
||||
struct Preparing {
|
||||
LoadTicket ticket;
|
||||
std::future<CheckpointLoadResult> completion;
|
||||
};
|
||||
struct Installing {
|
||||
LoadTicket ticket;
|
||||
WorldCheckpoint candidate;
|
||||
};
|
||||
struct Saving {
|
||||
std::uint64_t generation;
|
||||
std::uint64_t request;
|
||||
Void::Uuid::Uuid session;
|
||||
std::future<SaveResult> completion;
|
||||
};
|
||||
[[nodiscard]] LoadTicket begin_change();
|
||||
void replace(WorldCheckpoint candidate);
|
||||
void validate_candidate(const WorldCheckpoint& candidate) const;
|
||||
void fail_change(std::string message);
|
||||
void poll_changes();
|
||||
void poll_commands();
|
||||
void poll_saves();
|
||||
void poll_ticking();
|
||||
|
||||
std::size_t workers_;
|
||||
std::size_t command_capacity_;
|
||||
RulesManifest supported_rules_;
|
||||
SimulationRuntime runtime_;
|
||||
CheckpointFiles files_;
|
||||
std::shared_ptr<const World> guest_view_;
|
||||
std::unique_ptr<World> guest_world_;
|
||||
std::deque<Intent> intents_;
|
||||
std::future<RuntimeResult> command_completion_;
|
||||
std::optional<Preparing> preparing_;
|
||||
std::optional<Installing> installing_;
|
||||
std::future<RuntimeResult> install_completion_;
|
||||
std::vector<Saving> saving_;
|
||||
std::vector<ViewerEvent> events_;
|
||||
std::future<RuntimeResult> ticking_completion_;
|
||||
bool requested_ticking_ = false;
|
||||
bool applied_ticking_ = false;
|
||||
bool desired_ticking_ = false;
|
||||
bool guest_ = false;
|
||||
bool changing_world_ = false;
|
||||
bool fault_reported_ = false;
|
||||
std::uint64_t generation_ = 1;
|
||||
std::uint64_t next_intent_ = 1;
|
||||
std::uint64_t latest_save_ = 0;
|
||||
};
|
||||
|
||||
} // namespace settlement::viewer
|
||||
+631
-274
File diff suppressed because it is too large.
Load diff
@@ -1,35 +1,70 @@
|
||||
param(
|
||||
[ValidateSet('Debug', 'Release', 'RelWithDebInfo')]
|
||||
[string]$Configuration = 'Release',
|
||||
[string]$Msys2Root = $env:SETTLEMENT_MSYS2_ROOT
|
||||
[string]$Msys2Root = $env:SETTLEMENT_MSYS2_ROOT,
|
||||
[string]$VoidLibrarySource
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$projectRoot = $PSScriptRoot
|
||||
if (-not $Msys2Root) { $Msys2Root = Join-Path $projectRoot '.tools\toolchain\msys64' }
|
||||
$bin = Join-Path $Msys2Root 'ucrt64\bin'
|
||||
foreach ($tool in @('g++.exe', 'cmake.exe', 'ctest.exe', 'ninja.exe', 'windres.exe')) {
|
||||
foreach ($tool in @('gcc.exe', 'g++.exe', 'cmake.exe', 'ctest.exe', 'ninja.exe', 'windres.exe')) {
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $bin $tool) -PathType Leaf)) {
|
||||
throw "MSYS2 UCRT64 tool missing: $tool. Run .\setup-toolchain.ps1."
|
||||
}
|
||||
}
|
||||
$bin = (Get-Item -LiteralPath $bin).FullName.Replace('\', '/')
|
||||
$toolPaths = @($bin)
|
||||
$voidSource = ''
|
||||
$gitOption = @()
|
||||
if ($VoidLibrarySource) {
|
||||
$voidSource = (Resolve-Path -LiteralPath $VoidLibrarySource).ProviderPath.Replace('\', '/')
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $voidSource 'CMakeLists.txt') -PathType Leaf)) {
|
||||
throw "Void Library CMakeLists.txt was not found in $voidSource."
|
||||
}
|
||||
} else {
|
||||
$git = Join-Path $Msys2Root 'usr\bin\git.exe'
|
||||
if (Test-Path -LiteralPath $git -PathType Leaf) {
|
||||
$bundledGit = Get-Item -LiteralPath $git
|
||||
$git = $bundledGit.FullName
|
||||
$toolPaths += $bundledGit.DirectoryName
|
||||
} else {
|
||||
$git = (Get-Command git.exe -CommandType Application -ErrorAction SilentlyContinue).Source
|
||||
}
|
||||
if (-not $git) {
|
||||
throw 'Git is required to fetch Void Library. Run .\setup-toolchain.ps1 or pass -VoidLibrarySource.'
|
||||
}
|
||||
$gitOption = @("-DGIT_EXECUTABLE:FILEPATH=$($git.Replace('\', '/'))")
|
||||
}
|
||||
$buildRoot = Join-Path $projectRoot 'build'
|
||||
$buildDirectory = Join-Path $buildRoot 'msys2-ucrt64'
|
||||
$previousPath = $env:Path
|
||||
try {
|
||||
$env:Path = "$bin;$previousPath"
|
||||
$env:Path = ($toolPaths + $previousPath) -join ';'
|
||||
$version = & (Join-Path $bin 'g++.exe') -dumpfullversion
|
||||
if ($LASTEXITCODE -ne 0 -or $version -notmatch '^16(\.|$)') {
|
||||
throw "MSYS2 UCRT64 GCC 16 is required. Found: $version"
|
||||
if ($LASTEXITCODE -ne 0 -or $version -notmatch '^\d+\.\d+(\.\d+)?$' -or
|
||||
[version]$version -lt [version]'16.0') {
|
||||
throw "MSYS2 UCRT64 GCC 16 or later is required. Found: $version"
|
||||
}
|
||||
$cVersion = & (Join-Path $bin 'gcc.exe') -dumpfullversion
|
||||
if ($LASTEXITCODE -ne 0 -or $cVersion -ne $version) {
|
||||
throw "gcc.exe and g++.exe must match. Found: $cVersion and $version"
|
||||
}
|
||||
$cmake = Join-Path $bin 'cmake.exe'
|
||||
$cmakeVersion = & $cmake --version
|
||||
if ($LASTEXITCODE -ne 0 -or $cmakeVersion[0] -notmatch '^cmake version (\d+\.\d+\.\d+)' -or
|
||||
[version]$Matches[1] -lt [version]'4.0') {
|
||||
throw 'CMake 4.0 or later is required. Run .\setup-toolchain.ps1.'
|
||||
}
|
||||
Write-Output "Building with MSYS2 UCRT64 GCC $version"
|
||||
$cmake = Join-Path $bin 'cmake.exe'
|
||||
$options = @('-S', $projectRoot, '-B', $buildDirectory, '-G', 'Ninja',
|
||||
"-DCMAKE_C_COMPILER=$bin/gcc.exe",
|
||||
"-DCMAKE_CXX_COMPILER=$bin/g++.exe",
|
||||
"-DCMAKE_RC_COMPILER=$bin/windres.exe",
|
||||
"-DCMAKE_MAKE_PROGRAM=$bin/ninja.exe",
|
||||
"-DCMAKE_BUILD_TYPE=$Configuration", '-DBUILD_TESTING=ON')
|
||||
"-DCMAKE_BUILD_TYPE=$Configuration", '-DBUILD_TESTING=ON',
|
||||
"-DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH=$voidSource") + $gitOption
|
||||
& $cmake @options
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
& $cmake --build $buildDirectory --parallel
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
# Windows integration
|
||||
|
||||
Текущий план разработки расположен в [PLAN.md](../../PLAN.md). Ниже сохранена история предыдущего этапа интеграции.
|
||||
|
||||
As of 2026-12-02, the baseline is `74b89ae` on `chore/integrate-void-library`. The tracked checkout was clean at discovery. The project targets Windows x64, MSYS2 UCRT64 and Direct3D 11.
|
||||
|
||||
The user approved pinning Void to `7b0fea6095f603f9e1904f66dfdc7752f4be4792`, adopting Binary and Core for saves and LAN, and migrating the reflection suites to Void Testing. The Windows build uses CMake 4+ and GCC 16. Use a configurable agent with Astra 6.2 XHigh for planning and independent review and Sol 6.2 XHigh for implementation, as approved by the user.
|
||||
|
||||
The working tree contains the verified integration. The game uses Void Binary for the save stream and LAN fields, Void Core for the legacy save checksum, and Void Testing for both suites. Save format 13 and LAN protocol 11 remain compatible with the baseline game. The independent final review accepted the build-path and test-selector corrections.
|
||||
|
||||
## Verification
|
||||
|
||||
The root cross-compiled for Windows x64 UCRT on NixOS with GCC 16.2.0, CMake 4.5.0 and Ninja. Wine 11 ran the executables. The temporary verification directory for this session was `/tmp/stoneheart-verify.KoZwE4o8`. From the game root, the integrated build used these commands.
|
||||
|
||||
```sh
|
||||
source /tmp/stoneheart-verify.KoZwE4o8/env.sh
|
||||
cmake -S . -B "$SETTLEMENT_VERIFY/candidate" -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build "$SETTLEMENT_VERIFY/candidate" --parallel 8
|
||||
ctest --test-dir "$SETTLEMENT_VERIFY/candidate" -V --output-on-failure
|
||||
```
|
||||
|
||||
| Check | Observed result |
|
||||
| --- | --- |
|
||||
| Windows builds | A fresh fetch checked out the pinned commit. With tests enabled, all five x64 PE executables linked. A tests-off build linked the three production programs. An offline source path containing a space worked, and a native Linux configuration was rejected. |
|
||||
| Test registry | The baseline passed 25 core cases and one LAN case. The final build passed all 26 by name and six new compatibility cases. The construction tag selected six cases, the LAN tag selected one, and blank, missing and unmatched tag values failed. |
|
||||
| Save bytes | Baseline and final binaries emitted identical saves for both an empty world and an 80-tick colony. Both binaries loaded and reserialized empty-world fixtures for versions 1 through 13 identically. The suite also checks corrupt and truncated legacy footers, trailing data and output failure. |
|
||||
| Cross-version LAN | The baseline host accepted the new guest, and the new host accepted the baseline guest. In both directions a guest joined over loopback, received the host's snapshot, placed a stone bed, saw the updated colony and received the expected rejection for a second bed on the occupied cell. |
|
||||
| Viewer and command-line programs | The viewer opened its title screen and started a new colony with a visible 1112 × 479 Direct3D 11 viewport under Wine. It closed normally. The simulator and colony benchmark also ran. |
|
||||
| Windows build scripts | PowerShell 7.6.9 parsed both scripts. Isolated stub tools exercised the setup readiness path, argument quoting, bundled Git PATH ordering, local source override and packaging. Native Windows installation, real MSYS2 Git acquisition and execution on a physical GPU remain unverified. |
|
||||
|
||||
`build/settlement-windows-x64.zip` contains the five cross-built executables and their three MinGW runtime DLLs. The extracted viewer and tagged suites ran with the bundled DLLs and no Wine DLL-path override. The cross toolchain uses the MCF threading runtime. The Windows build script stages the winpthread runtime from MSYS2 UCRT64. Native build instructions are in the [README](../../README.md).
|
||||
|
||||
## Комплект планов воксельной игры
|
||||
|
||||
2 декабря 2026. Согласованные решения по платформе, паритету, регионам, модам, кооперативу, масштабу и происхождению материалов записаны в [мастер-плане](../../PLAN.md). Пользователь поручил нескольким авторам оформить документы и добавил обязательное повторное использование VoidLibrary с регистрацией недостающих возможностей в трекере библиотеки. Ветка документации `chore/plans`, база `083b84e`. До работы отслеживаемые файлы были чисты, `.serena/` и прежние записи `docs/agent-workflow/` существовали как неотслеживаемые.
|
||||
|
||||
Дизайн прошёл предварительную проверку D03/D04. Уточнены постоянные ID и владение грузами, смена экземпляра сессии, логические границы подгрузки, откат неудачного скрипта и состав контрольных миров. Комплект включает 13 этапов, 21 систему, исходный реестр поведения и матрицу возможностей закреплённой VoidLibrary. Результаты проверок документов относятся к этому комплекту. Полнота паритета, игровая производительность и нативная межмашинная приёмка будут проверяться на этапах разработки.
|
||||
|
||||
### Проверка документации и исходной сборки
|
||||
|
||||
Рабочий каталог для команд — корень репозитория игры. Проверка Markdown охватила 34 тематических плана, мастер-план, реестр, архив и ссылки из сопутствующих документов. Начальные 24 строки базовой игры и 26 строк ACE имеют 100 обратных ссылок от планов систем и этапов. Для каждой строки проверены источник, назначение и существующий якорь. 25 различных ссылок на файлы Void проверены через `git cat-file -e` по закреплённому коммиту. Содержимое архива сверено с `git show 083b84e:PLAN.md` с учётом архивной пометки и перемещения относительной ссылки. Проверены таблицы, форматирование, бюджет нагрузок и `git diff --check`. Рабочие страницы прошли проверку вместе с новыми файлами, ещё не добавленными в Git.
|
||||
|
||||
Повторная проверка исходной сборки выполнялась командами `cmake --build /tmp/stoneheart-plan-check.m7eQkO --parallel 8` и `ctest --test-dir /tmp/stoneheart-plan-check.m7eQkO --output-on-failure` в подготовленном окружении Windows x64 GCC 16.2.0/Wine. Сборка актуальна. Обе CTest-сюиты прошли, журнал содержит 28 успешных случаев ядра и 4 LAN. Изменения игровых исходников, CMake и тестов относительно `083b84e` отсутствуют.
|
||||
|
||||
Независимая проверка RM07 завершена с результатом **READY** для комплекта планов. Уточнены единый владелец резервов S04 при торговле и лечении, приёмка повторно используемого шаблона B22 на M10, перенос основателей B13 на M06, граница ранних правок чертежа и переход от локальной транзакционной загрузки к сетевой. Проверяющий повторно сверил исправленные места и ключевые выводы о VoidLibrary с исходниками закреплённой версии. Следующий этап игры — M00 и затем проверяемый перенос первого участка исполнения на M01.
|
||||
|
||||
## M00. Первый проход по выпускам и передача ядру
|
||||
|
||||
2 декабря 2026 года пользователь поручил начать реализацию согласованного плана с участием субагентов и отдельной веткой на этап. База — `chore/plans` на `0deacb3`, ветка инвентаризации — `milestone/m00-inventory`. Следующая ветка создаётся от локального коммита этой работы. Прежние неотслеживаемые `.serena/`, `TASKS.md` и старые задания V/RM не входят в коммит.
|
||||
|
||||
| Работа | Ответственный и результат |
|
||||
|---|---|
|
||||
| [План](tasks/M00-P.md) и [предварительная проверка](tasks/M00-F.md) | Планировщик и независимый проверяющий согласовали границы инвентаря и первый исполняемый тест M01. |
|
||||
| [Базовая игра](tasks/M00-B.md) и [дополнение](tasks/M00-A.md) | Два исполнителя проследили 50 исходных записей до версии и источника либо конкретного пробела и добавили 30 самостоятельных проверок. В документах указаны просмотренные выпуски и ещё открытые диапазоны. [Реестр](../plan/parity.md) |
|
||||
| [Материалы](tasks/M00-D.md) | Подготовлено производственное задание M03. Для трёх уже встроенных иконок подтверждение прав остаётся открытым. [Реестр материалов](../art/demo-inventory.md) |
|
||||
| [Исследование Void](tasks/M01-R.md) | Сверены публичные контракты текущего pin и ветки main. Для эталона используются существующие игровые расчёты и байты сохранения. Испытания замены пула вынесены в отдельную часть M01. [Решение](../plan/void-library.md) |
|
||||
| Исходная проверка и сцена | Зафиксированы состав старой сборки, путь открытия сохранений 13, условия прежних измерений, карта Q-HOME и три точки прерывания доставки. [Передача](../plan/prototype-handoff.md) |
|
||||
|
||||
Из корня игры собрана свежая Windows x64 Release в отдельном каталоге с закреплённым исходным деревом Void, CMake 4.5.0, GCC 16.2.0 и Ninja. Команды `cmake --build <build-dir> --parallel 8` и `ctest --test-dir <build-dir> -V --output-on-failure` под Wine 11 дали 28/28 случаев ядра и 4/4 LAN. Результат относится к кросс-сборке. Аппаратные измерения Windows и изготовление материалов относятся к следующим этапам.
|
||||
|
||||
[Итоговая проверка M00-V](tasks/M00-V.md) приняла этот срез и передачу M01. Проверены 80 идентификаторов, 43 документа и 1 041 локальная ссылка до добавления данной записи, хеши иконок, подключение ресурсов и журналы исходной сборки. Обход остальных исторических изменений, приёмка игровых сценариев и права на будущие файлы остаются открытыми.
|
||||
|
||||
## M01. Последовательный эталон и журнал
|
||||
|
||||
Пользователь подтвердил полный план, локальные коммиты и отправку веток этапов и систем в origin. M00 принят и опубликован в `milestone/m00-inventory` на `904bdf8`. Ветка `milestone/m01-authoritative-simulation` создана от него. Первая поставка S01 включает [режим мира](tasks/M01-C.md) и [пять сценариев воспроизведения](tasks/M01-T.md).
|
||||
|
||||
Под Wine 11 новая Windows x64 Release прошла 33/33 теста ядра и 4/4 LAN. Селектор `settlement_core_tests.exe --tag replay` выполнил пять новых случаев. Журнал из десяти команд дал 750 тактов с одинаковыми сохранениями в эталоне и на 2/6/12 потоках, включая продолжение с материалом в руках. Отдельная программа, собранная сначала с заголовками и ядром до M01, затем с новым ядром, сравнила квитанции и сохранения после каждой из 365 попыток шага. При 361 такте и пяти съеденных порциях все четыре режима совпали с прототипом по всем 738 386 байтам. [Итог M01-V1](tasks/M01-V1.md) — **READY** для эталона и тестов.
|
||||
|
||||
Контрольные команды из корня игры, в окружении кросс-сборки из записи выше:
|
||||
|
||||
```sh
|
||||
cmake --build /tmp/stoneheart-milestones.xprJ2SVp/windows --parallel 8
|
||||
ctest --test-dir /tmp/stoneheart-milestones.xprJ2SVp/windows -V --output-on-failure
|
||||
wine /tmp/stoneheart-milestones.xprJ2SVp/windows/settlement_core_tests.exe --tag replay
|
||||
```
|
||||
|
||||
Далее в M01 входят исполнитель Void с проверкой отказов, манифесты правил, авторитетный диспетчер команд, фоновый такт, снимки и транзакционная загрузка/запись. Приёмка этих систем ведётся отдельными коммитами.
|
||||
|
||||
### Ветки разработки и запросы на слияние
|
||||
|
||||
Для этапов используются ветки `milestone/*`, для систем — `system/*`. По поручению пользователя ветка [integration/roadmap](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/src/branch/integration/roadmap) содержит `chore/integrate-void-library`, `chore/plans` и принятые изменения каждой ветки этапа и системы. После проверки совместной сборки ответственный обновляет накопительную ветку. Она служит для получения всей работы одним checkout.
|
||||
|
||||
У каждой опубликованной рабочей ветки есть свой запрос в `main`. Описание ссылается на более ранние запросы этой серии. При параллельной работе подписи ссылок указывают, какие изменения послужили базой и какие развивались независимо. Новые коммиты ветки попадают в уже открытый запрос. Первыми открыты [VoidLibrary #3](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/3), [план #4](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/4), [M00 #5](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/5), [M01 #6](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/6), [модули правил S19 #7](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/7), [исполнитель S01 #8](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/8), [диспетчер S16 #9](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/9) и [сохранения S15 #10](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/10).
|
||||
|
||||
В `2224299` вместе собраны снимки мира, диспетчер команд, служба записи и кодек контрольных точек. Windows x64 Release под Wine прошла 82 из 82 случаев ядра и 4 из 4 LAN. Отдельная ветка S15 на `db4ac30` прошла 59 из 59 и 4 из 4 соответственно. По трём прогонам на поле 80×80 с шестью потоками медианы p50/p95 захвата снимка составили 2/4 мкс для 50 жителей и 23/68 мкс для 500. После 32 тактов прогрева каждый прогон измерял 240 захватов. При подключении службы записи к окну лимит одного файла должен вмещать `max_checkpoint_bytes`. Частота тактов, отзывчивость окна во время записи и работа на физической Windows проверяются отдельно. [Проверка команд и записи](tasks/M01-V4.md) · [Проверка снимка и контрольной точки](tasks/M01-V5.md) · [Совместная сборка](tasks/M01-V6.md) · [План постоянных ссылок](tasks/M01-P3.md)
|
||||
|
||||
В `cf0cc2f` объединены проверенные коммиты S19 `de38aff` и S01 `68f91a2`. После объединения под Wine 11 прошли 51 из 51 теста ядра и 4 из 4 тестов LAN, включая формат сохранений 13 и протокол 11. Независимый проверяющий сверил обе родительские версии, наследование параметров компиляции и встроенную реализацию SHA-256. [План владельца симуляции](tasks/M01-P2.md) · [Проверка библиотеки](tasks/M01-R2.md) · [Разбор отказов](tasks/M01-F2.md) · [Принятые контракты](tasks/M01-F3.md) · [Проверка S01 и S19](tasks/M01-V2.md) · [Проверка интеграции](tasks/M01-V3.md)
|
||||
|
||||
Срез S06 сохранил ссылки на склады и источники при удалении более раннего элемента. Два контрольных набора из 738 386 и 393 857 байтов совпали со старой сборкой в последовательном режиме и на 2/6/12 потоках. Второй набор включает разбор склада во время многоэтапной доставки. Изменения опубликованы отдельно в [S06 #11](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/11). В `4ba64f7` также вошла фоновая подготовка старых и новых сохранений. В объединённой Windows x64-сборке под Wine прошли 106 тестов ядра и 4 LAN. Публичный аналог ограниченного чтения в Windows отслеживается в [Void/Library #9](https://git.faumaray.com/Void/Library/issues/9). [Проверка двух компонентов](tasks/M01-V8.md) · [Интеграционная проверка](tasks/M01-V9.md)
|
||||
|
||||
Хост протокола 11 теперь передаёт приказы авторитетной симуляции, а гость получает подтверждение и снимок завершённого состояния. После смены сеанса старому гостю требуется новое подключение. Старая и новая сборки обменялись приказами в обеих ролях. В `aa4e271` под Wine прошли 106 из 106 тестов ядра и 9 из 9 LAN. Отдельно проверены переподключение при незавершённом приказе и разные правила нумерации отклонённых приказов у старого клиента и нового владельца. [Ветка S16](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/9) · [Проверка интеграции](tasks/M01-V10.md)
|
||||
|
||||
В `a8cd7bb` объединены заказы с постоянными ID и два варианта правил строительства кровати. Формат контрольной точки 2 сохраняет ID заказов и следующий свободный ID. Прежние контрольные точки и обычные сохранения версии 13 продолжают загружаться. Оба варианта правил прошли строительство реальных кроватей, сохранение во время доставки и сравнение продолжений на 1/2/6/12 исполнителях. В объединённой сборке под Wine прошли 122 теста ядра и 9 LAN. Аппаратная Windows ещё не проверена. [Заказы S04](../plan/systems/S04.md) · [Правила S19](../plan/systems/S19.md) · [Интеграционная проверка](tasks/M01-V11.md)
|
||||
|
||||
Клиент Windows в `db0a872` обрабатывает действия игрока по квитанциям владельца и рисует из неизменяемого снимка. Три отдельных процесса под Wine проверили создание партии, паузу в меню и окне выбора файла, запись, современное и прежнее сохранения и отказ при повреждении файла. Отдельно проверены подтверждение разбора при смене партии, сохранение гостевой колонии после неудачного переподключения и возобновление тактов после восстановления. В общей сборке прошли 122 теста ядра, 9 LAN и 10 клиента. [Клиент S18](../plan/systems/S18.md) · [Проверка с обеими родительскими ветками](tasks/M01-V10.md)
|
||||
|
||||
В `37fb6a8` объединены проверяемая передача всего груза одной остановки и выбор правил на титульном экране. Игрок может создать поселение с поэтапной сборкой кровати либо с рецептом из одной доски. При открытии сохранения восстанавливается его собственный набор правил. Испытание настоящего окна проверило оба выбора мышью и клавиатурой, файл и продолжение из нового процесса. В общей сборке под Wine прошли 136 тестов ядра, 9 LAN и 14 клиента. [Загрузка и инвентарь S06](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/11) · [Клиент S18](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/13) · [Совместная проверка](tasks/M01-V12.md)
|
||||
|
||||
В `048268a` две настоящие рабочие задачи завершаются в противоположном порядке. Во всех 24 воспроизведениях победитель спорной заявки и байты состояния совпали с последовательной партией. При загрузке более старого мира запоздалый результат не изменил новую партию. Windows x64 под Wine прошла 141 тест ядра, 9 LAN и 14 клиента. [Проверки S21](../plan/systems/S21.md) · [Интеграционная проверка](tasks/M01-V13.md) · [Управляемый порядок завершения в VoidLibrary](https://git.faumaray.com/Void/Library/issues/15)
|
||||
|
||||
В `455630f` камера отвечает на колесо мыши и перетаскивание, пока симуляция или запись файла задержана. Проверка настоящего окна сравнила пиксели и байты контрольной точки, воспроизвела замену мира между опросом и рисованием и проверила сохранение прежнего кадра. Под Wine прошли 141 тест ядра, 9 LAN, 14 клиента и отдельное испытание кадра с видимой цепочкой D3D11 и WARP. Проверка в нескольких процессах также подтвердила выбор и загрузку обоих рецептов кровати. Частота кадров на физическом Windows-ПК ещё не измерена. [Рендерер S17](../plan/systems/S17.md) · [Совместная проверка](tasks/M01-V13.md)
|
||||
@@ -0,0 +1,48 @@
|
||||
# Record ACE releases, active variants and open evidence
|
||||
|
||||
Task ID: M00-A
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory at 0deacb3. Prior untracked .serena and workflow/TASKS and older tasks belong to the user. M00-P and preflight approve the scoped inventory.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Produce the actual M00 public-behavior audit for ACE through 0.9.6.22 in NEW docs/plan/ace-evidence.md (Russian).
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Cover the 26 existing ACE observations and add distinct concrete observations from inspected earlier releases/patches. Base-game and art work have other owners.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/parity.md (A01–A26 and [ace],[quality],[drink],[market],[latest]), M00.md, PLAN.md and matching system/milestone plans. Read ACE maintainers' public release notes up to the cutoff.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: docs/plan/ace-evidence.md
|
||||
Shared checkout. Do not revert or edit others' work. Root links your file and integrates the indexes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Walk dated release posts from earlier installments through the actual .22 release with stable post-specific URLs. Track coverage, last inspected release, supersessions and concrete remaining questions. Audit A01–A26 individually or group only where source/version and status apply to every named member. Add worthwhile A27+ rules including interaction of seasonal irrigation/markets/occupations or distinct peaceful/hostile outcomes as supported. Verify exact release within a topic rather than attributing every post to its current title.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
For each new ID use a durable lowercase HTML anchor, module, version/source, trigger, player effect, independent equivalent/test and existing Sxx/Mxx links. Retain AT convention. Clearly distinguish unknown/outcome questions and required future acceptance checks.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns parity.md and M00 crosslinks. Base author owns Bxx. Report substantive corrections required to existing seed descriptions to root.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Unexamined ranges remain explicit. No claim of full patch coverage unless checked. Use primary public behavior descriptions only, no code, art, recipe text, credentials, uploads or unsupported rights statements.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. All 26 seeds map to explicit inspected evidence or concrete unknown. 2. Distinct testable new rows have stable IDs and linked evidence. 3. Honest chronological coverage including superseding fixes.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root rg -n 'A[0-9]{2}' docs/plan/parity.md, direct public-author release pages, git diff --check and verify anchors/relative targets in the new file. No build needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No commits, dispatch, published content, third-party source or assets. Stop only for an ownership conflict or material decision. Report unresolved evidence as an explicit question.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User asked to start the approved roadmap with one branch per milestone and subagents. Root owns integration and Git side effects.
|
||||
|
||||
## 14. Return format
|
||||
Return M00-A status, path, new IDs, inspected releases and unresolved gaps, corrections to root and actual verification evidence. No subagents.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Record the base-game behavior and release evidence
|
||||
|
||||
Task ID: M00-B
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory at 0deacb3. Prior untracked .serena and workflow/TASKS and older tasks belong to the user. M00-P and preflight approve the scoped inventory.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Produce the actual M00 public-behavior audit for Stonehearth base through 1.1 in NEW docs/plan/base-evidence.md (Russian).
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Cover the 24 existing base observations and add distinct concrete observations from the inspected sources. ACE has a different owner. Do not copy game code, art or passages.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/parity.md (B01–B24, source links), docs/plan/milestones/M00.md, PLAN.md and matching system/milestone plans; consult developer announcements on Steam and primary release evidence through 1.1.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: docs/plan/base-evidence.md
|
||||
You share the checkout with other authors. Do not revert or edit their work. Root links your file and integrates indexes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Walk identifiable releases chronologically, record dates/builds, which portions were inspected, which are still open, last examined and concrete next source. Audit B01–B24 individually or group only where source/version and status apply unambiguously to every member. Distinguish preview from stable release and claims from proposed checks. Add worthwhile nonduplicate B25+ behaviors including culture/peaceful branches and occupations where evidenced. Use stable deep links from developers, no secondary wiki assumptions.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
For each new ID use a durable lowercase HTML anchor and include module, applicable version/source, trigger, player effect, independent equivalent/test, linked existing Sxx/Mxx; retain original Bxx ids and AT naming. Use narrow open questions for unresolved version/outcome. Independent localized prose.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns parity.md and M00 crosslinks. ACE author owns Axx and art owner handles provenance. Report any substantive corrections to the original seed descriptions to root.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Treat old announcements and unsurveyed ranges honestly; no unsupported 1.1 confirmation or exhaustive claims. No Stonehearth/ACE code, assets, credentials or uploads.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Every seed ID maps to checked primary evidence or an explicit reproducible evidence question. 2. New observations are testable, linked and distinct. 3. Source coverage ledger identifies work reviewed and still open.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root use rg -n 'B[0-9]{2}' docs/plan/parity.md, direct public-author release pages, git diff --check and verify new Markdown anchors/relative targets in your file. No application changes or builds necessary.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No commits, dispatch, published content, third-party source or assets. Stop only for an ownership conflict or material decision. Report unresolved evidence as an explicit question.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User asked to start the approved roadmap with one branch per milestone and subagents. Root owns integration and Git side effects.
|
||||
|
||||
## 14. Return format
|
||||
Return M00-B DONE/PARTIAL, path, source coverage, new ID range, case-by-case caveats/corrections and executed checks. No subagents.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Define original demo art and audit the inherited icons
|
||||
|
||||
Task ID: M00-D
|
||||
Role: terra_specialist
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory at 0deacb3. Prior untracked .serena and workflow/TASKS and older tasks belong to the user. M00-P and preflight approve the scoped inventory.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Produce a Russian original art direction, M03 production budget and item-level provenance record in NEW docs/art/demo-inventory.md.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Cover models, textures/materials, animation, sound, font use, UI and 3 legacy icons. Make production decisions concrete and bounded. Documentation work only.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/milestones/M00.md, M03.md, docs/plan/systems/S20.md, app/house_icons.rc, app/art/, app/viewer_win32.cpp house choices, CMakeLists.txt, build.ps1, LICENSE and icon Git history.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: docs/art/demo-inventory.md
|
||||
The other authors own behavior catalogs and root owns integration. Do not change their work, any tracked art, CMake, or application code.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Trace all three icon blobs individually with adding commit and current hash/reference. Check source/attribution evidence. Set a disposition if rights remain unknown. Design the M03 scene independently (voxel scale, readable silhouettes, palette/material/lighting, animation and sound cues, font fallback) and a finite asset inventory keyed to the Q-HOME route. Record named author/source/rights/evidence or explicit missing/owner/gate, derivative/attribution and intended tool/export. Do not invent completed art or rights.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Distinguish source evidence, art brief and shipped inclusion. Current viewer embeds all three ICOs through house_icons.rc; M00 can record exclusion from the NEW demo and production owner/replacement gate. Preserve the historical build record. Document actual roles for the three house buttons.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root maps asset work to M00/M03 and decides package integration. No integration with any external service, no new commissioned/paid assets.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Existing license and Git commit author alone cannot establish provenance of imported images. Label planned assets, system fonts (no redistribution) and any rights questions truthfully. Provide precise what-to-check at release.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Each ICO individually traceable and included/excluded status justified. 2. Independent, concrete style and artist-ready playable demo bill of materials with provenance status, source/export & budget. 3. No implied clearance of future deliverables; include a usable manual check from camera.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git log --all --diff-filter=A -- app/art, git ls-tree -r 083b84e -- app/art, rg -n 'house_icons|house_artwork|house_choices' app CMakeLists.txt, git diff --check; verify links. Document source findings.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not edit graphics/code or create assets. No branch changes, commits, external messages, or child agents; report genuine unresolved evidence.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User asked to start the approved roadmap with one branch per milestone and subagents. Root owns integration and Git side effects.
|
||||
|
||||
## 14. Return format
|
||||
Return M00-D status, owned file, each icon verdict, Q-HOME coverage, evidence and remaining production work. No subagents.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Preflight the inventory and replay handoff
|
||||
|
||||
Task ID: M00-F
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory at 0deacb3. Old .serena and workflow tasks/TASKS untracked. M00-P mapped 50 seed rows, three icons and three parallel submission sites. M01-R investigates Void separately.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Preflight the contracts for M00 and the first M01 slice. Give actionable blockers before authors make changes. This is a design check, followed later by independent diff review.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
M00 evidence/asset inventory and reproducible baseline, then M01 serial-reference/tick comparison with a scheduled prototype scenario and reload. Larger runtime redesign belongs to later work.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect PLAN.md, docs/plan/milestones/{M00,M01,M03}.md, docs/plan/{parity,void-library}.md, docs/plan/systems/{S01,S15,S20,S21}.md, CMakeLists.txt, engine/include/settlement/core/{world,worker_pool}.hpp, engine/src/{world,world_save}.cpp, tests/core_tests.cpp.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Shared checkout. Root owns all edits/branches; no subagents.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
M00 authors own (a) behavior catalog and primary-source coverage/release/gap ledger, preserving stable anchors, (b) original art direction/M03 inventory and exclusion disposition for icons; root owns baseline, concrete Q-HOME/scale handoff and linking. M01 proposed explicit serial path for all parallel world passes, default pool and legacy counts intact, repeatable command fixture, exact serialized prototype state after every tick and across reload; only pinned applicable public Void utilities.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Treat closed evidence versus planned/unknown behavior separately. Save 13/LAN 11 stay compatible; worker settings are execution state, not canonical game bytes. Require useful work in the fixture, independent expected results, fresh-world mismatch detection and preserved execution mode on load.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
M00 root records sources/test evidence before M01 branch; M01-R verifies Void reuse. The planner and researcher do not own implementation. Root reconciles findings before dispatch.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Assess accidental distribution of unverified icons through existing Win32 resources, rights versus Git author, public-source boundaries; assess default worker performance and serial-without-threads semantics, thread/queue/exception behavior, transient caches, tests under GCC16/Wine.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return READY or scoped blockers with fixes. 2. Identify missing acceptance checks and ownership collisions. 3. Distinguish M00 launch inventory from final release coverage and M01 starter slice from complete milestone.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git status --short --branch, git diff 083b84e..HEAD --stat -- engine app tests CMakeLists.txt, rg -n 'worker_count|WorkerPool|submit\(|save\(|load\(' engine tests/core_tests.cpp. Available tests in CMake are settlement_core_tests, settlement_lan_tests. Use local read-only commands only.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop once decisive constraints can be sent. No fixes, Git mutation, external writes or duplicate source research. Return M00 decision early if M01 needs longer.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorized starting the existing plan on one new branch per milestone with subagents. Root approves product scope, reviewer checks technical readiness only.
|
||||
|
||||
## 14. Return format
|
||||
Return M00-F preflight verdicts by milestone, concrete severity/location/trigger/fix, checks and regression risks. Send early actionable findings; do not spawn.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Map the first milestone and the executable handoff
|
||||
|
||||
Task ID: M00-P
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory from chore/plans at 0deacb3. The old .serena and workflow tasks/TASKS are untracked. M00 precedes M01 under PLAN.md.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Map what M00 still needs beyond the 50 seed rows, and design one runnable, dependency-correct first slice of M01 on its own descendant branch.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only Scout. Concentrate on baseline, parity, Q-HOME, requirements, tick/worker callers, independent work packages and the smallest meaningful implementation with tests.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/milestones/M00.md and M01.md, docs/plan/parity.md, docs/plan/systems/S01.md, S15.md, S20.md, S21.md, engine/include/settlement/core/{world,worker_pool}.hpp, engine/src/world.cpp, tests/core_tests.cpp.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Shared checkout. Root owns all edits/branches. No child agents.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Identify gaps versus existing artifacts, stable interfaces and failure modes. Check local symbol evidence for the M01 seam. Distinguish M00 acceptance from full future parity. Use the scoped graph only after root/coverage/freshness checks or use local sources for coverage gaps.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Preserve B01–B24/A01–A26 anchors, old world save 13 and LAN 11, existing default and invalid pool sizes. Propose NEW M01 interfaces only when needed.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Researcher separately investigates VoidLibrary so do not duplicate that investigation. Root integrates disjoint authors and gates each milestone.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Do not infer asset rights or Windows correctness from a filename or Wine. Keep reference-content research to public behavioral descriptions.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return a bounded milestone package map with acceptance evidence. 2. Identify M01 entry point, assumptions, state comparison, and regression cases with exact source locations. 3. Give dependency/branch boundaries.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root use git status --short --branch, git show -s --format=%H, rg -n 'WorkerPool|tick\(' engine tests app/main.cpp and relevant bounded file reads. Report observed commands and runnable tests.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop for contradictions materially changing the product; no tracking issues, no Git edits, no installation. Return an early handoff when the plan is clear.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User asked to start the approved plan, use new branches per milestone and subagents. This assignment supplies planning only.
|
||||
|
||||
## 14. Return format
|
||||
Return M00-P status, files/evidence, proposed ownership, invariants, next verified checks and residual uncertainties.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Review the integrated M00 inventory checkpoint
|
||||
|
||||
Task ID: M00-V
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory, baseline 0deacb3. Old untracked .serena and legacy workflow/TASKS and V/RM are outside the diff. M00-P/F supplied plan and preflight; this is a fresh independent review.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Review the actual M00 checkpoint for traceability, accuracy and readiness of its confirmed M01 handoff. Report READY, CHANGES_REQUIRED, or INSUFFICIENT_EVIDENCE with scope.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Review inventory of 80 behavior IDs, released-vs-open evidence, original demo production inventory and legacy icons, reproducible baseline, Q-HOME/scale, Void decision, branch records. Review current changes, not author reports.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect git diff 0deacb3 plus NEW docs/plan/{base-evidence,ace-evidence,prototype-handoff}.md, docs/art/demo-inventory.md and linked M00/M03, parity.md, PLAN.md, docs/agent-workflow/STATE.md, docs/plan/void-library.md. Compare to CMakeLists.txt, app/house_icons.rc, build.ps1, benchmark records, M00 acceptance.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Root owns all corrections and Git. Shared checkout; no child or external side effects.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Check stable IDs/backlinks, source samples (stable vs preview, .22 edits, peaceful path, corrections), explicit unknowns and release-crawl limits. Verify scene consistency, compatibility evidence and whether old resource inclusion is recorded. Source-check via primary public descriptions and repository Git where useful.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Do not infer parity from inventory or art rights from Git attribution. Planned Q-HOME seed/coordinates are a fixture, not already generated. Preserve M00 evidence while allowing M01 to start from confirmed boundaries.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root observed two successful baseline Windows CTest runs using GCC16/Wine; fresh dir /tmp/stoneheart-milestones.xprJ2SVp/windows; log baseline-ctest.log in its parent. Temporary validation script found 43 docs, 80 unique IDs, all 50 direct audit pointers, no broken local link, icon hash mismatch or table error.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Do not assign deep examination of every historical release or production of art as completed. Pay attention to references going to the wrong edition and unsupported hardware or compatibility claims.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return verdict on integrated M00 and M01-ready handoff. 2. Identify concrete evidence conflicts, broken links or misreported results. 3. Report remaining source/art checks separately from fixable document defects.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Game root: git diff 0deacb3 --stat; git diff --cached --check; python3 /tmp/stoneheart-milestones.xprJ2SVp/validate_docs.py; git log --diff-filter=A -- app/art; inspect scoped files plus actual runtime log. No new build required for docs.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No edits, branch switching, staging, commits, merge, remote messages or unsupported claims. Return bounded findings as soon as evidence suffices.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorized milestone implementation and local branches. This review is advisory on the checkpoint, not a release authorization.
|
||||
|
||||
## 14. Return format
|
||||
Return M00-V verdict with severity, location, trigger, impact and verification for each actionable issue, actual checks/unrun checks and remaining inventory scope.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Run the same world kernels in an explicit serial reference mode
|
||||
|
||||
Task ID: M01-C
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m01-authoritative-simulation, M00 checkpoint 904bdf8. Legacy task notes/.serena are user work. M00-P/F and M01-R established the prototype's three worker sites and checked the pinned Void APIs.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement the first M01 execution seam: an explicit true serial reference and the existing threaded game mode for World construction and load.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Work only on simulation execution selection, including path selection/route/advancement. Keep normal CLI, viewer, LAN, wire bytes, command behavior and parallel executor compatible.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect engine/include/settlement/core/world.hpp, engine/src/{world,world_save}.cpp, worker_pool.hpp/cpp, tests/core_tests.cpp, docs/plan/milestones/M01.md and docs/plan/void-library.md. choose_jobs, find_path and advance_agents already exist in World.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/world.hpp; engine/src/world.cpp; engine/src/world_save.cpp
|
||||
You are not alone in this checkout. Other authors own tests and CMake; root owns docs and Git. Do not revert others' work.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Add the explicit mode to World construction and read_save. Validate count/mode before stepping. For serial work call the same domain kernels on the caller thread: compute all candidate choices against one starting state before committing winners, run the same find_path and apply requests in the same order, advance agents for the whole range once and sum actual completions. Preserve existing chunking and order in threaded mode. Use direct domain calls and avoid building any generic executor or new state codec.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW settlement::ExecutionMode::{Parallel, SerialReference}. World(seed,w,h, size_t workers=min_worker_count, ExecutionMode mode=ExecutionMode::Parallel); World::read_save(stream, size_t workers=min_worker_count, ExecutionMode mode=ExecutionMode::Parallel). Parallel accepts 2..64 as today. SerialReference requires logical count 1, creates zero OS workers and reports worker_count()==1. Reject invalid combinations/unknown enum with std::invalid_argument. Configuration is local and never serialized. Other source-compatible choices inside these paths are discretionary.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Tests owner will use frozen interface immediately. Preserve save v13 fixture, old versions, LAN 11, performance of ordinary pool dispatch and its current lifetimes. Pinned Void covers binary/test primitives; game-specific direct invocation adds no generic library facility. ThreadExecutor migration has its own later failure/performance contract.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Account for no agents/jobs, paused world, one resident, fewer agents than workers, competing jobs, retries for unreachable routes, reload and cache state. Keep parallel error behavior; do not broaden lifetime hazards. No detached tasks or implicit threads in serial.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Serial mode reaches all 3 sites without a worker pool. 2. Invalid ordinary counts still fail, valid serial passes constructor and load. 3. Exact v13 save bytes and outcomes match 2/6/12 for useful scenarios. 4. Default behavior and old consumers compile.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root source /tmp/stoneheart-verify.KoZwE4o8/env.sh; then cmake --build "$SETTLEMENT_VERIFY/candidate" --parallel 8 --target settlement_core. Use git diff --check and inspect actual diff. Tell root/tests when implementation compiles; tests use another build directory and root runs integrated suites.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not alter other files, registry, network, branch or legacy pool, stage/commit or spawn. Escalate a required interface change and report errors before changing approach twice.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved starting the roadmap on per-milestone branches and parallel subagents. Root selected first M01 replay increment after independent preflight.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-C status, changed paths/symbols, mode and ordering decisions, commands/results, untested paths and integration notes.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Preflight the rules, executor and authoritative runtime packages
|
||||
|
||||
Task ID: M01-F2
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home on milestone/m01-authoritative-simulation, M00 at 904bdf8, M01 serial tranche under separate final review. User authorized the entire roadmap with remote pushes by milestone/system.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Check next M01 system contracts before implementation. Prioritize a verdict for independent S19 rules and S01 Void pool migration, then S16 authority, S15 persistence and S01 viewer runtime.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Review technical design/failure boundaries and independent branch ownership. Later M02+ behavior is outside this preflight; the existing prototype remains runnable while these staged features integrate.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect plans M01, S01/S15/S16/S19, world.hpp/cpp, world_save.cpp, app/viewer_win32.cpp, app/lan_session_win32.cpp, engine/include/settlement/core/worker_pool.hpp, CMakeLists.txt. For Void check docs/plan/void-library.md and exact pin headers selected below.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Root owns checkout and branches. Separate system worktrees will isolate CMake/test changes; no new child agents.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S19 proposed bounded UTF-8 strict JSON manifest with namespaced IDs, schema+SemVer versions, definitions/references, dependencies, exclusive capabilities and recomputed per-package SHA256. A selected installed set is transitively resolved, duplicates/missing/range incompatibility/cycles/exclusive conflicts/unknown definitions rejected. Canonical encoding sorted by stable IDs plus exact SemVer incl build and digest frozen with a world/save/network. Reuse Void::Json::Strict, Semver, Algorithms graph and Crypto or report target blockers. Test actual input, deterministic permutation, malformed bounds, meaningful differences. S01 worker migration uses exact-pinned ThreadExecutor and FuturePool with overload retention, startup failure cleanup, draining accepted futures before captured locals unwind, reference and pressure tests plus measured useful work.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S16 proposal: single host dispatcher, trusted transport identity separate from payload, world/session/city/request identity, exact repeat receipt for same payload, conflicting replay/stale epoch has no effect; validation and mutation on owner thread. S01 timer runs fixed interval and publishes shared immutable completed state, live local/guest commands and read-only viewer no longer step/mutate an authoritative World from WM_TIMER. S15 validated candidate swap increments epoch even on rollback, bounded asynchronous immutable snapshot writing, atomic same-volume publication leaves previous data after failure. Rule selection persists + validated before live replacement. Existing sav13/LAN11 continue only by explicit compatibility surfaces.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
M01-P2 maps game code, M01-R2 verifies APIs: SemVer == ignores build so frozen identity uses exact version; Graph input ordering must be canonical. FileSystem atomic_write is unsupported on Windows: an upstream gap issue precedes local fallback. Root integrates M01 branches; public pushes separately authorized.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Consider also capturing mutable UI references/exceptions, pool draining and useful equality after queue pressure, concurrent load/save identity and stale worker results, bounded journal/receipt identity/windows old files. Identify native-only checks explicitly.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Prioritized READY or blockers for S19, S01 pool, and architecture for S01 runtime/S15/S16. 2. Concrete failure/ownership/test requirements and needed refinements. 3. Distinguish M01 goals from M09 public coop/1.0 packaging.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git diff 904bdf8 --stat; rg -n 'WM_TIMER|read_save|write_save|try_submit|worker_pool_|apply_command' engine app; consult actual upstream pinned StrictJson/Semver/Graph/Crypto/FuturePool public APIs and local source as needed. No writes or builds.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Send S19 and pool verdicts early; flag material decisions and applicability. No file edits, external actions, or child agents.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
The user authorized implementing the full plan with subagents, commits and pushes. Root retains integration and system approval.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F2 priority verdicts per package, actionable severity/location/contract fix, tests required, deferred compatibility/work. Do not review your own implementation.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Confirm the exact authority, failure and publication boundaries
|
||||
|
||||
Task ID: M01-F3
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m01-authoritative-simulation 8d2870a. M01-F2 identified four gaps. S01 pool and S19 running in separate worktrees. Upstream issues 3/4/5/6 are registered in Void/Library.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Verify the root's concrete decisions below close F2's open failure/identity/order points for starting S16 dispatcher, S15 writer and dependent runtime. Design review only.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Cover S16/s15 independent modules and next runtime ownership, preserved legacy behavior. No release or M09 network exposure.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read docs/agent-workflow/tasks/M01-F2.md, docs/plan/milestones/M01.md, S01/S15/S16, World::apply_command, worker submissions, app/viewer_win32.cpp legacy save/poll/queue cabin and LAN11.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Root owns decisions; no child or shared mutation.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S16 per active epoch: trusted transport passes known client slot separately from payload. World/session are nonnil Void UUIDs, city ID checked. Each authenticated client has monotonically contiguous request numbers starting at 1. Retain every completed result (including rejections) for the active epoch; reserve the record before mutating; check status/city/kind/entire payload equality. On capacity there is backpressure on NEW requests before effects, older cached receipts remain replayable, no eviction/reexecution. Requests behind missing/out-of-order and wrong epoch have distinct transient/nonmutating errors. Envelope ID maps to existing World next sequence only after validation, preserving legacy rejected-reusable sequence behavior. Clients choose new numbers for revised intents. Per-session ledger cap is configurable and explicit. Fresh session discards old history after successful replacement; old envelopes fenced.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S15 independent FIFO bounded single-writer service accepts materialization from a held immutable snapshot, serializes in background, bounded admission returns busy, Windows same-directory exclusive temp + write/flush/close + atomic publication; distinguish before/after visibility. Queue is serialized at admission across slots, so older same-slot save cannot finish after a newer one. Each completion identifies request/tick/epoch; latest UI state checks request ID. Shutdown drains accepted work. Input prepare/validate outside owner; replace only when matching expected old epoch and most recent load request. Corrupt/superseded load changes nothing.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
S01 runtime single simulation owner processes bounded requests also during pause and publishes an immutable independent World copy tagged with world, session, tick and publication revision including changes at the same tick. Stage tasks all drained before stack unwind. On ANY tick, command or snapshot preparation failure keep previous published snapshot and discard faulted mutable candidate; no success receipts are exposed for uncommitted changes. Runtime enters faulted and rejects saves/commands until an explicitly validated load restores coherent state under a fresh epoch. UI direct queue_cabin and LAN mutations route through owner; legacy wire stays separate. S19 immutable manifest part of checkpoint compatibility. Root owns interfaces.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Do not silently evict exact-repeat results or claim power-loss guarantees. Check constraints for denial of access or unsupported administrative features. Long-session journal storage beyond M01 replaceable bound documented. Root will record recovery outcome and tests.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return READY or scoped correction for S16 and S15 first, followed by runtime. 2. List exact stalled/failed operation behavior. 3. Identify remaining prospective tests in rollback, queue capacity, duplicate and concurrency scopes.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git show -s --format=%H, rg -n 'save_world_file|queue_cabin|World::apply_command|World::step' app engine, inspect referenced existing contracts; no runtime build needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No edits, branch changes, external writes, children or duplicate investigation. Send early if S16/S15 ready.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Full roadmap approved. Root requested this follow-up specifically to resolve M01-F2 before starting those packages.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F3 READY/CHANGES_REQUIRED per scope with any remaining actionable failures and tests; no edits.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Preflight the real Win32 client, file and LAN owner adapters
|
||||
|
||||
Task ID: M01-F4
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root a4cf99c contains all independently reviewed primitives. S01-04 implementation in /home/faumaray/Projects/stoneheart_at_home-worktrees/s01 at 2224299 awaiting review; public header and 10 tests exist. Planner M01-P2 and preflight F3 defined owner; current WM_TIMER still steps mutable world, saves synchronously and LAN11 poll writes directly.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Check precise adapter design for normal Win32 UI, asynchronous checkpoint files and existing two-slot LAN11, then give per-package green lights or bounded corrective requirements.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only M01 client wiring; existing public co-op compatibility and file use. No new public transport, encryption protocol or broad SDK. Existing S16 modern envelopes can be exercised with 2 internal clients; public network roadmap continues later.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect actual runtime public header + owner implementation in s01 checkout; viewer_win32.cpp WM_TIMER, start/stop/menus/new/load, local command reporters/blueprint rejection, title_screen; lan_session.hpp/.cpp protocol11 command/sequence/reconnect/send_snapshot, lan_wire; S15 checkpoint/save_service, initial rules catalog and document plan M01.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations, builds, shared Serena switches, branch/remote ops or children. Parent owns produced contracts and commits.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
File adapter (S15) uses one bounded Void background reader and approved SaveService (max_checkpoint_bytes). Caller obtains healthy published snapshot once; producer owns it and encodes on writer thread. Asynchronous load prepare from path/catalog only, with bounded bytes/check signatures, read one open file, legacy World::read_save migrates to new stable UUID/city+default rules; current envelope validates exact installed closure. Keep current 32x32 viewer dimension gate outside generic codec and validate before install. Futures retain immutable data, no background Win32 calls or raw runtime/viewer pointers. Shutdown drains. UI binds a runtime LoadTicket to each admitted load and rejects stale completions by epoch+latest request; report latest save/load per UI slot/request and older save completions must not overwrite newer status.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
LAN11 adapter (S16) keep existing poll(World&) entry/test; add preferred asynchronous host path driven by SimulationRuntime and a guest-only poll requiring no mutable authority. Maintain same exact frames/signature/2 trusted slots. Check authenticated wire request. Legacy numeration is World::next_command_sequence and ordinary domain rejections leave it live, while new envelopes use runtime published next_requests per slot including rejections. Compare incoming wire seq and use authenticated guest slot, serialize per-peer in-flight command so no stale snapshot mapping/multiple executions; return receipt only after committed outcome, current correct next wire sequence. Disconnect/generation/guest changes discard pending network completions without moving effects into new session. Never block network/UI waiting for owner. Exclude new public endpoint. Add verified real host/guest loopback via async path including wrong sequence, rejection and subsequent corrected same old number, reconnect. Keep original fixtures/binary interoperability.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Viewer milestone adapter: one shared_ptr<const World> consistent view (hold for entire frame including nested messages), one SimulationRuntime for offline/host. Guest consumes incoming const views only, transient old host connection fenced. WM_TIMER polls completions/views/network rather than advancing world. New colony/reset creates valid UUID+selected default-compatible manifest; expose real choice where alternative installed packages materially alter game creation (no cosmetic selector). Existing host authority/pause/title/file-dialog gating via set_ticking independent of World::paused; retries when Busy and don't flood queue. Local mutations incl legacy cabin route through runtime. UI needs acknowledged result before applying accepted-only changes; queue/futures and pending metadata reinsert blueprint or report typed rejection, FIFO contiguous modern IDs, handled Busy/OutOfOrder; snapshots can lag while multiple local inputs are pending. Ensure reads and command submission never block on a long tick. Keep modern save normal UI path; legacy saves still load deliberately.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Pay particular attention to Win32 reentrancy, old futures crossing reset/load, modal pickers, latest load after failed reading vs superseded earlier good, rollover UI state if save job from old session finishes, in-flight bounds and trusted peer rebind. A non-default rules subset must be truly compatible with hard-coded prototype game until more rule-driven mechanics land. Avoid accepting incompatible content silently or rejecting legacy corrected retries.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per file adapter, LAN and UI. 2. Concrete interface+tests for each, required handoff order and where existing code enforces assumptions. 3. Clarify what is safe to dispatch immediately and any consequence requiring product choices.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git status --short --branch, scoped rg -n 'WM_TIMER|world->step|handle_save_menu|submit_command|queue_cabin|handle_host|poll\(' app, read targeted actual source. No builds needed. Existing combined 82 core+4 LAN, S01-04 adds ten. Current CLI old baseline cross-version harness /tmp/stoneheart-verify.KoZwE4o8/interop.cpp.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No edits, external actions or other agents; no extension to public LAN protocol or unwanted UI. Report any ambiguous scope to parent rather than blocking independent file service.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestones, prior planner/preflight resolved ownership; this concerns concrete client integration choices within M01. Parent handles branches and git operations.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F4 verdict per package, exact corrections and compatibility tests, optional future distinction where implementation depends on another unbuilt seam.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Recheck concrete client and peer lifecycle contracts
|
||||
|
||||
Task ID: M01-F5
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Main at 512c9ef, previous F4 approved S15 and identified two LAN and three UI gates. Revisions are in /home/faumaray/Projects/stoneheart_at_home-worktrees/{s16,s18}/docs/agent-workflow/tasks/{S16-02,S18-01}.md. Runtime header is integrated; CheckpointFiles header is real in s15.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Check added conditions against F4 findings for early per-package approval before implementation.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only recheck of contract adequacy, no review of future LAN/UI implementation. S15 already implementing.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read two task documents, M01-F4, normal Win32 title/timer/guest reset and LAN drop_peer lifecycle and actual runtime/CheckpointFiles headers. Match earlier evidence.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote requests/Git actions/children.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Verify LAN default-only manifest gate, epoch reconnect, independent receipt tracking across peer turnover, legacy next sequence vs modern committed id and nonblocking completions. Verify viewer completion pump precedes all title returns, no old runtime joins blocking reset/new/join, one writer, receipt-driven bounded one-in-flight queue and profile guard, load supersession and safe guest/offline transition.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Review exact contract not summaries. Flag any missing precondition or undefined API behavior that prevents a worker from safely implementing a nonblocking compatible host/client.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
F4 read-only reviewer pre-existing; parent will perform integration after independent implementation. Root ensures reviewed sibling dependencies available to S18.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Watch stale future from disconnected client, latest failed load, modal reentrancy, old/new slot file ordering and unsupported manifest advertising. Genuine alternative module selection and texture/keyboard features are independently scheduled.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/targeted correction per S16/S18. 2. Bound any remaining actual gap and verification needed. 3. No implied release or approval to merge remotely.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Read actual tasks including ownership, tests and stop gates and inspect relevant source from F4. git show 512c9ef --stat optional; no build required.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read only. Return LAN early if adequately scoped. Stop only for a material remaining omission.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Root requests this F4 follow-up after exact corrections and user has authorized roadmap. No remote writes.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F5 S16 and S18 READY/CHANGES_REQUIRED with evidence and residual concrete runtime/native checks.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Recheck production identity safety and preflight a selectable colony rule
|
||||
|
||||
Task ID: M01-F6
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root at 60154bd. S04-01 contract in s04 checkout (4ba64f7) includes the two M01-V9 findings. In S19 M01-P4 examines new world profile selection reusing existing simple vs staged bed paths. Default built-in manifest content must remain compatible.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Immediately recheck S04 exact guards and, separately, preflight the first selectable rules behavior with a validated default/legacy compatibility policy. No actual code review or implementation.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only S04-01 revised contract and S19 feature preflight. Exclude further stack/transfer/production implementation.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect s04/docs/agent-workflow/tasks/S04-01.md sections 6–10 and World::edit_object/CommandDispatcher::apply. For S19 read M01-P4, world.cpp bed construction, legacy codec/staged flag, generator/first_colony, rules_manifest, runtime/file/load and default-only LAN contracts. Implementation worktrees outside main have direct read evidence.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote writes/branch ops/children or shared Serena activation. Other workers continue on their own files.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S04 confirm hypothetical exhaustion guards precompute post-demolition totals exactly across all affected supplies before erasing or queue changes, preserve accepted receipt semantics for proved cabin preflight Busy separately from mutation faults. Genuine v1/body1–13 and current2/14 mapping, negative checks and older file test version. Send scoped approval immediately if corrected.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S19 proposal: compiled default first-colony behavior stays staged recipes and two-package original frozen manifest, content digest unchanged; optional exact pinned, additive package selects existing simple/plank recipe path at world creation. Encode enacted policy in World at initialization, existing staged_beds state and manifest saved, normal creation can choose default/alternative. Add game-specific supported profile compiler using actual typed data and package closure; reject unsupported modified digest before installation by viewer, generic resolver/decoder retains broad catalog tools behavior. Important: previous v1 checkpoints and imported historical worlds could legitimately carry DEFAULT manifest with staged_beds=false, and inactive world is valid. Describe migration rule that preserves these old states/bytes; distinguish strict alternate invariant from accepted old default data, and verify clean subsequent saves on current envelope. Future S19/UI APIs and compatibility choices from M01-P4 confirmed by root prior to implementation.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
S04 and S19 can use isolated branches; parent serializes shared World/factory/file semantics and S18 normal UI selector after core approval. Keep legacy LAN default-profile-only and preserve old default digest/test fixtures. Do not equate illustrative board ticks=8 with actual compiled tick count.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check nonempty real colony resources/producer/receipt for both bed paths, UI stone vs wood selection, immutable held snapshot and save-load continuation, partial bed materials, old format 1–13 valid imports, malformed optional profile/default unknown package gate, credible negative tests. No fabricated ACE parity.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate S04 corrected or material outstanding. 2. S19 preflight verdict with explicit compatibility and required exact negative/normal tests. 3. Record what can proceed with certainty and facts needing further root commitment.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Read actual source/contract targets and M01-P4; compare default manifests/code and World legacy flags; no build required. Check git status/refs to identify exact code.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read only. Return S04 verdict immediately then S19. No new external service or changes to accepted user scope.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Root requests follow-up after exact S04 corrections and planner-backed S19 technical preflight. User authorizes signed-off coding only through root.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F6 two scoped verdicts with evidence, precise blockers/solutions and pending real integration tests.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Check the contract for atomic reserved pickups and client rule selection
|
||||
|
||||
Task ID: M01-F7
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
M01 parent 9a248c3 has S19-02 compiled profile and S06-ID data. S04-01 adds production identities and body14 in isolated s04. S18-01 canonical client still in isolated s18 resolving modal input findings. M01-P5 proposed a bounded reserved-quantity pickup used by actual meal and construction stops.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Preflight the first S06 quantity transaction and bounded S18 followup that wires approved profile to the New/Load/Host UI. Return separate actionable corrections before component implementation.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
The S06 step preflights a single existing storage→resident pickup atomically, including all materials at one construction stop. Later stack identity, cancel, site ownership and replay ledger remain P5-dependent. S18 selection is only New colony and coherent support/legacy compatibility; no new game settings or traffic.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read root world.hpp, world.cpp functions finish_meal_step/advance_construction_delivery/take_reserved_material/finish_production, profile public API/first_colony/tests, s04 working diff and actual s18 viewer_session/viewer_win32/title_screen, LAN default gate, docs S04/S06/S18/S19 and M01-F6.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posts/other agents or Serena switch. Root decides subsequent contracts and serializes worktrees/CMake changes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S06 proposed NEW internal bounded reserved pickup with one validated StorageId per operation, max item_type_count distinct items (all lines at stop aggregated before any mutation), reject zero/None/unknown ID, reserved>physical, insufficient reserved/quantity or target sum overflow using Void::Numeric; commit all source counts/reserve/zero-stack removal/destination changes without further allocation or throwable effects. Success keeps meal, route cursor, order/worker behavior and v13 projection/corpora unchanged. Failure immediately leaves source+inventory and stop/actor bookkeeping unchanged; impossible invariant failure may fault owner while preserving last healthy publication. Existing non-pickup recipe paths must be accounted for. Identify any missing edge or side effect.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S18 followup proposed initial selector defaults staged, allows existing alternative single plank profile in title New, Continue/Open ignores current selection; factory+validator before runtime construct and after latest load prepared, preserve exact default old simple/inactive, refuse forged/extra or optional staged, both immediate and deferred legacy-host gates require exact default, failed admission leaves world/guest unchanged. Rename/conditionally hide staged base UI choices in plank-only worlds; confirm existing placement validation behavior. Verify title keyboard/mouse handling and no accidental persisted settings.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Depends on S19-02 and S18-01 review, S06-02 first consumer should merge after S04-01 with tests and version untouched. Root will own separate follow-up schema migration and M01-P5 final decisions; legacy cancellation compatibility remains.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check non-throwing commit including vector erase/multi-type and destination Inventory bounds, zeros/duplicates, capacity reserve for carpentry and any work cursor mutation. Check modal callbacks/error feedback, unsupported profiles advertised to LAN, save/restore exact active legacy mode.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per contract before dispatch. 2. Concrete trigger and correction for any inconsistency. 3. Exact tests that would fail on a partial batch and incorrect selection or post-load gate. The stages do not approve future implementation.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Read-only git status/rev-parse at each worktree, scoped rg and direct source/graph coverage. Inspect /tmp/stoneheart-milestones.xprJ2SVp/profile-{tag,ctest}.log and existing client-session/GUI smoke source if needed. No new builds.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No new general inventory database, domain mechanics or UI expansion, no duplicate library issues. Report prerequisites immediately; defer review of actual changes until implemented. No charges/remote operations.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestones, including stable single-owner items, selectable new rules, per-branch publishing and generic Void issues. Root retains mutation authority.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F7 PREFLIGHT disposition for S06 and S18 separately; exact invariants/tests and any blocking oversight backed by existing source.
|
||||
|
||||
Preflight required the pickup owner to validate the post-withdrawal occupancy and the carpentry output slot together, aggregate repeated lines, and preserve the state at pickup entry on rejection. Direct storage-to-recipe conversion keeps its own path. For profile selection, deny starting a legacy host while a replacement is pending, recheck after a modal menu, then check the installed authoritative default manifest immediately before either host call. The simple-bed house preview must describe the actual one-plank recipe for every house type.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Preflight durable custody, legacy projections and replay limits
|
||||
|
||||
Task ID: M01-F8
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root e6a01be includes production IDs, current14/outer2, compiled profiles and verified initial viewer. Quantity batch now ready in isolated s06 at a8cd7bb + changes. Detailed operational proposal from M01-P5 in NEW docs/plan/custody.md. This prescreen concerns the next persistent state model, not approval of implementation.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Examine the complete proposed data/operation/migration contract and find contradictions before assigning parallel core/codec/command owners. Provide first specific corrections quickly and feasible independent interfaces.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S06/S04 custody, bounded receipts, migration from raw1–14, v15/outer3, cancel and LAN legacy projection. Existing numeric/ID tickets #7/#8, duplicate support and preflight-before-mutation apply. No new gameplay or schema publishing yet.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read root docs/plan/custody.md, tasks M01-P5/F6/F7, world.hpp, world.cpp, world_save.cpp (codecs, route/phase validation, old limits), checkpoint*, command_dispatcher*, simulation_runtime, actual app/lan_session_win32.cpp legacy publication and viewer costs; s06 new transaction source/consumers. Check existing fixtures and acceptance corpus.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posts/other agents or Serena switch. Root owns public actions and serializes source. Look at actual code, modern replay and schema context, consulting direct worktree sources for S06.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Check embedded unique stack identities, split/merge and reservation movement, checked monotonic world counters and batch preflight, one owner including production input, exact custody for resources, all recipes, grants, meals, canceled work and demolition, capacity claim backed by claimed input, no double-used space. Verify same-type lines and multiple source warehouses vs number-of-item-types limit; coordinate strict modern validation with real legacy accepted data. Specify robust migration for Working site, completed orders still carrying outputs without inventing supplies, raw import opening balance and modern projection of unrepresentable payloads.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Admitted execution TransferId with ordinal, retained exact input+result 4096 entries <=1KiB each part, remaining earlier ordinals stale forever under high-water; root accepts schema15/outer3, checked before-effect refusal vs stored admitted rejection. Establish how an exact retry of *creation/admission itself* is recognized across crashes if caller has not yet been given a TransferId; when legitimate repeated blocked work consumes ordinals; persisted capacity/hash checks, session/world identity during timeline rollback and monitor snapshot cost.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Core/registry implementation may be parallel with fixtures/validator/serializers only after exact public/internal data shapes agreed. Recommend useful checkpoints and ownership for S06 main data, S04 ledger/cancel and S16 unsupported legacy state. Normal v13/LAN11 baseline must match; unsafe-fallback exception must be caught before session UI/network effects, preserving live host. Choose measurable memory/latency acceptance.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Watch O(N²) owner+claim search, cross-transaction side effects after allocations fail, receipts shallow copies shared mutable in published snapshots, reparent/merge alias lifetime, callable external mutation through current prototype Inventory/Storage APIs, new IDs exhausted during split/recovery. Inspect resource-harvesting branch and raw1-8 sleep import logic. Legacy loader may accept snapshots with unused/trailing projected route metadata; avoid pathological blanket rejection of genuine saves.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED plus specific contract amendments. 2. Bound request/replay/IDs and failure atomicity at ordinary world hot paths. 3. Identify data-shape necessities for accurate P5 legacy import and modern pollution rejection. 4. Specify earliest branch-safe real end-to-end migration stage. 5. Name concrete validation tests that catch each risk.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Read-only git status/rev-parse, graph search/trace and coverage for cited root paths, direct missed ranges. Check core/profile/production/identity/construction tests and raw serializer fields; no builds necessary. Existing logs in /tmp/stoneheart-milestones.xprJ2SVp.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No new generic public dependency/remote issue unless actual gap separate from #7/#8 is identified; root handles filings. Stop to report actual contradictions, keep analyzing independent parts. Do not review or edit the code of another upcoming assignment.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete implementation; root accepted pre-admission vs admitted rejection accounting, modern CancelProduction by durable ID, raw13 UnsupportedLegacyState and retained exact 4096 receipts, immutable stacks with a single quantity source, and input-backed capacity claims, subject to technical feasibility.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F8 PREFLIGHT verdict, concise exact corrections, schema and ownership constraints, regression fixtures and performance risks.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Preflight independent renderer frames and deterministic completion replay
|
||||
|
||||
Task ID: M01-F9
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root M01 66af7c5 includes client b7f18c0, current14, S06 atomic pickup. M01-P6 planner inspected current Win32/worker paths. Actual WM_TIMER pumps every 60 ms, scene packets borrow spans and camera-only paint rebuilds flat D3D mesh, while 20 Hz runtime is independent. Replay covers serial/2/6/12 and last berry but lacks proof of opposing real computation completion and semantic divergence diagnostics.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Preflight M01-P6 proposals for S17-W01 and S21-W01 before assigning separate implementation worktrees. Return separate corrections and concrete signoff conditions.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
S17 independent presentation with one retained prepared flat mesh and 16ms dirty-only visible UI timer; S21 success observer for real worker callables plus deterministic arbitration/barrier/replay reporting. No M02 voxel geometry, native 60fps claim or GPU/backend replacement.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read root app/viewer_win32.cpp, app/d3d_scene_win32.hpp/.cpp, viewer_session, app timer/lifecycle, tests/replay_tests.cpp/executor_tests.cpp/runtime_tests.cpp, engine/include/settlement/core/worker_pool.hpp, engine/src/world.cpp actual stage spans and quota; docs S17/S21/M01, M01-P6 and pinned FuturePool/Testing. Inspect temporary actual client handler smoke.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posts/other agents or Serena switch. Root assigns separate S17/S21 branches, and S18 owns ongoing title changes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S17 verify packet owns world/camera/selection/overlay and prepared GUI inputs, UI-thread resource ownership, post-replacement pairing after pump consumes event, immutable pin across nested UI; D3D reuses existing flat GPU/CPU mesh for camera-only changes, avoid per-timer reallocation/hot spinning, hidden/title/minimized and zero-size restoration. Real actual handler test needs camera and render changes while owner/file blocked, safe destruction; respect existing WARP/offscreen/hardware capabilities and fallback HUD only.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S21 optional after_execute(index) on success after real callable returns, before future satisfaction; return void/value/references/move-only, same-callable exceptions including observer errors, no throwing destructor, no hook when absent. Existing Void #15 registered. Two gates for two known competitors, controlled opposing completions asserted; tests 2/6/12 + capacity1 fallback without deadlock; real generic job contest parallel, berry claim serial with parallel movement separately. Report object/field/owner/request for first divergence using public World and canonical current serializer as authority; gated old world vs queued same-world reload with fresh session and unchanged old snapshots.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
S17 rendering work in new branch separate from S18 title/profile; avoid altering normal client command pumps. S21 production edit restricted to optional worker hook and tests/docs, no world mutation/codec changes. Future body15 normalize version selector after integration.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check exception lifetimes, reference dangling/extra move, re-entrance or UI init/failure, force order while caller coordinator blocked, guarantee test oracle actually observes completion, full terminal effects after faults/cancel. Potential thread-lifetime hang on assertion; GPU device generation invalidates cached upload after reset. Check path/store version key for camera-only frames and active overlay state.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per component. 2. Concrete prescreen decisions, testable postconditions and residual limitations. 3. Meaningful assignment in each isolated subsystem without changing the product contract.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use source read and graph search/trace/coverage plus direct ranges; inspect actual m01-viewer-{build,ctest,ui-smoke}.log and client_handlers_smoke.cpp. No builds.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Send prescreen first safe scope early. No apparent missing generic capability needs a duplicate issue; root filed Void/Library #15, immutable publication uses #5. Do not review unseen code or demand native-only validation for feasible Wine work.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete roadmap branches and tests; root accepts dirty-only 16ms timer, one retained flat mesh generation, optional success observation and semantic diagnostics subordinate to canonical bytes, subject to technical preflight.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-F9 PREFLIGHT stage-specific verdict, corrections, exact test cases/source, bounded risks and practical blockers.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Map the authoritative runtime and dependent system branches
|
||||
|
||||
Task ID: M01-P2
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m01-authoritative-simulation at M00 904bdf8, M01-C/T in progress. User extended the goal to the full plan with commits, pushes and separate milestone/system branches. Pin 7b0fea6, Windows GCC16.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Design the next integrated M01 implementation after the deterministic reference. Give concrete separable packages, frozen APIs, branch order and runnable acceptance for S01, S15, S16, S19 and the viewer.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only plan for M01 and prospective compatibility seam for M02. No new product discovery; the approved roadmap controls. Do not replan existing serial/replay task.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect PLAN.md, M01/M02, S01/S15/S16/S19 and S04/S06 contracts, world.hpp/world.cpp/world_save.cpp, app/viewer_win32.cpp, app/lan_session.hpp and _win32.cpp, CMakeLists.txt and current tests incl LAN. Check actual world mutators, UI direct writes, reload/command cache hazard and exposed stores/indices.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Shared checkout; root owns branches/builds. Do not modify files or activate a different project.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Indicate exact integration for a single-owner fixed-tick runtime publishing immutable snapshots; atomic candidate load/epoch rejection; versioned, city-scoped idempotent command results/authentication; rules manifest dependency validation/fingerprints; permanent ID and custody path. Preserve old format13/protocol11 with an explicit compatibility boundary for existing programs. Propose deliverable slices which independently add executable tested features.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Name specific NEW types and responsibilities separate from observed ones. Explain host identity, dedup key, conflicts with stale packets, pending versus committed epoch, queue bounds and failed save/load. Suggest a no-duplicate-serialization path, CPU cost/50ms budget and API for existing viewer reads.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Researcher separately investigates Void/primitives. Root authorizes scope, owns CMake integration, cross-system compatibility and push. One branch per milestone or system package fits the added user direction. New worktrees may be used for independent systems.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Call out deadlocks, stale load/worker results, snapshot lifetime, partially applied ticks, time spent in rendering, current hardcoded two slots and generator/script state. Keep more ambitious M09 features on M09.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Source-grounded M01 package graph and first precise interfaces usable for concurrent implementation. 2. Boundaries for each acceptance criterion including existing gameplay/legacy callers. 3. Concrete, short next package to dispatch plus integration strategy.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git status --short --branch, git diff 904bdf8 --stat; rg -n 'WM_TIMER|world->step|world->apply_command|read_save|write_save|lan.poll' app engine; use scoped graph with coverage/direct checks for cited source. Existing integrated check is CMake + CTest Windows on Wine. No remote writes.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Send first independent work packages early when ready. Stop if evidence requires a product decision; keep useful read-only work going. Do not spawn.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User explicitly requested the full plan, local commits, remote pushes and occasional status. This assignment is planning only.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-P2 READY/PARTIAL, package DAG, file boundaries and frozen API, behavior/risk/test matrix, what can ship first and which assumptions need owner confirmation.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Map durable item custody and stable entity references into the running game
|
||||
|
||||
Task ID: M01-P3
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
The integrated M01 branch /home/faumaray/Projects/stoneheart_at_home is at cf0cc2f. S01-03 groups logical state in a private WorldState in s01 worktree. S15-02 introduces a versioned modern checkpoint around validated legacy body and exact rules. S16-01 scopes command receipts to session. User's next gameplay requirement in M01.2 is stable IDs and conservation.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Specify an executable incremental implementation plan for M01 stable IDs/ownership through actual current game actions (production, resource haul, construction, inventory, demolish). Identify the first narrow end-to-end migration that can be dispatched immediately.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only S04/S06 and checkpoint/world integration architecture; distinguish current IDs from index-based fields and later M03 capabilities. No redesign of the whole roadmap, mod SDK, region/world geometry or unrequested product choices.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect world.hpp, world.cpp, world_save.cpp, first_colony.cpp, viewer_win32.cpp, app/d3d_scene_win32.cpp/tests, plan S04/S06, M01 and M03. Inspect s01 capture worktree actual logical representation and detached checkpoint checkout. In pinned Void inspect public IDs/typed handles/registry if relevant and cross-check already documented matrix.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations, branches, external requests or children. Parent owns root task notes and Git. Do not change shared Serena project.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Map introduction, assignment, transport, consumption, split/merge, cancel/delete, HUD, serialization and load validation by actual symbols. Plan monotonic counters never reused, ownership and transitions, stable typed references with bounded lookup and ordered arbitration. If legacy format13 must keep indices on the wire, convert at codec compatibility boundary, ensuring legacy snapshots can import deterministic IDs; modern checkpoints must encode actual counters and identities so rollback/mutations never reassign values. Identify exact compatibility mode for changing demolish behavior, preserve existing tests where game design allows. Avoid double representations that can silently diverge/lose inventories.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Specify NEW API and fields only after source check. Cover existing WorkJob.id, Agent.id, ResourceNode.id, Storage.id, ProductionOrder, MaterialReservation, ConstructionStop, ItemStack and private AgentInventory. Give ownership and migration sequencing for WorldState, routes, input/output codec, renderer, tests, and branches S04 vs S06. Recommend whether durable ID fields are domain-local or reusable generic Void capability needing issue; no remote writes.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Dependencies S01 snapshot/dispatcher/S15 versioned checkpoint. Root owns integration order. Send first safe independent task early with exact symbols, lossless old-wire export boundary and hard tests before broad changes. Multi-branch CMake/World ownership must be serialised.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check nonempty demolished storage (currently erases stored items), active reservations/held goods, room/floor target, duplicate/dangling IDs, counterfeit aggregate counters, overflow and million-record malicious saves. No behavior changes to LAN11 or wrong acceptance claims. Keep authoritative reconciliation deterministic for serial/parallel.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Source-grounded table of stable vs positional identifiers and mutation sites. 2. First executable slice with narrowly owned files and disambiguated compatibility. 3. Subsequent DAG solves M01 reference/custody exit, tests after mid-carry load/cancel and ledger conservation. 4. Name any actual product decision needed, or bounded technical recommendation.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git status --short --branch, git show -s --format=%H, rg -n 'shift_index|reserved_slots|construction_delivery|MaterialReservation|production_index|stock_storage|finish_production' engine app tests; inspect actual pinned headers, current serializer/acceptance fixtures and exact removal semantics. No build needed for read-only planner.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No source/code modifications, deployment or tool state changes. Stop if pinned source unavailable or a consequential design decision is truly user-owned. Return useful independent conclusions immediately.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved entire plan and requested subagents. Root assigns this dependent architecture work within M01. F3 authority and failure decisions remain in force. Does not authorize a new public protocol/dependency or branch push by agent.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-P3 READY/PARTIAL, concise path/behavior, implementation contracts, ordering, tests, upstream fit, unresolved facts. No children.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Map the first selectable rules to existing game behavior
|
||||
|
||||
Task ID: M01-P4
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Main 4ba64f7 has frozen rules manifests, checkpoint v1, Window-independent runtime. S18 initial UI preflight correctly permits only actually supported profiles. Present World::start_scenario hardcodes staged_beds_=true, while saved legacy worlds and recipes/game commands contain both staged and simple/plank bed behavior. Builtin colony manifest has a board work_ticks field (8) different from compiled SawPlank (12), so treating that as activated configuration would change prototype behavior.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Produce a narrow verified implementation proposal for M01 real module selection/new game/load, with an actual deterministic gameplay difference and unchanged default trajectory. Assess existing simple vs staged bed paths as the first selectable feature.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only S19 technical/product-fit plan for first actual setting, default compatibility and existing explicit script-state contract for M01. Keep new Lua runtime, complete mods SDK and public cooperations in planned later scopes.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect rules_manifest.{hpp,cpp}, world.{hpp,cpp}, world_save.cpp, first_colony.cpp, checkpoint.hpp/.cpp, checkpoint_files.cpp, simulation_runtime.cpp, actual title_screen_win32.hpp and viewer handlers, S19 W01–W03, master/parity/prototype fixture. Review test constructions of old v1/v2/current bed states, frozen digest fixture and handoff from S18.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote access or child agents. Parent owns root decisions and eventual branch contracts; keep shared Serena activation fixed.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Trace actual recipe/placement/material/progress behaviors under World::staged_beds() false/true, inputs/stock and ability to complete both. Propose a valid optional built-in rule package with explicit behavior and data (for example opt-in classic recipe always uses simple plank). Keep frozen default 2-package digest, current normal make_first_colony behavior and v1–13 imports. Give validation path from chosen catalog → Resolved actual game options → world initialization and saved rules → preinstall compatibility. Avoid merely switching labels/fingerprints without changing executed mechanics. Do not equate any early option with complete ACE parity.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Propose frozen NEW C++ APIs and file/branch ownership. Handle old scenario saves with staged_beds=false and legacy imported default manifest, custom unsupported manifests in generic readers vs retained exact viewer profile gate, default-only LAN11, authoritative rules invariant on loads, real user setting at new colony in existing Windows title flow. Identify any compatibility ambiguity requiring product decision. S04 changes raw body/current checkpoint in parallel; coordinate ownership and versioned format boundaries.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Dependencies S19 owns package/factory behavior; S18 UI can wire selector when accessor/factory verified; S15 owns generic file prepare, S01/S16 already identity/legacy gates. Keep selectable integer state/atomic script results on M01 contract only unless actual milestone requires executing Lua now. Use existing Void facilities, flag genuinely missing upstream primitive without externally filing.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Risks default digest change, explicit legacy import with previously valid raw data, failing to reflect actual selected mechanics after reload, stale display code assuming staged beds, repeated loading/selection under same world seed. Need exact tests for active-world refusal on incompatible compiled profile, variant supply/bed completion, replay and v1/cross-binary.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Source-grounded selected pair or better alternative with clear real effects, no cosmetic difference. 2. First implementable core task and limited follow-up UI integration. 3. Testable legacy/frozen/unchecked-catalog/canonical behavior and precise pending script contract. 4. Name any real product decisions.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git rev-parse HEAD; rg -n 'staged_beds_|start_scenario|make_first_colony|BedStage|default_rules_manifest|builtin_rule_packages' engine app tests; inspect actual pinned API when relied on. No build needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Send first viable technical criteria early. No refactoring, remote writes, branch changes or children. If simple-bed feature is invalid by plan/source, identify a valid alternative with direct evidence instead of forcing it.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete roadmap and rules selection is explicit M01 deliverable; this design reuses existing gameplay/boundaries. Root retains scope and integration choices.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-P4 READY/PARTIAL, actual source references, bounded interface/ownership design, exact verification targets, integration risks/native gaps.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Specify the first authoritative inventory and transfer operations
|
||||
|
||||
Task ID: M01-P5
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root M01 2a5df1a. S06 IDs 8260e09 are integrated. The developing S04-01 converts production orders/agent links to ProductionId, current save body14/outer2 and typed legacy import. Previous M01-P3 mapped object domains, but actual quantities still live in storage/resident representations and construction drops cargo on arrival. This is the detailed technical handoff for M01.2.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Freeze a small end-to-end migration for S06-02 and S04-02 with exact authoritative ownership, identity allocation, operations and backward projection. Suggest genuinely independent implementation segments that can be dispatched before large World edits.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Focus on objects/recipes already present, order-reservations/haul/consumption/cancel/demolition, no new gameplay, extra protocols, catalog or general database. Domain-level transfer retry/retention must have explicit bounds.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read root docs/plan/systems/{S04,S06}.md, M01, M01-P3, engine/include/settlement/core/world.hpp and actual Inventory/Storage definitions, engine/src/world{,_save}.cpp plus tests for logistics/production/replay and resource/food handling. Inspect s04 worktree public diff for actual ProductionId and NEW current14 schema; never modify it. Review pinned Void Numeric, upstream #7/#8 linked in docs/plan/void-library.md.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posting, shared project switches or children. Parent owns root/remote and serializes World/codec ownership. Work from actual source and verified graph coverage.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Trace every quantity introduction, split/move, take_reserved_material, pickup, in-transit cancellation, construction worksite arrival/delivery, consumption, eating, storage demolition and factory stock. Identify minimum source of truth. Design checked before-effect atomic operations, stable nonzero StackId by world, one current owner per stack, explicit material balance opening/sink, exact held amounts, and reliable projection to old fields. Avoid persisting parallel quantity ledgers without enforced consistency. Characterize active/inactive imported orders to preserve v1–14 continuation, including mid-site delivery. Product keeps pre-existing demolition's removal of stock and records its amount/reason.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Give exact proposed NEW operation types, identities/high-water constraints, on-disk version steps, and API surfaces for S04 claims vs S06 actual stock. Pin behavior on outcomes AlreadyApplied/Duplicate/Conflict/Busy and stale retries even after bounded receipt retention and save/load, deterministic order vs multi-actor concurrency. Name genuine policy questions; choose bounded defaults for reversible design.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
An independently testable ledger module before World integration may be parallel if it has a real consuming path and fixed grounded seam. S04-01 must integrate first for worksite references, and S19 touches only scenario setup. Summarize actual changes needed in UI for preserving displayed amounts.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Bound memory by current existing file/collection capacities, handle zero and uint64/int quantity overflow, reserve IDs without partial mutation including splits/exhaustion, owner removal after pickup, no-free-space redirects, capacity races, negative/cross-owner dangling state, and loaded modern wrong digest. Avoid quadratic hot paths; identify realistic measurement checks.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Source-grounded transition and migration tables; 2. First independently deliverable task with exact scope and tests that leads to real stock; 3. Subsequent isolated work packages with complete modern migration path; 4. Leverage correct Void utilities and #7/#8 where adequate; 5. Declare present limits in legacy raw13/network11 projection.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git rev-parse HEAD, actual scoped rg -n on add_item, take_reserved_material, advance_construction_delivery, finish_production, reserved_slots, item inventory and stock, scoped current/load/save comparisons, local Void pin as needed. Check graph identity/coverage for relied-on root code; isolated s04 working diff uses direct reads. No compilation required.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Send first technical seam early, then full report. Do not assign new IDs by vector position, silently destroy cargo on cancel, break legacy binary projections or start new worktrees/remote Git. If uncertainty materially changes the product scope, identify the specific branch and continue other evidence.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Approved M01 hard requirements and earlier planner M01-P3 permit this focused design of actual custody. Root decides integration order and product-preserving defaults. No release or merge to main.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-P5 READY/PARTIAL, exact grounded operations and claimed invariants, owners/paths, test and version matrix, bounded retention/performance policy plus actionable blockers only.
|
||||
|
||||
The accepted decisions and historical format boundaries are recorded in [the custody contract](../../plan/custody.md). Source-backed corrections from preflight address creation retries, retained site stages, pending completion and representability on LAN 11.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Define the remaining client frame and replay acceptance work
|
||||
|
||||
Task ID: M01-P6
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root db0a872 merges S18 b7f18c0, S19 selectable rules, S04 Current14, S01 owner and legacy LAN. Actual client WM_TIMER pumps every 60 ms while camera input can invalidate on demand and scene Present uses 0. Existing replay on serial and 2/6/12, last meal, synchronous structural barriers and faulted owner recovery pass. M01 needs independent client frames and an evidenced worker completion-order adversary/first divergent IDs.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Prepare two independent real work packages for S17-W01 render frame delivery and S21-W01 deterministic replay diagnostics. Identify acceptance already satisfied vs missing. Recommend minimal source-grounded additions that can proceed alongside full S06/S04 custody.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
No implementation, new M02 terrain, mesh engine overhaul, native performance claims, general benchmark infrastructure or speculative production hooks. Preserve S18 title/rules changes and S06 current schema.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read docs/plan/milestones/M01.md, systems/S01,S17,S21; app/viewer_win32.cpp pump_session/scene/view/HUD/camera/modal/WM_PAINT/WM_TIMER, app/d3d_scene_win32.* and public draw interface, existing client_* smoke and tests; engine worker_pool/world scheduling/hooks, runtime/dispatcher, tests/replay_tests.cpp/executor_tests.cpp/runtime_tests.cpp, benchmarks as pertinent.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote/children or Serena switch. Root plans separate branches, S18 owns title and profile logic, S06/S04 own inventory world paths. Use current root graph only after coverage check and read missed lines.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S17 identify how to prepare/pin immutable frame data once, main+child/software/D3D and nested UI callbacks, decouple scene refresh from event/network pump and authoritative 50 ms tick, avoid busy loop/rebuilding expensive static geometry solely for unchanged state, camera movement during gated world and file work. Match existing Win32 design and keep title/minimize/pause behavior; future D3D chunk cache is M02. State how real harness could assert camera changed and original tick stayed fixed without treating Wine fps as native.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S21 locate how last-item/resource arbitration relates to actual parallel batches and stable tie order. Design test/harness that PROVES opposing order of completed tasks (not just ordering hook starts/sleeps) for an actual contested outcome and canonical state. If after callback needed, preserve WorkerPool completion/exception/move-only behavior and use least invasive grounded seam. Check stale results after load owner barrier, real two client idempotent and save+camera. Recommend first-divergent tick/ID (inventory/actor/job/command) reporting and repeatable command entry/tag. Avoid duplicated serializers that drift; existing current14 soon current15. Derive calls/files from source.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Align S17 renderer-owned files vs S18 title/client profiles and CMake/worker code ownership. S21 can adapt test golden canonical encoding immediately independent of future custody, document which invariants extend after body15. Flag any truly missing generic primitive and check pinned Void facilities before suggesting upstream issue.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check UI timers/window events after destroyed, minimized/hidden, modal subloops and GPU resource lifecycle/race. Race tests deterministic using bounded waits and release cleanup even on assertion. Never rely on exact Wine wall scheduling or declare physical 60fps. Prevent deadlocks at 2 workers or queue capacity 1.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate executable contracts with exact paths and acceptance. 2. Clear proof of forced completion and stale fencing/diagnostic usefulness. 3. Real GUI cadence event and pinning acceptance with labels and stable source ownership. 4. Mark which existing evidence suffices. 5. No broad refactors outside M01.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git rev-parse HEAD; scoped graph search/trace and snippets plus coverage ranges. Read actual integrated CTest/GUI logs m01-viewer-{build,ctest,ui-smoke}.log and /tmp/stoneheart-milestones.xprJ2SVp/client_handlers_smoke.cpp. No builds needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Send first independent S17/S21 seam early. Avoid new protocol/settings, general policy changes or altering product contracts in design. No remote actions/children.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete roadmap and per-system development branches. Root owns product/integration/publication. Preliminary design may proceed while S18 title and S06 custody progress.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-P6 READY/PARTIAL per system, current verified behavior, scope/paths, exact measurable tests, remaining gaps/dependencies and likely performance implications.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Verify library reuse for the first deterministic replay slice
|
||||
|
||||
Task ID: M01-R
|
||||
Role: astra_researcher
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m00-inventory at 0deacb3. Prototype integration is 083b84e. Pin is 7b0fea6095f603f9e1904f66dfdc7752f4be4792. Pre-existing untracked .serena/ and workflow records.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Resolve what the first M01 serial-reference/per-tick replay slice can reuse from Void, with exact upstream source/tests/Windows limitations and any genuinely missing generic contract.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only Verify. Investigate deterministic executor/reference, batching, test/replay and canonical bytes for the existing prototype. No change or new issue in this assignment.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect CMakeLists.txt, docs/plan/void-library.md, docs/plan/milestones/M01.md, engine/include/settlement/core/worker_pool.hpp, engine/src/worker_pool.cpp, world.cpp, world_save.cpp, tests/core_tests.cpp and the exact pin in the matching Void repository.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Shared checkout. Root owns Git, network writes and integration.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Identify and verify the actual pin and current published revision read-only. Check applicable public headers, implementations and upstream tests, including inline executor behavior, Windows dependencies and state/ordering semantics. Look up matching existing upstream issues only as needed. Use configured repo interfaces or exact git objects, no unrelated repos/credentials.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Preserve old save 13 and LAN 11. Separate a game-owned reference mode or test fixture using upstream primitives from a new generic capability needing an issue. Do not prescribe an incompatible executor or assume replay tokens hash full world state.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
M00-P maps game seams. Root decides M01 scope and will link or register actual upstream gaps if a local generic capability is necessary.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Pay attention to partial thread start, bounded queues, zero/one-worker behavior, std::future semantics and differences from inline execution; avoid claiming untested Windows behavior.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return reuse decisions at pin with public/test evidence and actual target availability. 2. Identify alternate current upstream implementation or actual issue for gaps if relevant. 3. State runnable verification and untested contracts.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git show HEAD:CMakeLists.txt. For matching upstream use git -C <confirmed-checkout> cat-file -e 7b0fea6095f603f9e1904f66dfdc7752f4be4792^{commit}, ls-tree and show exact header/test paths. Cite paths, commits and results. Network reads only.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop when evidence is sufficient for the first slice. Do not fetch private data into public tools, modify deps, create issues, build a replacement library or change a branch.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved milestone development and requires library-first analysis. This task is strictly evidence gathering.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-R status, decision table, exact source and tests, suggested scope/replacement checks, unknowns. Do not spawn further agents.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Verify Void contracts for runtime, persistence and modules
|
||||
|
||||
Task ID: M01-R2
|
||||
Role: astra_researcher
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home at M00 904bdf8 on milestone/m01-authoritative-simulation; initial serial/replay tranche in flight. Public Void HEAD matched CMake pin 7b0fea6095f603f9e1904f66dfdc7752f4be4792. User wants later systems implemented as well.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Find exact reusable Void APIs for M01 rules module/manifest dependencies and hashing, transactional saves/Windows atomic replacement, immutable snapshots/fixed clocks and idempotent command dispatch. Produce per-contract decisions so authors can begin without duplicating library code.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only evidence focused on S19/S15/S01/S16. Start by returning results for rules/manifest and atomic writes. M01-R already covered executors/replay.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect CMakeLists.txt, docs/plan/void-library.md, docs/plan/systems/{S01,S15,S16,S19}.md, current save codec, viewer save entry points, exact public Void pin, test and backend files and current upstream tracker. Verify source branches against pin, not co-located names.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Root owns all network writes. Other agents own game/test files. Do not change branches or active graph.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Check public API, real behavior, Windows flags and tests at pin e.g. Binary, Crypto SHA256, IO atomic replace, version/dependency graph/manifest. For each required generic gap give existing matching issue or minimal issue content, expected replacement check, local game path candidate. Distinguish domain ownership. Independently validate whether Windows build/link of candidates is feasible, no application writes.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Return precise API/units, guarantees and missing pieces (including byte/string handling, version compatibility and corruption behavior). Prefer supported existing routines over new custom equivalents.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
M01-P2 handles game integration. Root decides package ownership, upstream issues and commit/push. Authenticated tool available only if needed; use read-only upstream operations.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Do not leak private code, real data or credentials in external queries. Treat native Windows vs cross-test explicitly. Network, sandbox and subprocess errors must be reported accurately.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Runnable library reuse plan for each next M01 system. 2. Direct URLs/test paths and Windows constraints. 3. Actual tracked gaps or precise issue drafts with acceptance and migration test.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git show HEAD:CMakeLists.txt and from confirmed pinned checkout git show 7b0fea6095f603f9e1904f66dfdc7752f4be4792:<path>. Check live git ls-remote and read-only public issues. Reference existing cross env and use source fixtures as appropriate without changing project.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not create issues, fetch private data into public tools, or ship dependency changes. Return findings by priority, including partial early results. No children.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User's plan requires library-first analysis, and separately authorizes authorized repository changes and branches. This task grants read-only investigation.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-R2 status, decision/evidence per feature, real gaps/practical issues and replacement criteria, current Windows evidence and unresolved questions.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Replay actual colony commands and compare every tick
|
||||
|
||||
Task ID: M01-T
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home, milestone/m01-authoritative-simulation based on M00 checkpoint 904bdf8. The baseline has 28 core and 4 LAN cases, reflection suites from pinned Void. Legacy task notes/.serena are untracked.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Build an executable M01 replay regression in the normal settlement_core_tests target, exercising the explicit serial reference and normal modes on the same saved starting state.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Own the test fixture, useful game scenarios, mode/legacy boundary assertions and minimal source registration. Keep every existing core and LAN case. No new runner or game production logic.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect tests/core_tests.cpp (save_contents and test_two_players_share_the_first_colony, resource/hauling and parallel job tests), tests/test_main.cpp, CMakeLists.txt, world.hpp, docs/plan/milestones/M01.md, docs/plan/void-library.md and actual game behavior.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: tests/replay_tests.cpp; CMakeLists.txt
|
||||
You are not alone. Core owner writes only world.hpp/world.cpp/world_save.cpp. Root owns docs and Git. Do not revert their changes; serialize your new file registration in CMake yourself.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Add a reflected Void Suite in NEW tests/replay_tests.cpp, register this file on existing settlement_core_tests. Mark new cases with tag replay. Use the actual write_save binary bytes as prototype oracle (no hashes or shadow codec). Record a fixed test-local set of PlayerCommand values including explicit player sequences and scheduled step attempt ordinals. Check expected receipts/rejections, tick/revision and pause/resume, then compare state bytes every attempt through meaningful colony output. See preflight requirements below.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW frozen API settlement::ExecutionMode::{Parallel, SerialReference}; World(seed,w,h, size_t workers=min_worker_count, ExecutionMode mode=ExecutionMode::Parallel); World::read_save(stream, size_t workers=min_worker_count, ExecutionMode mode=ExecutionMode::Parallel). Serial requires logical count 1 and reports worker_count()==1. Parallel 2..64 and ordinary one-worker rejection remain. Invalid combinations/unknown enum throw invalid_argument. Existing PlayerCommand, CommandReceipt, make_first_colony, resource/job APIs apply.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Core author implements the frozen API concurrently. Use an uninterrupted serial reference versus 2/6/12 from the same initial bytes. At a proven material-in-hand checkpoint resume another world per mode from bytes, keep uninterrupted reference alive and compare every subsequent tick. Use warmed path cache in the live history; report path counters and first differing tick/mode/object or byte offset if a comparison fails. Coordinate builds after both sides compile.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Cover empty, paused, one resident/fewer residents than workers. Include multiple competing generic jobs and an unreachable route forcing a retry to another job (all three dispatch points), and two eligible residents contending for the last item, with a specific winner and conservation after delivery/consumption. Choose meaningful positive outcomes to rule out all modes equally doing nothing. Compare bounded scenarios and avoid OS timing assertions.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Reproducible command schedule advances a real colony and checks accepted and rejected commands. 2. Exact byte equality every tick for serial/2/6/12 including reload vs uninterrupted; prove in-hand stop and useful work. 3. Contention winner and unit accounting, job selection/retry, and valid/invalid configs are checked. 4. Existing tag/CTest entry points still work.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root source /tmp/stoneheart-verify.KoZwE4o8/env.sh; cmake --build /tmp/stoneheart-milestones.xprJ2SVp/windows --parallel 8 --target settlement_core_tests; wine /tmp/stoneheart-milestones.xprJ2SVp/windows/settlement_core_tests.exe --tag replay. Root built this directory from the exact clean Void pin. Report counts and time. Work with core owner if build awaits API.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not weaken old tests, compare only hashes/final counts, edit game files, change branches, stage/commit or spawn. Investigate actual source when a fixture fails; distinguish bad setup from real divergence and inform root.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User requested milestone implementation with subagents. This scoped M01 tranche establishes replay evidence before replacing the executor or changing the authoritative command format.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-T status, changes, fixture/expected state, counts and commands, any coverage you could not verify and integration notes. Send early if there is a real disagreement across modes.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Review the serial reference and replay checkpoint
|
||||
|
||||
Task ID: M01-V1
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Game root /home/faumaray/Projects/stoneheart_at_home on milestone/m01-authoritative-simulation, parent 904bdf8. User asks that reviewed milestone/system work be committed and pushed. Initial M01 tranche only. Pre-existing untracked .serena and older task files are outside the diff.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Review the actual integrated M01-C/T source and tests; give an independent defect-oriented verdict on this checkpoint before push.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Audit constructor/load mode, all worker dispatch paths, exact-state comparison, normal suite/CLI callers and documentation plus boundary to future work. Work on later M01 packages is planned separately.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read git diff 904bdf8 and NEW tests/replay_tests.cpp, docs/agent-workflow/tasks/M01-{C,T}.md, README and M01 plan. Check world.hpp/world.cpp/world_save.cpp, CMakeLists.txt, test_main.cpp, existing core and LAN suites against the frozen contract.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Do not change any shared checkout files or branches. No children, push or external writes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Inspect actual worker lifetime, order, exception handling changes since baseline, empty/paused/one-resident cases, mode validation and save ingress. Review each new case for effective contention, warmed-cache checkpoint and positive useful progress. Check mode-specific reporting, new API compatibility and CMake discovery.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Parallel rejects 0,1,65+ and serial admits only 1 logical lane, with zero pool threads. Preserve save13/LAN11, existing commands and parallel results. Full M01 authority/async saves belong to later packages.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
M01-C/T complete. Root observed an independent original-ABI Windows probe vs candidate serial/2/6/12, 365 attempts (361 ticks, 5 meals), 738386 bytes of saves and receipts identical bytewise. Five replay tests pass under Wine. Full CTest and build on integrated state in /tmp/stoneheart-milestones.xprJ2SVp/windows; logs m01-first-build.log and m01-first-ctest.log.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check directional reference equivalence when candidates all target same work and routes retry, stable movement/jobs state and flag any newly widened lifetime risk. Native Windows/GPU remains outstanding. Do not waive failed assertions.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return verdict on first M01 execution tranche. 2. Concrete severity, affected callers, reproduction for bugs and proposed fix. 3. Report untested risks and distinguish them from observed regressions.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From game root git diff 904bdf8 --stat; git diff --cached --check; source /tmp/stoneheart-verify.KoZwE4o8/env.sh for any targeted read-only testing. Review /tmp/stoneheart-milestones.xprJ2SVp/{replay-tests,m01-first-ctest}.log and actual new file. Do not start a competing build.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read-only. No docs or fixes, no commit/push. Return bounded findings promptly so root can integrate and continue the active goal.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes implementing, committing and pushing each milestone/system. This review covers the first M01 tranche and does not declare the milestone complete.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V1 READY/CHANGES_REQUIRED/INSUFFICIENT_EVIDENCE, findings by severity/location, observed checks, unrun checks and remaining milestones.
|
||||
@@ -0,0 +1,56 @@
|
||||
# Audit the live LAN owner bridge and interactive session integration
|
||||
|
||||
Task ID: M01-V10
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
S16-02 in isolated /home/faumaray/Projects/stoneheart_at_home-worktrees/s16 based 8c4c1fe. Contracts S16-02 and M01-F5 closed peer+epoch issues. S18-01 in sibling s18 has reviewed S15 a063894 merged, viewer in progress; LAN candidate will enter its checkout after review. One independent review per product path.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Review actual S16 adapter now for branch integration. Later when root supplies final S18 commit/diff and evidence review normal Win32 entry for events, snapshots, async files and lifecycle, with separate verdicts.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S16 compatibility host/guest integration and S18 normal client wiring. Legacy protocol remains 11. No public additional transport or deployment.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect s16 tracked diffs app/lan_session.hpp/.cpp, tests/lan_tests.cpp, docs S16, frozen runtime header and actual command/snapshot logic. S18 later inspect actual all new viewer_session code/tests and viewer_win32.cpp, CMake, S15 CheckpointFiles and normal entry + smoke. Read M01-F4/F5 and the assignments.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote writes/branch ops/children/project switches. Other workers own code. Use direct source for isolated worktrees. Ignore their summaries until checked.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S16 validate default-only authenticated legacy slot, session replacement, coalesced/wrong/rejected old sequence vs modern next_requests, pending future capacity/incarnation/peer tags, reconnect with in-flight owner mutation, truthful Wire11 receipt and first snapshots, consumer of take_result accept/reject vs prior take_rejection, correct future lifetime and no blocking poll on game work. Cross-verify old/no default rules or disconnect and correct generation in actual state transitions.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S18 later validate consistent immutable world on paint/menu including nested window callbacks, pumped title/modal completions, no per-reset UI join, one file service check latest ticket + dimensions/supported rules, healthy save capture max, correct current epoch after commands, reject and retain draft, receipt routing and bounded local IDs, short locks and cleanup, actual normal new/continue/title load and LAN. No live mutable world assignment through UI.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root merges S16 into S18 to actually build/test full client after S16 review. S18 source is incomplete initially; do not approve unseen future work. Public test port uses loopback only. Native acceptance separate.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check state across TCP rebind and network packets/receipts allowed on aborted session. Saturation/old guest fixed sequence, authoritative exceptions. UI must handle busy/faulted futures, avoid stale changes after failed newer load, process-level save ordering and bounded memory. Compare baseline behavior only within approved compatibility.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per phase with concrete sources and triggers. 2. First confirm real 5/5 lan-owner, 92/92 core, 9/9 LAN and original/new binary interop in both directions. 3. S18 after actual signoff + build/smoke logs; name any missing evidence for end-to-end status.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git -C s16 diff --check; inspect /tmp/stoneheart-milestones.xprJ2SVp/lan-owner-final-{build,ctest,tag}.log and lan-owner-interop.{cpp,py,log}. For S18 compare named parents once available and logs client-* in shared temp dir. Read-only inspection only.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Return S16 review early. If blocked by outstanding S18 dependency, confirm stage A and await final evidence without premature approval. Inform root immediately of a verified actionable defect.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete plan and system/milestone commits/MRs accumulating on roadmap. Root owns external actions/normal integration.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V10 separate S16/S18 findings with actual tests, changed paths and limitations. No children.
|
||||
|
||||
The S16 adapter has been integrated at `aa4e271` (parents `60154bd` and `09545bf`). Recheck the transport, legacy codec and test blobs against the reviewed branch, confirm the absence of merge edits to the owner or file adapter, and inspect `m01-lan-{build,ctest}.log` before publication. This additional check is read-only. The combined suite passed 106 core and 9 LAN tests.
|
||||
|
||||
Stage A passed the integrated review at `aa4e271`. For stage B inspect the actual tracked and new S18 files in the `s18` worktree based at `eef69ca`, including `viewer_session`, the Win32 entry point, CMake and the viewer suite. Inspect `client-{build,ctest,ui-smoke}.log` and `client_ui_smoke.cpp` under the temporary evidence directory above. The smoke used three real viewer processes with isolated save data. Check title, modal navigation, successful and failed load, guest transitions and truthful pending-blueprint outcomes. The contract still distinguishes the initial compiled default profile from the separately scheduled S19 selection. Return a defect report or READY for S18 without changes to the checkout.
|
||||
|
||||
Stage B initially required three corrections. Recheck the finished fixes for identity after modal demolition, rejected guest rejoin preserving the retained replica, and ticking acknowledgements across fault recovery. Inspect the updated committed-quantity and request-path checks in `client_{handlers,regression}_smoke.cpp`, the corresponding `client-{handlers,regression}-smoke.log`, the final viewer build, the three-process smoke and `client-ctest.log` (99 core, 9 LAN, 10 viewer). Separate integrated audit follows when root supplies the merged ref.
|
||||
|
||||
Stage B fixes passed review and were committed as `b7f18c0`. Integrated commit `db0a872` has parents `5354241` and `b7f18c0`. Confirm that the resident panel uses approved resource/storage/production IDs while the view remains pinned, both UI and core suites register, and the merged application’s three-process smoke passed. Check `m01-viewer-{build,ctest,ui-smoke}.log` under the temporary evidence directory.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Review durable order identity and compiled colony profiles
|
||||
|
||||
Task ID: M01-V11
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Independent review in two phases. S04-01 isolated worktree s04 based 4ba64f7 with production order IDs, body14 and outer checkpoint2, existing schema1 real fixture. S19-02 isolated s19 based 60154bd with first optional package/profile, old default retained. S19 and S04 are expected to touch adjacent World declarations/CMake; root will supply combined refs for final checks. Baseline S16/S06/S15 already published.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Provide separate disposition for actual S19-02 and S04-01, then for a root-supplied integrated result if requested. Alert root quickly on reproducible failure before workers retire.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
S19 backend, old/new data and S04 current changes including codec, command handling, real placement/reservations and lifecycle. S18 screen/selector verification belongs to a separate client review. This review covers the public core seams that later UI calls.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect actual tracked/untracked files in sibling worktrees /home/faumaray/Projects/stoneheart_at_home-worktrees/{s19,s04}, including all new headers/sources/tests, full surrounding world, checkpoint/readers, rules_manifest, first_colony, command_dispatcher, changed CMake and docs; baseline legacy tests + new fixtures actual consumed bytes. Read contracts S04-01/S19-02 there and root M01-F6.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote postings or children. Parent owns commits/resolution. Use direct scoped reads for separate worktrees, shared root graph with coverage/direct missed lines if used. Do not change project activation.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S19 audit exact old default manifest/hash, optional package deterministic compile of real recipes vs forged/missing/additions and unsupported profiles, factory UUID/canonical rules, no mutable after-start rule switching. Check active staged optional refusal, default raw/simple/inactive/saved historical compatibility, actual input requirements/duration simple vs staged, finished beds and room. S04 review full ID allocation, batch production scheduling incl replenishment simulated post-demolition, before/after failures transactional, exact Busy narrow no domain next seq mutation; new ID in all actor references, cancellation, finishing order and find; explicit codec boundaries, bounds/duplicates/noncanonical/high-water/dangling, v1 authentic + modern pair and replay.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Public profile functions colony_rules/compile_colony_rules/make_colony_checkpoint/validate_colony_checkpoint and staged/default initializers preserve calling contracts; strict profile policy only at game/client gate, generic codecs/runtime remain reusable. ProductionId 0 absent, MAX exhausted with last valid MAX-1. Compare both double dispatch (legacy/direct/modern) where relevant to tests.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Order of branch signoff independent. On integrated stage confirm the raw/outer and profile gates and all added tests coexist under root CMake/World changes. Native hardware/real LAN separate. Root will send ready marker and evidence directory for each phase; do not approve unseen results.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Watch O(N²) references in hot/hostile save path, exhaustion partial mutations after storage erasure/cabin terrain / counters/room placements, v13 and LAN11 byte drift, accidental implicit fallback on unauthenticated or modified data, restoring historical default simple and optional staged mismatch. Confirm authentic fixtures frozen using prechange binary; never log private data.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per component with concrete reproduction and severity. 2. Compare targeted/final logs and actual old corpus bytes, not just worker report. 3. Root integration evidence after selected branches merged must identify any new cross-contract issue. 4. Document unverified native/product gaps.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git -C <wt> rev-parse HEAD; git -C <wt> diff --check and --stat; read status/new paths and inspect source directly. Inspect /tmp/stoneheart-milestones.xprJ2SVp/profile-{baseline,tag,ctest,compatibility}.log and production-id-{final-tag,ctest}.log plus archived production replay/corpus logs as provided. For merge phase compare relevant actual branch/HEAD blobs and final CTest logs.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Give findings as soon as evidence warrants; no remote or code writes, no plan beyond requested changes. Hold component approval if final tests not yet recorded or actual source still changing. Two failed same-cause fixes escalate via root.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes roadmap/push/MRs/upstream issues; root alone owns those actions. Preflight M01-F6 explicitly passed under default simple/inactive compatibility policy and scoped capacity exception contract.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V11 S19/S04 separate verdict, file/line, trigger, actual tests/artifacts and remaining gaps. Later verify corrected diff or integrated refs when supplied.
|
||||
|
||||
Both component reviews returned READY. Audit integration commit `a8cd7bb`, parents `9a248c3` (which includes S19 `2759563`) and S04 `2a3ec92`. CMake kept both new test sources during conflict resolution. Check the merged World initialization and stable production fields, old/new checkpoint and profile behavior, selection tests using the real current encoder, and the unchanged legacy host gate. Windows x64 logs `m01-orders-profiles-{build,ctest}.log` cover 122 core and 9 LAN cases. S18 initial viewer and follow-up title selection have separate reviews. Scope here is the integrated core and runtime LAN behavior.
|
||||
@@ -0,0 +1,54 @@
|
||||
# Review atomic pickup and the title profile selection
|
||||
|
||||
Task ID: M01-V12
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
S06-02 at sibling s06 a8cd7bb plus implemented checkout. Targeted quantity tag 14, whole 136 core+9 LAN at isolated branch and two prior corpora. S18-02 at sibling s18 e6a01be in progress. Each had explicit M01-F7 preflight corrections. Root will signal when to inspect S18 implementation and integrated refs.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Independently review actual atomic pickup now, title/profile integration when ready, then combined branch evidence before remote publication.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
S06 subset meal/construction stop only and preserved direct recipe processing; S18 visible title selection, exact compiled acceptance/host gates, old profile compatibility. Durable custody in design F8 is separate.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read root M01-F7, sibling s06 S06-02, its new inventory_transaction.hpp/.cpp, narrow World integration, actual new quantity_transaction_tests.cpp/CMake/docs, contextual World/WorldSave/Immutable runtime. For later S18-02: actual title_screen_win32/viewer_win32/viewer_session/tests, S19 factory/validator, LAN and GUI/handler smokes.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posts/other agents or Serena switch. Root publishes and owns merges. Direct scoped worktree source incl untracked files mandatory; shared root graph with range checks only when relevant.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Pickup verify one storage at the current stop, multiple and nonadjacent duplicate line aggregation, no underflow/overflow or invalid type indexing, exact target count, checked final storage capacity including one first-ingredient output reservation at the correct stop. Late rejection leaves original count/slot inventory, routes/cursor/state from pickup entry. Ensure commit has no allocation/throw, erases correctly and preserves stack order, body14/raw13/LAN11 outputs unchanged. Ensure tests enter real meal/multistop/carpentry and runtime fault behavior and direct finish_production is preserved.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S18 later validate title-only New choice, accurate simple Miner description/controls, both initial and latest async candidates use accepted compiled profile & 32×32, historical default simple/staged/inactive, malformed latest after superseded prepared candidate, exact-default legacy host both immediate/deferred/after modal and explicit pending-load refusal before listener effects; S18-01 guest rollback/modal epoch and ticking fixes remain.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Send independent verdicts as available. Root may request follow-up integrated comparisons via updated refs/log paths. Wait for actual S18 ready marker; no future-code signoff.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check arithmetic touched only accepted input, multiple erased stack lifetime, max 11 types vs unbounded input lines, true atomic output-slot commit, current state unchanged after failures, actual compiled probes and real Win32 entry. Test data mutations must remain scoped to fixtures. Do not equate Wine with native Windows.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per component. 2. Source-grounded findings with concrete triggers/severity. 3. Confirm actual logs and golden files/GUI smoke. 4. Integrated review only when refs supplied.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git -C <wt> status/rev-parse/diff --check; read new source and relevant tracked full contexts, /tmp/stoneheart-milestones.xprJ2SVp/quantity-{config,build,rebuild,tag-final,ctest,probe-build,golden}.log and actual checksums. S18 final logs will use client-profile-* in same temp directory.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No code/Git/remote changes; if a blocking defect appears report promptly, then re-review actual corrected source on request. Do not assume dry approval of new receipt registry or future schema15.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes roadmap/push/MRs/upstream issues; root owns all external actions. Prescreen fixes incorporated before implementation.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V12 separate S06/S18 verdicts, real files/paths/tests, exact remains and native caveats, later integrated check as assigned.
|
||||
|
||||
The S06 component passed and is committed as `3c997ed`. Compare integration `66af7c5` (parents `e6a01be` and `3c997ed`) to each parent. Inspect actual `m01-quantity-{build,ctest}.log`: Windows x64 under Wine passed 136 core, 9 LAN and 10 viewer tests. S18-02 is still a separate pending review.
|
||||
|
||||
The integrated S06 check passed. S18-02 now has finished production changes against `e6a01be` in the s18 checkout. Inspect both real title/handler sources in the temporary evidence directory and `client-profile-*` logs, including a real two-process title choice/save/open, normal GUI regressions, held-load Host refusal and 14 viewer cases. Validate the actual six edited files, costs and initial/async gate along with the compiled profile and LAN boundaries.
|
||||
|
||||
The S18 component passed and is committed as `180506d`. Integrated `37fb6a8` has parents `f6493e2` and `180506d`. Inspect the combined selector/quantity source against those parents, CMake and `m01-selection-{build,ctest,ui}.log`. The real application smoke used the executable in the integrated build directory.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Audit deterministic completion evidence and immutable presentation frames
|
||||
|
||||
Task ID: M01-V13
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
S21-01 sibling s21 at 66af7c5 with new optional success hook and actual replay/fault barrier tests; branch final pass imminent. S17-01 sibling s17 same base with immutable packet/render caching and test target in progress. Original contracts S21-01/S17-01 and preflight F9/P6. Root cumulative currently 5a64a27 includes S18-02 profile chooser.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Review CPU observer/real replay/diagnostics and independent GUI presentation as separate completed components and later combined integration. Send all actual blocking findings immediately.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
S21 worker adapter and tests/diagnostics/docs; S17 frame packet creation, D3D mesh/upload, lifetime/timer and actual test path. S06 custody15 beyond scope except future compatibility noted.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect actual tracked/untracked files and exact contracts in siblings. S21 world.hpp/world.cpp stage layout, WorkerPool submit/admit, tests/executor/replay/runtime, new diagnostics, end-to-end old corpora and logs. S17 actual Win32 handlers, scene packet and D3D, tests/viewer_frame_smoke.cpp, CMake, involved S18 session/GUI, Win32 smoke and docs.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posts/other agents or Serena switch; siblings outside root graph require direct source. Check diff --check and new source separately.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S21 success-only invocation (void/value/reference/move-only, throws, overload and before_submit/before_execute failure), original no-hook semantics and capacity. Validate opposing actual completions (two real candidate calculations, separate driver/hook release), lower ID winner, serial berry claim vs parallel advancement, no flakiness/deadlocks, stale load barrier and modern Current14, domain mismatch reports and tests incl byte fallback; inspect fixture/scoped source and actual logs.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S17 after ready marker verify one immutable prepared packet held across nested callbacks even during release/install, candidate not sampled while changing before consumed Replaced, owned overlays and HUD, true camera-only reuse of prepared physical geometry and GPU upload keyed over all visuals incl reset, no extra work hidden/resized/destroyed; original camera input, GUI titles/profile and normal LAN/events still work. Check actual settled tests including two real windows, blocked file/owner, saved content, offscreen/native fallback and helper includes.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Stage A S21 ready first; stage B only on finished status, separate integrated approvals requested later. No sign-off until actual cross-component evidence and fixes are available.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Pay particular attention to return category/dangling references, accidentally recording pre-completion, capacity1 coordinator deadlock, exceptions in optional hook, tests changing data outside owner. For S17 camera/cursor geometry keys, offscreen rendering and clipping/nested frames, pending parent/child window messages, backend recreation and save/peer replacement while rendering. Do not equate Wine with native Windows.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per component. 2. State source/trigger/severity and corrective acceptance per defect. 3. Verify actual logs with issue #15 link and stable old corpora, new frame target and prior GUI smoke. No unsupported physical 60fps claim.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git -C <wt> rev-parse/status/diff --check; read new files and surrounding actual consumers. In /tmp/stoneheart-milestones.xprJ2SVp inspect s21-replay-* and s17-frame-* logs and harnesses once supplied. Eventual merged refs and logs will be appended.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Check actual completed source, no early approval of another component. No source/branch/Gitea changes/children. After corrective commit re-audit relevant behavior per root instructions.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestone/system development and Gitea, root owns all external operations; published reusable missing completion test support upstream #15 and existing publication issue #5.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V13 S21/S17 independent findings, inspected source/logs/limits, then integrated recheck when supplied.
|
||||
|
||||
S21 branch `ef980af` passed component review. Integrated root commit `048268a` has parents `5a64a27` and `ef980af`; inspect `m01-replay-{build,ctest}.log` and check its actual merged adapter, registered suites and unchanged core/GUI. S17 code and docs have also frozen in the sibling worktree at the original base plus working source. Read the actual committed-path smoke source, all tracked edits, and `s17-frame-*` logs. Verify the corrected pre-Replaced fence and stable rendering/cache/lifecycle conditions before branch approval.
|
||||
|
||||
Final S17 integration `455630f` joins reviewed `1cf8bd0` and `e9e7e82`. Cross-check S18 title/profile/host eligibility and S17 packet replacement, timer, GPU and cleanup against both parents. The build, verbose four-target CTest and separate multi-process real profile smoke are in `m01-frame-build.log`, `m01-frame-ctest.log` and `m01-frame-profiles.log`.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Review the independent executor and rule package changes
|
||||
|
||||
Task ID: M01-V2
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Milestone integration root /home/faumaray/Projects/stoneheart_at_home at 8d2870a. Actual candidate worktrees /home/faumaray/Projects/stoneheart_at_home-worktrees/{s01,s19} both based on 8d2870a. S01-02 and S19-01 have test evidence, root owns integration.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Independently review each actual system diff and return separate merge-ready verdicts. Include new untracked files, not only git diff or implementer summaries.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Check correctness/regressions/compatibility and possible new test defects in the two bounded packages. Scope excludes later authoritative runtime and native release acceptance.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect each worktree's docs/agent-workflow/tasks/{S01-02 or S19-01}.md, CMakeLists.txt, new engine/src/rules_manifest.cpp/public header, rules_tests.cpp, worker_pool.*, world.cpp/world_save.cpp/world.hpp, tests/executor_tests.cpp and replay_tests.cpp. Use exact upstream headers at pin in /tmp/stoneheart-verify.KoZwE4o8/candidate/_deps/void_library-src.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No edits, branch/Serena switching, new builds, network writes or children. Worktrees are isolated; check cwd for each.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S19 inspect public API and actual bounded StrictJson handling, duplicate key/definition/ID diagnostics, exact SemVer incl build, canonical SHA of simulation content, order permutations, dependency closure and conflicting providers, malformed constructs and failure diagnostic. S01 inspect task capture lifetimes and guard destruction order, reserved capacity, overload retention, stop/start/error handling, expected/future semantics, partial startup, nested dispatch assumptions, injected tests and threading on Windows.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Verify original M01-C replay public default behavior and format13/LAN11; new rule identity needed by S15. User expects appropriate Void APIs and references for gaps (#4 resolver). Check public compile/link feature propagation and competing CMake edits for root.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Evidence for S19 in /tmp/stoneheart-milestones.xprJ2SVp/rules-final-*.log (9 tagged +42 core/4 LAN). S01 build /tmp/stoneheart-milestones.xprJ2SVp/executor-build; additional capacity-one replay and throwing move case being finalized with original 5 normal replay cases. Baseline 33 core/4 LAN. Root owns final integrated CMake and each system commit.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Inspect actual changed and new lines before verdict. Avoid assigning unchanged historical limitations as new bugs; label native filesystem/Windows physical checks outstanding. Read-only isolation excludes shared Serena switching. Capability process notes are not test evidence.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate S19 and S01 verdicts, P0–P3 real issues with reproduction/locations/fixes. 2. Verify evidence and exposed contracts. 3. Report integration risks and targeted regressions. Give early S19 verdict to unblock persistence integration.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Run git -C <actual-worktree> diff 8d2870a --stat and git -C <worktree> status --short; read the actual new files. Review each ctest log and check git diff --check. Optional existing binary smoke under known Wine env; no competing rebuild.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not approve unseen final changes, or perform external or repo writes. Stop once bounded evidence suffices and send findings early.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorized branch-per-system development, commits and pushes. Root requested independent final review.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V2 verdict for each branch, findings with severity/observed effect, verification and anything unrun. No application edits.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Recheck executor teardown and integrated system target linkage
|
||||
|
||||
Task ID: M01-V3
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Root at de38aff S19; s01 checkout /home/faumaray/Projects/stoneheart_at_home-worktrees/s01 based on 8d2870a. M01-V2 accepted all production paths and S19; P2 concerned only promises and shared future destroyed before WorkerPool joined on assertion unwind.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
First re-review the one-line test lifetime repair in s01 and its rebuilt evidence. Then when root sends the staged integration, verify actual combined target graph for S01+S19 and any contemporaneous reviewed S16/S15 layers expressly identified.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Independent read-only review of precise previously identified risk and later integration overlap. Code/design outside changed boundaries retains its separate reviews.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect s01/tests/executor_tests.cpp test_capacity_retains_move_only_work_and_exceptions, s01/docs/plan/systems/S01.md and M01-V2. Integrated CMakeLists.txt, test registry, system target interfaces, actual git staged merge. Root provides integration refs/results at that point.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
Do not mutate checkouts, shared Serena or Git. Others own code; report findings only.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Reason through reverse destruction on early failure, ScopeExit ordering, async future captures. Consult actual targeted runner log and receipt; send READY/CHANGES_REQUIRED per component. Later verify merge parent trees and union of observed features without re-reviewing unchanged code.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Core composable Windows consumers need transitive public Void::Async (cxx_std_26) and other headers' dependencies. Retain pure SHA, correct enabled modules, all sources/cases including executor/rules/replay. New S01/S19 docs report actual benchmark with Windows/Wine scope.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns merge, CMake conflict resolution, clean build and pushes. First verdict unblocks the branch commit. Remain available for integrated changes.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Reversed destruction must keep promises, shared_future and borrowed worker data alive through join; guard releases before join. No native Windows or performance overclaims.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Live source + actual rerun validate lifetime finding. 2. For integrated stage identify any lost component or unintended changes in overlapping files and verify real aggregate suite counts. 3. Report verdict separately per stage.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Use git -C <s01> diff --check; read test lines 104–136 and /tmp/stoneheart-milestones.xprJ2SVp/executor-recheck.log (8 of 8), root reran CTest core and LAN PASS. At stage two use git -C <root> diff --cached --stat and inspect actual CMake vs named parents, link/test results root sends.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No edits, new roles, external writes, branch changes or builds touching worker build dirs. Stop on uncovered shared behavior or missing evidence.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Parent authorized this follow-up to M01-V2 on the specific finding; full roadmap scope permits integration after evidence.
|
||||
|
||||
## 14. Return format
|
||||
Send first verdict immediately; second when integrated staging and results are available. Findings severity, location, impact, fix and actual evidence.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Review accepted-command retention and Windows save publication
|
||||
|
||||
Task ID: M01-V4
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Separate isolated worktrees /home/faumaray/Projects/stoneheart_at_home-worktrees/{s16,s15} at 8d2870a. S16-01 and S15-01 each add a concrete service + tests. S16 build 43 core/replay/session incl ten session and four LAN, native Win32 writer verification finishing. M01-F3 accepted contracts. Root owns Git and app integration.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Perform fresh defect-oriented independent audit of both actual diffs. Send S16 signoff/finding early and S15 when its final test run finishes. Initial review covers independent component behavior for subsequent integration.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only S16 and S15 actual code and new paths, test quality, CMake/public API, NFK Windows error semantics. Later integration review is separate. No UI, scheduler or broad networking architecture.
|
||||
|
||||
## 4. Files to inspect
|
||||
In each isolated checkout inspect git diff + git ls-files --others --exclude-standard; source/header/tests for command_dispatcher, save_service_win32, session_tests, save_service_tests and CMakeLists. Read S15-01/S16-01 there and M01-F3 in root. Read actual World::apply_command, queue_cabin, pinned Void Async/Uuid/FuturePool, and original synchronous viewer save as needed.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations, branch actions, builds into active build dirs, shared Serena activation, external writes or children. Reviewers did not implement either change.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S16 reserve before effects; exact complete payload comparison; bounded cached accepted/rejected receipts; trusted separate player, UUIDs and city; valid new request mapping, out-of-order detection and paused/prior-world exact repeats; Before/After fault observer must poison uncommitted ledger and expose previous commitments only. Confirm all domain input validities incl extreme coordinates before arithmetic. S15 inspect FIFO identity, concurrent submission reentrancy, producer ownership on acceptance/rejection/completion, no writes before validation, bounded work/bytes, OS-level staging ownership/exclusive temp, close/flush/publish point, recovery and shutdown.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Independent API must give strong failure boundary, cloneable dispatcher with candidate staging and exact unchanged legacy format13/LAN11. S15 single writer, atomic same-directory replace; share denial may return prepublication failure, preserving old bytes. Requiring replace-through-held-handle across all Windows filesystems is outside game contract. For that specific error test prove visibility flags, unchanged old data and next success after closing.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root merges CMake with other branches preserving Void::Core public and previously reviewed Async/Rules. Later runtime consumes these primitives; no new native/cross-platform durability claims. Compare upstream actual API and latest registry before raising feature gaps.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check exception surfaces, future lifetimes, retained failures, no success exposed after partial domain mutation, no unsafe catches/rolled-back state claims; UUID/session fence; Windows Unicode paths, sharing, race before/after rename, close errors, relative path rejection and whole contents for readers. Do not equate program-crash publication with durable power-loss protection.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate scoped READY/CHANGES_REQUIRED for S16 and S15 with actual locations/impacts. 2. Compare accepted F3 contracts to implementation incl test-on-failure cleanup and producer concurrency. 3. Check real tests, counts and flags. 4. Distinguish legacy limitations from introduced bugs.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
From each checkout git diff --check; git status --short; inspect explicit new files and matching ranges. /tmp/stoneheart-milestones.xprJ2SVp/session-final-{build,ctest,tag}.log and /tmp/stoneheart-milestones.xprJ2SVp/save-build/Testing/Temporary/LastTest.log and final save-tag/build logs when ready. All computed tests Windows x64 under Wine.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read only. Return actionable findings immediately. No external writes or blind reruns. If either component needs a repair, identify distinguishing check before re-review.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorized plan, system branches and remote MRs to main. Parent retains authority to publish and rechecks merged components. Review doesn't approve main merge.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V4 S16 and S15 independently, actual files and tests inspected, severity/code location/rationale for any defect, native and integration gaps.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Audit snapshot ownership and checkpoint compatibility
|
||||
|
||||
Task ID: M01-V5
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
S01-03 actual implementation in /home/faumaray/Projects/stoneheart_at_home-worktrees/s01 at 68f91a2, S15-02 in ../stoneheart_at_home-worktrees/checkpoint detached de38aff. They independently implement immutable owner captures and persisted modern envelopes. Other reviewers cover writer/dispatcher and past S01/19. M01-F3 remains controlling for failure/publication.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Read-only final independent review of both real source diffs before branch commits. Send per-branch verdicts early. Later integration will be separately verified.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Review exact changed snapshots/logical field partitioning/lifetime and checkpoint/rule catalog extraction/format gating, tests/limits/headers/CMake. No runtime owner or future custody field required from these narrow slices.
|
||||
|
||||
## 4. Files to inspect
|
||||
Each worktree git status, git diff (tracked changes), explicit new files. Review world.hpp/.cpp, snapshot_tests.cpp, surrounding const rendering/WorldSaveCodec, checkpoint.hpp/.cpp, checkpoint_tests.cpp, rules_manifest.hpp/.cpp, target and actual pinned Void Binary/SHA/Uuids. Read S01-03/S15-02.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote writes/branch ops/children, shared Serena project stays at main game. Direct check worktree source and evidence; you are not an implementer.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Snapshot: reason about every logical field vs executor/cache, copied nested state and observability, no callbacks/pool/references retained, C++ construction/copy/move/const escape/lifetime on exception, no silent public ABI caller break. Checkpoint: check endianness/checksum coverage, length/overflow/allocations before validation, bounded work/memory, no eager megabyte unbounded allocations for tiny malicious body, compare entire installed closure order-independent, identity/tick matching, unsupported versions/trailing data, SHA >16 MiB, named error, independent candidate.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Existing raw save13/LAN11 APIs and exact bytes unchanged. Running captured world is read-only. Modern binary envelope has stable nonnil UUID/city/rules/tick, current body on existing serializer, no on-disk active session/ledger. CMake public types propagate Void::Core.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns CMake/Git and cross-component integration. S01 path will underpin renderer/background saves, S15 prepares candidate; do not claim they're connected in this slice. Fresh win native/physical tests unavailable here.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Investigate invalid input triggering count-based huge allocations despite small outer blob, default/moved-from rules objects, empty rule sets whether legal in resolver, stream consumption/trailing and portability. Catch definite problems in changed surface; distinguish historical legacy-parser behavior. Snapshot test failure-path lifetime/drain warrants attention.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per component. 2. Identify file and precise trigger/consequence for defects and proposed focused regression. 3. Report current actual build/test evidence and any unverified claims.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git -C <wt> diff --check; inspect new files with real paths, /tmp/stoneheart-milestones.xprJ2SVp/checkpoint-{build,ctest,tag}.log (8 checkpoint, 50 core and 4 LAN). S01 capture is 4 snapshot plus full suites and benchmark in same temp folder as capture-* when available. No rebuild needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Remain read only; send urgent actionable findings after validating reachability. No speculative redesign, external actions or other agents.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved roadmap and PRs. Parent owns commits/push and review acceptance; local independent branch certification doesn't approve merging main.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V5 S01-03 and S15-02 verdicts, actual evidence, limitations and any re-review scope. Send first ready ASAP.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Verify the combined M01 systems and preflight stable storage references
|
||||
|
||||
Task ID: M01-V6
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
M01 main worktree /home/faumaray/Projects/stoneheart_at_home commit 2224299 vs earlier integrated cf0cc2f. Reviewed component tips 84a78ef S16, fd17a2f S01 capture, 3844ebb S15 writer, 15da3f4 S15 checkpoint (parent de38aff S19), combined S15 db4ac30. Reviews M01-V4/V5. Separate prospective S06 slice proposed by M01-P3 planner.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
First adversarial integration audit of 2224299 and db4ac30, including actual target union and cross-file operating limits. Second, read-only preflight for replacing runtime positional storage/node references with existing durable IDs. Separate verdicts.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S01/S15/S16/rules integrated surfaces and upcoming first S06 migration. Owner/runtime not yet in integrated commit. No implementation.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect git diff cf0cc2f..2224299, all merge parents, s15 CMake db4ac30, primary headers checkpoint/save_service/world/command_dispatcher/rules_manifest and normal callers; logs. For S06 World::edit_object/gather/assign/finish, Agent/MaterialReservation/ConstructionStop, WorldSaveCodec::body/validate/load, viewer resident detail, tests.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations, branches, external actions, children or shared Serena switching. Other agents own future changes, compare named commits only.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Audit merged code vs exact source commits for lost fields, ABI or modules, transitive flags; verify actual native-target build reports core tag counts and compatibility. Check whether max_checkpoint_bytes and SaveService limits align for explicit caller config, typed capture/dispatcher/codec work together. Record any unmet obligations to runtime instead of claiming integration already wired.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
First S06 proposal: stored Agent/MaterialReservation/ConstructionStop references to existing sorted Storage.id/ResourceNode.id migrate from index/sentinel to nonzero actual ID/zero none in live memory; bounded lookup via lower_bound or equivalent. Legacy byte layout retains positional fields only inside WorldSaveCodec: stage raw positions during deserialization in separate bounded temporary structures, resolve against fully parsed pools before domain validation; encode inverse mapping and reject invalid refs before writing. Existing public code/callers updated where needed; vector order/indices are transient iteration only. Stable production, transfers and item IDs follow separately. Verify there is no non-reference zero or order interaction that breaks this. Present recommendations for const accessors/source compat as needed.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Run-time 20Hz, UI/file/lifecycle wiring and larger S04 IDs are future; new S06 can progress with disjoint package files while runtime owns separate files. Root merges/updates Gitea. F3 controls fault bounds. No branch push from reviewer.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Review save13/LAN11, root's complete CMake stack and old caller behavior. S06 legacy unordered/invalid data, max sentinel, moving/deleting unrelated earlier elements with active reservations; encoding cost O(N log M) not quadratic searches. M00 goal records nonempty demolition intentional confirmed by human choice; any accounting change separate.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate integrated READY/CHANGES_REQUIRED with actual evidence 82/82 core and 4/4 LAN; S15 59/59 +4. 2. First S06 task READY/needs correction with concrete narrow stop conditions and reproducible tests preserving canonical save13. 3. No approval of unseen runtime or native acceptance.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git diff --check cf0cc2f..2224299 and git show --cc db4ac30; compare source blobs to each branch, inspect /tmp/stoneheart-milestones.xprJ2SVp/{m01-candidates,s15-combined}-{build,ctest}.log. For S06 inspect real world/codec/HUD paths via targeted graph + source, reachability and smoke fixture behavior.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No edits/builds/Git/remote mutations. Send integrated review immediately. Stop if older valid format or dependency would force distinct migration beyond current scope. Return actionable findings, no speculation.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all system/milestone branches, commits/push and merge requests into main. Root alone publishes cumulative integration. This is final integrated review plus prospective S06 technical gate.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V6 two verdicts: integrated M01+S15 and S06 preflight. Evidence, limits, actions and native gaps.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Recheck S06 allocation limits and audit the simulation owner
|
||||
|
||||
Task ID: M01-V7
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
M01-V6 accepted system assembly 2224299 but required one S06 design correction. New task S06-01 is in /home/faumaray/Projects/stoneheart_at_home-worktrees/s06 at a4cf99c. Runtime S01-04 implementation is in sibling s01 worktree at 2224299. Reviewer did not implement it.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
First confirm that revised S06-01 resolves the sole preflight finding. Then independently inspect the actual integrated runtime/World/command/clock/publication contracts and new tests before its branch push.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Stage A preflight limit/failure invariants only. Stage B actual S01-04 core changes, CMake, tests and docs. UI/transport/disk integration not yet present.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read s06/docs/agent-workflow/tasks/S06-01.md sections 6–10 and World allocation positions, S01-04 spec and new simulation_runtime.hpp/.cpp, runtime_tests.cpp, CMakeLists.txt, docs/plan/systems/S01.md. Check previous M01-F3, S16 receipt staging, load API, const captures, pinned headers with actual worker join/clock behavior.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote writes/branch ops/children or shared Serena switching. Use direct actual isolated sources (outside graph). Parent owns all fixes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
A. Confirm MAX terminal, allocation MAX-1 publishes successor MAX before exhaustion, use checked successor before vector/terrain effects, factory overflow vs command Busy, loaded MAX valid, include direct field/mine + add_storage/PlaceStorage. B. Critique single owner restart/load and epoch ordering, short locks, healthy/faulted snapshot read, receipt transaction, active+queued completion and shutdown, fixed deadlines across pause/suspend/exhaustion, concurrency, manual-clock tests and real worker drain.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Read actual SimulationRuntime new header, RuntimeSubmission/Result, LoadTicket, commit/wakeup and scheduling code. Freeze public API only if no correctness gaps. Record how caller retries transient Busy and obtains new contiguous IDs after completed rejects; latest snapshot meta must agree with committed ledger. Check latest request vs current epoch immediately before installation and preserve old publication on failed install.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns integrations. S06 work begins on stage A verdict. S01 acceptance is limited to tested core; GUI/S15 adapter must acquire healthy immutable save capture and limit bytes. Platform is Windows x64 under Wine.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Look for timing regressions from owner using admission clock timestamps, unchecked overflow, transaction window with visible successes after fault, queued mutators in faulted state, settlement of pending loaders/receipts, captured aliases and mutex hold during disk/tick/owner join. Check repeated and failed calls on background owner and teardown.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Return stage A feasibility verdict immediately and stage B independently. 2. Compare source+tag tests to F3 and all required observability/fault/stale boundaries. 3. Report any reachable defect with cause and precise regression. Native acceptance separate.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
use git -C s01 diff --check; read new files, /tmp/stoneheart-milestones.xprJ2SVp/runtime-{final-build,final-ctest,final-tag}.log. Run no competing builds. For A inspect new contract plus actual world.cpp 396–425, 770–803 and world_save.cpp validation.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read only. Stop if phase evidence not ready, but return the other independent verdict first. Contact parent for code changes and bounded follow-up if needed.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes roadmap, pushes, MRs and upstream issue tracking. Root requests corrected preflight and fresh code review before integrating core runtime. No external actions by reviewer.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V7 A/B READY/CHANGES_REQUIRED with file/location/evidence, expected symptoms/urgent fixes, counts and residual native/UI risks.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Audit the storage and resource identity migration and file adapter
|
||||
|
||||
Task ID: M01-V8
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
S06-01 isolated worktree /home/faumaray/Projects/stoneheart_at_home-worktrees/s06 baseline a4cf99c, separate S15-03 in s15 baseline 8c4c1fe. M01-V6 and corrected V7 preflight S06. M01-F4 accepted S15-03. Both packages have single owners; this reviewer is independent.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Verify S06 actual full migration/legacy bytes and then S15-03 actual file reader/writer adapter implementation when ready. Give independent per-branch verdicts with real evidence.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only two component reviews; do not infer viewer is wired or production/stack identity finished. Scope new code only plus changed cross-file contracts.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect git diff/status plus new files in both worktrees, actual WorldState/World/WorldSaveCodec/body/validate/HUD/identity_tests and S15 checkpoint_files header/source/tests, SaveService/modern envelope and project tasks. Compare against pinned Numeric/Async/UUID and actual command/loader callers.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote writes/branch ops/children or shared Serena switching. Others own code. Read exact worktree files directly if outside graph.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
S06 exhaustively check migration sites including partial no-ref (tending, meal), erase/shift, validated sorted IDs and lower_bound, no deref absent pointers, constructor/command MAX and MAX-1 behavior before effects including mine changes/command sequence, codec preserving old positional bytes, loading malformed pool order/IDs/dangling refs before validation without out-of-bounds. Review real tests and any new allocations/complexity.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S15-03 check one handle path read under bound incl growth/trailing/truncation/EOF, modern magic + bad version cannot downgrade to legacy, fresh stable legacy UUID and default compatible rules, load future and diagnostic/caller action, max_checkpoint_bytes writer, one bounded reader queue plus in-flight, concurrent shutdown, no live worker pointers, progress of writer while reader stalled, snapshots/futures release resources safely under failures.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root merges S06 and S15 work; UI and other packages are independent. If S15 not ready yet send S06 verdict first; parent will provide ready files/logs. Per-component review only; native Windows integration later.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check actual pre/post baseline bytes and high-water exhaustion semantics; preserve intentional demolition behavior. Inspect kernel calls and archive validation handling hostile/malformed data defensively. Guard test teardown and multi-GB file size observations. Do not equate program exit with physical durability.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per component. 2. Report precise reachability + fix/regression for material issues. 3. Check observed test completeness, external trajectory compatibility and tool limits. 4. Name additions needed before combined normal entry.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git -C each worktree diff --check; inspect /tmp/stoneheart-milestones.xprJ2SVp/identity-{build,ctest,tag}.log and identity compat/trajectory binaries using wc/sha256sum. file-adapter-{build,ctest,tag}.log when ready. Check newly added files not yet staged for whitespace if appropriate.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read only. No competing builds. Send an early confirmed finding or verdict on S06. Report S15 only against complete available implementation.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Root requested two independent checks, user authorizes roadmap system branches/MRs and cumulative pushes. Root retains mutation authority.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V8 two scoped reported verdicts, real files/commands/counts, untested native or integration requirements and re-review scope.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Verify merged logistics references and preflight modern production identities
|
||||
|
||||
Task ID: M01-V9
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Main checkout milestone/m01-authoritative-simulation c2d9d8d (parents 512c9ef, S06-01 8260e09); S01-04 integrated at 8c4c1fe. Reviewed S06 and compatibility corpus M01-V8. Next owner migration M01-P3 calls for persistent production IDs in S04 while legacy format13 remains stable.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Independently verify merged S06+runtime and preflight the concrete S04-01 modern identity + codec migration. Send integration verdict early.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Integration of actual components only, no assumption viewer already uses runtime. Preflight production IDs only, no broad transfer registry or new region architecture.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect git diff 512c9ef..c2d9d8d, both parents and CMakeLists.txt, WorldState/world.hpp, world.cpp, world_save.cpp, checkpoint.hpp/.cpp, S06 identity tests, normal consumers, compat traces. S04 plan M01-P3, existing save13 and checkpoint-v1 writer/parser plus legacy import adapter in s15.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote writes/branch ops/children or shared Serena activation. Other workers continue on their own worktrees.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Verify application blob equality vs reviewed S06 apart from merged CMake and actual registrations/linkage: Math for checked_add, Time public for runtime, tests identity/runtime all active. Analyze unsupported legacy boundary for next stage and identify every order insertion and caller that must reserve a whole ID batch before normal return.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
S04-01 proposal: ProductionId nonzero, stored ProductionOrder::id, Agent::production_id (0 absent) and copyable persistent WorldState::next_production_id_. All three insertions (queue_production + two PlaceRoom loops) and every recipe/room/cabin batch share checked allocation, sorted ID vector/lower_bound; valid MAX next terminal never wraps. No partial ordinary acceptance/rejection. Reuse Void Numeric checked operations, upstream #7. Existing raw World::write_save default still v13, exact position projection for older readers; explicit modern raw body v14 includes order IDs, next counter, durable agent refs. Checkpoint encode becomes v2 using v14; decode preserves authentic v1 + old bodies incl valid old legacy imports and rejects inconsistent v2 body / bad version/IDs. New modern canonical replay includes all durable fields; old files import IDs deterministically in vector order with next greater than all. Game session/UUID untouched. Reject duplicate/zero/dangling/current ID, invalid/exhausted batch before mutation; erasing highest then reloading modern snapshot must not reuse it. Isolated S15 file signature classifier uses shared envelope magic, keep unchanged. Legacy wire13 loss of new auxiliary ID history accepted only at its explicit export boundary.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns cross-component integration. S06 and S04 touch shared World/serializer, so sequence them. Viewer branch will update one resident production lookup during merge; avoid changing S18 normal UI design. Existing legacy public code and normal current renderer must keep working. Require exact statement if prior v1 had stricter/looser body behavior.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Inspect O(NlogN) lookup, checked arithmetic including batches; post-decode forward reference resolution; cache/loader behavior incl ordering. How to preserve old test fixtures while schema bumps: freeze old known bytes with successful read. No overwriting current schema fixture pretending compatibility. Watch allocation without effects vs retry/reporting in dispatcher (must preserve world when returning Busy).
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate READY/CHANGES_REQUIRED per integrated S06 and S04 preflight. 2. Concrete blockers/acceptance e.g. continued mid-carry world, removed order before unrelated active target, MAX-1 vs >=2 batch, wrong outer/inner pairing, replay serial/2/6/12. 3. Report real aggregate evidence 99/99 core+4 LAN; use old/new binary comparisons from S06.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git diff --check 512c9ef..c2d9d8d; git show -m --stat c2d9d8d, compare selected paths to 8260e09 and 512c9ef, inspect actual /tmp/stoneheart-milestones.xprJ2SVp/m01-identity-{build,ctest}.log and identity compat hashes, scoped source/caller reads. No builds needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Read only. Send confirmed integration verdict promptly, then preflight scope. No speculation without source validation.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestone/system development, pushes, PRs and upstream linkage; parent retains publication/merge authority. These are final integration and design gates.
|
||||
|
||||
## 14. Return format
|
||||
Return M01-V9 integrated and S04 preflight verdicts separately, concrete failure scenarios/test boundaries and unverified native state.
|
||||
|
||||
## Additional merge under review
|
||||
|
||||
The root subsequently merged the independently reviewed S15-03 commit `a063894` into `c2d9d8d`, producing `4ba64f7` with an automatic CMake merge. Check the added checkpoint file service, classifier, test registration and their actual blobs against the S15 parent alongside the integrated stable-reference codec. Verify `git diff --check c2d9d8d..4ba64f7` and the real `m01-files-{build,ctest}.log` under the same verification directory. The combined suite passed 106 core and 4 LAN cases. Send this bounded verdict separately under the same read-only restrictions.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Review finite voxel region contracts before implementation
|
||||
|
||||
Task ID: M02-F1
|
||||
Role: astra_reviewer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Read-only preflight of M02-P1 initial design from actual 455630f M02 worktree. The signed 32³ sparse page foundation is independent of M01 custody 539cea0 now in progress. Existing renderer already uses z as vertical height via x−y, (x+y)−z and existing viewer picks the z=0 plane. Library first M02-R1 confirmed pin 7b0fea6, upstream #11 signed division and #14 sparse atomic edits, #12 ray traversal, #13 revision readsets, #10 RNG; actual public math/binary/hash available.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Independently decide whether bounded S02 geometry/generation contract is safe to implement now. Review the later S03/normal runtime/save/presentation boundaries insofar as they constrain S02 data. Send foundation verdict early; root may later supply planner final addendum.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only M02 correctness preflight with first S02 slice priority. No implementation, release/PR acceptance, M03+ design or approval of unchecked future code.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read real M02 worktree docs/agent-workflow/tasks/M02-P1.md, M02-R1 and plans M02/S02/S03/S15/S17/S18, void-library.md; root existing world.hpp, world.cpp WorldState::capture, worker_pool, world_save and checkpoint, app/map_camera.hpp, d3d_scene_win32.cpp shader, viewer_win32.cpp pick_grid, first_colony and actual tests; private current15 in /tmp/stoneheart-milestones.xprJ2SVp/combined-custody. Inspect exact graph root only if relevant; direct sibling sources required.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations/builds/remote posting, shared project switching, user contact or children.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Attack proposed NEW VoxelRegion/value view with nonzero RegionId, int32 voxel xyz, finite half-open bounds, ordered key directory/sharing immutable 32³ pages, generator keyed by exact seed+version+absolute xyz, queries separate outside/unloaded/loaded air. Page publication precedes ready only at logical designated step. Edits validate all expected revisions/bounds/materials/caps/unsupported operations, finite canonical order and no partial mutation, publish touched revisions once and invalidate face neighbors without fictitious content changes. Focus on material id stability, thin bounds intersecting pages and border operations. Query correctness at both signed extremes and boundary examples, no pointer/reference mutation. Check which exact domain is expected to be represented.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Review ownership/constructor/geometry exposure, immutable page pointers vs mutable alias to page/cache/directory, exact all-or-nothing publication, result visibility/cache invalidation incl reads of inactive/neighbors, validity of one stable geometry revision for render and path when head changes due to activation/deactivation. Propose minimal interfaces and stable tests without duplicating future WorldState. Check D3D renderer z-up and slice/face tie contract.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Foundation worker has isolated file ownership in NEW voxel_region.hpp/cpp/test plus CMake and S02 docs. World/runtime/save protocol integrating with S15/16 requires final agreed schema and cannot clobber S06 custody15. Preserve protocol11 by explicit representability; original 2D first colony must remain readable/playable.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Negative division at INT_MIN and max half-open bounds, dirty neighbor overflow at extreme chunk ids, seed sign/ordering/algorithm version, bounded page/batch memory and worst-case old snapshot retention, revision rollover/admission, no-op/duplicates/conflicting expectations; negative/zero ray incl edge tie, stale auth, work/tick exposure, failed chunk activation/crossing. Differentiate genre policies/materials and requested Void issues.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. READY or BLOCKED with precise mandatory first-slice fixes and testable criteria. 2. State if parallel independent implementation is sound within compiled M02 base before M01 finished. 3. Capture edge behavior and feasible tests for generation, bounds, stale atomic recompute, immutable view, deterministic batch and subsequent consumers. 4. Mark unknown physical target verification. Do not review a future code diff prematurely.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Read-only git status/rev-parse and source refs in the M02 and combined worktrees. Compare pinned source with M02-R1 and note no binary evidence unless reading actual existing logs. Project index root-only; direct reads for sibling files. Later CTest should use exact Windows x64 GCC16/Wine test setup in M02-P1.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No approval of M01 scope or M02 implementation, no code, no Git/Gitea changes/children. If a substantial missing contract is identifiable, provide counterexample and precise remedy without tacking on speculative features.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User requested end-to-end milestone implementation and library gap filing. Preflight gates first edits, not engineering judgment on reversible local choices. Root integrates findings into worker specs and owns upstream effects.
|
||||
|
||||
## 14. Return format
|
||||
Return M02-F1 preflight with earliest foundation assessment then notes for remaining consumers, actual source references, required tests and stop conditions for implementation.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Design the first playable editable voxel region and its integration
|
||||
|
||||
Task ID: M02-P1
|
||||
Role: astra_planner
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
The user approved implementing M00–M12 on milestone and system branches. M01 currently provides a 50 ms authoritative World, immutable snapshots, authenticated commands, released rules profiles, protocol11 and modern checkpoints. M02 worktree at 455630f has S17 immutable frames and S21 real scheduler tests. Local M01 candidate 539cea0 adds modern raw15/checkpoint3 transfer persistence. An independent pin/API audit M02-R1 at Void 7b0fea6095f603f9e1904f66dfdc7752f4be4792 found library gaps reported as Void/Library #10–14. This is a preparatory design while M01 exit evidence is in flight.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Provide actionable dependency boundaries for M02 and the first implementable S02 region/chunk/component that can be built now without conflicting with M01 custody work. Continue to cover S03, S17/S18, S15 and normal owner/runtime end to end so the first terrain output has real consumers.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only milestone architecture and phased, playable acceptance. Focus limited M02 editable voxel scenario through two levels and chunk edge. Defer M03 colony storage/building changes, water, other worlds, plugin changes and release. No arbitrary lowering of approved roadmap scope or new UI product choice.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/milestones/M01.md and M02.md; docs/plan/systems/{S02,S03,S15,S17,S18,S21}.md, docs/plan/void-library.md and M02-R1; engine/include/settlement/core/{world,simulation_runtime,command_dispatcher,worker_pool,deterministic_rng}.hpp and world/first_colony/world_save CPU paths; app/d3d_scene_win32.*, map_camera.hpp, viewer_win32.cpp, tests/frame/replay/identity/checkpoint. Use actual names in results. Read sibling custody.hpp and checkpoint.hpp at combined 539cea0 to avoid schema collision. No fetching private data outside project.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No edits, branch/remote ops, builds that modify worktrees, project switch or children. Parent persists results. Root and sibling agents are working in separate checkouts. For isolated M02 use direct files and avoid changing shared Serena project.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Map owner/tick/frame/file architecture, deterministic generation keyed by signed world location, gates for snapshots/cache and async activation. Specify finite 32³ sparse page representation and signed Euclidean division, fatal and retriable edit paths, exact row/coordinate order, native Win32 interaction scenario, known old-save/old-LAN behavior and how these can be tested using real consumers. Identify the first S02 slice that can receive an independent concrete coding contract at once; send it early.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Propose NEW clear types and methods by responsibility with essentials only: region identities/int coords with z up, bounds/limits, material query/source/support+edit revision set and undo on failure, copy-on-write pages immutable to snapshots, deterministic per-chunk source and edit overlay; S03 use cases incl stable ties, minimum profile/door/stairs and consulted revision sets incl misses and neighbors; ray/pick face from D3D Y-up conversion and actual commands; M02 persistent version/generator identity; reconcile normal M01 World lifecycle, actual public source/test consumers and authored test scenario. Distinguish proposed APIs from existing ones.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root reconciles M02-R1, planner, independent preflight and starts S02 in an isolated branch before coupling to mutable M01 sources when safe. Make ownership/dependency ordering and concrete integration points clear. Source-only private S06/S15 candidates must never be treated as published.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Bound coordinate overflow (INT_MIN, ±32), sparse memory and checked edit count, stale/mixed revisions, border invalidation, optimistic deterministic admission/queued jobs, signed normal/cell at equally crossed faces, old saves and LAN projections of edited maps, delayed/out-of-order and corrupted chunk I/O, camera/view consistency and finite scheduling. Respect pinned Void API/tests and replacement cases for #10–14 in repository matrix.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Concrete HOW/WHAT for S02 first worker including new files/headers/CMake and behavioral tests with cross-boundary negative coordinates, immutable snapshots, failed multi-page edit and independent generation. 2. Bounded follow-on packages S03, authoritative/edit/tick+save, real UI and exit verification with actual dependencies. 3. Identify genuine missing library contract only after checking pin and issues. 4. Normal small scenario is visible, editable, traversable and survives save/restore across thread order.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Read-only git -C <m02> rev-parse HEAD/status/diff and git -C /tmp/stoneheart-milestones.xprJ2SVp/combined-custody show as needed; use direct source in sibling worktrees. Give real proposed CMake GCC16 cross and CTest commands for later workers based on /tmp/stoneheart-verify.KoZwE4o8/env.sh and existing target. Native Windows cannot be asserted from Wine.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop and report if a required product choice truly blocks first slice; use reversible decisions matching approved M02 otherwise. No source mutation, speculative library ticket, user messages, or children. Do not claim test execution.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User explicitly asks to implement all milestones, reuse library APIs and file concrete gaps. Root owns all side effects. User authorization already covers bounded M02 foundation and branch/MRs.
|
||||
|
||||
## 14. Return format
|
||||
Return M02-P1 PLAN with early immediately implementable S02 slice, dependency order/ownership, immutable contracts, concrete tests/risks/source refs and remaining evidence. No approval or merge decisions.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Verify library support for voxel coordinates, chunks and surface picking
|
||||
|
||||
Task ID: M02-R1
|
||||
Role: astra_researcher
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Approved game roadmap, M02 follows M01 and calls for an editable finite voxel region with 32³ chunks, consistent coordinate/picking/navigation interpretation. No M02 code or branch started. Game root current 60154bd/aa4e271, Void exact CMake pin 7b0fea6095f603f9e1904f66dfdc7752f4be4792 confirmed equal upstream HEAD, source/tests available locally.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Prepare reusable API and missing-feature evidence so S02/S03/S17 can start under the user's Void-first dependency rule when M01 entry gates settle.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Read-only M02-specific official/pinned API audit, exact target semantics and minimal verification/issue ideas. Not a game implementation, upstream write, or M02 completion claim.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/milestones/M02.md, systems/S02/S03/S17, prior void-library matrix and first_colony/world terrain/render picking, deterministic_rng.hpp. Pin clone /tmp/stoneheart-verify.KoZwE4o8/candidate/_deps/void_library-src including CMake modules, include and tests. Inspect official library headers before claiming absent.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: none
|
||||
No mutations to tracked/user data, Git/remote writes, public issue creation or children. Parent owns upstream tickets. Temporary isolated compilation probe in /tmp allowed if evidence is genuinely needed; no editing any shared build dir.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Determine exact public support for (1) signed 3D integer coordinates with correct floor division at negative boundaries, checked conversion, fixed-size contiguous chunk index and 6 neighbors; (2) deterministic seed/coordinate hashing and stateful portable random streams with fixed parameters and import/state or existing game RNG; (3) bounded sparse/finite chunk storage, generation version/edit delta/revisions; (4) grid DDA/voxel surface hit and path invalidation by touched chunk revision. Test/document any claimed coverage. Distinguish math primitives to use directly from game-specific policy and genuinely reusable missing capabilities. Check actual dev/test modules/adapters on Windows x64.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Return concrete interface names when present with source/tests at pin and what they guarantee. Root needs precise issue titles, reproducible inputs and replacement tests for actual generic gaps only; avoid a broad request to build the entire game in a shared library. Cover local coords at -1/0/31/32, extreme ranges, 3D axis convention and cross-chunk picking ties.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
M01 stable world ID/epoch/snapshot/checkpoint ownership upstream, future S02 data constructor and S17 ray picking consume that. No assumption M01 fully done; preparatory research only. Confirm whether upstream moved relative to pin via read-only ref if necessary.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Do not suggest library nondeterministic RNG for authoritative state when serialization/stream portability absent. Observe D3D renderer right-handed coordinate/picking constraints locally, storage limits and floating vs integer choices needed. Cite files, no private data outside approved repo/library.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Separate supported modules with test evidence vs missing subcontracts; 2. Bounded ownership and exact replacement tests for future implementation; 3. Identify native/other gaps and M02 code dependencies. 4. Relay first actionable library finding early.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
git rev-parse HEAD and git -C <pin> rev-parse HEAD, targeted rg --files and rg -n on actual symbols and tests, project graph with coverage/direct reads for current app/World when relevant. Source /tmp/stoneheart-verify.KoZwE4o8/env.sh for any standalone Windows probe, no global changes.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not open remote tickets or implement new types; notify root with exact evidence. No speculation solely from CMake module names. No further agents.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User mandates Void support/issue linkage for real gaps; root authorizes this preparatory evidence in parallel with M01 work, without marking M02 started or complete.
|
||||
|
||||
## 14. Return format
|
||||
Return M02-R1 VERIFIED/PARTIAL, pinned paths/API/test names, minimal concrete missing-feature cases and upstream lookup/filing suggestions, native/target limitations.
|
||||
|
||||
The Windows x64 probe passed under Wine 11 with GCC 16.2. Native Windows and MSVC remain unverified. Numeric, canonical little-endian Binary fields, FNV-1a, seeded raw Xoshiro output and graph traversal limits are available on this target. Each missing reusable operation has its consumer and replacement check in the [dependency matrix](../../plan/void-library.md#подготовка-воксельного-мира-m02). Upstream records cover [restorable random streams](https://git.faumaray.com/Void/Library/issues/10), [Euclidean division](https://git.faumaray.com/Void/Library/issues/11), [grid ray traversal](https://git.faumaray.com/Void/Library/issues/12), [revision dependencies](https://git.faumaray.com/Void/Library/issues/13) and [atomic sparse volume edits](https://git.faumaray.com/Void/Library/issues/14).
|
||||
@@ -0,0 +1,50 @@
|
||||
# Adopt the pinned Void executor and drain each simulation batch
|
||||
|
||||
Task ID: S01-02
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive worktree /home/faumaray/Projects/stoneheart_at_home-worktrees/s01, system/s01-simulation at 8d2870a. Main working directory belongs to another task. Serial+replay passed at 8d2870a. Precise M01-R/R2 upstream pin 7b0fea6095f603f9e1904f66dfdc7752f4be4792. M01-F2 approved below failure tests.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Replace the homegrown WorkerPool thread/queue implementation with pinned Void::Async::ThreadExecutor + FuturePool. Preserve existing World parallel and serial outcomes, guarantee lifetime of all admitted batch tasks across exceptions, and demonstrate useful-work/latency effects.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Scope S01 executor migration only. No UI, scheduler, S15 persistence or gameplay redesign. Keep public submit(std callable)->std::future<Result> and thread_count() compatibility where useful; small game-specific pressure/fault seams allowed for real observations.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect engine/include/settlement/core/worker_pool.hpp, engine/src/{worker_pool,world}.cpp three submissions, engine/include/settlement/core/world.hpp, tests/replay_tests.cpp, benchmarks/colony.cpp, docs/plan/void-library.md. Upstream headers and tests pinned in /tmp/stoneheart-verify.KoZwE4o8/candidate/_deps/void_library-src.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/src/world_save.cpp; tests/replay_tests.cpp; engine/include/settlement/core/worker_pool.hpp; engine/src/worker_pool.cpp; engine/src/world.cpp; engine/include/settlement/core/world.hpp; tests/executor_tests.cpp; CMakeLists.txt
|
||||
Not alone. All writes only to named branch/worktree using explicit workdir or absolute paths. Other systems have separate checkouts, root merges CMake. No change of shared Serena project, Git commits or branch switches.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Use Void::Async::ThreadExecutor::create/start and FuturePool::try_submit. Preserve original count>=2 for legacy pool and zero pool in serial. Choose explicit non-dropping policy for overloaded work (e.g. synchronous invoke/future of untouched callable); stopped/error distinguishable. Use per-batch lifetime guard or equivalent that waits ALL accepted work before locals unwind for later submit/first-future exception, reserve storage before submissions. Keep stable result order, avoid extra tasks in serial and stop/join exactly once. Verify startup/queue exceptions against actual API, zero duplicate result. The public Async usage requirements must reach consumers whose headers include Void. Only add module Async and necessary transitive closure.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Existing worker adapter remains game-owned translator of Void contract. NEW test fault/pressure settings should be minimal, e.g. create worker with capacity 1 and a start hook; preserve ordinary defaults. Determine actual original exception type/semantics and deterministic error behavior. Reject waiting on the same worker's own execution. Provide runner-exercised integration proof for World using migrated adapter.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns authoritative runtime and remote issue filings; use supported pinned executor, no new generic thread pool. Initial core/replay state 33 core +4 LAN. New tests are in existing core suite and tagged executor. Compile in your own system worktree.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Required failures: capacity saturation with retained move-only callable, propagation of callable exception, start failing after a thread already launched, destroyed pool drains admitted work, capture lifetime survives later admission/future exceptions. Avoid polling sleeps in concurrency tests; use promises/latches/barriers with bounded waits. No OS-specific perf assertions.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. All old and replay tests pass. 2. Fault/pressure/drain tests prove no lost work or surviving task at unwind, including world/batch paths. 3. Small/larger existing colony benchmark runs with a fixed seed compare before/after completed work and timings, clearly labeled Wine (historical native times only contextual). 4. Include any observed regression or residual failure boundary; preserve old path as historical baseline.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/executor-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Select --tag executor and --tag replay under Wine. Use 50/500 residents 6 workers with existing benchmark.exe for measured comparisons against /tmp/stoneheart-milestones.xprJ2SVp/windows/settlement_colony_benchmark.exe; report work and 32 warmup/240 measured if used.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop if pin backend cannot build or semantics contradict contract, report distinguishing probe. After two failed repair cycles send both results to root. No unauthorized remote actions, shared checkout edits or child agents.
|
||||
|
||||
Additional integration check approved by root: append defaulted WorkerPoolOptions to read_save, forward to the constructed world, and exercise the existing command/reload fixture under capacity one (tests/replay_tests.cpp). Preserve original replay coverage and the save format.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved full plan and branch-per-system development. Strong implementation owner assigned for high-risk cross-thread failure/critical path. Root integrates and pushes after review.
|
||||
|
||||
## 14. Return format
|
||||
Return S01-02 status, actual API/files, failure semantics and lifecycle checks, build/test and benchmark results with commands and baseline, residual risks and integration implications.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Capture immutable world state at a completed simulation boundary
|
||||
|
||||
Task ID: S01-03
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive checkout /home/faumaray/Projects/stoneheart_at_home-worktrees/s01, system/s01-simulation at 68f91a2, verified S01-02. World owns complete data, execution mode/pool/caches; WorldSaveCodec reads and validates that data. M01-P2/F3 and upstream Void/Library #5 cover immutable caller-built snapshots.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Provide NEW World::capture() const -> std::shared_ptr<const World> for const renderer/serializer/snapshot users. Held snapshots preserve all observable data after subsequent live mutations, or when live World is destroyed.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
World snapshot representation and focused tests, no coordinator, UI, checkpoint, rules or generic atomic snapshot mirror. No byte roundtrip/allocation of a worker during capture. Capture must be called by owner at finished command/tick barrier.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect world.hpp, world.cpp, world_save.cpp, worker_pool.*, tests/{replay,executor,core}_tests.cpp, benchmarks/colony.cpp. Identify all persistent fields, visible counters, worker and transient cache state, const views and nested paths/inventory containers.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/world.hpp; engine/src/world.cpp; tests/snapshot_tests.cpp; CMakeLists.txt; docs/plan/systems/S01.md
|
||||
No editing other worktrees, Git or Serena state. You are not alone and other agents own runtime, rules, persistence, dispatch. Preserve S01-02 exactly apart from necessary representation changes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Group copyable logical World data in a single copyable representation such that future gameplay fields naturally join one copy. Keep executor, worker callbacks and cache out of captures (cache independent of future behavior; if a read-only getter exposes hit or path counters, preserve its observed value). Preserve source worker_count() reporting where practical, and forbid mutable snapshot access by type. Favor private or internal state and simple direct World access; no hand-maintained second serializer, dozens of copy assignments or per-capture thread starts. Reuse existing WorldSaveCodec public behavior. Validate current construction/layout/implicit move caller compatibility.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW public std::shared_ptr<const World> World::capture() const. Propagate normal allocation failures to the owner, source remains untouched, no mutation or pointer aliases to source vectors/agents. Existing factories, modes and format13 unchanged. Include upstream #5 link plus replacement criterion where publication is discussed.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root will plug capture into single-owner publication, sampled under one owner, snapshots can cross renderer/I/O/threads. This feature can compile from 68f91a2 without S16 or S19. No alternate restore API unless natural and actually required.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Snapshot retains owned nested inventories/routes/reservations, current pause, workshop, hidden sequence/revision/counters and profiling data needed by reads. Capture while a task is running is outside caller contract. Pools/hooks not allocated/retained by read-only view. Test held snapshot can be read on a worker while source advances without using sleeps as ordering controls. Bound benchmark scope to actually measured World/runs.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. compare canonical bytes immediately and after source changes/destruction incl mid-carry fixture; assert stable views/counters/pause. 2. Capture+serialize on actual const read path; callback ownership released with live world even if snapshot lives. 3. Cover 2/6 and serial or existing replay tests for legacy behavior. 4. Measure capture cost at 50/500 residents in x64 Wine and report exactly what was measured, no native claim.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/capture-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <build>/settlement_core_tests.exe --tag snapshot, git diff --check; evidence including benchmark protocol and measurements. Separate output files from S01-02 logs.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not alter formats, owner scheduling or save/LAN fixtures. No unrequested generic server/runtime framework. Stop if renderer has mutating access disguised as const or impossible copy semantics. Escalate after two failed repairs of the same defect.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Parent owns all commits and pushes. User approved roadmap; planner/preflight accepted independent copies at owner barrier. This is the first S01 immutable-publication component.
|
||||
|
||||
## 14. Return format
|
||||
Return S01-03 READY/BLOCKED, exact API/files, fields/cache/executor boundary, actual tests/counts, measurements, limitations and contact on any compatibility risk. No children.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Run the single-owner simulation clock and publish committed snapshots
|
||||
|
||||
Task ID: S01-04
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive s01 checkout /home/faumaray/Projects/stoneheart_at_home-worktrees/s01 fast-forwarded to 2224299. Actual S01::World::capture, S16 CommandDispatcher+SessionIdentity and S15 WorldCheckpoint + rules exist in this tree; S01/S19/S15/S16 reviews M01-V3/V4/V5. M01-F3 defines fault, epoch, capacity, and load fencing. Pin 7b0fea6 provides Time::MonotonicClock/SystemMonotonicClock/ManualClock, Uuid::try_v4, Async executor. Public library snapshot gap https://git.faumaray.com/Void/Library/issues/5.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Build NEW SimulationRuntime, sole mutable World owner on a background worker, 20 Hz at normal speed and real immutable publications. Provide a usable asynchronous adapter for commands, save capture and load replacement before later viewer integration.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Core scheduler, snapshot, bounded commands, validated installs, compatibility with existing serial/parallel World, tests/docs. UI, LAN packet codec, file dialogs, disk decoding/reading, stable-ID internals and content selection UI have other owners. Keep standalone old World entry points compatible.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect actual engine/include/settlement/core/{world,command_dispatcher,checkpoint,save_service,rules_manifest}.hpp + implementations, app/viewer_win32.cpp timer/menu/pause/command placement, M01-F3 and relevant systems, pinned Void/Time/Clock.hpp, Void/Core/Uuid.hpp and Void/Async. Use stage barrier capture() exactly as documented.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/simulation_runtime.hpp; engine/src/simulation_runtime.cpp; tests/runtime_tests.cpp; CMakeLists.txt; docs/plan/systems/S01.md
|
||||
Do not change any other worktree, Git refs, existing command/save interfaces or shared Serena activation. You are not alone; other workers own viewer, library and custody concerns.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Single mutable owner, initial validated WorldCheckpoint (already contains stable world_id, city, rules) or explicit initial equivalent. Generate ephemeral session UUID for each start/install, including rollback of the same stable world. One stable PublishedSnapshot (identity/tick/publication revision, shared_ptr<const World>, shared immutable RulesManifest, command request metadata as needed). publish prepared snapshot/ledger results only after complete tick or command. Reader snapshot retrieval never waits for a tick or disk work. On any active tick/command/preparation exception: retain previous publication, drop/disable partial working world and uncommitted ledger, make observable Faulted, complete queued futures predictably, retain old exact committed receipt lookup. Ordinary domain rejection and failed install/file validation leave healthy owner alive. Keep owner responsive to queued work while paused, external presentation suspend independent from in-game pause. Target fixed logical 50 ms steps using pinned MonotonicClock; process elapsed debt deterministically bounded per pass, no starvation or time skipping; re-anchor on suspend/paused/resume so idle time cannot burst into gameplay. Provide manual-clock wake/test barrier so tests avoid arbitrary sleeps. Publish revision changes even for accepted commands at equal tick. Use atomic or short critical sections, no locks around World::step/capture, I/O or joining. Efficient ledger staging: avoid copying the ledger on each tick or replay. Unexpected post-effect failures never return success.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Expose a bounded try_submit(TrustedClient, CommandEnvelope) + future/typed result with immediate admission outcomes and safe always-completed accepted requests. Allow viewer to allocate correct contiguous per-client IDs (normal local queue/order and retries). Provide trusted read-only snapshot for UI and a coherent capture_for_save that checks health at its linearization point. Expose begin_load()/install(ticket, independently validated WorldCheckpoint) or equivalent with latest requested serial and expected active epoch, rechecked immediately before publication incl concurrent newer load during preparation. Failed/superseded install keeps current publication/owner/ledger. Honor F3 even if faulted and guarantee recovery by a valid newest load. A fresh epoch discards old command history and fences stale commands/errors. Provide a simple clock notification or deterministic owner fence for tests. Communicate frozen signatures early to root; UI/transport packages depend on them.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns CMake integration, app adapters, Gitea and current ports. Runtime must be usable from Win32 WM_TIMER to poll latest view and command futures while rendering. Prefer existing Void supported primitive for generic work/time (standard condition-variable/synchronization where appropriate). Service writer owns disk background; use capture API without calling writer on the owner thread. Link #5 + replacement criterion in docs. Default config limits consistent with existing M01 subsystems.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Stress lifecycle races: complete all accepted work on shutdown with normal/Closed/Faulted status, no borrowed tasks after World destruction, success never races visibility. New accepted work has deterministic FIFO/admission and explicit capacity; ensure load recovery possible after fault, old work only commits in old session. Faulted current view still valid for read-only rendering. UUID/allocation failures during load leave old state unchanged. Document shared snapshot ownership memory tradeoff. Test reads return previous stable view while deliberately blocked tick is running. Determine nonfatal invalid inputs before owner mutation.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Under manual time, exactly 20 ticks per second (or observe per step) with same canonical data as direct reference. Commands can pause/unpause while no ticks progress, same-tick publications update. 2. Two clients exact repeats, old session after rollback, altered payload, load supersession, capacity and orderly shutdown. 3. Inject stage failure / after command mutation / snapshot preparation, verify last publication and committed receipts survive, no fresh mutation/save silently succeeds, queue futures all settle, valid load recovers cleanly. 4. Gate real long tick and show a UI reader and immutable save capture return previous completed state. 5. Whole x64 Wine suite passes, no native claim.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/runtime-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <build>/settlement_core_tests.exe --tag runtime, full verbose CTest, git diff --check. Name logs runtime-* under /tmp/stoneheart-milestones.xprJ2SVp. Communicate before schedule/contract changes.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No external services, branches/commits/push, children or template frameworks. Stop if a shared API makes F3 impossible. Two failed fixes for same problem -> distinguish failure and escalate to parent for re-diagnosis. No scheduling behavior on UI or disk paths.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes whole roadmap, separate system branches and PRs. Planner/preflight M01-F3 and reviewed implementations freeze the conditions. Root decides integration and release separately.
|
||||
|
||||
## 14. Return format
|
||||
Return S01-04 status, early exact public header/contract for viewer, concrete timing/fault/install/ID outcomes, files, actual compile/tests/counts, open native or integration limitations. No subagents.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Implement immutable finite voxel regions and atomic multi-chunk edits
|
||||
|
||||
Task ID: S02-01
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Actual isolated system/s02-voxel-world at 0d71bcf, parent milestone/m02-voxel-world. M02-P1 plan and F1 independently accepted first slice. Existing first colony WorldState copied on capture and flat terrain remains, renderer z-up. Cross-toolchain CMake pin 7b0fea6095f603f9e1904f66dfdc7752f4be4792. Void Math::Numeric checked arithmetic, Binary::Writer and Hash public, signed split/atomic pages absent and tracked upstream #11/#14. M01 final custody in isolated siblings, no overlapping source needed.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Build a tested, ready-to-integrate finite authoritative voxel region with deterministic versioned terrain, signed coords and immutable chunk pages, checked all-or-nothing multi-page edits and accurate surface invalidation. The first file consumers are S03 nav queries, S17 surfaces and M02 World/serializer/activation. Freeze a usable header early and send actual declarations to root.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only memory representation, generation, prepared page installation, querying and edits for the finite one-region M02 foundation. No unrelated RNG, terrain viewer, WorldState or format edits, S03 path solver, resource ledger, gameplay or network. Input/outcome types below are NEW and may be named idiomatically.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read docs/plan/milestones/M02.md, systems/S02 + S03, dependency matrix section M02 + actual pin headers/tests for Math/Numeric, Binary and Hash. Inspect world.hpp/world.cpp capture, default 2D semantics, actual 3D shader at app/d3d_scene_win32.cpp, CMake targets and registered Void::Testing suites. S06 / S15 provisional custody data unneeded. Read M02-P1/F1.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: NEW engine/include/settlement/core/voxel_region.hpp; NEW engine/src/voxel_region.cpp; NEW tests/voxel_region_tests.cpp; CMakeLists.txt only two source/test entries; docs/plan/systems/S02.md
|
||||
Your isolated s02 checkout only. Others work in separate WTs, do not overwrite or revert their changes. No Git/remote operations, shared Serena switch, children.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Define checked nonzero uint64 RegionId, int32 xyz with z-up, int64 half-open endpoints verifying within [INT32_MIN,INT32_MAX+1], strictly positive volume per axis (finite coordinate bounds need not densely allocate), chunk/local split no -INT_MIN, x-fast 32³ index. Stable material identifiers air/soil/stone, configurable bounded resident pages (default256), edit count (default4096), and actual checked staging/result/directory sizes (default allow full bounded batch). Region copies or dedicated immutable views share complete directory/pages via const ownership; no retained mutable aliases or mutable raw span. Immutable generator candidate is keyed by metadata/coords, source initialized independent of job ordering, deterministic generator1 with plausible soil surface/stone below and canonical absolute-coordinate encoding via actual Void Binary/Hash, uses no shared RNG. Mask all cells outside partial region.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Ordinary query distinguishes outside bounds vs unavailable vs loaded air; returns stable coordinate/read stamp matching caller lifetime. Separate pure generation/preparation from explicit all-or-nothing publication so later M02 owner controls logical tick. Region may not install result from a different region/seed/generator/coordinate or expired expectation. Keep page/availability paths usable by future persistence. A bounded atomic edit requires exact revision expectations for each touched chunk (including no-op), rejects duplicate cells, unsupported material/coords/bad expectations before publishing. Empty/all-identical edit has no changes. Sort changed cells/pages and actual neighbor invalidations canonically; increment once per truly changed page, unchanged neighbors keep material stamp, loading must be observable by dependencies. Extreme revision denies change before first effect. No need for unload until a later consumer, if implemented prevent ABA with persistent stamp. Define what finite bounds/unavailable neighbor contributes to dirty key.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Host only builds Windows; unit checks linked in actual settlement_core_tests. Root merges S02 into M02 and cumulative only after review. Need write stable header before dependent S03/S17 and alert parent if implementation materially changes contract. Other workers own old World/codec/camera, never edit those. Local implementation explicitly references Void/Library #11/#14 in S02 docs with exact replacement tests.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Widen origins, local indexes and neighbor math before conversion; avoid INT overflow/padding/endian and unbounded directory/grid construction. Bound working + staging memory before allocations and reject insufficient limits unchanged. Stage all pages and result list before final nonthrowing swap; preserve original content/pointer/revision on bad batch, allocation failure and MAX counter. External retained snapshots own memory separately, state its limit precisely. Prefer compact materials and deterministic column generation; full active 256 pages must not cause unrelated pages to be recopied on each edit. No nondeterministic unordered serialization or generation.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Exact split/join and x-fast indices at INT_MIN,−33,−32,−1,0,31,32,INT_MAX incl [max,max+1) and partial negative/extreme bounds. 2. Canonical full material content and revisions independent of forward/reverse/parallel preparation, real neighboring signed coordinate continuity/golden seed, precise different availability/air. 3. Two-page edit succeeds atomically and old view unchanged; stale second/unloaded/duplicate/unknown/budget/MAX fail unchanged, unchanged writes validate expectation and do not increment; correct face vs edge neighbor invalidation across boundaries. 4. No additional unlinked generic shim outside #11/#14; real release compilation and focused/full CTest, report actual footprint/copy behavior and evidence. 5. Document useful public operations in S02 and share frozen header.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/s02-voxel-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run --tag voxel-region at your build, complete CTest -V (coordinate any real windows via root) and git diff --check; logs /tmp/stoneheart-milestones.xprJ2SVp/s02-voxel-*.log. Native Windows beyond cross tests not verified. Test revision exhaustion via meaningful persistence/import or narrow deterministic seam without exposing an unchecked arbitrary setter.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not silently expand M02 to full renderer/World or change prior save formats. If dependency contract missing, verify pin plus check existing issues, report exact consumer/guarantee and root handles any filing. Two unsuccessful same-cause fixes escalate with original contract/evidence. No publishing or other checkout edits.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestone/system coding, Gitea PRs and true Void gaps. Root chose region identity and finite signed z-up cells, M02 product decisions in milestone doc; planner/preflight complete for this slice. Concrete bounded storage/container choices delegated.
|
||||
|
||||
## 14. Return format
|
||||
Return S02-01 READY or PARTIAL, early frozen API and relevant coordinate/frame assumptions, controlled failure cases, working paths, actual verification counts/measurements/limits and remaining integration seams.
|
||||
|
||||
The M02 door uses two stable non-generated cell kinds, `MaterialId::DoorClosed` and `MaterialId::DoorOpen`, appended after Air, Soil and Stone. A closed door blocks body clearance; an open door and air permit clearance. Only Soil and Stone provide standing support. Publish NEW `voxel_blocks_passage(MaterialId)` and `voxel_provides_support(MaterialId)` queries for the navigation and presentation owners. Both halves of a door can be changed in the same checked edit batch. Invalid materials remain rejected. The generator produces natural materials only, and the gameplay owner controls who may operate or mine a door. Add tests for these shared semantics, both updating over a page boundary if applicable, and tell root when the adjusted header is frozen. This prevents a second source of door geometry, occupancy and invalidation in navigation.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Find and revalidate settler routes across editable voxel chunks
|
||||
|
||||
Task ID: S03-01
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Actual isolated system/s03-navigation worktree at 6d1123e has frozen region API voxel_region.hpp, S02 implementation/registration arriving from sibling before testing. M02-P1/F1 reviewed source/algorithm limits; M01 flat assignment_path keys are two-dimensional and World::step advances without revalidation. S03 is disjoint from existing World and S02 implementation. Void 7b0fea6095f603f9e1904f66dfdc7752f4be4792 supplies IndexedGraphView/bfs/shortest_path_unweighted WorkLimits. Generic consulted revision sets absent, already tracked #13.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement tested bounded 3D ordinary-settler path query, interaction positions, consulted effective chunk revisions and transition revalidation. Ready for the authorized M02 World movement/mining owner to consume; send actual frozen public API early.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only new voxel navigation module, real standalone tests, CMake entries and S03 docs. Use shared S02 data; leave old flat A*, World/serializer/actual HWND/drawing to their assigned M02 consumers. No new navmesh, multi-region streaming, liquids/animals or future profiles. Do not copy any unfinished S02 source.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read docs/plan/milestones/M02.md, systems/S02/S03, void-library.md and M02-P1/F1/S02-01; frozen engine/include/settlement/core/voxel_region.hpp at6d1123e, root engine/src/world.cpp assignment_path/advance, headers command_dispatcher.hpp::SessionIdentity (UUID epoch), CMake/tests. Official pinned Void/Algorithms/Graph.hpp plus tests in pinned tree, see real limits, edges, start==target early success.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/voxel_navigation.hpp; engine/src/voxel_navigation.cpp; tests/voxel_navigation_tests.cpp; CMakeLists.txt; docs/plan/systems/S03.md
|
||||
First three paths are new. In CMake add only your source, test and, if needed, a link to the already enabled Void::Algorithms target.
|
||||
Other people work in separate WTs; never overwrite/revert their work, never change shared Serena project. No Git/remote ops, children, edits to S02 files, existing World or M01.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Represent foot at one voxel, two vertical cells clear, support directly below. 4 horizontal cardinal neighbors with level/one-step up/down, no unsupported pure flight or diagonal wall/corner clipping. Evaluate the swept body under up/down (needed headroom over raised/descending transition). Reuse S02 voxel_blocks_passage/voxel_provides_support and stamps; DoorOpen+air passable, DoorClosed blocked; soil/stone support only. A stair flight is a sequence of supported steps. Provide single-hop validation and standing check from same queries as solver, and separate API for adjacent accessible task interactions (range/line of contact cannot mine through wall/above unreachable geometric separation).
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW request/result includes region and session/incarnation from existing actual UUID type, bounded search volume/goals (deterministic ties), route/current to goal route semantics documented, cost, failure reason, sorted deduplicated consulted chunk stamps incl support/head/blocked/unavailable neighbours, and stale check via Region.matches + owner session. An unrelated edit must preserve result. Opening previously unavailable gateway invalidates negative result, same ID and numeric revisions after world reload still require new session. Distinguish invalid inputs, truly unreachable, unavailable/awaiting activation, boundary/budget and cancellation errors. Small finite known search uses Void::Algorithms::bfs or shortest_path on bounded IndexedGraphView; respect start==goal check before library fast path. For multi-goal choose canonical shortest (distance then stable coordinate and neighbor order); restrict result to reachable interaction positions. Do not allocate full coordinate extent on sparse huge region. Check vertex count, edges/step/aggregate scratch, size_t/int64 computations and bound read-set. Non-exhaustive clipping/budget must not masquerade as proven unreachable.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Parent gives compiled S02 implementation and test registration via local merge after worktree is sealed when ready. Can compile your TUs against header first; no mock replaces genuine final evidence. Future M02 authority, persistence, frame/picking will use foot positions/goal and read stamps. Protocol11/legacy file unaffected. Local revision set #13 to be linked with its exact replacement tests in S03.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Include INT extremes/partial bounds/overflow, headroom at source+destination, missing vertical support in a different page, start==same blocked target, path/missing pages and time/epoch; cannot mutate captured VoxelRegion. Keep memory bounded by explicit realistic work limits; e.g. 256*32³ cells must not allocate 136MiB per worker to traverse a four-cell corridor. Check allocation failure/too many input goals gracefully. Avoid per-node heap allocations for bounded neighbor enumeration where appropriate. No hiding application bugs in arbitrary timeout/different path cost.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Real S02 volume route through two-cell open door and cross-chunk stair to upper interaction; closed door/headwall/no support block and reason. 2. Remove next future support while traveler still safe, route/stamps stale, next-hop rejects; reopen, route returns; unrelated chunk change preserves validation; unavailable-to-loaded negative becomes stale; new session stale. 3. Stable exact cost/goal/tie path on small fixtures vs independent exhaustive reference + multiple worker schedules, direct same-goal invalid case. 4. Explicit bounded-limit behavior before dense allocation/partial proof, integer extremes and deterministic sorted queried stamps. 5. Real cross-build/full tests with S02 and docs issue linkage.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/s03-navigation-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. After link run --tag voxel-navigation, full ctest -V and git diff --check with /tmp/stoneheart-milestones.xprJ2SVp/s03-voxel-*.log. Native Windows unavailable. Before full interactive CTest contact root to avoid simultaneous keyboard-driven smoke test.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No invented S02 or Void API; if integration contract insufficient, send precise new dependency to root and continue self-contained cases. No alternate user workflow, new external tickets, or duplicate library pathfinder. Two unsuccessful same-cause attempts escalate. No remote or children.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User requested all milestone/system coding, actual upstream library gaps and per-branch MRs. M02 architecture accepted ordinary one-cell-wide/two-tall profile, one step max; root handles publishing.
|
||||
|
||||
## 14. Return format
|
||||
Return S03-01 READY or PARTIAL, early stable interface for M02 owner, actual code/test limits, work bounds and cross-branch evidence including cross-boundary route/invalidation and distinct failure outcomes.
|
||||
|
||||
Review at `7a7ff32` found a confirmed negative-result bug. On a solid, loaded z=0 floor a downward candidate may sample an unloaded z=-1 support while the known solid destination foot conclusively forbids the transition. A two-high closed wall then appears to be waiting for unrelated activation. Retain the actual sampled stamps but classify missing data as a potential frontier only if the corresponding transition, standing goal or reachable continuation cannot already be ruled out. Add the walled-floor regression and a positive genuinely unavailable frontier. Check analogous search-boundary handling and real interaction targets. Keep the existing signature and scoped files.
|
||||
Independent interaction clipping finding at `17389b2`: a known blocked list of in-window contacts does not prove a global negative when additional valid interaction candidates lie outside the finite window and the reached search frontier can leave it. Reproduce in a flat 8×8×4 fixture, start (1,1,1), search upper.x=4, target stone (3,3,1), blockers (2,3,2), (3,2,2), (3,4,2) and (3,3,3). With a reachable contact at (4,3,1) the narrow search returns SearchBoundary; upper.x=6 must reach it. Preserve all prior fixed direct-goal and unknown-frontier contracts. Include cases without any traversable exit and with an unavailable exit, freeze actual before/after code and run 13 previous focused cases, new regression and full CTest under the shared GUI lock.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Persist production order identities and allocate complete command batches atomically
|
||||
|
||||
Task ID: S04-01
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive /home/faumaray/Projects/stoneheart_at_home-worktrees/s04 system/s04-jobs-reservations base 4ba64f7. WorldState includes capture, S06 durable storage/node refs. S15 envelope v1 accepts raw World v1–13. M01-P3/V9 identified all insertion and refusal paths including storage demolition replenishment and LegacyCabinPayload in S16. Upstream durable allocator #7.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Give every production order a persistent World-scoped ID, remove stored positional production references, preserve identity history in modern checkpoints while keeping original saves/wire exact, and make all order-allocating business commands reject exhaustion without partial effects.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Production identity, high-water mark, ABI/caller migration, modern raw/envelope generation and validated v1 import. Keep zero none, leave new stack/ownership/transfer records and broad economy behavior to later slices. Preserve historical default formatting/encoding and v11 public network.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect world.hpp, world.cpp all insertion/erase/use sites and missing_carpentry_orders, world_save.cpp body/validate, checkpoint.cpp/.hpp/checkpoint_files.cpp, command_dispatcher.cpp catches LegacyCabinPayload, viewer resident detail, existing tests and old baselines. F3/F5, M01-P3/V9. Inspect/preserve exact pinned Void Numeric/Binary/Crypto and prior deterministic corpus.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/world.hpp; engine/src/world.cpp; engine/src/world_save.cpp; engine/include/settlement/core/checkpoint.hpp; engine/src/checkpoint.cpp; engine/src/command_dispatcher.cpp (only legacy cabin exhausted outcome); app/viewer_win32.cpp (resident production details only); tests/core_tests.cpp; tests/identity_tests.cpp; tests/replay_tests.cpp; tests/production_identity_tests.cpp (NEW); tests/checkpoint_tests.cpp; tests/checkpoint_file_tests.cpp; tests/session_tests.cpp; CMakeLists.txt; docs/plan/systems/S04.md
|
||||
Only touch listed affected tests/callers as needed. Other owners touch UI, files, profiles elsewhere. You are not alone; root integrates branches. Do not edit other worktrees/Git/Serena.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Add real ProductionId, immutable order identity, WorldState::next_production_id_, Agent::production_id (0 absent), bounded sorted lookup, erase without index repair. Centralize all order insertion incl queue_production and both direct PlaceRoom loops. Calculate exact whole ID requirement and incrementable successors before any command/domain side effect. Single and multi-order (bed, loom, workshop, rooms/furnishings, direct cabin and implicit replenishments) precheck numeric exhaustion as well as vector allocation. MAX terminal valid, last allocatable MAX-1. Calculate EXACT post-demolition missing carpentry counts across products/requirements WITHOUT erasing/mutating storage first, reserve all IDs before deleting stock or appending any order. If full batch cannot fit return nonmutating Busy with exact old storage/stock/sequence and counters. For LegacyCabinPayload use explicit testable pre-mutation exhaustion result/exception, narrowly translate THIS proven refusal to completed Busy in CommandDispatcher::apply, retain exact repeat while session remains healthy. Do not catch a generic error that could follow partial mutation. Other unexpected errors use F3 fault boundary. Avoid duplicated independent registries.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Default World::write_save(std::ostream&) still emits exact v13 bytes and historical positional links, old callers incl LAN11 unchanged. Add explicit modern World write mode v14 (new actual enum or method) using same codec/body, include stable refs / order IDs/high-water; now World::read_save handles appropriately. Checkpoint encode becomes schema2/modern body14. Decode authentic schema1/inner1–13 and schema2/inner14 only, verify signature & checksum using common codec, latest high-water after deleting last/highest/all survives. Historical import assigns IDs deterministically in vector order with next > live max; no new UUID on modern reload. Validate sorted unique nonzero ProductionIds, strictly larger next (MAX valid), referenced target existence/state before indexing. Keep envelope magic unchanged. Old file-adapter test hardcodes unsupported next value 2: change to actually unsupported value and retain a true pre-change v1 fixture, not just changing expected bytes. Tell root exact frozen API early.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns final merge. S18 worker also touches UI but not resident-detail lookup; S19 profiles separate. File reader matches same signature and uses generic decode; ensure outer/inner pairing tests even when attacker recalculates both checksums. Registry consumers continue using const World. Use existing checked arithmetic; local implementation+replacement link Void/Library #7 in docs and allocation source where useful.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Avoid O(N²) repeated scans of million-record parsed data; legacy index projection/import bounded as in S06. Active resident must keep same original order when lower deleted. All domain normal refusal keeps previous capacity/contents/command seq; last accepted identifier remains unaffected by vector erasure, world capture or save. Ensure no different command arbitration/legacy behavior on ordinary non-exhaustion. Preserve legal old v1–v13 payload behavior. Do not overwrite any user save.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Deleting lower/highest/all orders followed by v2 reload + allocating another never reuses IDs, actual mid-haul agent remains bound; corrupt ID/dangling/current combinations rejected. 2. MAX/MAX-1 single and multi batch incl room/cabin/stock demolition with multiple products, verify byte-identical complete current state/unchanged seq after Busy, and exact replayed cabin Busy with healthy runtime. 3. Authentic checkpoint v1 lower inner and v13 accepted, wrong pairing incl v1/14, v2/13 rejected with valid checksums. 4. Per-tick MODERN canonical replay including ID state across serial/2/6/12, old default v13/legacy benchmark data compare exact. 5. All cross suites pass.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/production-id-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <dir>/settlement_core_tests.exe --tag production-id, full verbose CTest, git diff --check; fixed binary compatibility corpora at /tmp/stoneheart-milestones.xprJ2SVp/old-trajectory.bin and identity-compat-old.bin, baseline 4ba64f7 artifacts. Save logs production-id-*. No synthetic recreation of a golden old checkpoint with the new encoder.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No broad rewrite or custom replacement for supported Void primitives, branch changes or further agents. If existing unknown pre/post mutation exception means a Busy lie, stop and send contract+counterexample. After two failed repairs raise distinct hypothesis with evidence.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestone/system features, commits/push and merge requests. M01-V9 requested exact demolition and cabin corrections; parent obtains narrow preflight recheck before dispatch. Root owns all side effects.
|
||||
|
||||
## 14. Return format
|
||||
Return S04-01 READY/BLOCKED, public format and ID APIs, actual coverage of all allocation sites, clean failure outcomes, compatibility corpora hashes/tests, and remaining later custody/native risks. No children/commits/push.
|
||||
|
||||
The middle-of-delivery assertion in `tests/snapshot_tests.cpp` also reads the removed production index. The implementer owns its equivalent check of the stored nonzero production ID.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Resolve stored logistics references by stable storage and resource IDs
|
||||
|
||||
Task ID: S06-01
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Isolated checkout /home/faumaray/Projects/stoneheart_at_home-worktrees/s06, system/s06-logistics begins a4cf99c. M01-P3 mapped World+codec+UI references, M01-V6 requires checked exhaustion for all storage/node allocation paths. Actual WorldState groups the complete capture; modern v1 checkpoint embeds format13; legacy tests 1–13/LAN11.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Migrate live Agent::resource_node_index and storage_index, MaterialReservation::storage_index and ConstructionStop::storage_index to the selected objects' existing nonzero IDs. Deleting an earlier unrelated element must preserve all targets and quantities. Cover restoration and ID exhaustion.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S06-01 storage/resource references and checked allocation at all existing sites. Production index and next agent/job/production counters have their own later contract, stack/reservation/transfer identity comes later. Preserve deliberately confirmed stock demolition behavior. No public new network protocol, geometry, checkpoint schema or UI feature.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect world.hpp, world.cpp, world_save.cpp, first_colony.cpp, viewer_win32.cpp resident detail, graphics/callers including benchmarks, core/replay/snapshot/checkpoint tests. Read S06/S04, M01-P3/V6, pin Math/Numeric.hpp checked_add and Core/Counted.hpp. Use stable-vector ordering validated by WorldSaveCodec. Verify existing API users by rg.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/world.hpp; engine/src/world.cpp; engine/src/world_save.cpp; app/viewer_win32.cpp (existing resident-detail reference access only); tests/core_tests.cpp; tests/snapshot_tests.cpp; tests/replay_tests.cpp; tests/checkpoint_tests.cpp; tests/identity_tests.cpp (NEW); CMakeLists.txt; docs/plan/systems/S06.md
|
||||
Other code owners operate in isolated branches. You are not alone; do not revert others or change Git/shared Serena. Modify existing tests only for changed ref semantics, not to weaken checks.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Use zero as missing typed ResourceNodeId/StorageId, remove positional fixups for these members everywhere. Expose read-only bounded ID lookup and reuse ID-ordered lower_bound or equivalent. Keep indices ephemeral inside assignment and validation count arrays. Encode ID→old positional one-based/sentinel fields exactly; decode raw positions in explicitly bounded loader temporaries then convert to IDs after referenced arrays are populated and order validated, before world domain validation/use. Reject out-of-range/missing ID before indexing. Keep production_index/no_entity_index independent. Preserve ordering, deterministic routes and complete old wire bytes. Write source comments with linked replacement test for Void/Library #7.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
ID exhaustion: UINT64_MAX in next_* is a legitimate terminal high-water mark, last allocatable ID is MAX-1. Precompute checked successor with pinned Void::Numeric::checked_add before world/vector/terrain effects in World::add_resource_node, World::add_storage AND direct Place{BerryField,TreePlot,FlaxField,Mine} and PlaceStorage command paths. Only commit counter after successful construction/insertion. No returning zero, wraparound or duplicate IDs. Direct factory exhaustion raises std::overflow_error, commands return non-mutating Busy without consuming legacy sequence. For MAX-1 exactly one insertion then a stable serialized exhausted world. Validate invalid refs and preserve existing stronger invariants/canonical old bytes.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns CMake merge, dependent runtime/GUI packages, Git and upstream. Void/Library #7 covers restorable checked sequences; #8 is later custody, pinned Void Numeric handles arithmetic now. Preserve current std::unique_ptr<World> factories/mode, Render const path, standalone tests. No compatibility alias which silently restores use of vector indices.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Mid-carry before/after erasing earlier store/node, pantry meal, site tending with no storage, construction multi-stop delivery, carpenter output reservation, active targets remain protected by existing rules. Guard lookup for none/dangling, sorted IDs and caches. Ensure fast logarithmic lookups; avoid O(N²) scans or per-agent linear scans during codec, no duplicate durable map to synchronize. Check max vs max-1 inputs, failed insertions and byte-level determinism. Use pre-migration external baseline or saved corpus to verify exact bytes when gameplay equivalent.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Live references preserve meaning after erasing an earlier unrelated store/node; no shifted refs remain in runtime. 2. Capture, legacy save13, checkpoint roundtrip and serial/2/6/12 trajectories agree mid-haul. 3. MAX/MAX-1 at every allocation path, including mine blocked-cell/cache on rejection. 4. Damaged legacy indices reject candidate, no partial live mutation. 5. All tests/cross build pass incl baseline, focused identity tests and project docs.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/identity-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <dir>/settlement_core_tests.exe --tag identity, verbose CTest, git diff --check. Cross-baseline compare relevant old outputs; root shares /tmp/stoneheart-milestones.xprJ2SVp/trajectory.cpp & old-trajectory.bin. Report actual bytes/scenarios and time if performance measured.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No side effects outside checkout/build/log temp. Stop if current wire cannot represent migrating these existing IDs without loss, or a supported caller needs out-of-scope change, or after two failed repairs of the same issue. Do not silently drop malformed/legacy data.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestone/system implementation, upstream issues, commits and PRs. M01-P3 proposed slice and M01-V6 preflight correction is incorporated here; root confirms narrow corrective re-review before dispatch.
|
||||
|
||||
## 14. Return format
|
||||
Return S06-01 status, actual files/lookup and legacy conversion boundaries, overflow/Busy semantics, commands/counts, cross-baseline byte evidence, remaining limitations. No children/commits/push.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Apply a complete reserved pickup to one resident atomically
|
||||
|
||||
Task ID: S06-02
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Isolated system/s06-logistics worktree s06 at a8cd7bb (S04 ProductionId/current14, S19 selectable rules, S06 stable StorageId). Meals and construction stops call take_reserved_material then Inventory::add, and a carpentry output reserves a new storage slot at its first ingredient pickup. Earlier M01-P5/F7 require whole-stop preflight. Existing finish_production also calls take_reserved_material for direct storage→recipe consumption, a different operation.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement checked all-or-nothing physical pickup in both real meal and construction stop paths, including a carpentry output slot when applicable. Retain normal simulation bytes/timing. Cover overflows, split duplicate material entries and late failure before mutation.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
No save version, StackId, worksite ownership, reservation ID, journal, general-purpose database or protocol change in this slice. Keep existing direct recipe consumption in finish_production. Stage only future work in appropriate system notes.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read engine/include/settlement/core/world.hpp Inventory/Storage/ItemStack/MaterialReservation, engine/src/world.cpp named consumers, world_save.cpp validation/legacy split records, tests identity/production_identity/core/replay, and S06 documentation/linked Void #8. Consult pin include/Void/Math/Numeric.hpp checked_add/sub. Root baseline cumulative a8cd7bb.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/src/world.cpp (narrow meal/construction stop pickup and related local helper); NEW engine/include/settlement/core/inventory_transaction.hpp and engine/src/inventory_transaction.cpp if needed for a shared testable operation; NEW tests/quantity_transaction_tests.cpp; CMakeLists.txt only source and test entries; docs/plan/systems/S06.md
|
||||
Exclusive to your isolated s06 worktree. Others work in sibling worktrees. Do not revert others' changes or edit unrelated methods/world_save/UI or shared Serena state. Root owns Git and remote.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Use one bounded operation over a single Storage and resident Inventory, evaluating present source/reserved counts, aggregate duplicate participating lines per type, and checked destination increments. If using the whole order span, choose only lines at the current storage; a missing/zero/invalid selection fails. Reject invalid types/None, zero amount, overflows, insufficient reserved or count and reserved>physical. Preserve source stack order, prune zero stacks without allocation; prevent throws between first and last logical writes. Use the existing checked Numeric API. For carpentry precompute reserved_slots successor and ensure post-withdrawal total_items+reserved_slots<=capacity before any quantity write; move commit/route/cursor only after success. No per-line mutating call before complete preflight. Failures observed by the owner must preserve last healthy publication. Avoid needless repeated lookup/allocations.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Prefer one simple domain function returning std::expected<void,typed quantity diagnostic>; exact type and header naming locally flexible. Application entry precondition is pickup-function entry: World::step may already advance walking position/route_cursor earlier in the tick. On pickup rejection, no additional stop, inventory, reserved slots/stock, route replacement or state transition; never publish partial transfer. Cover zero/foreign-only or out-of-range data; existing legitimate repeated material entries aggregate. Raw13/LAN11 layout stays byte exact and modern Current14 shape stays the same.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns merging this branch to milestone/integration and cross-branch checks. P5 future durable IDs and reservations will consume this operation. S04-01 and S19-02 are already present; S18 UI can proceed independently.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Data bounds as provided by old loader; max distinct types item_type_count, avoid allocating proportional to a user-provided count. Do not wrap at uint32 max on destination, source/slot arithmetic or sum. Source storage count/metadata may be inconsistent on direct test input; fail safely. No total mutable parallel ledger. Minimize impact on World::step hot path.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Source/dest byte-equivalent on success for valid meal and multi-material/multistop/carpentry paths, tested from production code. 2. A two-item stop late failure plus cumulative duplicate and destination overflow leaves all stock/reserved/capacity/inventory unchanged. 3. Successful exact depletion removes zero stack, respects source order and reserve slot. 4. Replay serial/2/6/12 modern checks and both old byte corpora unchanged. 5. Document limits separately from future custody and link Void #8 replacement.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/quantity-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Use --tag quantity-transfer on new tests, CTest -V, git diff --check; /tmp/stoneheart-milestones.xprJ2SVp/old-trajectory.bin and identity-compat-old.bin old golden outputs were checked by s04 (portable projection probe sources in same directory). Keep verification logs quantity-* in that temp root.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not fake output inventories for finish_production or weaken legacy validity, add unrelated changes or use unbounded copies. Alert root if actual code contradicts the contract. Root owns commit/push/MRs/upstream issues. After two failed same-cause repairs escalate; no children.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Approved M01 item conservation and per-system development. F7 corrective terms are included above. Conditional batch issue Void/Library #8 already registered; parent owns external tracking.
|
||||
|
||||
## 14. Return format
|
||||
Return S06-02 READY or PARTIAL, owned files, exact tradeoffs/failure boundary, actual tests/golden output, any native and deferred full-custody limitations. No Git/remote operations.
|
||||
|
||||
F7 corrections are binding. Item indices are checked against 1..item_type_count before using type−1. Aggregate nonadjacent duplicate lines, handle an absent stack, and preserve the original first material's storage as the output source even when it is visited after another stop. No stale iterators may survive zero-stack removal. Include valid exact UINT32_MAX destination count, multiple erasures with unrelated surviving stacks, full storage freeing exactly one carpentry output slot, invalid slot/capacity state rejected before physical transfer, and direct storage→output production compatibility.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Publish immutable save requests asynchronously on Windows
|
||||
|
||||
Task ID: S15-01
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive /home/faumaray/Projects/stoneheart_at_home-worktrees/s15 system/s15-persistence, baseline 8d2870a. Root and other authors use different checkouts. S15-W02, M01-P2/F3, Void pin 7b0fea6. Root created https://git.faumaray.com/Void/Library/issues/3 for unsupported Windows replace_file.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement a bounded FIFO background Windows save service, with atomic same-volume publication of immutable request content and meaningful failure outcomes. Provide API/test surface for viewer and later checkpoint framing.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Own independent S15 file service only. No UI/World/serialization format change. Input is a snapshot-owning producer (or shared immutable bytes) with tick, epoch and request identity; synchronous existing save helper remains until owner integration.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect app/viewer_win32.cpp::save_world_file, current save codec, docs/plan/systems/S15.md. In exact pin inspect Void/System/Path.hpp (ReplaceFailure, unsupported Windows), Void/Async/{ThreadExecutor,FuturePool}.hpp for a single writer and bounded admission. Existing env and library checkout are in /tmp/stoneheart-verify.KoZwE4o8.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/save_service.hpp; engine/src/save_service_win32.cpp; tests/save_service_tests.cpp; CMakeLists.txt
|
||||
You are not alone. Use explicit workdir/absolute paths only in specified worktree; others own independent systems. Root handles CMake merges/Git. Do not edit main or change shared Serena project.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Give each accepted save a monotonic request identity, captured tick and session UUID (reuse Void::Uuid::Uuid or consistent fixed bytes). Materialize from immutable producer on writer thread or allow shared immutable bytes, further integration must keep snapshot acquisition cheap. Bound queue including in-flight and return Busy/Closed before ownership side effects. One FIFO writer ensures older accepted saves cannot replace newer same-slot requests. Use pinned Void Async where suitable. Worker completes all accepted requests on shutdown. A failed producer/write must deliver completion and next FIFO task continues.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Publish to a unique same-directory staging file created exclusively, write all bytes incl embedded NUL, handle short/error or close failure, explicitly FlushFileBuffers, atomically rename with replacement on the same volume; preserve previous slot on any prepublication failure, remove only owned staging files and distinguish postpublication visible/durability-unknown. First create, Unicode paths, sharing errors. Keep application-crash observations separate from power-loss guarantees. Local adapter + replacement criterion and upstream #3 link. Deterministic fault injection at phases for test; do not broaden external access. Communicate API early.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
S01 runtime later captures immutable snapshot/manifests, S15 checkpoint codec constructs bytes, UI will enqueue this service and poll completion. No dependency on unfinished runtime/system branch. CMake public types require actual transitive includes for callers.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Serialize FIFO submission ordering even if concurrent callers; expose or check order via returned IDs. No blocking UI submission, no mutex held waiting for disk/producer or while joining. Same-directory sibling preserved on failures. Use isolated temporary directory for tests, never overwrite user files. Reject missing parent/closed service; documents should make overwrite/new behavior clear.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Unicode path succeeds on create/replace while readers see full contents. 2. Prepublication failures preserve old bytes, temp cleaned, postpublication failure truthful. 3. Slow earlier/newer order on a single slot, bounds, shutdown drain, producer exception followed by next success verified. 4. Tests establish immutable snapshot life & UI caller progress without sleep-only assertions; tag save-slot and run under Wine.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/save-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Tests use new empty temp dirs, Windows/Wine results labelled. Collect native limitations. Provide specific replacement test for Void #3.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop if Windows primitive cannot meet claimed contract or tests prove a different outcome. After two failed repairs escalate with artifacts. No external writes, further agents, branch operations, admin actions or out-of-scope edits.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved entire roadmap and per-system development with commits/push from root. F3 accepted FIFO ordering and failure semantics. Upstream issue already exists.
|
||||
|
||||
## 14. Return format
|
||||
Return S15-01 status, exact API/files, failure/visibility semantics, commands/counts, native verification still needed and integration notes. No subagents.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Encode and validate versioned world checkpoints with frozen rules
|
||||
|
||||
Task ID: S15-02
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Isolated checkout /home/faumaray/Projects/stoneheart_at_home-worktrees/checkpoint, detached de38aff (reviewed S19 rules + M01 replay). Parent integrates this into system/s15-persistence. Legacy World::write_save/read_save and their validations implement formats 1–13. default_rules_manifest resolves two real built-ins. Pin 7b0fea6095f603f9e1904f66dfdc7752f4be4792.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement a bounded modern checkpoint codec admitting a stable world UUID, city identity and a verified rules manifest together with the existing canonical world state. Produce a complete validated candidate without touching live state.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Game-specific envelope, built-in installed-catalog API only if needed, tests. SaveService, asynchronous requests, session/epoch assignment, UI, new custody fields, scripting are independent packages. Existing default format13 encoding and LAN11 fixtures must still pass.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect engine/include/settlement/core/{world,rules_manifest}.hpp, engine/src/{world_save,rules_manifest}.cpp, tests/{rules,core,replay}_tests.cpp, CMakeLists.txt, docs/plan/systems/{S15,S19}.md. Inspect pinned Void/Binary, Crypto SHA256, Core Uuid public types/tests.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/checkpoint.hpp; engine/src/checkpoint.cpp; tests/checkpoint_tests.cpp; CMakeLists.txt; engine/include/settlement/core/rules_manifest.hpp; engine/src/rules_manifest.cpp
|
||||
Use last two only for extracting the actual built-in catalog behind existing default_rules_manifest. Others own writers, S01/S16 and separate checkouts. You are not alone, do not revert others or change Serena/Git.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Define NEW encode_checkpoint(const World&, stable world UUID, nonzero city, const RulesManifest&) and decode_checkpoint(bytes, installed RulePackage catalog, workers/mode), or equivalent precisely typed API. Use distinct magic+schema, little endian Void Binary, SHA-256 integrity over all meaningful header+payload bytes. Persist complete selected closure with each sorted stable ID, exact version, content digest and compare recomputed manifest from installed catalog, naming missing/changed package. Serialize core once with existing World codec. Verify bounded lengths/counts and outer integrity before domain/world allocations. Reject extra bytes, unsupported version, nil identity/zero city, metadata mismatch incl tick if stored, missing/extra/conflicting rules. Candidate returns unique World, identity, matching immutable manifest. No on-disk active session/ledger. Report simple actionable diagnostics while preserving ownership; do not make persistence a signature/authentication.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Use Void::Uuid::Uuid for world, uint64 city, RulesManifest and RulePackage directly. Add public installed builtin_rule_packages() returning expected catalog if needed, reuse in default_rules_manifest. Keep compiled-in fixture contents identical. Frozen rules independent of current active world. Allow later versioned state for new custody data without breaking old fixture. Match preexisting 128 MiB body cap plus separately bounded metadata before buffering. Communicate actual API early.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
No dependency on writer or runtime; immutable capture later calls encode in background, validated decoded world goes to runtime replacement. No new framework/dependency or external issue is needed for game framing using supported primitives; report a genuine missing generic capability to root.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Adversarial truncations, length overflow, malformed counts/input, duplicate packages, package digest/version/build mismatch, corrupted canonical body with recomputed outer checksum, lossless old bytes, world/identity/city survival. Decode allocates only from bounded data; respect existing output failure behaviors. Reading legacy file remains via World::read_save.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Round-trip a live and mid-carry world, compare full canonical world bytes and continued ticks. 2. Selecting alternate installed packages round-trips and validates against a catalog in different order. 3. Corruption, incompatible/uninstalled rules, bad UUID/city, lengths/trailing data fail with usable diagnostics while original world is untouched. 4. Old save13 & LAN11 and all existing suites pass.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/checkpoint-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <build>/settlement_core_tests.exe --tag checkpoint and git diff --check. Check commands from YOUR worktree.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No changes to shared checkouts or external services. Stop on ambiguous destructive format migration or incompatible real library semantics. Escalate after two failed repairs of the same defect.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Parent owns Git. User approved milestones/systems, commits/push; plans M01, M01-F3 cover independent validation before any owner replacement. Parent will review actual diff.
|
||||
|
||||
## 14. Return format
|
||||
Return S15-02 READY/BLOCKED, exact API, owned files, frame and limits, test results incl counts, residual limitations and later runtime integration. No subagents.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Prepare checkpoint files in the background for the interactive client
|
||||
|
||||
Task ID: S15-03
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive s15 checkout /home/faumaray/Projects/stoneheart_at_home-worktrees/s15 system/s15-persistence fast-forwarded to 8c4c1fe. Includes verified runtime PublishedSnapshot, S15 checkpoint and SaveService + builtins. M01-F4 accepted bounded background file adapter; #3 is the linked Windows atomic-write contract.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Supply a usable persistence adapter for the real window: submit save of a held PublishedSnapshot, prepare a modern or legacy file asynchronously into a complete WorldCheckpoint; no disk or parsing on UI/owner thread.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S15 file API/implementation and test/docs/target integration. Viewer itself and its load-ticket/feedback lifecycle are owned separately. Existing SaveService handles writes; existing World/checkpoint codecs handle validation.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect actual simulation_runtime.hpp (PublishedSnapshot immutable), checkpoint.hpp/.cpp, save_service.hpp/.cpp, rules_manifest.hpp/.cpp, world_save.cpp signature/limits/validation, viewer current dialog/select and file handling. Review Void Async ThreadExecutor/FuturePool lifetime/admission tests and pinned Windows IO coverage. M01-V6 requires max_checkpoint_bytes.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/checkpoint_files.hpp; engine/src/checkpoint_files.cpp; tests/checkpoint_file_tests.cpp; CMakeLists.txt; docs/plan/systems/S15.md; engine/include/settlement/core/checkpoint.hpp and engine/src/checkpoint.cpp only if needed to expose canonical signature recognition
|
||||
No changes to other worktrees/Git/Serena/Win32 UI. You are not alone; other workers own runtime, LAN, UI, World/custody. Parent integrates CMake.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Introduce NEW CheckpointFiles owning one existing SaveService configured max_checkpoint_bytes and a bounded pinned Void reader executor/FuturePool. try_save(absolute path, shared_ptr<const PublishedSnapshot>) delegates to existing queue, producer owns const world/manifest and runs encode_checkpoint on writer. Caller acquired healthy snapshot already. try_load(absolute path,... immutable installed catalog, workers/mode) returns immediately with explicit admission and accepted future/typed diagnostic or complete candidate. Provide useful error for file access, limits, legacy decode, missing package etc. For modern signature call decode_checkpoint only, never downgrade after a modern failure. For legacy signature parse validated World::read_save and attach fresh stable nonnil UUID, city1, default supported manifest. Preserve exact prior old v1–13 paths; don't invent a mutable live session. Open each path once, enforce maximum read incl growth/EOF before consuming unbounded storage. Reader/writer can run independently; hold input/catalog through work, drain on shutdown.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Communicate exact header early. Constructor may own shared immutable installed catalog (default builtins) to simplify caller. Caller keeps this service for window lifetime across runtime resets; jobs never capture viewer/raw runtime or call GUI. Return SaveSubmission or precise adapter result preserving prior SaveService metadata. Reader producer can use an optional bounded observer/gate for deterministic tests following existing failure hooks if needed. No thread per file; explicit bounds & stable closed admission. Busy or invalid admission does not consume caller data. Viewer handles begin_load tickets/replacement policy, reporting and 32×32 restriction.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root wires UI later, receives filled result and verifies dimensions before SimulationRuntime::try_install; runtime itself rechecks epoch/ticket. Old valid file import gets a fresh stable ID on each explicit import. Default `.settlement` existing extension and title paths maintained. Store upstream #3 link where relevant; pinned Void supports asynchronous running and file codecs as documented. No external actions.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check Unicode filesystem path, open-one/read-one with changing files, oversized declared/actual data (bound including growth), corruption/trailing/truncation distinctly, catalog mismatch names missing package, nil UUID generator error, concurrent submit/shutdown/read queue/in-flight count, writer retains held snapshot after source advances. Avoid throwing from worker leaving pending futures. No double-opening for format detection, no fallback rewriting files. Track native/Wine differences.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Roundtrip actual immutable old snapshot through production save helper to file then load to independent candidate; live world progresses meanwhile. 2. Open true legacy fixtures and modern mismatches; invalid/oversized/trailing/frame corruption rejects. 3. Bounded and closed reader, deterministic held reader blocking test shows UI submit and writes/other work independent, shutdown drains, next read succeeds after bad file. 4. Normal cross build and old suites pass. 5. Frozen interface is usable for viewer async polls without lifetime hazards.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/file-adapter-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <dir>/settlement_core_tests.exe --tag checkpoint-file, full verbose CTest, git diff --check; files in new temporary Windows directories. Name logs file-adapter-*.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No editing viewer/custody, raw live World access from workers, remotely written actions or new external deps. If architecture requires a new generic capability report it to root. Two failed fixes for the same issue require escalation.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Root owns all Git; user approved roadmap and asked maintain PR/cumulative/issue tracking. F3/F4 and V6 freeze acceptance; Windows physical tests follow separately.
|
||||
|
||||
## 14. Return format
|
||||
Return S15-03 READY/BLOCKED, early concrete signatures for viewer, owned paths, complete tests/observations and limitations. No children/commits/push.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Dispatch authenticated session commands with exact retry outcomes
|
||||
|
||||
Task ID: S16-01
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive /home/faumaray/Projects/stoneheart_at_home-worktrees/s16 system/s16-authority, 8d2870a. Main checkout is a different task. F2/F3 and M01-P2 approve this scope; pinned Void 7b0fea6, upstream gap https://git.faumaray.com/Void/Library/issues/6.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement S16-W01 game command admission/dispatch in a single-owner component plus integration tests with two trusted client handles. Expose a frozen interface for S01 runtime and modern transport.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
S16 dispatcher only, no sockets/UI/clock or save format. Preserve legacy World::apply_command behavior and LAN11 decoding for existing callers.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect world.hpp, world.cpp World::next_command_sequence/apply_command and queue_cabin, app/lan_wire.cpp, tests/core_tests.cpp, docs/plan/systems/S16.md. Void/Core/Uuid.hpp at exact pin supplies nonnil identities/try_v4; source stubs/compile headers from known library checkout.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/command_dispatcher.hpp; engine/src/command_dispatcher.cpp; tests/session_tests.cpp; CMakeLists.txt
|
||||
You are not alone. All writes only to specified worktree with explicit absolute paths/workdir. Root integrates branches and CMake; no switching shared Serena, changing others' files, committing/pushing or spawning.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Use one host dispatcher per world/session and one shared city for M01 (plus disallowed city test). Authenticate caller via trusted local connection slot passed separately, never trust payload player. Envelope includes version, nonnil world+session UUID, city, uint64 request id, game action fields. Per trusted client require contiguous monotonic numbers from 1. Session/identity/version and trusted slot validated before any cached response. For full payload and city equal to an existing key, replay original outcome; reject ID reuse with a changed payload (compare all fields) without mutation. Persist accepted and completed rejected results within session until replaced. Global or per-client configurable capacity: Busy before NEW requests at capacity; honor all previously admitted receipts, no eviction/reexecution. Stale/out-of-order/busy transient errors don't consume request; completed domain rejections do. Store or reserve result before applying effect. Do not silently drop prior receipts on exceptions; runtime will retire faulted owner and session before more commands.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW CommandEnvelope/CommandPayload, session identity (using Void::Uuid::Uuid or fixed byte-compatible game type), target city and explicit outcomes incl status, assigned tick and revision; trusted player is supplied to dispatcher, not a payload identity. Map payload to PlayerCommand using World::next_command_sequence after auth, with no change to legacy sequences on rejection. Provide bounded acceptance path for legacy queue_cabin when needed by viewer (new owner command, preserve checked prerequisite and return outcome) or report exact adaptation to root. New command and session types should be usable without event loop. Share exact API with root early.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Consumers S01 runtime, S15 checkpoint and modern transport. Worker owns CMake additions in isolated branch; link Void::Core PUBLIC only if publicly required. Reference #6 in companion task + local source/milestone decision with replacement check. No extra generic ledger.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check nonnil IDs, invalid/unsupported action, sequence zero, overflow, two clients same request numbers, different payload/city, old world/session, accepted and failed duplicates even after later requests, capacity and exception-safe reservation. Old rejection corrected under a new envelope ID must still use correct World sequence. No hidden trust from bytes.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Two clients converge and repeat accepted/rejected commands without reapplication, including after newer requests. 2. Stale after rollback and wrong city/identity rejected with identical world bytes. 3. Changed payload, exhaustion, unsupported version/order bounded and tested. 4. Legacy and new tests build/run using actual World. Header communicates semantics to runtime.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/session-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Tag new tests session, including positive effects and exact repeat receipt tick/revision. Report performance bounds by inspection.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Escalate required cross-branch changes, genuine ambiguity or two failed repairs; use direct source in this worktree instead of querying the main graph as if it were the same checkout. No external actions.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorized full roadmap and branches/commits/push; root owns remote actions. F3 READY for S16 dispatcher under above semantics.
|
||||
|
||||
## 14. Return format
|
||||
Return S16-01 status, actual files and public interface early, semantics/complexity, test and build counts, gaps, runtime integration notes. No subagents.
|
||||
@@ -0,0 +1,50 @@
|
||||
# Serve compatible LAN clients from the immutable authoritative runtime
|
||||
|
||||
Task ID: S16-02
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive /home/faumaray/Projects/stoneheart_at_home-worktrees/s16, system/s16-authority fast-forwarded to 8c4c1fe. Existing LanSession::poll(World&) protocol11 is tested (4 cases/baseline binary interop). Runtime and command dispatcher new headers exist. M01-F4 identified manifest and outstanding-command reconnect gates, included below.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Add production host polling that consumes immutable runtime views and submits authenticated guest actions to the owner asynchronously. Add guest-only polling usable by a view-only client, preserve current hardcoded two slots and old packet format.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Legacy LAN11 compatibility adapter and actual loopback tests. No public new protocol/version or remote rollout, no new internet exposure. Preserve existing poll(World&) entry/fixtures for old API clients. Viewer source is owned separately.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect app/lan_session.hpp, app/lan_session_win32.cpp, app/lan_wire.hpp/.cpp, tests/lan_tests.cpp, simulation_runtime.hpp, command_dispatcher.hpp, world.hpp, rules_manifest.hpp, docs/plan/systems/S16.md. Read /tmp/stoneheart-verify.KoZwE4o8/interop.cpp/.py for existing binary interop.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: app/lan_session.hpp; app/lan_session_win32.cpp; tests/lan_tests.cpp; docs/plan/systems/S16.md
|
||||
If an identified shared codec change is necessary, contact root first; no data layout redesign. Other workers own Win32 viewer/core. You are not alone, do not change Git/Serena/other worktrees.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
NEW poll_host(SimulationRuntime&) and poll_guest() (or equally explicit) for real viewer. Wire11 Hello carries no manifest/epoch, so allow ONLY default compatibility manifest (verified frozen identity); close incompatible connection before exposing a snapshot/command. Bind host session incarnation; detecting replacement drops peer & requires new hello before serving new world. Existing TCP framing/auth and slot validation retained. Read current immutable published World and prepare v13 snapshots with current bounds. No direct mutation in new host path. Screen sends one action at a time; bound hostile/pipelined volume, keep pings/timeouts/disconnect progress, never wait on a long owner while polling socket. Serialize one outstanding valid command per authenticated guest slot.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Wire request IDs are legacy World::next_command_sequence(guest), only accepted gameplay increments them. Modern envelope number from committed PublishedSnapshot::next_requests[guest] also advances on domain rejection. Precheck wire sequence without mutating state; old wrong-sequence -> expected number. Submit trusted guest=2, verified UUIDs/world/city/version, exact payload; report the correct legacy result and next wire sequence only from corresponding committed runtime result. Reject unsupported actions using existing authority. Track one outstanding admitted operation across TCP disconnect/rebind; suppress old-connection replies by connection generation, hold/reconcile its completion before next guest's sequence or authentication/publication is used, prevent reusing in-flight modern request number. On epoch change fence old future before new peer bind. No borrowed runtime pointer persisted. Expose status to viewer on incompatible rules/fault. Send early public signatures.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns actual Win32 viewer integration. Runtime consumers now available at baseline; old standalone overload remains tested. Add only in-process loopback tests using random port/loopback flag. Reuse existing socket implementation and avoid duplicate dispatch/snapshot logic. Legacy reader file/body remains format13 and lower limits; world with unsupported future schema must be rejected explicitly in later change.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
On Busy/Closed/Faulted/superseded/out-of-order preserve protocol-correct old next id and prevent lost reported effects. Guest can correct a rejected action using same old number. Do not retain retired peer's optimistic blueprint metadata. Check long owner tick does not block server pings/poll; settled work from old peer cannot reply to a new one. Enforce bounded admission and no logs of join codes. Test a publication at same tick.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Old-style genuine guest joins runtime-owned host and receives actual committed world; user action, domain rejection and corrected next command preserve legacy sequences. 2. Deliberately blocked/delayed command, disconnect/reconnect, no old receipt to new peer, sequential guest slot safely resumes. 3. New epoch and non-default manifest refuse or reauthenticate before any legacy snapshot. 4. Both existing LAN11 fixtures and old API work; deterministic cross-version loopback including old guest executable. 5. Real x64 tests and warning status.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/lan-owner-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <dir>/settlement_lan_tests.exe --tag lan (or registered runtime LAN tag plus full target), verbose CTest, git diff --check. Logs lan-owner-*. Root can stage external original-binary harness if needed.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No changes to socket reachability, authentication standards, new transport, UI or unrelated game state. Two failed fixes for the same defect -> send evidence and changed hypothesis to root. No children/Git/remote mutations.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User approved milestone/system work, commits/PRs/accumulation. M01-F3/F4 require authenticated owner entry and preserved old-wire rules. Root handles final integration.
|
||||
|
||||
## 14. Return format
|
||||
Return S16-02 status, early exact caller entry points, peer/session tracking contracts, actual test evidence/counts/interop and any native limitations.
|
||||
|
||||
The client also needs positive acknowledgements to remove committed draft parts. The approved preferred guest interface exposes `take_result()` with the full accepted or rejected intent, including resident ID. Retain one completion until the preferred caller drains it, clear stale results across connection generations and preserve legacy `take_rejection()` behavior. The loopback cases cover accepted and rejected results.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Prepare immutable client frames and present camera changes independently
|
||||
|
||||
Task ID: S17-01
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Isolated system/s17-rendering at 66af7c5 includes reviewed S18-01 client. app/viewer_win32.cpp has a 60 ms session/network timer, parent+child paints retain an old pointer but still dereference changing globals and SceneView spans live blueprint vectors. D3DScene::render presently regenerates flat geometry even on camera-only paints. S18-02 alters title/host gates and bed text in another worktree. M01-P6/F9 advise independent dirty-only 16ms frame sampling and strict install boundary.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement S17-W01 normal Windows entry: scene and HUD consume one immutable prepared client packet including owned overlays, camera and pinned snapshot; camera frames can render while 20 Hz world step or file/load busy. Coalesce invalidation and reuse geometry on view-only changes.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Existing flat game map, hardware Direct3D/WARP and error HUD only. No M02 chunk meshes, new camera settings, render thread, input/protocol changes or 60fps hardware claim. Preserve current viewer/rooms/blueprints/colony UX and all baseline harnesses.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect app/viewer_win32.cpp scene_window and main WndProc, WM_TIMER/PAINT/DESTROY, camera wheel/drags, pump_session, draft/room render, title/minimize/resize, D3DScene in app/d3d_scene_win32.hpp/.cpp, map_camera, actual /tmp/stoneheart-milestones.xprJ2SVp/client_handlers_smoke.cpp. CMake/tests WARP/capture availability, app/viewer_session member changing_world/poll_changes.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: app/viewer_win32.cpp (drawing, camera invalidation, timer/pump sequencing only); app/d3d_scene_win32.{hpp,cpp}; NEW app/viewer_frame.hpp/.cpp if useful; NEW tests/viewer_frame_smoke.cpp; CMakeLists.txt limited to registering frame test/owned sources; docs/plan/systems/S17.md
|
||||
Other branches own title/profile and stock; do not revert others' changes or switch Serena. Exclusive isolated s17 checkout. No Git/remote operations, further agents or unrelated app changes.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Prepare owned immutable presentation data on UI thread, derive HUD/selection/cursor/room validity and existing geometry from exactly one accepted world and copied relevant overlay state. Avoid borrowed spans into mutable UI across nested WM_PAINT or an overwritten single scratch buffer. Main and child paint each pin packet locally; no global world deref to render. Frame timer and camera/window invalidation independently drive dirty visible frames; keep existing 60ms LAN/control pump. While session->changing_world() keep prior presented world/frame including null, even if runtime.latest has already installed newer; release new world only after pump consumes Replaced, resets overlays/camera and updates identity. Guest/epoch transitions likewise cannot mix old work and new overlays. Sample ordinary healthy revisions with stable client identity.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Keep one current flat geometry version keyed by world identity/snapshot and all overlay/selected/cursor/BuildingView inputs. Camera-only or size-only change regenerates only camera/projection constants; account for resize/device/backend reset invalidating GPU upload. Explicit immutable geometry ownership shared by packets retained by readers; stale packets can render consistently even after newer packet then reuse correct upload. No work on hidden/title/minimized/zero sizes. On restoration or failed/recreated backend request fresh frame. No busy loop or full mesh rebuild/upload for unchanged view. Preserve existing D3DScene::render callers or update only within ownership. RAII for paint/DC and timers/shutdown.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Integration root will merge separately from S18 title+host. Avoid code dependencies on S06 custody changes, S21 hooks. Reuse Void owner snapshot (#5) and current D3D facilities; GPU resource ownership remains in renderer. Do not copy fixture include paths from other worktrees into repo. There is no GDI world renderer to invent in this scope.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Check nested dialog/WM_PAINT while replacements happen, applied room/draft vector lifetime, same-world rollback or new UUID taking same tick, mouse cursor remains coherent re camera zoom and changes may legitimately affect preview geometry, no blocked owner/file calls on presentation thread. Render failure presents current HUD error and recoverable state. Graphics-test availability must be explicit, tests need bounded cleanup and skip/report only genuine backend unavailability.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Durable actual regression target (repo-relative source paths) observes fresh render and actual input camera/zoom/drag while owner worker and file writer blocked; original tick/canonical snapshot preserved. 2. Frame timer alone advances camera frame without event timer. 3. Held old packet remains renderable with old overlays across nested install; new packet resets correctly; exact saved snapshot content. 4. Geometry/upload reuse on pure camera/unchanged, title/hide/minimize/0-size/restore/destruct, device reset semantics; WARP/offscreen capture/real UI as available. 5. All original UI, core and LAN checks still pass.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/s17-frame-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. CTest -V, git diff --check; source actual Wine GUI/D3D environment from env.sh. Add/verify focused new real frame smoke and existing UI regressions (three-process/temp harness with isolated LOCALAPPDATA, no user data). Use s17-frame-* logs and report observed device/driver.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop if independent-frame scheduling would require replacing app/renderer architecture or mutating unrelated title/guest controls. Ask root on genuine scope change; after two failed same-cause fixes escalate with evidence. No M02 feature additions, Git/remote or children.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete roadmap on system/milestone branches. Root approved independent dirty-only 16ms sampling, immutable packet, one flat geometry generation and no unsourced performance claims. F9 requires explicit pre-Replaced candidate fence.
|
||||
|
||||
## 14. Return format
|
||||
Return S17-01 READY or PARTIAL, actual owned changes/normal paths, packet/geometry lifetime, render/repaint file/worker evidence, exact logs/native limits. Send frozen smoke seam early.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Drive the Win32 client from committed world views and async results
|
||||
|
||||
Task ID: S18-01
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive /home/faumaray/Projects/stoneheart_at_home-worktrees/s18 system/s18-client at 512c9ef. Runtime reviewed at 7979fff and M01 8c4c1fe. S15-03 and S16-02 are in separate worktrees and root will supply reviewed commits to this checkout before final build. S18-W01 owns separating snapshot reads and command submission from window handlers. M01-F4 identified title/menu, lifetime, admission and rules gates.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Wire the actual Win32 viewer to the single-owner runtime for offline play and hosting, immutable guest view, bounded async command handling and real background checkpoint save/load. Keep title/new/continue, legacy scenario/cabin controls and LAN guest usable.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Normal Windows app entry points plus focused testable client-state handling. This first S18 slice does not include unrelated keyboard/scale/sound settings, new internet protocol or UI for metadata-only rule selections. Show only supported default-profile new games; S19 adds genuine selectable behavior separately.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read app/viewer_win32.cpp all session lifecycle/menu/paint/blueprint/command handlers, app/title_screen_win32.hpp, D3D const World entry, LAN and CheckpointFiles headers in sibling s16/s15, frozen simulation_runtime.hpp/impl, raw world factory/first_colony, and existing tests/smoke source /tmp/stoneheart-verify.KoZwE4o8/viewer_smoke.cpp. Watch S06-01 resident detail index access intentionally owned by another worktree.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: app/viewer_win32.cpp; app/viewer_session.hpp and app/viewer_session.cpp (NEW if needed for testable state); tests/viewer_session_tests.cpp (NEW); CMakeLists.txt (viewer_session target/tests only); docs/plan/systems/S18.md
|
||||
Do not edit other worktrees, shared Serena or Git, or overhaul unrelated UI. Keep resident-detail lookup changes minimal where S06 branch also edits one line; parent integrates. Native normal entry is mandatory.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
One window-lifetime owner runtime where possible. New/reset/load install prepared WorldCheckpoint with fresh incarnation; reuse the long-lived runtime or retire former owners off UI without joins, keeping retirement bounded. Guest reads latest received world immutably, never steps/applies; suspend local owner when guest, fence pending UI/authority. Preserve playable disconnected/leave behavior: keep last received guest World privately owned to import into a fresh local session on deliberate leave if prior behavior allows continuing that colony. Fresh first colony uses nonnil stable UUID+resolved default manifest. Gate viewer installs to exact supported compiled-rules profile/32x32 dimensions, preserve legacy imported world. Use consistent shared const world/view per frame and protect raw references across nested window messages/modal confirmations by pin or revalidate after dialogs. Render/HUD paths must stay safe on title with no world. WM_TIMER pumps file/network/runtime completions and reconciles desired ticking state BEFORE ANY title/offline/file-dialog/UI early return. Never step/serialize mutable World on UI. File picker is normal modal selection; picker open affects presentation pause without blocking owner polling or completion processing. Anchor title/hidden, pause-menu, file-dialog, guest/host and shared World::paused semantics to existing user-facing choices; no flood of set_ticking when unchanged or Busy. Fault visible, rendering last head and explicit load still usable.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Expected seam: S15 CheckpointFiles(options) with try_save(path,shared_ptr<const PublishedSnapshot>), try_load(path,workers,mode) → admission/request/future<expected<WorldCheckpoint,CheckpointFileDiagnostic>>, one process-level instance, survives reset across slots. Viewer obtains snapshot_for_save(), tracks completion by request+epoch, only reports latest relevant result. At selected load intent issue runtime begin_load even if ensuing file decode fails so stale older prepare cannot undo latest request; file result independent, filter UI ticket/generation+epoch, install checks again, preserve display on invalid/busy/superseded. S16 provides void poll_host(SimulationRuntime&) and unique_ptr<World> poll_guest(); guest presentation stores owned snapshot only, legacy standalone poll(World&) is for old consumers. Attach local controls/host and legacy cabin to modern CommandEnvelope, trusted host slot, via ONE bounded per-client intent queue and at most one runtime submission awaiting reply; allocate number from latest committed next_requests, never consume on Busy; retries do not duplicate. Pending blueprint/room IDs or exact generation-marked metadata ensure only an actually accepted part is cleared, rejected/busy remains editable, repeated click cannot resubmit pending. Other accepted-only statuses after commit. On reset/join/load, disconnect or retired epoch fence stale results and preserve unrelated current edits. Explicit local effects and connection authority; no GTK/web UI.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root merges reviewed S15/S16 deps into s18 checkout before final build; send dependency requests early. Development may start on public seam/logical model; verify actual source before final compile. F4 corrections per exact contract. Existing tests and external Wine UI smoke must still run. Current UI actions should remain meaningful. No fake alternate rules advertising. Preserve old compatible file extension/recent saves and existing no-guest-save host policy.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
UI must remain responsive during deliberately long tick/file write, complete results on title/modal loops, avoid dereferencing stale selected_agent pointer, actively fence prior session commands/loads, avoid starving owner and don't freeze on reset/new/join. No stateful dangling callbacks on WM_DESTROY; orderly shutdown can drain on app exit. Queue memory and ongoing operations bounded by documented capacity. No unchecked exceptions escaping Win32 callbacks or stale feedback after generation change. Use deterministic gates for tests; actual end-to-end app path observable.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Launch actual viewer, start and advance local colony; deferred owner command incl cabin, pause/unpause while at same tick; no WM_TIMER direct world->step/World::apply_command. 2. Open modern and old saves from title, save during progress, update status only on newest completion; malformed/superseded/unsupported rule loads preserve current session. 3. UI reader can repaint/pan while owner/writer blocked; no synchronous join resetting/joining. 4. Host and guest continue through correct polling and domain-rejection/blueprint sequencing; stale queued intent/load cannot affect new session. 5. All Windows x64 tests and real viewer smoke, including title load if possible, with recorded native gaps.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/client-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <dir>/settlement_core_tests.exe or viewer suite as actually registered, CTest -V, git diff --check. Reuse local isolated Win32 smoke harness for real viewer title/new/close and extend temporary harness for title/save/load as feasible; no disk writes to real user saves. Keep logs client-*.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No edits to S06, raw game rules, runtime, file service or LAN wire. Stop if exact external API differs or a product decision is needed, continue independent work. After two failed repairs of the same issue escalate. No children/Git/remote mutations.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes all milestones, per-system branches, commits/push and merge requests. F3/F4 and subsequent corrective recheck apply; parent owns branch merges/remote publication, no release.
|
||||
|
||||
## 14. Return format
|
||||
Return S18-01 status, actual changed behavior/lifetime/queue and gates, owned files, exact tests and Win32 smoke evidence, pending native validation. Communicate frozen helper/normal UI entry paths early.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Select supported rules when starting a colony in the Win32 client
|
||||
|
||||
Task ID: S18-02
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Isolated s18 worktree after root fast-forwards to db0a872 or a descendant containing the reviewed b7f18c0 client and 2759563 compiled profiles. S18-01 uses a long-lived runtime, exact default-only constructor/load, healthy views, transactional guest admission and fresh session identity. S19 core factory and validator already run the two real cost chains. M01-F6/F7 require validating initial, asynchronous and legacy hosts.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Make the actual Russian title screen offer staged beds (default) or one-plank beds for a new colony, apply the selected compiled rules to the new world, reload either supported profile exactly, and restrict LAN protocol 11 to default rules before any network side effect.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S18 profile selection/validation and accurate colony presentation. Preserve general S19 resolver, format1–14, LAN bridge/wire, legacy guest leave and unrelated keyboard/settings. Initial factory default stays staged, UI title selection is local to this process and only affects New.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read root/s18 actual app/title_screen_win32.hpp, viewer_win32.cpp, viewer_session.hpp/.cpp, tests/viewer_session_tests.cpp, colony_profile.hpp/.cpp (colony_rules, compile_colony_rules, make_colony_checkpoint, validate_colony_checkpoint), S19 profile_tests and S18/S19 docs. Inspect LAN direct and deferred host event paths BEFORE making changes, current supported_rules_ also supplies legacy guest import. Actual smoke sources client_{ui,handlers,regression}_smoke.cpp in temp.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: app/title_screen_win32.hpp; app/viewer_win32.cpp (title/new/host/bed labels only); app/viewer_session.hpp and .cpp (factory/validator/host readiness); tests/viewer_session_tests.cpp; docs/plan/systems/S18.md
|
||||
Isolated s18 only. Other workers edit separate branches. Do not revert others' changes or modify CMake/other components. Root owns all Git/remote operations. Distinct test build directory.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Use one accessible native control for a clearly labeled New-only choice, ensure keyboard (focus/Tab/arrows/Space/Enter as appropriate) and mouse operate at supported dimensions. Preserve title layout/order and new/continue/save list. Factory creates a new UUID and selected actual world; Continue/Open ignore current selector. Run candidate validation for both supplied initial and replacement/latest prepared loads before owner install and preserve current 32×32 restriction. Preserve default simple/inactive historical modes. Display correct cost including Miner house in simple profile; hide staged foundation material controls when simple.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Host immediate path must reject if changing_world or the current authoritative publication does not have exact default rules. Recheck after returning from modal menu before opening a listener; deferred path revalidate the newly installed publication immediately before network start. Error preserves active world/local file operation/peer. Existing default simple legacy world can host if other established gates pass. Legacy guest import still uses exact frozen default. Do not expose optional rules via old wire. Keep S18-01 fresh ticket/epoch gating and bounded queues.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Root owns fast-forward to integrated base before starting. Backend S19 and first viewer are independently accepted. New choice has real compiled behavior. Future S17 render-timer changes are separately owned; avoid edits to WM_TIMER or D3D unless a real unexpected dependency is reported.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Reject unknown/forged/extra manifests, optional+staged, unusable dimensions/identity before any effect. Restore valid default raw simple, active optional simple and authentic old saves. A superseded valid load followed by failing newest must keep current world. Titles with small width/DPI should retain usable label/control. No external files in real saves, never open real network beyond loopback.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Real title New creates both variants (including exact selected manifest in saved checkpoint and visible costs). 2. Continue/Open preserve saved choice despite different selection, exact default old inactive/simple accepted. 3. Bad initial/load gate leaves session/world untouched. 4. Immediate/deferred legacy Host refusal before listener or peer change, including held optional load over old default. 5. Existing ten viewer tests, integration CTest and prior three-process/handler regressions still pass.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/client-profiles-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run CTest -V, viewer suite selectors as actually registered and git diff --check. Run an actual GUI smoke with isolated LOCALAPPDATA, exercise both choices with mouse/key, New, save/open with opposite selector, confirm actual stored manifest/bed mode. Extend /tmp smoke only as appropriate and record client-profile-* source/logs. Named current published checks are baselines.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Do not change staged vs simple game costs or default digest, add fake settings, change wire or unrelated app controls. No lowering exact-default admission. If title input cannot be exercised with available Windows/Wine tooling, describe specific gap and continue core meaningful checks. No children/commits/push; two failed same-cause fixes escalate.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User asked for complete milestones/system branches and actual compatible module selection. M01-F7 recorded corrective host gate and accurate simple Miner description. Root owns external side effects. Existing upstream #4 tracks generic resolution.
|
||||
|
||||
## 14. Return format
|
||||
Return S18-02 READY/PARTIAL, actual chosen title control + normal flow, exception/load/LAN boundaries, paths, commands/logs and any native UI caveats.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Resolve a frozen set of game rule packages from actual manifests
|
||||
|
||||
Task ID: S19-01
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive worktree /home/faumaray/Projects/stoneheart_at_home-worktrees/s19, system/s19-rules at 8d2870a. Main working directory belongs to another task. Exact Void pin 7b0fea6095f603f9e1904f66dfdc7752f4be4792. M01-P2/R2 and preflight F2 confirm the implementation seam.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement S19-W01 typed game rule manifest loading, validation and reproducible identity, with real JSON inputs and CTest coverage. Supply the public interface S15/S01 will freeze into worlds.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
Only S19/M01 core support and its tests/build wiring; no Lua, UI, save codec or network yet. Plan requires diagnostics usable by a caller and frozen identity for explicit world selection.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect docs/plan/systems/S19.md, M01, CMakeLists.txt, exact upstream Void/Data/StrictJson.hpp, Void/Text/Semver.hpp, Void/Algorithms/Graph.hpp, Void/Crypto/Crypto.hpp and respective tests. Source root for pin is /tmp/stoneheart-verify.KoZwE4o8/candidate/_deps/void_library-src.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/rules_manifest.hpp; engine/src/rules_manifest.cpp; tests/rules_tests.cpp; CMakeLists.txt
|
||||
You are not alone. Use ONLY your specified worktree with explicit workdir/absolute paths, verify root/HEAD before edits. Other systems have separate checkouts. Do not edit the main checkout, change shared Serena project, stage, commit, push or spawn. Root integrates CMake.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Bound byte count and node/dependency/depth limits before/while using Void::Json::Strict. Manifest schema v1 includes namespaced package ID, exact strict SemVer, named dependencies and version constraints, exclusive providers, definitions with stable qualified IDs and references. For M01 definitions live in the JSON file (no external untrusted file paths/scripts). Resolve transitive deps from installed packages (one installed version per ID), detect duplicates/missing/range incompatibility/cycles/exclusive-provider clashes/unresolved definition refs. Use Void::Semver, Algorithms, Crypto and StrictJson. Sort sets, include definition content in SHA256, recompute digests; preserve semantically ordered data. Write diagnostics containing package/source and field. Provide usable base game package(s) for later startup via an explicit built-in loader or factory in owned code. Avoid implementing generic library alternatives.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
NEW public RulePackage source + immutable RulesManifest (sorted frozen package ID/exact version/SHA256 and manifest fingerprint), loading/resolution via settlement/core/rules_manifest.hpp. Expose a base default and real catalog/selection input. Keep public types independent of upstream internals where practical. Define schema, duplicate/unknown semantics and source error handling in a short header comment. Send final signatures to root ASAP for S15/runtime.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
No upstream dependency update. Validate SHA-256 pure C++ fallback on Windows; use modules Data, Text, Algorithms, Crypto and transitive deps only. Matching generic candidate issue draft for reusable resolver is root-owned; game-specific capability names and decisions use published primitives. Root handles cross-system consumers and remote tracker outcome.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Reject unknown schema/invalid UTF-8/duplicate fields, malformed IDs/versions, digest spoofing, large files and excessive fan-out. Range semantics need explicit prerelease policy. SemVer == ignores build metadata, so frozen exact identities compare normalized full string and 32-byte digest. Stable diagnostic path relevant to user-provided files. No third-party game content.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Load and select from at least two meaningful original package documents with deps; reversing input/definition sets produces identical frozen identity. 2. Content, exact version or build change alters fingerprint. 3. Missing dependency, bad range, duplicate, cycle, exclusive conflict, dangling references and malformed/oversize JSON give actionable diagnostics. 4. Windows target/test suites pass and API ready to persist/compare a manifest.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/rules-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Add a discoverable Void suite with tag rules. Check actual diff and log timings.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Escalate any required new generic mechanism or library incompatibility. No network writes, no Git mutations, no competing branch/source edits. Stop after two unsuccessful repairs of one issue and send original failures.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorized full plan, milestone/system branches and pushes. The root handles those; preflight READY for S19 under these limits.
|
||||
|
||||
## 14. Return format
|
||||
Return S19-01 status, actual files and API, schema/canonicalization decisions, failure coverage, commands/results, unverified limits, integration notes for runtime/save. Do not spawn.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Compile a selectable plank-bed package into actual colony behavior
|
||||
|
||||
Task ID: S19-02
|
||||
Role: sol_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Exclusive s19 worktree /home/faumaray/Projects/stoneheart_at_home-worktrees/s19, system/s19-rules at 60154bd. Prior S19 catalog/manifest reviewed, M01-P4 and F6 preflight approved both existing bed production paths. Current World::start_scenario sets staged_beds_=true unconditionally; legacy/restored worlds already execute nonstaged SawPlank + BuildBed. S18 initial UI work/other World changes in distinct checkouts.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Allow real selection between the existing default staged bed assembly and optional one-plank bed assembly at colony creation. Freeze compatible manifest/engine configuration and provide supported-profile validation at the application boundary for creation and loading.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
S19 core package, game-profile compiler/factory, narrow World scenario initialization and runtime-neutral validation tests. No UI/transport changes in this slice. No change to generic resolver/decoder acceptance or Lua VM. Preserve all original package contents, default game output and original call signatures/behavior.
|
||||
|
||||
## 4. Files to inspect
|
||||
Inspect rules_manifest.{hpp,cpp}, first_colony.cpp, world.hpp/.cpp start_scenario/PlaceBed/PlaceRoom/recipes, world_save.cpp staged flag/state validation, checkpoint.hpp, actual tests/rules_tests, core_tests, legacy fixtures, prime S18 viewer_session.cpp constructor/load/host gates via sibling and plans S19/F6. Pin has resolver primitives used earlier, existing issue #4. Current default SawPlank executes 12 ticks; the old manifest's sample work_ticks=8 is not activated by this feature.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/colony_profile.hpp and engine/src/colony_profile.cpp (NEW); engine/src/rules_manifest.cpp; engine/include/settlement/core/world.hpp; engine/src/world.cpp (scenario initialization only); engine/src/first_colony.cpp; tests/rules_tests.cpp; tests/profile_tests.cpp (NEW); CMakeLists.txt; docs/plan/systems/S19.md
|
||||
Skip all UI and unrelated caller edits. S04 changes production identity in separate worktree. You are not alone; root integrates and handles simultaneous CMake/World edits. Never revert another worker, change Git or shared Serena.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
Add additive optional built-in exact package settlement.plankbeds with an allowed recipe definition in its own namespace, stable dependency on settlement.colony and no conflicting exclusive construction capability. Interpret explicit typed data describing one plank/simple assembly to select the actually existing engine bed mode. Use resolver/checkpoint typed APIs, validate supported exact closure/digests and content before building a supported colony. Compute prechange default manifest canonical bytes/fingerprint using the verified baseline first, hardcode golden from it into regression (old two-package closure/content unchanged); do not recompute expected with candidate. New default=false option meaning must be clear by names. Expose concise NEW profile enum/options and a game-specific factory producing validated WorldCheckpoint (owned World, fresh stable nonnil UUID, city1, correct manifest), plus supported-profile validation taking World/manifest or candidate. Name signatures early so S18 follow-up can wire title.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Keep existing World::start_scenario(sawmill), make_first_colony(workers) staged by default; add explicit creation-only mode/profile parameter or overload, no mutable post-creation toggle. When active optional package selected, actual simple path: SawPlank + one BuildBed, one plank consumed; default already uses foundation wood/stone plus cloth twice. Furnished rooms must respect same rule. Existing schemas saved real mode; loaded exact default is allowed with EITHER persisted mode, inactive legacy worlds included (historical v1 or raw-format import). Do not alter their rules/mode at load. Optional exact profile requires active scenario staged=false where applicable; reject exact simple-manifest with active staged world. Unknown package/digest/config rejected by supported-profile gate; generic decode/runtime continue to handle caller-supplied catalogs independently. Reuse shared immutable definitions/lookup as suitable; avoid catalog-size assumptions and requiring every installed unrelated package.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Viewer later calls this public factory and canonical compatibility gate on BOTH initial and prepared worlds, and keeps immediate/deferred old LAN11 exact-default-only. Do not mix S18 UI edits on s19; communicate the trusted support check and whether a profile may host to root. New catalog optional must not automatically activate or alter existing default hashes.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Exercise active/inactive imported historical worlds, current resaves, no silent toggle or package rewriting. Avoid claiming all base/ACE systems implemented. Use an actual complete bed production run under both options with relevant materials/outputs (incl furnished room), mature/paused snapshots persisted and continued. Preserve wire13/old baseline normal path. An altered content package using same ID/version must not pass compiled-profile support.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Old default known fingerprint/bytes and baseline gameplay preserved; selecting optional package changes material chain and completes bed with actual initial supply. 2. Compare modern canonical per tick across serial/2/6/12 for representative events; held view does not change; mid-carry save/load continues identically. 3. Exact optional mismatch, default historical raw/v1 active simple and inactive accepted without rewriting; catalog reordering and missing/changed/extra activated packages handled. 4. Correct real startup factory and no mutable rules switch. 5. All cross suites pass.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/profile-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run wine <dir>/settlement_core_tests.exe --tag profile and tagged rules, full verbose CTest, git diff --check; source actual old baseline digest from already built branch or separate helper, log its hash. Provide exact logs profile-*.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
No editing S18 UI, no broad changing existing recipes to fit sample data and no rewriting old manifests, formats or resources. Stop/escalate after two failed repairs of same issue or if actual optional mode cannot complete the scenario. No children/Git/remote mutations.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
Plan explicitly requires new-world module selection. Existing bed behaviors were chosen as first reversible demonstration, preserving old defaults and P4/F6 restoration policy. User authorized commits, issues and PRs through root.
|
||||
|
||||
## 14. Return format
|
||||
Return S19-02 status, early exact creation/validation API, source derived default golden, observed actual bed/room/canonical and legacy compatibility, counts and residual native/UI risks.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Prove deterministic arbitration under opposing worker completion orders
|
||||
|
||||
Task ID: S21-01
|
||||
Role: astra_implementer
|
||||
Status: READY
|
||||
|
||||
## 1. Context and baseline
|
||||
Isolated system/s21-verification at 66af7c5. World assign_idle_agents calculates independent candidates for idle residents then assigns competing jobs in stable order. Meal claim is serial before parallel movement. Existing replay compares Current14 state for 1/2/6/12, last meal and mid-delivery plus capacity1; scheduler hooks currently before_submit/before_execute only. M01-P6/F9 request an observer of actual returns and readable divergence reports.
|
||||
|
||||
## 2. Objective and deliverables
|
||||
Implement a minimal optional success observer in the real WorkerPool adapter, prove opposite actual calculation completions and deterministic arbitration, and report first divergence through domain facts tied to canonical bytes. Verify runtime install waits for outstanding work and fresh session fences stale results.
|
||||
|
||||
## 3. Scope and non-goals
|
||||
WorkerPool instrumentation, tests and S21 verification docs only. No World scheduling/codec/receipt semantic changes, no synthetic exploit inputs or unrelated rendering/milestone changes. Native Windows hardware separate.
|
||||
|
||||
## 4. Files to inspect
|
||||
Read engine/include/settlement/core/worker_pool.hpp, engine/src/worker_pool.cpp/world.cpp (actual partitions and meal selection), runtime source, tests/{executor,replay,runtime}_tests.cpp, M01-P6/F9 and S21. Void FuturePool/Testing at pinned clone and issue #15.
|
||||
|
||||
## 5. Write ownership and coordination
|
||||
Write scope: engine/include/settlement/core/worker_pool.hpp; tests/executor_tests.cpp; tests/replay_tests.cpp; tests/runtime_tests.cpp; NEW tests/replay_diagnostics.hpp only if useful; docs/plan/systems/S21.md
|
||||
Isolated s21 only. Other agents own sibling source. No CMake mutations, shared project switch, children/Git/remote changes. Root integrates.
|
||||
|
||||
## 6. Implementation or investigation approach
|
||||
NEW optional WorkerPoolOptions::after_execute(index), success-only after callable returns before result future ready. Account for optional observer alone in submission indexing. Preserve original no-hook path and hook/call behavior for void, values, lvalue refs, move-only closures/results and exceptions on worker + inline fallback. Observer exceptions reach corresponding future; no throwing destructor. Test using separate driver and bounded CV gate for two known submissions; release on all exit paths. Only block task B until A has actually returned (post hook), then reverse. Never wait for all tasks/lanes or rely on sleeps/scheduling chance.
|
||||
|
||||
## 7. Interfaces and data contracts
|
||||
Fresh two-resident/one real reachable WorkJob scenario, opposite completion traces must be observed even with max_admitted1 on a separate driver, 2/6/12. Verify deterministic winner and each future state equal serial canonical Current14. Last berry serial claim test/cargo/movement preserve independent one-winner evidence, do not claim parallel meal arbitration. Add old worker held, queue same-world earlier load, verify old view remains readable/install pending until drained, replacement identity fresh, old request rejected, current state intact after further fence.
|
||||
|
||||
## 8. Dependencies and integration
|
||||
Test-local semantic reporting only when canonical byte comparison differs (existing Current14 encoder remains oracle). Include seed/scenario, attempt/tick, concurrency/schedule, load, stable first differing entity/property and expected/actual, command/receipt player/number/status/revision or byte-offset fallback. Actor/job/storage stack as owner plus type for current14; support absent/extra records. Test at least stock/job/command divergences individually and equal-case. Later body15 will extend this; don't introduce alternate persistence schema. Reuse existing helpers/tests.
|
||||
|
||||
## 9. Edge cases security and performance
|
||||
Bound waits even on CI; each branch releases gates before destroying/joining pool; no assertion library calls from worker threads. Keep hook captures alive; no mutex while running user callbacks. When no selector installed, no new allocations/counters per job. Tested genuine Submit paths including inline. No simulated full native performance claim.
|
||||
|
||||
## 10. Acceptance criteria
|
||||
1. Tests fail when completion acknowledgement incorrectly moves to start, schedules traces must be opposite and canonical states match. 2. Observer sees returned value/reference/void, exceptions incl hook and overload, callable ownership preserved. 3. Reload barrier stale work/commands and snapshot fencing checked. 4. Domain diagnostics exercised with expected entity ID/field/receipt context. 5. All CTest, corpus, focused tags and docs checks pass.
|
||||
|
||||
## 11. Verification commands and evidence
|
||||
Source /tmp/stoneheart-verify.KoZwE4o8/env.sh. From YOUR worktree configure cmake -S . -B /tmp/stoneheart-milestones.xprJ2SVp/s21-replay-build -G Ninja --toolchain "$SETTLEMENT_VERIFY/cross.cmake" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_VOID_LIBRARY:PATH="$SETTLEMENT_VERIFY/candidate/_deps/void_library-src". Build with cmake --build <that dir> --parallel 6, run ctest --test-dir <that dir> --output-on-failure and your targeted tests. Evidence required. Run CTest -V and --tag executor, --tag replay and --tag runtime under Wine; record s21-replay-* logs and commands. Old normal corpus should remain unchanged, use available trajectory probes as appropriate. Actual checks rather than latency claims.
|
||||
|
||||
## 12. Constraints and stop conditions
|
||||
Stop if index pair cannot be tied to real first job-choice partition: identify actual code and adjust fixture, no pretend success. No global installation or unrelated changes. Two failed same-cause fixes escalate. No children/Git/remote writes.
|
||||
|
||||
## 13. Authorization and decisions
|
||||
User authorizes complete M01 and separate S21 system branch; root approved test-only success observer and strict canonical oracle. [Void/Library completion test facility](https://git.faumaray.com/Void/Library/issues/15) documents the replacement test. Root publishes.
|
||||
|
||||
## 14. Return format
|
||||
Return S21-01 READY/PARTIAL, bounded integration/worker semantics, branch files, tests with actual opposing traces/diagnostic cases/corpus, native limits.
|
||||
@@ -1,5 +1,7 @@
|
||||
# Архитектурные решения
|
||||
|
||||
Эти решения описывают работающий прототип на коммите `083b84e`. Целевые контракты воксельного мира, сохранений и многопоточной симуляции представлены в [планах систем](../PLAN.md#план-систем).
|
||||
|
||||
## ADR 0001: Сначала headless-симуляция
|
||||
|
||||
Прототип не зависит от рендеринга. Сценарии можно быстро и повторяемо запускать отдельно от графики; SVG экспорт используется для осмотра состояния мира.
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Материалы демо «Дом на склоне»
|
||||
|
||||
Запись M00, 2 декабря 2026 года. Это производственное задание для [M03](../plan/milestones/M03.md) и контрольной сцены Q-HOME. Новые материалы ниже ещё не изготовлены и не приняты. Художественный владелец назначается перед производством каждого материала. До этого в таблицах указан владелец «не назначен». Автор, исходник, условия использования, атрибуция, инструмент и его версия заполняются по факту создания или получения. Разрешение на использование в игре, изменение и распространение подтверждается ссылкой на сохранённое свидетельство. Частная переписка и платёжные данные в публичный реестр не заносятся.
|
||||
|
||||
## Иконки прототипа
|
||||
|
||||
Все три файла добавлены в коммите `8bb448cc49e3d76a5fdd52e490bd423138cca5f7` от 1 декабря 2026 года. Автор коммита указан как `Codex`. В просмотренной истории файлов и сопутствующих записях репозитория подтверждения происхождения не найдено. [LICENSE](../../LICENSE) содержит лицензию проекта, а связь каждого изображения с его правообладателем ещё требует подтверждения.
|
||||
|
||||
| ID | Файл и роль в прототипе | Git blob на `083b84e` и текущем HEAD | SHA-256 файла | Автор, источник, права и решение для демо |
|
||||
|---|---|---|---|---|
|
||||
| LEG-01 | [doctor_house.ico](../../app/art/doctor_house.ico), кнопка шаблона «Дом врача», кровать и аптечный шкаф | `9bc0d003c5881ac1201f6735df62a19446a27f35` | `1261481f7e4c321bc172f3f9ba3183f993a2d01c67e8db7f3d38e62fd2b9df0a` | Автор и источник неизвестны, разрешение не подтверждено. Исключить из нового распространяемого демо до установления прав или заменить самостоятельным обозначением. |
|
||||
| LEG-02 | [miner_house.ico](../../app/art/miner_house.ico), кнопка шаблона «Дом шахтёра», каменная кровать и стойка с инструментами | `6873e316c71ca766d3956beb9f034e4c3af85b48` | `98d04a18adfd3f33746170620fd68b487d9b32a5e5d479d935adb66f2e2f92df` | Автор и источник неизвестны, разрешение не подтверждено. Исключить из нового распространяемого демо до установления прав или заменить самостоятельным обозначением. |
|
||||
| LEG-03 | [weaver_house.ico](../../app/art/weaver_house.ico), кнопка шаблона «Дом ткача», кровать и ткацкий станок | `f191e2478e023ddbb278da32c092a62202e6fa91` | `5c72453768bd5abac4e5e4d9a38eb7a809424956f2653d378be30cc4cbb3deec` | Автор и источник неизвестны, разрешение не подтверждено. Исключить из нового распространяемого демо до установления прав или заменить самостоятельным обозначением. |
|
||||
|
||||
Эти файлы сейчас входят в исполняемый файл прототипа. [Ресурс](../../app/house_icons.rc) объявляет три ICO, [CMake](../../CMakeLists.txt) добавляет ресурс к viewer, а [build.ps1](../../build.ps1) копирует viewer в каталог поставки. Кнопки и содержимое шаблонов определены в [viewer_win32.cpp](../../app/viewer_win32.cpp). Владелец производства демо должен убрать эти ресурсы из новой сборки или приложить доказательства прав к каждому файлу и проверить итоговый исполняемый файл. Сохранённая сборка прототипа остаётся исторической записью.
|
||||
|
||||
Для замены трём кнопкам нужны самостоятельные пиктограммы в едином наборе интерфейса. Название и подпись должны оставаться читаемыми без опоры на цвет. Различительные мотивы для эскиза — сумка ухода, камень с инструментом и переплетённые нити. Исходные рисунки, автор и права заносятся в UI-02 до экспорта.
|
||||
|
||||
## Направление сцены
|
||||
|
||||
Рабочее направление — небольшой дом на террасированном склоне, сложенный из ясных плоскостей дерева, камня и утрамбованной земли. Контрольный чертёж занимает 6 × 5 клеток, пересекает границу `x=32`, содержит дверь, внутреннюю лестницу и три кровати, включая одну наверху. Последняя часть верхнего перекрытия строится из особо отмеченной распиленной доски. Для неё нужен различимый знак на модели груза и на готовой секции. Повторяемый модуль задаёт один игровой воксель. Для первого макета высота жителя принимается равной двум вокселям, дверной проём и лестница подгоняются к реально допустимому проходу M02. Точка привязки жителя — центр основания, у предметов — основание или место контакта с рукой. Масштаб и экспорт проверяются вместе с границами коллизии и рабочими позициями.
|
||||
|
||||
Вид сверху должен показывать положение ступеней и дверного проёма при скрытом верхнем этаже. Житель читается по крупному силуэту головы и туловища, груз — отдельной массой перед телом. Рабочие действия различаются формой движения и инструментом. Геометрия дома использует крупные балки и ясные контуры перекрытий. Мелкий орнамент не должен закрывать проход, груз или маркер работы. Одна утверждаемая сцена содержит дом, жителя, рабочее место и небольшой участок земли.
|
||||
|
||||
Палитра эскиза включает холодный серо-синий камень `#778485`, тёплое дерево `#9B744D`, землю `#8B735B`, траву `#728B62` и светлый текстиль `#E5D9BC`. Для команд и обратной связи применяются светлый контур на тёмной подложке и подпись. Готовая деталь сохраняет материал, чертёж получает полупрозрачную заливку и контур, недоступная работа — значок и текст причины. Освещение мягкое направленное с достаточным заполнением теней, чтобы верхняя площадка и нижняя комната оставались читаемы. Это исходные художественные решения для проверки, а не утверждённые экранные замеры.
|
||||
|
||||
Текстуры при необходимости ограничиваются размером 256 × 256 на материал для первого набора. Разрешены однотонные материалы и повторяемые узоры. Точный движковый формат, цветовое пространство и версия экспортёра определяются при создании импорта, после чего записываются с каждым исходником. Для моделей в рабочем файле хранятся ориентация, единицы, точка привязки и названия анимаций. Экспорт должен воспроизводиться из сохранённого источника без путей конкретного компьютера.
|
||||
|
||||
## Бюджет производства
|
||||
|
||||
Количество — план уникальных базовых исходников для одной сцены Q-HOME. Это объём для оценки работы, а не оценка стоимости или сроков. Повторения дома, жителей и ресурсов используют эти исходники. Каждая строка представляет единый комплект с отдельной записью для каждого созданного или полученного файла. Владелец и автор пока не назначены. Источник, лицензия или разрешение, возможные производные, атрибуция и свидетельство для всех новых файлов пока отсутствуют. Все строки имеют статус «запланировано». Перед поставкой нужно заполнить эти поля и сохранить рабочие исходники и экспорт.
|
||||
|
||||
| ID | Комплект и количество | Назначение в Q-HOME | Рабочий источник и экспорт |
|
||||
|---|---|---|---|
|
||||
| GEO-01 | 4 материала рельефа — земля, трава, камень, открытый срез | Склон, выемка, различимый добываемый камень | Собственный файл палитры или текстур, экспорт материалов в формат импорта M02 |
|
||||
| GEO-02 | 1 набор дерева и 1 набор каменного узла | Источники древесины и камня до и после добычи | Собственные модельные файлы и варианты состояния, экспорт геометрии и материалов |
|
||||
| GEO-03 | 1 набор строительства из 6 частей — опора, пол, стена, дверь, лестница, крыша | Два этажа, вход, маршрут и стадии постройки | Модульные модели и материалы, экспорт с точками привязки по сетке |
|
||||
| GEO-04 | 1 рабочее место и 1 склад с 3 состояниями заполнения | Изготовление детали и хранение материалов | Модельные источники, экспорт геометрии и состояний |
|
||||
| GEO-05 | 1 модель кровати в трёх экземплярах и 1 простой предмет обстановки | Обставить дом и показать три назначенных спальных места, одно на верхнем этаже | Модельные источники, экспорт геометрии и привязок взаимодействия |
|
||||
| GEO-06 | 1 источник еды и 1 порция пищи | Добыча или сбор еды, перенос и приём пищи | Модельные источники, экспорт геометрии и точки захвата |
|
||||
| GEO-07 | 1 базовая модель жителя с 3 различимыми цветовыми вариантами одежды | Три жителя, путь и работа на этажах | Исходник модели и скелета, экспорт геометрии, материалов и привязок |
|
||||
| GEO-08 | 3 модели груза — дерево, камень, изготовленная доска с отметкой | Различить перенос до склада, мастерской и стройки, отследить последнюю доску | Модельные источники, экспорт с общей точкой захвата |
|
||||
| ANIM-01 | 6 действий — ожидание, ходьба, перенос, работа инструментом, еда, сон | Понятные переходы между состояниями жителя | Исходник анимаций, экспорт на скелет GEO-07 с именованными клипами |
|
||||
| UI-01 | 8 значков — добыча, склад, стройка, лестница, еда, кровать, пауза, причина остановки | Команды и объяснение состояния | Собственные исходники значков, экспорт в формат интерфейса после определения импорта |
|
||||
| UI-02 | 3 самостоятельных обозначения типов дома, если эти кнопки войдут в демо | Выбор шаблона, включая замену LEG-01–03 | Собственные редактируемые исходники, экспорт по размеру кнопок и масштабу UI |
|
||||
| AUD-01 | 6 коротких звуков — шаг, добыча, обработка, установка, еда, подтверждение команды | События игрового маршрута | Собственные или разрешённые записи, исходный звук и экспорт в формат аудиосистемы |
|
||||
| AUD-02 | 1 петля окружения склона | Фоновая среда во время партии | Исходная запись или проект, бесшовный экспорт в формат аудиосистемы |
|
||||
| FONT-01 | 1 системный шрифт интерфейса Windows | Подписи команд и состояния на русском языке | Выбор установленного системного шрифта во время работы без включения файла шрифта в пакет. Проверить кириллицу и запасной `DEFAULT_GUI_FONT` на целевой Windows |
|
||||
|
||||
Для каждой записи звука при производстве дополнительно зафиксировать источник, приоритет, событие симуляции и правило повтора после загрузки. Контакт инструмента и звук сопровождают подтверждённое действие, момент расхода материала задаётся симуляцией. Отсутствие звукового устройства не должно мешать управлению. Музыкальное сопровождение пока не включено в бюджет первой сцены.
|
||||
|
||||
## Проверка готовности сцены и поставки
|
||||
|
||||
1. На контрольной камере M03 показать одновременно дом, склон, склад и трёх жителей. На обычной и дальней рабочих дистанциях отличить дерево от камня, груз от жителя, чертёж от построенной части и видимую причину остановки. Повторить при доступных масштабах интерфейса.
|
||||
2. Проследить жителя с каждой моделью груза через дверь и по лестнице на верхнюю площадку. При скрытии этажа убедиться, что маршрут, ступени, кровать и рабочая позиция видны. Проверить переход от работы к еде и сну.
|
||||
3. Сверить файлы итогового пакета с реестром, включая встроенные ресурсы viewer и выбранные шрифты. На каждом файле должны быть автор, происхождение, допустимые действия, необходимая атрибуция, подтверждение, исходник, экспорт и версия инструмента. У незаполненных записей остаётся владелец и действие до поставки.
|
||||
4. Повторить экспорт одинаковых исходников с одинаковыми настройками, сравнить содержимое и записать результат. На Windows проверить кириллицу, запасной системный шрифт, читаемость кнопок и управление без звука.
|
||||
|
||||
[Этап M00](../plan/milestones/M00.md) · [Система материалов S20](../plan/systems/S20.md) · [Контрольные сцены S21](../plan/systems/S21.md)
|
||||
@@ -0,0 +1,92 @@
|
||||
# Проверка публичного поведения ACE
|
||||
|
||||
Проверка M00-A выполнена 2 декабря 2026 года для целевой серии ACE 0.9.6.22. Исходный набор содержит A01–A26 в [реестре паритета](parity.md#дополнения-и-изменения-ace). Ниже каждому пункту назначены опубликованная редакция правила, границы подтверждения и следующая проверка. A27–A40 дополняют набор самостоятельными наблюдениями. Все игровые сценарии `AT-Axx` ожидают реализации и результата на собственной сборке.
|
||||
|
||||
Опубликованное описание подтверждает заявленное правило. Численные коэффициенты, скрытые условия и сохранение промежуточного состояния требуют отдельных свидетельств либо явно выбранного собственного контракта. Указанные здесь тесты задают оригинальный игровой эквивалент. Полнота инвентаризации остаётся открытой до разбора каждого различимого поведения в просмотренных выпусках. [M00](milestones/M00.md)
|
||||
|
||||
## Обход выпусков
|
||||
|
||||
В пяти темах автора DaniAngione просмотрены номера и даты объявлений, заголовки изменений и исправлений. Предметно разобраны разделы, связанные с A01–A40, включая замену правил более поздними выпусками. Остальные перечисленные объявления пока служат индексом следующего прохода. Дата относится к созданию сообщения в UTC. Автор мог дополнять его несколькими исправлениями, поэтому суффиксные hotfix в одном сообщении требуют собственной даты при дальнейшей детализации.
|
||||
|
||||
| Период | Опубликованные редакции и проверенные сообщения | Остаток разбора |
|
||||
|---|---|---|
|
||||
| 24 декабря 2018 — 1 января 2019 | Начальное объявление **0.9** от [24 декабря](https://discourse.stonehearth.net/t/38843/1), затем [0.9.1](https://discourse.stonehearth.net/t/38843/44), [0.9.2](https://discourse.stonehearth.net/t/38843/137), [hotfix 1](https://discourse.stonehearth.net/t/38843/143), [hotfix 2](https://discourse.stonehearth.net/t/38843/154), [hotfix 3](https://discourse.stonehearth.net/t/38843/171). Проверены основания A01–A09. | Разложить начальную переработку кузнеца, военное снаряжение и охоту на отдельные условия и результаты. |
|
||||
| 2–23 апреля 2019 | [0.9.3](https://discourse.stonehearth.net/t/39695/1), [0.9.3.1](https://discourse.stonehearth.net/t/39695/32), [0.9.3.2](https://discourse.stonehearth.net/t/39695/85), [0.9.3.3](https://discourse.stonehearth.net/t/39695/97). Проверены качество, корм, свет, требования растений и инструменты. | Выписать отдельные эффекты погоды, одежды, предпочтений еды и домашних животных. |
|
||||
| 20 августа 2019 — 24 января 2020 | [0.9.4](https://discourse.stonehearth.net/t/40239/1), [0.9.4.1](https://discourse.stonehearth.net/t/40239/20), [0.9.4.2](https://discourse.stonehearth.net/t/40239/58), [0.9.4.3](https://discourse.stonehearth.net/t/40239/75), [0.9.4.4](https://discourse.stonehearth.net/t/40239/82), [0.9.4.5](https://discourse.stonehearth.net/t/40239/154), [0.9.4.6](https://discourse.stonehearth.net/t/40239/159), [0.9.4.7](https://discourse.stonehearth.net/t/40239/179). Проверены напитки, отказ от питья из обычной открытой воды, пасека и переработка вместилищ. | Отдельный проход по ловушкам, погоде, встречам и изменениям лечения. |
|
||||
| 4 декабря 2020 — 6 декабря 2022 | [0.9.5](https://discourse.stonehearth.net/t/41422/1), [.1](https://discourse.stonehearth.net/t/41422/58), [.2](https://discourse.stonehearth.net/t/41422/76), [.3](https://discourse.stonehearth.net/t/41422/93), [.3b](https://discourse.stonehearth.net/t/41422/98), [.4](https://discourse.stonehearth.net/t/41422/110), [.4b](https://discourse.stonehearth.net/t/41422/119), [.5](https://discourse.stonehearth.net/t/41422/157), [.6](https://discourse.stonehearth.net/t/41422/167), [.7](https://discourse.stonehearth.net/t/41422/191), [.7c](https://discourse.stonehearth.net/t/41422/207), [.7d](https://discourse.stonehearth.net/t/41422/209), [.7e](https://discourse.stonehearth.net/t/41422/219), [.7f](https://discourse.stonehearth.net/t/41422/226), [.7g](https://discourse.stonehearth.net/t/41422/238), [.7h](https://discourse.stonehearth.net/t/41422/249). Проверены выделение пивовара, возврат семян, высотные условия полей и изменение жидкостей. | Проверить полноту вложенных суффиксных исправлений, отдельно раскрыть травы, ранения, новые культуры, животных и исходы Frostfeast. |
|
||||
| 11 февраля — 3 июня 2023 | [0.9.6](https://discourse.stonehearth.net/t/43079/1), [.1](https://discourse.stonehearth.net/t/43079/4), [.2](https://discourse.stonehearth.net/t/43079/6), [.3/.3b](https://discourse.stonehearth.net/t/43079/7), [.4/.4b/.4c](https://discourse.stonehearth.net/t/43079/13), [.5/.5b/.5c](https://discourse.stonehearth.net/t/43079/20), [.6–.6e](https://discourse.stonehearth.net/t/43079/25), [.7–.7c](https://discourse.stonehearth.net/t/43079/32), [.8–.8c](https://discourse.stonehearth.net/t/43079/37), [.9–.9c](https://discourse.stonehearth.net/t/43079/47), [.10–.10c](https://discourse.stonehearth.net/t/43079/79), [.11–.11e](https://discourse.stonehearth.net/t/43079/94). Разобраны рынок и исправления доставки заданий. | Отдельный проход по каждому новому заказчику, ветвям заданий, титулам, предметам и взаимодействию модулей. |
|
||||
| 31 октября 2023 — 23 января 2024 | [0.9.6.12](https://discourse.stonehearth.net/t/43079/112), [.12i–.12k](https://discourse.stonehearth.net/t/43079/115), [.13](https://discourse.stonehearth.net/t/43079/118), [.14](https://discourse.stonehearth.net/t/43079/123), [.14b/.14c](https://discourse.stonehearth.net/t/43079/125), [.14d](https://discourse.stonehearth.net/t/43079/130), [.14e](https://discourse.stonehearth.net/t/43079/134), [.15](https://discourse.stonehearth.net/t/43079/140). Разобраны мирная сезонная ветвь, стартовое окно и память о питомце. | Полный граф сезонных задач, все награды, отдельные исправления возобновления и недоступности ветвей. |
|
||||
| 12 мая 2024 — 27 августа 2025 | [0.9.6.16](https://discourse.stonehearth.net/t/43079/151), [.16d](https://discourse.stonehearth.net/t/43079/158), [.16e–.16h](https://discourse.stonehearth.net/t/43079/166), [.16i](https://discourse.stonehearth.net/t/43079/168), [.17–.17e](https://discourse.stonehearth.net/t/43079/184), [.18](https://discourse.stonehearth.net/t/43079/200), [.18c](https://discourse.stonehearth.net/t/43079/207), [.18d](https://discourse.stonehearth.net/t/43079/208), [.19](https://discourse.stonehearth.net/t/43079/211), [.19c](https://discourse.stonehearth.net/t/43079/216), [.19d](https://discourse.stonehearth.net/t/43079/219), [.19e](https://discourse.stonehearth.net/t/43079/220), [.19f/.19g](https://discourse.stonehearth.net/t/43079/224). Проверены очереди ремесла и условия первого Firstbloom. | Сопоставить пересекающиеся встроенные и отдельные hotfix, затем детализировать инженерию, бои и все варианты сезонных заданий. |
|
||||
| 24 декабря 2025 — 27 ноября 2026 | [0.9.6.20](https://discourse.stonehearth.net/t/43079/240), [.20b, 6 января 2026](https://discourse.stonehearth.net/t/43079/242), [.21/.21b, 1 апреля](https://discourse.stonehearth.net/t/43079/245), [.22/.22b/.22c, сообщение 27 ноября](https://discourse.stonehearth.net/t/43079/246). Предметно проверены A19–A26, повтор сезонной ветви и сохранение качества при преобразовании. Последнее просмотренное объявление — .22c внутри сообщения 246. | Определить даты встроенных .22b/.22c, разрешить четыре вымышленных пункта .21 и разложить новые боевые способности .22. |
|
||||
|
||||
Текущий заголовок темы меняется по мере выхода патчей. Сообщение `43079/1` описывает 0.9.6, `39695/1` — 0.9.3, `40239/1` — 0.9.4. Номер версии в заголовке всей темы не датирует ранний текст. В объявлении .21 автор прямо предупреждает о четырёх вымышленных пунктах. Утверждение из этого поста получает подтверждение другим выпуском либо остаётся открытым. [Объявление .21](https://discourse.stonehearth.net/t/43079/245)
|
||||
|
||||
## Проверка исходных A01–A26
|
||||
|
||||
Здесь «описано» означает наличие публичного утверждения автора. Столбец последующей проверки содержит требования к свидетельствам и к собственной приёмке, которые пока остаются открытыми.
|
||||
|
||||
| ID | Проверенное правило и редакция | Последующая проверка |
|
||||
|---|---|---|
|
||||
| <a id="a01"></a>[A01](parity.md#a01) | 0.9 вводит ускорение роста от близкой воды. 0.9.3 меняет измерение влажности и света, 0.9.3.2 распределяет требования по сложности культур. | `AT-A01` сравнивает одинаковые поля по одному фактору, затем сезон совместно с поливом. Уточнить границы радиуса и насыщения для каждой культуры. [0.9](https://discourse.stonehearth.net/t/38843/1), [0.9.3.2](https://discourse.stonehearth.net/t/39695/85) |
|
||||
| <a id="a02"></a>[A02](parity.md#a02) | 0.9 объявляет управление потоком через затвор. | `AT-A02` проверяет закрытие и повторное открытие, загрузку в закрытом состоянии, объём воды и межчанковую границу. Геометрия проходного сечения и воздействие давления требуют отдельного свидетельства. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a03"></a>[A03](parity.md#a03) | 0.9 объявляет подъём воды насосом. Переработка 0.9.5.5 затрагивает выходящие в воздух трубы. | `AT-A03` проверяет перенос между нижней и верхней ёмкостью и сохранение объёма. Все направления установки проверить после исправлений .14, пределы дальности привязать к отдельному варианту насоса. [0.9](https://discourse.stonehearth.net/t/38843/1), [0.9.5.5](https://discourse.stonehearth.net/t/41422/157), [.14](https://discourse.stonehearth.net/t/43079/123) |
|
||||
| <a id="a04"></a>[A04](parity.md#a04) | 0.9 описывает сырьё, зависящее от места добычи, включая глину на дне водоёмов. | `AT-A04` размечает одинаковые объёмы в двух местах и учитывает полученные материалы. Полный перечень месторождений и допустимых заменителей остаётся задачей S02/S07. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a05"></a>[A05](parity.md#a05) | Высокогорный биом с собственной флорой и сырьём опубликован в 0.9. | `AT-A05` обеспечивает самостоятельное снабжение оригинального биома. Необходимо выписать различия доступности каждого ресурса и его производственные последствия. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a06"></a>[A06](parity.md#a06) | 0.9 различает три класса топлива и требования конкретного производства. | `AT-A06` проверяет подходящую партию, отказ при неподходящем топливе и расход после загрузки. Уточнить требования каждого станка. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a07"></a>[A07](parity.md#a07) | 0.9 объявляет углублённую переработку металлов. | Открытый вопрос Q-A07 — какие промежуточные стадии и альтернативные входы различаются в целевой редакции? Общее объявление не закрывает цепочки. В `AT-A07` нужен отдельный маршрут каждой подтверждённой цепочки. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a08"></a>[A08](parity.md#a08) | 0.9 позволяет задавать предпочтения типов оружия и щита. | `AT-A08` меняет комплект и проверяет учёт снятых вещей. Уточнить приоритет предпочтения относительно профессии, уровня и отсутствия подходящей вещи. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a09"></a>[A09](parity.md#a09) | 0.9 публикует маршрут патруля из знамён. | `AT-A09` проверяет обход. Возобновление после тревоги в исходной строке требует отдельного свидетельства о позиции продолжения. Ограничение размера патруля вынесено в A35. [0.9](https://discourse.stonehearth.net/t/38843/1) |
|
||||
| <a id="a10"></a>[A10](parity.md#a10) | 0.9.4 описывает питьё как потребность комфорта с предпочтениями и непереносимостью. 0.9.4.2 убирает питьё из обычных открытых водоёмов. | `AT-A10` проверяет настроение, допустимый напиток и доступность воды. Общая доступность любой реки относится к ранней редакции. [0.9.4](https://discourse.stonehearth.net/t/40239/1), [0.9.4.2](https://discourse.stonehearth.net/t/40239/58) |
|
||||
| <a id="a11"></a>[A11](parity.md#a11) | Приготовление напитков опубликовано в 0.9.4. В 0.9.5 основные производственные обязанности переданы новой профессии пивовара. | `AT-A11` должен покрывать разные виды обработки и сохранение занятого сосуда. Состав действующих рецептов и открытие станков сверять с 0.9.5, включая последующие изменения. [0.9.4](https://discourse.stonehearth.net/t/40239/1), [0.9.5](https://discourse.stonehearth.net/t/41422/1) |
|
||||
| <a id="a12"></a>[A12](parity.md#a12) | 0.9.3 связывает специальный корм с качеством продукции стада. .22 исправляет применение качества корма. | `AT-A12` различает качество и количество продукции, включает корм разных качеств и контрольный рацион. Уточнить действующую функцию бонуса и применимость к каждой продукции. [0.9.3](https://discourse.stonehearth.net/t/39695/1), [.22](https://discourse.stonehearth.net/t/43079/246) |
|
||||
| <a id="a13"></a>[A13](parity.md#a13) | 0.9.4.5 меняет стоимость и привлекательность качественных вещей. 0.9.6.3 меняет округление дешёвых товаров. | `AT-A13` сохраняет качество при переноске и различает итоговую цену. Точные множители и правила округления требуют отдельной таблицы. [0.9.4.5](https://discourse.stonehearth.net/t/40239/154), [0.9.6.3](https://discourse.stonehearth.net/t/43079/7) |
|
||||
| <a id="a14"></a>[A14](parity.md#a14) | .14 добавляет извещение об умершем питомце и памятную урну с его данными. | `AT-A14` проверяет однократное создание и сохранение связей. Исходный источник подтверждает именно смерть питомца, а идемпотентность после загрузки задаёт наша проверка. [.14](https://discourse.stonehearth.net/t/43079/123) |
|
||||
| <a id="a15"></a>[A15](parity.md#a15) | 0.9.6 вводит физически присутствующих торговцев и занятие рыночного места. | `AT-A15` проверяет занятие и освобождение места и повторное открытие торговли в течение визита. Уточнить поведение при удалении занятого места. [0.9.6](https://discourse.stonehearth.net/t/43079/1) |
|
||||
| <a id="a16"></a>[A16](parity.md#a16) | 0.9.6 ограничивает посетителей уровнями города и места. | `AT-A16` меняет эти два фактора независимо. Отдельно проверить посетителя без рыночного места и специализированные места. [0.9.6](https://discourse.stonehearth.net/t/43079/1) |
|
||||
| <a id="a17"></a>[A17](parity.md#a17) | В 0.9.6 есть особые цены желаемых товаров. .2 исправляет конфликт спроса с собственным ассортиментом. | `AT-A17` сравнивает спрос и обычную продажу, исключает ценовой цикл и проверяет однократное списание оплаты и груза. [0.9.6](https://discourse.stonehearth.net/t/43079/1), [.2](https://discourse.stonehearth.net/t/43079/6) |
|
||||
| <a id="a18"></a>[A18](parity.md#a18) | 0.9.6 позволяет настраивать предпочтения категорий посещения. | `AT-A18` использует одинаковую историю и меняет только одну настройку. Открытый вопрос Q-A18 — это жёсткий запрет либо изменение вероятности для каждого положения настройки? [0.9.6](https://discourse.stonehearth.net/t/43079/1) |
|
||||
| <a id="a19"></a>[A19](parity.md#a19) | .22 повышает влияние прошлой торговли относительно богатства. | `AT-A19` сравнивает торговавший и контрольный города при равном богатстве. Нужна опубликованная формула либо собственная явно выбранная функция. [.22](https://discourse.stonehearth.net/t/43079/246) |
|
||||
| <a id="a20"></a>[A20](parity.md#a20) | .22 связывает опыление с подходящими растениями и качеством улья. .22b уточняет последствия укрытия. | `AT-A20` отдельно считает улучшение растений, развитие и спад качества улья, повтор после задержки и производство под укрытием. Точные интервалы и пороги открыты. [.22/.22b](https://discourse.stonehearth.net/t/43079/246) |
|
||||
| <a id="a21"></a>[A21](parity.md#a21) | .22 усиливает затопление и заморозки, сохраняя различия морозостойкости культур. | `AT-A21` варьирует мороз и затопление отдельно, затем совместно с поливом. Нужны пороги и исключения для каждой культуры. [.22](https://discourse.stonehearth.net/t/43079/246) |
|
||||
| <a id="a22"></a>[A22](parity.md#a22) | .22 вводит сезонные вероятности новой дичи и заменяемый мясной ингредиент. | `AT-A22` проверяет появление, ловлю и замену в собственном рецепте. Требуется перечень применимых рецептов. [.22](https://discourse.stonehearth.net/t/43079/246) |
|
||||
| <a id="a23"></a>[A23](parity.md#a23) | .12 разрешает пройти Candledark без боёв через выбор, доступный в Peaceful. .20b поясняет финал повторного мирного прохождения. | `AT-A23` проверяет доступность выбора по сложности. Условие выживания боевой ветви нельзя автоматически применять к мирной. Нужен отдельный проверяемый исход повторной ветви. [.12](https://discourse.stonehearth.net/t/43079/112), [.20b](https://discourse.stonehearth.net/t/43079/242) |
|
||||
| <a id="a24"></a>[A24](parity.md#a24) | .14 задаёт старт Frostfeast для города уровня 2+ во временном окне и продолжение уже начатой истории после его закрытия. | `AT-A24` сохраняет историю на обеих сторонах окна. Исходную ссылку `/240` следует подписать как зимнюю .20. Условия повтора раскрывает A40. [.14](https://discourse.stonehearth.net/t/43079/123), [.20](https://discourse.stonehearth.net/t/43079/240) |
|
||||
| <a id="a25"></a>[A25](parity.md#a25) | .22 переносит животных удалённого пастбища в подходящее существующее при наличии вместимости. | `AT-A25` учитывает переведённых и оставшихся животных при нулевой, частичной и достаточной вместимости. [.22](https://discourse.stonehearth.net/t/43079/246) |
|
||||
| <a id="a26"></a>[A26](parity.md#a26) | .22 повышает приоритет основных потребностей относительно восстановления в кровати. | `AT-A26` проверяет голод одновременно с ранением. Порог переключения и возобновление лечения остаются открытыми вопросами. [.22](https://discourse.stonehearth.net/t/43079/246) |
|
||||
|
||||
## Дополнительные наблюдения
|
||||
|
||||
Для каждого ID действует сценарий `AT-` с тем же номером. Наблюдаемое правило и предлагаемый самостоятельный тест приведены раздельно в столбцах. Изменение количества входов, результатов либо условий открытия получает отдельный сценарий при дальнейшем разборе.
|
||||
|
||||
| ID | Модуль и редакция правила | Триггер и эффект | Собственный эквивалент и проверка | Система и этап |
|
||||
|---|---|---|---|---|
|
||||
| <a id="a27"></a>A27 | Качество, 0.9.3 | Качество ингредиентов меняет шанс качества изделия, ограниченный умением ремесленника. | Оригинальный рецепт из двух ресурсов. Проверить низкий и высокий уровни мастерства, одинаковый seed и сохранение перед выдачей изделия. [Источник](https://discourse.stonehearth.net/t/39695/1) | [S07](systems/S07.md), [M04](milestones/M04.md) |
|
||||
| <a id="a28"></a>A28 | Поля, 0.9.3.2 | Требования влажности и состав показателей зависят от сложности культуры и открытых возможностей фермера. | Собственные простая и сложная культуры. Проверить информацию до и после обучения и остановку при неподходящей влажности. [Источник](https://discourse.stonehearth.net/t/39695/85) | [S10](systems/S10.md), [S18](systems/S18.md), [M05](milestones/M05.md) |
|
||||
| <a id="a29"></a>A29 | Добыча, 0.9.3.3 | Улучшенный инструмент шахтёра меняет скорость и качество добычи. | Две версии собственного инструмента на одинаковой жиле. Сравнить завершённую работу и качество, проверить сохранение во время добычи. [Источник](https://discourse.stonehearth.net/t/39695/97) | [S07](systems/S07.md), [M04](milestones/M04.md) |
|
||||
| <a id="a30"></a>A30 | Напитки, 0.9.4 | Время суток влияет на выбор напитка, личные предпочтения имеют более высокий приоритет. | Доступны два собственных напитка. Сравнить утро и вечер у обычного жителя и жителя с непереносимостью. [Источник](https://discourse.stonehearth.net/t/40239/1) | [S05](systems/S05.md), [M05](milestones/M05.md) |
|
||||
| <a id="a31"></a>A31 | Пасека, 0.9.4.2 | Производство мёда в улье останавливается зимой. | Сохранить собственную пасеку до границы сезона, проверить остановку, возобновление и отсутствие накопления пропущенной продукции. Требуется сверка зимних исключений в целевой редакции. [Источник](https://discourse.stonehearth.net/t/40239/58) | [S09](systems/S09.md), [S10](systems/S10.md), [M05](milestones/M05.md) |
|
||||
| <a id="a32"></a>A32 | Вместилища, 0.9.4.5 | Специальный чан допускает несколько жидкостей одной категории. | В собственный аналог чана загрузить два совместимых напитка, затем предложить несовместимый груз. Проверить вместимость и владельца при отказе. Исключение относится к указанному типу тары. [Источник](https://discourse.stonehearth.net/t/40239/154) | [S06](systems/S06.md), [M05](milestones/M05.md) |
|
||||
| <a id="a33"></a>A33 | Профессии культур, 0.9.4 | Событие открывает обработку кости культурам без исходного доступа. | Оригинальная учебная встреча. Проверить доступ до и после финала, сохранение на развилке и однократное открытие. Позднее .20/.22 блокируют ненужный повтор при полном комплекте знаний. [0.9.4](https://discourse.stonehearth.net/t/40239/1), [.20](https://discourse.stonehearth.net/t/43079/240) | [S07](systems/S07.md), [S13](systems/S13.md), [M06](milestones/M06.md) |
|
||||
| <a id="a34"></a>A34 | Травы, 0.9.5.1 | Очистка посадочного сосуда возвращает семя и удаляет растение. | Перенести собственное растение в улучшенный сосуд через возвращённое семя. Проверить единственного владельца и сохранение между действиями. [Источник](https://discourse.stonehearth.net/t/41422/58) | [S06](systems/S06.md), [S10](systems/S10.md), [M05](milestones/M05.md) |
|
||||
| <a id="a35"></a>A35 | Патруль, 0.9.5.3 | Одна группа ограничивает число одновременно патрулирующих воинов. Опубликованное значение по умолчанию — шесть. | Назначить семь воинов одной группы и наблюдать участие и ротацию, затем две группы. Точный порядок отдыха и замещения требует отдельного подтверждения. [Источник](https://discourse.stonehearth.net/t/41422/93) | [S12](systems/S12.md), [M07](milestones/M07.md) |
|
||||
| <a id="a36"></a>A36 | Поля, 0.9.5.3 | Высотный слой биома влияет на влажность, свет и допустимость поля. | Два поля собственного биома на разных высотах при одинаковой культуре и сезоне. Проверить граничную высоту и объяснение запрета в UI. [Источник](https://discourse.stonehearth.net/t/41422/93) | [S02](systems/S02.md), [S10](systems/S10.md), [M05](milestones/M05.md) |
|
||||
| <a id="a37"></a>A37 | Доставка, 0.9.6.2 | Исправлен учёт груза задания, принесённого прямо с земли в специальный склад. | Два одинаковых собственных заказа получают груз с земли и из обычного склада. Награда выдаётся один раз, груз имеет одного владельца до и после загрузки. [Исходная ошибка](https://discourse.stonehearth.net/t/43079/1), [исправление](https://discourse.stonehearth.net/t/43079/6) | [S04](systems/S04.md), [S06](systems/S06.md), [S13](systems/S13.md), [M07](milestones/M07.md) |
|
||||
| <a id="a38"></a>A38 | Кооператив, 0.9.6.3 | Игроки могут передавать друг другу эксклюзивные рыночные места, полученные развитием города. | Передать собственное специализированное место союзнику. Проверить право использования, оплату и единственного владельца при повторе сетевой команды и загрузке. [Источник](https://discourse.stonehearth.net/t/43079/7) | [S11](systems/S11.md), [S16](systems/S16.md), [M09](milestones/M09.md) |
|
||||
| <a id="a39"></a>A39 | Производство, 0.9.6.16 | У ремесленника есть основная и вторичная очереди с независимым включением. Основная имеет приоритет. | Собственный разовый и поддерживающий запас заказ. Проверить приоритет, выключение одной очереди и сохранение уже зарезервированных материалов. [Источник](https://discourse.stonehearth.net/t/43079/151) | [S04](systems/S04.md), [S07](systems/S07.md), [M04](milestones/M04.md) |
|
||||
| <a id="a40"></a>A40 | Повтор событий, 0.9.6.20b | Исправлен старт Frostfeast при уже открытых рецептах. Для мирного повторного Candledark дано особое объяснение завершения. | Собственная повторная сезонная история при полном комплекте знаний. `AT-A40-F` проверяет вход зимней ветви, `AT-A40-C` — мирный финал без ожидания отсутствующих вторжений. Требуется выписать точные условия финала из свидетельства. [Источник](https://discourse.stonehearth.net/t/43079/242) | [S13](systems/S13.md), [M07](milestones/M07.md) |
|
||||
|
||||
## Открытые вопросы и следующий проход
|
||||
|
||||
| Вопрос | Проверка для закрытия и владелец |
|
||||
|---|---|
|
||||
| Q-ACE-COVERAGE — какие самостоятельные поведения ещё не выделены из перечисленных объявлений? | M00 и владельцы S05/S07/S10/S11/S12/S13 проходят индекс по порядку, добавляют строки для каждого отличающегося результата и связывают заменённые редакции. Последняя точка нынешнего просмотра — сообщение 246, раздел .22c. До полного разбора статус инвентаризации остаётся «в работе». |
|
||||
| Q-ACE-21 — какие четыре пункта .21 вымышлены? | M00 ищет опубликованное уточнение автора либо независимое подтверждение выпуска каждого спорного правила. Предположения читателей не закрывают вопрос. Новые строки этой проверки опираются на другие сообщения. |
|
||||
| Q-ACE-DATES — когда появились суффиксные исправления в редактируемых сообщениях? | M00 сверяет публичную историю объявления или отдельный авторский анонс. Сохраняет дату создания и дату подтверждения для конкретного суффикса. Текущий срез включает видимые .22b/.22c без выдуманной индивидуальной даты. |
|
||||
| Q-A07 — какие стадии металлургии различаются в актуальных правилах? | S07/M04 составляет цепочки из публичных описаний и требований профессий. Для каждой ветви указывает вход, открытие, выход и точку сохранения. |
|
||||
| Q-A18 — как настройки влияют на категорию торговцев? | S11/M06 устанавливает смысл каждого положения настройки и исключения для специализированных мест. Вероятностный вес нельзя объявлять жёстким запретом. |
|
||||
| Q-ACE-EVENTS — какие условия и исходы есть у каждой сезонной и культурной ветви? | S13/M07 описывает вход, сложность, шаги, награду, повтор и восстановление для каждой ветви отдельно. A23, A24, A33 и A40 задают первые различия. |
|
||||
| Q-ACE-NUMBERS — какие численные требования доступны в публичных свидетельствах? | Владельцы систем уточняют влажность, радиусы, качество, вместимость, цены и сроки. При отсутствии описания фиксируют конкретный пробел и проверяемый собственный выбор. |
|
||||
|
||||
Для M01 подтверждена необходимость хранить устойчивые ссылки, владение грузом, командный прогресс и состояние отложенных действий. Приведённые сценарии требуют сравнения продолжения после загрузки и защиты от повторного применения. Выбор внутренней архитектуры выполняется по [M01](milestones/M01.md) и [правилу VoidLibrary](void-library.md). Номера будущих библиотечных issues добавляются после реального поиска и регистрации.
|
||||
|
||||
[Реестр паритета](parity.md) · [Мастер-план](../../PLAN.md)
|
||||
@@ -0,0 +1,114 @@
|
||||
# Свидетельства поведения базовой Stonehearth
|
||||
|
||||
Проверка M00-B от 2 декабря 2026 года относится к публичным описаниям базовой игры до версии 1.1 с её декабрьским исправлением. Исходный инвентарь B01–B24 сохранён в [реестре паритета](parity.md). Здесь каждому пункту назначены проверенный выпуск и конкретный остаток исследования. B25–B40 расширяют инвентарь. Все `AT-Bxx` ожидают реализации и проверки на собственной Windows-сборке.
|
||||
|
||||
Источники описывают наблюдаемое поведение. Собственные сценарии ниже задают условия будущей проверки. Неустановленные коэффициенты, исходы и изменения между выпусками получают открытый вопрос. Передаваемые в M01 ограничения относятся к воспроизводимому состоянию, владению и возобновлению работ. Полный обход ранних выпусков продолжается по очереди в конце документа. [M00](milestones/M00.md) · [Мастер-план](../../PLAN.md)
|
||||
|
||||
## Источники и пройденный диапазон
|
||||
|
||||
Тексты объявлений прочитаны через официальный `ISteamNews/GetNewsForApp`. Ссылки ведут к двум полученным срезам ленты с фиксированным `enddate` и полным содержимым. Текстовый фрагмент ссылки указывает заголовок. В JSON запись находят по полю `title`, дату проверяют по `date`, автора по `author` и источник по `feedname`. Дата в таблице приведена в UTC. Витрина Steam может показывать предыдущий день. Старые адреса `announcements/detail`, полученные из части записей API, при проверке перенаправляли на общую страницу событий. Запросы отдельных записей с `count=1` завершались сбросом HTTPS, поэтому здесь использованы успешно полученные срезы по 100 записей.
|
||||
|
||||
| Дата UTC | Выпуск и прочитанный материал | Зафиксированная граница |
|
||||
|---|---|---|
|
||||
| 2016-09-13 | Alpha 18, стабильный выпуск. Строительство, развитие фермера, торговля и жизнь жителей. [Alpha 18 is Here!][a18] | Объявление выпуска прочитано. Предшествующие альфы и промежуточные исправления ещё не пройдены. |
|
||||
| 2016-10-28 | Alpha 19, стабильный выпуск. Развитие пустынной культуры, стройка и управление модами. [Alpha 19 Has Arrived!][a19] | Старые ветви развития сопоставить с заменившей их кампанией Alpha 24+. |
|
||||
| 2017-01-24 | Alpha 20, стабильный выпуск. Настроение, спасение и восстановление жителей. [Alpha 20][a20] | Установлены выпущенные механики, ранее описанные в нестабильной сборке. |
|
||||
| 2017-01-30 | Исправление Alpha 20, текст обновлён до release 701 от 31 января. [Release 701][r701] | Учтены голод, восстановление и сохранение эффектов лечения. |
|
||||
| 2018-04-05 | Alpha 24.4, нестабильный выпуск. Погода, прогресс города и торговцы. [Alpha 24.4][a244] | Сам по себе не подтверждает поставку в стабильной ветке. |
|
||||
| 2018-04-12 | Alpha 24.5, нестабильный выпуск. Workshop и изменение урона погоды в мирном режиме. [Alpha 24.5][a245] | Для точного исключения урона в 1.1 открыт B31. |
|
||||
| 2018-05-03 | Alpha 24.8, нестабильный выпуск. Кооператив, шаблоны, доступ работников и интерфейс стройки. [Alpha 24.8][a248] | Стабильное подтверждение основной поверхности кооператива получено в Alpha 24+. |
|
||||
| 2018-06-08 | Alpha 24+, стабильное объединение изменений нового строителя, кооператива, погоды, развития города, модов и растений. [Alpha 24+][a24] | Прочитано объявление целиком. Подробные журналы каждого промежуточного 24.x ещё требуют отдельного обхода. |
|
||||
| 2018-07-18 | Beta r876, нестабильный выпуск. Перемещение дверей и окон, исправления размещения, торговли и повторной отправки жителей. [r876][r876] | Стабильная Beta перечисляет r876 среди включённых выпусков. |
|
||||
| 2018-07-18 | Beta на стабильной ветке. Культура, достопримечательности, сотрудничество, специальность, сезоны и финальное событие. [Beta on Steam Stable][beta] | Встроенная сводка прямо названа неполной. Ссылки на r862–r875 перечислены, их полные тексты ещё не проверены. |
|
||||
| 2018-07-25 | Выпуск 1.0. [Stonehearth is Now 1.0][v10] | Подтверждена поставка 1.0. Обещание будущей работы над 1.1 не служит свидетельством её механик. |
|
||||
| 2018-09-19 | r898, нестабильный выпуск. Путешественники и исправления торговли. [r898][r898] | Механика визитов повторно подтверждена в 1.1. |
|
||||
| 2018-11-16 | 1.05, стабильный выпуск. [Stonehearth 1.05][v105] | Подтверждён перенос r898 и r905 с исправлениями на стабильную ветку. Полные тексты r905 и его исправления остаются в очереди. |
|
||||
| 2018-12-12 | 1.1, стабильный выпуск. Путешественники, новые встречи, выход из застревания, ремесло и моды. [Stonehearth 1.1][v11] | Последнее крупное обновление по объявлению разработчика. Прочитаны все игровые разделы. |
|
||||
| 2018-12-20 | Исправление 1.1. [Hotfix for Stonehearth 1.1][v11fix] | Последний просмотренный патч базовой игры. Прочитаны все шесть исправлений, включая сортировку владельца кровати, список шаблонов и закрытие окна загрузки. |
|
||||
|
||||
Также прочитано актуальное описание игры на витрине. Оно подтверждает общие возможности, а вопросы о точных правилах версии 1.1 требуют датированного свидетельства. [Описание игры][store]
|
||||
|
||||
## Проверка первоначальных B01–B24
|
||||
|
||||
Ссылка в ID ведёт к собственному сценарию в основном реестре. Здесь «подтверждено» относится к указанной части поведения в указанном выпуске. Остаток проверки входит в соответствующий `AT-Bxx`.
|
||||
|
||||
| ID | Проверенное поведение и версия | Открытый вопрос и продолжение проверки |
|
||||
|---|---|---|
|
||||
| <a id="b01"></a>[B01](parity.md#b01) | Новый старт использует процедурный рельеф. [Витрина][store] | Гарантирует ли 1.1 одинаковое размещение ресурсов при одинаковом seed и настройках? `AT-B01` повторяет генерацию и сравнивает доступные залежи. |
|
||||
| <a id="b02"></a>[B02](parity.md#b02) | Перекрывающиеся комнаты образуют общий план. Alpha 24+. [Новый строитель][a24] | Как пересечение комнат определяет смету и общие блоки? `AT-B02` считает материалы и объём пересечения до начала работ и после. |
|
||||
| <a id="b03"></a>[B03](parity.md#b03) | Комнату можно поставить поверх другой. Alpha 24+. [Новый строитель][a24] | Объявление не определяет правила постоянной лестницы. `AT-B03` требует доступной кровати наверху и проверяет маршрут после снятия временного доступа. |
|
||||
| <a id="b04"></a>[B04](parity.md#b04) | Отдельный воксель настила редактируется вытягиванием или вдавливанием. Alpha 24+. [Новый строитель][a24] | Какая часть уже начатой стройки допускает такую правку в 1.1? `AT-B04` начинает с чертежа, продолжение после выдачи работ остаётся отдельной проверкой. |
|
||||
| <a id="b05"></a>[B05](parity.md#b05) | Застой стройки вызывает поиск недоступных частей и их подсветку. Alpha 24+. [Новый строитель][a24] | В исходном объявлении задержка около 30 секунд. Точное значение 1.1 открыто. `AT-B05` возвращает доступ лестницей и проверяет продолжение того же заказа. |
|
||||
| <a id="b06"></a>[B06](parity.md#b06) | После окончания здания убираются временные леса и лестницы. Alpha 24+. [Новый строитель][a24] | Как очистка ведёт себя при отмене или неполной стройке? `AT-B06` отдельно проверяет завершение, отмену и сохранение перед разборкой. |
|
||||
| <a id="b07"></a>[B07](parity.md#b07) | Мысли о еде, безопасности, постели и пространстве влияют на настроение. Alpha 20 stable. [Настроение][a20] | Полный перечень мыслей, сроков и сочетаний в 1.1 открыт. `AT-B07` меняет по одному условию и связывает сводку с причиной изменения. |
|
||||
| <a id="b08"></a>[B08](parity.md#b08) | Снабжение едой и развитие поселения входят в основной игровой цикл. [Витрина][store] | Формулы иммиграции 1.1 не установлены. Alpha 24.4 меняет требования еды и богатства. `AT-B08` фиксирует население, пороги и принятие жителя. [Alpha 24.4][a244] |
|
||||
| <a id="b09"></a>[B09](parity.md#b09) | Третья культура опирается на охоту и каменное ремесло. Beta stable. [Культуры][beta] | Каковы все различимые открытия профессий и стартовые предметы трёх культур? `AT-B09` получает отдельную матрицу культур до M06. |
|
||||
| <a id="b10"></a>[B10](parity.md#b10) | В штатных биомах при старте встречаются достопримечательности. Beta stable. [Генерация][beta] | Какие объекты размещаются условно и как переживают редактирование? `AT-B10` проверяет собственную руину до и после сохранения. |
|
||||
| <a id="b11"></a>[B11](parity.md#b11) | При создании партии выбирается сезон, который меняет распределение погоды. Beta stable. [Сезоны][beta] | Список разрешённых стартовых сочетаний и длительности сезонов по биомам открыт. `AT-B11` сравнивает один биом с двумя стартами. |
|
||||
| <a id="b12"></a>[B12](parity.md#b12) | В предпочтительный сезон рост культуры ускоряется вдвое. Beta stable. [Земледелие][beta] | Как взаимодействуют сезон, погода и прочие модификаторы в 1.1? `AT-B12` сначала измеряет изолированное правило, затем сочетания. |
|
||||
| <a id="b13"></a>[B13](parity.md#b13) | После цепочки развития доступен перенос до трёх жителей и десяти предметов в новую партию. Alpha 24+. [Повторное заселение][a24] | Объявление допускает перенос городского бонуса с особым предметом. Как учитываются ограничения профессий и расход стека? `AT-B13` сверяет отправление и прибытие. |
|
||||
| <a id="b14"></a>[B14](parity.md#b14) | Цепочка сотрудничества открывается после второго уровня города и может дать новую специальность. Beta stable. [Сотрудничество][beta] | «Мало боя» в описании не устанавливает полную доступность при мирной сложности. `AT-B14` отдельно проверяет этот режим и состав каждого исхода. |
|
||||
| <a id="b15"></a>[B15](parity.md#b15) | Специалист размещает участки земли, источники воды, залежи и достопримечательности. Beta stable. [Специальность][beta] | Какие затраты, ограничения и рабочие позиции имеет каждый тип изменения? `AT-B15` делится по типам и сверяет доступность после правки. |
|
||||
| <a id="b16"></a>[B16](parity.md#b16) | Необязательное финальное событие открывается после одной из двух кампаний. Beta stable. [Финал][beta] | Возможность отказа, мирный режим, поражение и награды каждого пути требуют отдельных свидетельств. `AT-B16` проверяет оба входа и сохранение до запуска. |
|
||||
| <a id="b17"></a>[B17](parity.md#b17) | Упавшего в бою жителя можно спасти, перенести в постель и восстановить, ускоряя уходом специалиста. Alpha 20 stable. [Спасение][a20] | Условия смерти, таймер спасения и возврата к службе в 1.1 открыты. `AT-B17` сохраняет во время переноски и восстановления. |
|
||||
| <a id="b18"></a>[B18](parity.md#b18) | Зарезервированная гостевая кровать допускает визиты. Обстановка и постель влияют на удовлетворённость и подарок. 1.1. [Путешественники][v11] | Условие визита проверяется по доступной кровати. `AT-B18` варьирует кровать, привлекательность и уровень города отдельно, проверяет покупку и единственную выдачу подарка. |
|
||||
| <a id="b19"></a>[B19](parity.md#b19) | До восьми игроков размещают поселения на общей карте у хозяина. Alpha 24+ stable. [Кооператив][a24] | Какими правами защищены чужие объекты при каждом действии? `AT-B19` фиксирует разрешённые и отклонённые команды двух владельцев. |
|
||||
| <a id="b20"></a>[B20](parity.md#b20) | Между городами доступна торговля товарами и золотом. Alpha 24.8 и Alpha 24+ stable. [Торговля][a248] · [Стабильный выпуск][a24] | Поведение незавершённой сделки при отключении не описано. `AT-B20` проверяет подтверждение, разрыв связи и отсутствие повторного расхода. |
|
||||
| <a id="b21"></a>[B21](parity.md#b21) | Отряды игроков помогают отражать нападения друг на друга. Alpha 24.8. [Совместная оборона][a248] | Какие команды требуют разрешения владельца? Точное правило остаётся вопросом для `AT-B21` и таблицы прав M09. |
|
||||
| <a id="b22"></a>[B22](parity.md#b22) | Хозяин и клиент сохраняют и загружают шаблоны нового строителя. Alpha 24.8. [Шаблоны][a248] | Является ли шаблон локальным, какова область доступа и сохраняется ли смещение по высоте? `AT-B22` переносит шаблон между участками и ролями. |
|
||||
| <a id="b23"></a>[B23](parity.md#b23) | Определения контента и сценарии допускают расширение модами. [Витрина][store] · [Моды в Alpha 24+][a24] | Полный набор поддерживаемых точек расширения 1.1 открыт. `AT-B23` использует собственные предмет, встречу и API, проверяет восстановление набора правил. |
|
||||
| <a id="b24"></a>[B24](parity.md#b24) | Специалист создаёт помощников для повторяемых работ. Beta stable. [Помощники][beta] | Полный набор поручений и взаимодействие с резервами жителей в 1.1 открыт. `AT-B24` проверяет один результат совместно выбранного задания. |
|
||||
|
||||
## Дополнительные наблюдения B25–B40
|
||||
|
||||
Каждая строка задаёт новый `AT-Bxx`. Предполагаемые названия предметов и событий новой игры определяются её собственным контентом. Версия указывает источник проверенной части контракта. Условия продолжения исследования записаны в последнем столбце.
|
||||
|
||||
| ID и модуль | Триггер и наблюдаемый эффект | Собственный сценарий и ожидаемый результат | Системы, этап и проверенное свидетельство | Оставшийся вопрос |
|
||||
|---|---|---|---|---|
|
||||
| <a id="b25"></a>B25. Профессии | Житель получает опыт работой. Условие развития и инструмент позволяют сменить профессию. | `AT-B25`. Создать собственную пару профессий, проверить отказ без инструмента и переход после открытия. Сохранить опыт и инструмент. | [S07](systems/S07.md) · [M04](milestones/M04.md). [Описание развития жителей][store] | Датированный полный перечень условий 1.1 по каждой культуре открыт. |
|
||||
| <a id="b26"></a>B26. Земледелие | Уровень фермера открывает культуры. Мастер допускает торговые предложения с чужими семенами. | `AT-B26`. Перейти через одно открытие, затем получить собственную инокультурную посадку через торговца. До открытия она недоступна. | [S07](systems/S07.md) · [S10](systems/S10.md) · [M06](milestones/M06.md). [Alpha 18][a18] | Конкретные уровни культур и изменённые условия 1.1 проверить по отдельности. |
|
||||
| <a id="b27"></a>B27. Торговля | Продажа ограничена запасом золота торговца. | `AT-B27`. Продать партию на границе наличности, повторить запрос и сверить остатки товара и денег обеих сторон после загрузки. | [S11](systems/S11.md) · [M06](milestones/M06.md). [Alpha 18][a18] | Правило частичного принятия партии и пополнения наличности 1.1 открыто. |
|
||||
| <a id="b28"></a>B28. Пища | Пища портится и исчезает после полного гниения. | `AT-B28`. Поместить две собственные партии разных сроков в склад. Пройти границу порчи с сохранением, проверить единственный расход и доступную еду. | [S05](systems/S05.md) · [S06](systems/S06.md) · [M04](milestones/M04.md). [Alpha 18][a18] | Все сроки и влияние типа хранилища в 1.1 ещё не установлены. |
|
||||
| <a id="b29"></a>B29. Развитие города | Выбор пути городского развития меняет испытание и награды культуры. | `AT-B29`. Сохраниться перед выбором двух собственных путей, завершить каждый отдельно и сравнить открытия и бонусы. | [S11](systems/S11.md) · [S13](systems/S13.md) · [M06](milestones/M06.md). [Alpha 19][a19] · [Замена кампании в Alpha 24+][a24] | Старые требования Alpha 19 сопоставить с заменившими их путями 1.1. Каждый различимый финал требует отдельного случая. |
|
||||
| <a id="b30"></a>B30. Погода | Прогноз охватывает текущий и два следующих дня. Укрытие меняет воздействие суровой погоды на жителей. | `AT-B30`. Сравнить двух жителей под крышей и снаружи в заданной погоде. Прогноз и эффекты продолжаются после загрузки. | [S09](systems/S09.md) · [S05](systems/S05.md) · [M05](milestones/M05.md). [Alpha 24.4][a244] · [Стабильный выпуск][a24] | Для каждого типа 1.1 установить длительность, повреждения и защиту животных/растений. |
|
||||
| <a id="b31"></a>B31. Мирный режим | В нестабильной Alpha 24.5 отключён урон песчаных и грозовых бурь в мирной сложности. | `AT-B31`. Запустить одинаковую собственную бурю в двух сложностях. В мирной партии проверить отсутствие соответствующего урона и сохранить остальные предусмотренные эффекты. | [S09](systems/S09.md) · [S13](systems/S13.md) · [M05](milestones/M05.md). [Alpha 24.5][a245] | Подтверждение точного исключения в стабильной 1.1 и граница между уроном и эффектами комфорта остаются открыты. |
|
||||
| <a id="b32"></a>B32. Настроение | Пять состояний настроения меняют темп работы и выражаются в поведении и интерфейсе. | `AT-B32`. В одинаковом задании менять только мысли. Измерить полезную работу и сверить состояние в карточке и сводке города. | [S05](systems/S05.md) · [M04](milestones/M04.md). [Alpha 20 stable][a20] | Коэффициенты и пороги 1.1 ещё не подтверждены. |
|
||||
| <a id="b33"></a>B33. Здоровье | При голодании здоровье не восстанавливается. | `AT-B33`. Ранить собственного жителя и сравнить восстановление до и после кормления. Загрузка на границе не добавляет лишнего лечения. | [S05](systems/S05.md) · [S12](systems/S12.md) · [M07](milestones/M07.md). [Исправление Alpha 20 до 701][r701] | Установить порог голода 1.1 и приоритет лечения относительно еды. |
|
||||
| <a id="b34"></a>B34. Кооперативный труд | Игрок может разрешить жителям работать на другого игрока. | `AT-B34`. Два города. Выдать работу союзнику, отозвать разрешение во время рейса и проверить работника, груз и незавершённую работу. | [S04](systems/S04.md) · [S16](systems/S16.md) · [M09](milestones/M09.md). [Alpha 24.8][a248] · [Стабильный выпуск][a24] | Область делегирования и момент отзыва в 1.1 открыты. |
|
||||
| <a id="b35"></a>B35. Добыча | Новая зона добычи может создаваться приостановленной. Выбор задаётся отдельно для каждого игрока. | `AT-B35`. Один игрок создаёт активную зону, другой приостановленную. Проверить отсутствие работ во второй до запуска и сохранение владельца. | [S02](systems/S02.md) · [S04](systems/S04.md) · [M03](milestones/M03.md). [Alpha 24+ stable][a24] | Настройки старта зоны и приостановка уже выданной работы требуют отдельных проверок. |
|
||||
| <a id="b36"></a>B36. Модули правил | Набор модов связан с партией, подключение согласуется с модами хозяина. | `AT-B36`. Открыть две партии с разными собственными модулями. Проверить их восстановление и понятный отказ гостю с несовместимым набором. | [S19](systems/S19.md) · [S16](systems/S16.md) · [M10](milestones/M10.md). [Alpha 24+ stable][a24] | Исторические гарантии версий и обновления сохранения не установлены. Контрольные суммы заданы контрактом нового проекта. |
|
||||
| <a id="b37"></a>B37. Строительство | Двери и окна можно снять и переместить. | `AT-B37`. Перенести собственную дверь в другой проём. Проверить наличие одного предмета, коллизию старого и нового прохода, сохранение во время переноски. | [S08](systems/S08.md) · [S03](systems/S03.md) · [M03](milestones/M03.md). [r876][r876] · [Включён в stable Beta][beta] | Ограничения для стройки в процессе и владельца другого города открыты. |
|
||||
| <a id="b38"></a>B38. Ремесло | Потеря ингредиентов текущего рецепта перестала навсегда блокировать ремесленника. | `AT-B38`. Убрать последний вход собственного заказа. Ремесленник завершает допустимую работу, а исходный заказ возобновляется после снабжения. | [S04](systems/S04.md) · [S07](systems/S07.md) · [M04](milestones/M04.md). [1.1][v11] | Точный порядок отложения и возврата заказа 1.1 открыт. |
|
||||
| <a id="b39"></a>B39. Выход из застревания | Для бездействующего жителя доступен перенос через карточку с суточным ограничением. Об угрозе голода в изоляции приходит уведомление. | `AT-B39`. Изолировать собственного жителя. Проверить уведомление, доступность действия по состоянию и сохранение срока повторного применения после загрузки. | [S18](systems/S18.md) · [S03](systems/S03.md) · [M03](milestones/M03.md). [1.1][v11] | Разрешённая точка назначения и взаимодействие с грузом 1.1 не описаны. |
|
||||
| <a id="b40"></a>B40. Модули правил | Объявленная зависимость мода влияет на порядок загрузки. | `AT-B40`. Два собственных модуля с явной зависимостью. Проверить порядок, отсутствие зависимости и цикл, затем восстановление того же набора из сохранения. | [S19](systems/S19.md) · [M10](milestones/M10.md). [1.1][v11] | Поведение исторического загрузчика при цикле или отсутствии зависимости открыто. Явный отказ закреплён контрактом нового проекта. |
|
||||
|
||||
## Продолжение обхода источников
|
||||
|
||||
| Открытый участок | Точное продолжение и условие закрытия | Владелец и этап |
|
||||
|---|---|---|
|
||||
| Выпуски до Alpha 18 | Пройти датированные объявления ранних альф по порядку, начиная с первого доступного первичного журнала. У каждого правила записать введение, изменение или отмену. Витрина сама по себе не закрывает этот участок. | M00 и владельцы всех затронутых систем. |
|
||||
| Промежутки Alpha 18–24+ | Проверить промежуточные исправления 18/19/20, Alpha 21–23, Alpha 24 и каждый 24.x. Последовательность названий из API даёт очередь, прочитанными считаются только строки таблицы выше. | M00. |
|
||||
| Beta r862–r875 и RC–1.0 | Пройти перечисленные в stable Beta журналы r862, r864, r866, r868, r869, r870, r874, r875, затем RC1–RC5 и исправления 1.0. Сопоставить изменения с каждой строкой Bxx. | M00, [S07](systems/S07.md), [S13](systems/S13.md). |
|
||||
| 1.0–1.1 | r898 и 1.05 просмотрены. Пройти полностью r898-hotfix, r905/hotfix, r909, r915, r923, r927. Объявление 1.1 и его финальное исправление просмотрены. Проверить наличие иных более поздних патчей базовой игры к отсечке. | M00. |
|
||||
| Культуры и профессии | Для каждой культуры выписать дерево инструментов, уровни, входы, выходы, доступные мастерские и открываемые рецепты. B09/B25/B26 задают начало матрицы. | [S07](systems/S07.md) · [S11](systems/S11.md), M04–M06. |
|
||||
| События и мирная сложность | Для обеих входных кампаний финального события, сотрудничества, городских выборов и двух редких встреч из 1.1 установить все различные ветви. Для каждого пути указать режим, условия запуска, отказ, исход и повторяемость. B14/B16/B29/B31 остаются открытыми по перечисленным вопросам. | [S13](systems/S13.md), M07. |
|
||||
| Потребности, животные, торговля и UI | Разложить общие B07/B08/B17/B18 на разные триггеры и эффекты. Проверить недостачу еды, лечение, владение постелью, подарки и торговые покупки отдельно. Для UI финального патча воспроизвести сортировку кровати, наличие штатных шаблонов и закрытие загрузки клавишей Escape. | [S05](systems/S05.md) · [S10](systems/S10.md) · [S11](systems/S11.md) · [S18](systems/S18.md), M04–M10. |
|
||||
|
||||
Статус этого прохода — инвентарь с проверенными опорными выпусками и явной очередью. Полнота всех выпущенных поведений принимается после закрытия этой очереди и проверки исходов. Последний просмотренный выпуск — исправление 1.1 от 20 декабря 2018 года UTC. Для собственной реализации каждую строку закрывает результат `AT-Bxx` с коммитом, seed, модулями и наблюдаемым состоянием. [Приёмка M00](milestones/M00.md) · [Основной реестр](parity.md)
|
||||
|
||||
[store]: https://store.steampowered.com/app/253250/Stonehearth/
|
||||
[a18]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1485907022#:~:text=Alpha%2018%20is%20Here%21
|
||||
[a19]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1485907022#:~:text=Alpha%2019%20Has%20Arrived%21
|
||||
[a20]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1485907022#:~:text=Alpha%2020%3A%20In%20Which%20We%20Put%20the%20Heart%20in%20Hearthlings
|
||||
[r701]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1485907022#:~:text=Alpha%2020%20Updated%20to%20release%20701
|
||||
[a244]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Alpha%2024.4%20Now%20on%20Steam%20Unstable
|
||||
[a245]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Alpha%2024.5%20Now%20on%20Steam%20Unstable
|
||||
[a248]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Alpha%2024.8%20Now%20on%20Steam%20Unstable
|
||||
[a24]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Alpha%2024%2B%3A%20The%20Alpha%20to%20End%20All%20Alphas
|
||||
[r876]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Beta%20r876%20Now%20on%20Steam%20Unstable
|
||||
[beta]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Stonehearth%20Beta%20on%20Steam%20Stable
|
||||
[v10]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Stonehearth%20is%20Now%201.0
|
||||
[r898]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Release%20r898%20Now%20on%20Steam%20Unstable
|
||||
[v105]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Stonehearth%201.05%20on%20Steam%20Stable
|
||||
[v11]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Stonehearth%201.1%3A%20Once%20Moar%2C%20With%20Feeling
|
||||
[v11fix]: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=253250&count=100&maxlength=0&feeds=steam_community_announcements&enddate=1546300800#:~:text=Hotfix%20for%20Stonehearth%201.1%20now%20on%20Steam
|
||||
@@ -0,0 +1,53 @@
|
||||
# Владение грузом во время работ M01
|
||||
|
||||
Формат 14 уже различает заказы по постоянным ID. Следующий срез [S06](systems/S06.md) и [S04](systems/S04.md) вводит имущество, требования к нему и результат передачи. Это контракт реализации для текущих игровых действий. [План этапа](milestones/M01.md) · [Проверка действующего кода](../agent-workflow/tasks/M01-P5.md)
|
||||
|
||||
## Имущество и резервы
|
||||
|
||||
Каждый непустой стек имеет ID мира и одного владельца — склад, жителя или входной запас конкретного производственного заказа. Количество хранится у владельца. Резерв ссылается на него и задаёт удерживаемое количество. Отдельные резервы удерживают рабочее место, источник добычи и место для результата. Счётчики доступности склада и источника можно восстановить из действующих резервов. Требование рецепта описывает затраты отдельно от имущества.
|
||||
|
||||
Целый стек, переходящий в пустой слот, сохраняет ID. При разделении ID остаётся у исходного остатка, а новая часть получает отдельный ID. При объединении сохраняется ID стека получателя. Ссылки резервов на перемещённое количество обновляются той же операцией. Для каждого вида ID свой восстанавливаемый счётчик. Ноль означает отсутствие ссылки, а `UINT64_MAX` у следующего ID — исчерпание. Выделение всей группы проверяется до изменения мира. [Void/Library #7](https://git.faumaray.com/Void/Library/issues/7)
|
||||
|
||||
Назначение работника закрепляет все материалы, рабочее место и вместимость вместе. Для плотника место под результат может обеспечивать зарезервированный входной материал в том же складе. Резерв места ссылается на конкретный резерв материала. Одна единица обеспечивает только одно место. При получении этого материала на освободившееся место устанавливается обычный резерв. До окончания работы запоминается и исходный склад, чтобы прежние команды перемещения и разбора выдавали согласованный отказ после получения груза.
|
||||
|
||||
| Событие | Изменение владения |
|
||||
|---|---|
|
||||
| Стартовые запасы и добыча | Начисление создаёт количество у склада либо жителя. Для добычи в тот же момент уменьшается исчерпаемый запас источника. |
|
||||
| Получение материалов | Все позиции текущей остановки переходят со склада к жителю. При отказе любой позиции весь груз остаётся на месте. |
|
||||
| Прибытие на стройку | Материалы переходят к заказу. Пока идёт работа, у площадки есть собственный входной запас. |
|
||||
| Завершение рецепта, монтаж, еда | На одном шаге списываются входы, учитывается причина и при необходимости создаётся результат. |
|
||||
| Отмена до получения | Освобождаются требования к складу, рабочему месту и исполнителю. |
|
||||
| Отмена в пути или на площадке | Груз остаётся у жителя либо возвращается ему со стройки. Уже установленные части здания сохраняются. Житель возвращает все виды груза, ожидая место при заполнении складов. |
|
||||
| Разбор свободного склада | Оставшиеся запасы списываются с причиной разбора и точным количеством каждого вида. |
|
||||
|
||||
Когда время работы истекло, а завершение временно невозможно, исполнение сохраняет состояние ожидания завершения и нулевой остаток времени. Новый шаг повторяет проверку с очередным номером операции. Так при исчерпании ID или переполнении не происходит повторного уменьшения нулевого таймера и частичной выдачи результата.
|
||||
|
||||
Для каждого вида предмета проверяется баланс. Начальный остаток, начисление, добыча и производство равны сумме имущества у всех текущих владельцев и списаний на сырьё, монтаж, питание и разбор. Счётчики источников и расходов используют проверяемую арифметику. Эта проверка выполняется при загрузке и в тестах. [Void/Library #8](https://git.faumaray.com/Void/Library/issues/8)
|
||||
|
||||
## Исполнение и повтор
|
||||
|
||||
У создания исполнения заранее известен ключ из ID жителя и его следующего номера назначения. Нумерация начинается с 1. При успешном принятии мир одной операцией выдаёт `TransferId`, сохраняет данные запроса и его результат и увеличивает номер назначения. Потеря ответа не может назначить ту же работу повторно. Нехватка ID, места или материалов до принятия оставляет оба счётчика прежними. Последующие шаги используют пару из `TransferId` и очередного номера операции. Отказ принятого шага меняет только журнал повтора. Повтор с исходными данными возвращает прежний результат, с изменёнными — конфликт.
|
||||
|
||||
Хранятся последние 4096 результатов в порядке применения. Для каждого результата закодированные запрос и ответ ограничены 1024 байтами каждый. После вытеснения прежний номер распознаётся по следующему номеру шага действующего исполнения или по границе выданных ID завершённых исполнений. Устаревший запрос не может повторно переместить имущество. У жителя не более одного действующего исполнения. Резервы одинакового предмета могут относиться к разным складам; размер набора проверяется по фактическим ограничениям игры. Полные проверки и измерения размера снимка входят в приёмку.
|
||||
|
||||
Действующие ссылки должны разрешаться к существующим объектам. Историческая квитанция может содержать уже израсходованный стек или удалённый заказ. Загрузчик проверяет её вид, согласованность полей и диапазоны выданных ID. Пары схемы и тела проверяются по отдельности для всех трёх поколений сохранений.
|
||||
|
||||
Явная отмена относится к современному приказу по `ProductionId`, с проверками города, инкарнации и номера запроса. Житель с возвращаемым грузом сохраняет своё исполнение до сдачи последней единицы. Если у кровати уже установлено основание или существует действующий ткацкий станок, отмена сохраняет площадку под прежним ID и приостанавливает следующие работы. Явное возобновление продолжает с сохранённой стадии. Завершённая кровать сохраняет назначение владельцу. Для старых `DemolishObject` и `MoveObject` продолжают действовать прежние отказы при занятом источнике, складе или кровати. [Контракт команд](systems/S16.md)
|
||||
|
||||
## Сохранение и миграция
|
||||
|
||||
Планируемая контрольная точка схемы 3 использует тело версии 15. В нём сохраняются реальные ID, владельцы, незавершённые исполнения, резервы, результаты повторов и баланс. Повтор ID, лишний владелец, пропавший источник или несовпадающий баланс отклоняют кандидата до смены текущей партии.
|
||||
|
||||
| Вход | Восстановление |
|
||||
|---|---|
|
||||
| Тела 1–13 и контрольная точка схемы 1 | Проверить исторические поля и контрольную сумму. Сопоставить позиционные ссылки постоянным ID. |
|
||||
| Тело 14 и схема 2 | Сохранить имеющиеся ID заказов и следующий ID, восстановить остальное имущество из действительных старых данных. |
|
||||
| Материалы в пути | Уже посещённые остановки соответствуют грузу жителя. Оставшиеся материалы удерживаются у склада. |
|
||||
| Начатая работа с доставленным материалом | В старом формате прибытие убирало материалы из инвентаря жителя. Восстановить вход площадки по проверенному действующему рецепту, затем посчитать начальный баланс. |
|
||||
| Добытчик, перевозчик, голодный житель | Восстановить фактический груз, удержание места, резерв источника или еды в соответствии с сохранённой стадией. |
|
||||
|
||||
При переносе старого активного задания ему назначается первое поколение, а следующий номер назначения жителя устанавливается в 2. Для свободного жителя следующее назначение начинается с 1. Запрос от уже перенесённого поколения без исторической квитанции получает ответ об устаревшем номере.
|
||||
|
||||
Обычная партия сохраняет побайтовый экспорт 13 и протокол LAN 11. Для отменённой стройки житель может нести несколько видов материалов без доступного склада. Даже одна доска без связанного с ней заказа может не иметь представления в старом состоянии перевозки. Кодек сообщает `UnsupportedLegacyState` до записи первого байта. Это относится также к приостановленной площадке и другим несовместимым сочетаниям состояния. Современная контрольная точка сохраняет партию полностью. Хост проверяет представимость до допуска гостя, разбора приказа и выдачи снимка. При отказе совместимый гость получает отказ в подключении или отключается, а хост продолжает игру.
|
||||
|
||||
Приёмка охватывает остановки до получения, между складами, на площадке, при отмене и при ожидании свободного места; исчерпание ID и числовые границы; точный повтор до и после загрузки; старые двоичные наборы; сравнение каждого такта на последовательном исполнителе и 2/6/12 потоках. В контрольном сценарии с 500 жителями дополнительно измеряются снимок, размер сохранения и операции при 10 000 стеках и 2 000 заказах.
|
||||
@@ -0,0 +1,93 @@
|
||||
> Исторический план плоского прототипа на коммите `083b84e`. Отметки относятся к старой сборке. [Мастер-план воксельной игры](../../../PLAN.md)
|
||||
|
||||
# План Stonehearth-like Simulation Engine
|
||||
|
||||
## Цель
|
||||
|
||||
Самостоятельная C++-игра о поселении с повторяемой симуляцией, многопоточным расчётом и 3D-клиентом. Это отдельный проект, не совместимый движок для Stonehearth. Код и игровые ресурсы Stonehearth не включаются.
|
||||
|
||||
## Этапы
|
||||
|
||||
### P0 — Инструменты и границы проекта
|
||||
|
||||
- [x] Отдельный каталог, CMake, C++20, лицензия и базовая структура.
|
||||
- [x] Portable-установщик MSYS2 UCRT64 с GCC 16 и сборка с CTest.
|
||||
- [ ] CI для Windows и Linux.
|
||||
- [x] Не включать код и ресурсы Stonehearth.
|
||||
|
||||
### P1 — Повторяемое ядро симуляции
|
||||
|
||||
- [x] Фиксированные тики и seed мира.
|
||||
- [x] Целочисленная карта и стабильный порядок симуляции.
|
||||
- [x] Резервирование работы, маршруты A*, перемещение и завершение заданий.
|
||||
- [x] Версионированный формат сохранения и загрузки мира.
|
||||
- [x] Версионированный формат команд и снимков для первого подключения по локальной сети.
|
||||
- [x] Общая обработка команд двух игроков с порядком применения, проверкой прав и защитой от повторов.
|
||||
|
||||
### P2 — Ресурсы, нагрузка и измерения
|
||||
|
||||
- [x] Источники дерева и камня с резервированием ресурса.
|
||||
- [x] Жители добывают ресурс и доставляют его на склад.
|
||||
- [x] Инвентарь склада со стеками предметов и ограничением вместимости.
|
||||
- [x] Метрики тиков, запросов A* и посещённых узлов.
|
||||
- [x] Сценарий сравнения 50 и 2500 жителей.
|
||||
- [x] Профилирование отдельных подсистем и сценарии на 50/100/250/500 жителях.
|
||||
- [x] Кэш маршрутов для полей, складов, мастерских, еды и сна с обновлением при изменении карты.
|
||||
- [x] Индекс доступных ресурсных поручений по профессиям.
|
||||
- [ ] Индекс производственных заказов и пространственный индекс заданий.
|
||||
|
||||
### P3 — Многопоточность
|
||||
|
||||
- [x] Пул потоков для независимого выбора заданий, A* и продвижения жителей.
|
||||
- [x] Стабильное применение результатов в конце шага симуляции.
|
||||
- [x] Многопоточный режим с двумя и более рабочими потоками; проверка игровых результатов и загрузки.
|
||||
- [x] Автоматический выбор числа потоков в Windows-клиенте и параметр для командных бенчмарков.
|
||||
- [x] Повторный замер времени тика после расширения систем ресурсов.
|
||||
|
||||
### P4 — Игровой клиент
|
||||
|
||||
- [x] Windows-клиент с отображением карты, маршрутов и жителей.
|
||||
- [x] Отображение источников ресурсов, складов и текущих запасов.
|
||||
- [x] Камера с перемещением и масштабированием относительно курсора.
|
||||
- [x] Нижняя панель с жителями, добычей, участками и строительством.
|
||||
- [x] Нижние кнопки «Работы» и приоритета с настраиваемым масштабом панели.
|
||||
- [x] Главное меню со списком сохранений, продолжением партии и управлением кооперативом.
|
||||
- [x] Меню Esc с паузой, сохранениями, выходом в главное меню и завершением игры.
|
||||
- [x] Игровая карта на Direct3D 11 с глубиной и базовыми объёмными моделями.
|
||||
- [ ] Расширение набора 3D-моделей и освещения.
|
||||
- [x] Постановка чертежа домика мышью в Windows-клиенте.
|
||||
- [x] Редактируемая раскладка кроватей и станков с предпросмотром, списком материалов и подтверждением.
|
||||
- [x] Прямоугольные чертежи комнат с полом, стенами, выбором стороны входа и поэтапной стройкой.
|
||||
- [ ] Маршруты через дверные проёмы и настройка формы комнаты.
|
||||
- [ ] Интерфейс для остальных типов работ и зданий.
|
||||
|
||||
### P5 — Игровые системы и совместная игра
|
||||
|
||||
- [x] Базовые предметы дерева и камня; склады хранят их в стеках.
|
||||
- [x] Личный инвентарь жителя для еды и грузов.
|
||||
- [ ] Предметы с уникальными свойствами.
|
||||
- [x] Базовые рецепты, ремесло и строительство из доставленных ресурсов.
|
||||
- [x] Доставка материалов со складов на стройплощадку.
|
||||
- [x] Сборка спального места по деталям с выбором основы и отдельной доставкой на каждый этап.
|
||||
- [x] Голод и сбор еды в кладовую.
|
||||
- [x] Усталость, сон в назначенной кровати и отдых на земле.
|
||||
- [x] Возобновляемые поля ягод и посадки деревьев, шахты для добычи камня.
|
||||
- [x] Перенос и снос доступных объектов с проверкой резерва и маршрутов.
|
||||
- [x] Назначение профессий и группировка приказов по типу работы.
|
||||
- [x] Производство ткани из льна для спальных мест.
|
||||
- [x] Посев полей и посадка деревьев как рабочие поручения.
|
||||
- [ ] Остальные потребности жителей и простые боевые события.
|
||||
- [x] Сохранение и загрузка из меню Windows-клиента.
|
||||
- [x] Кооператив на двоих по локальной сети с авторитетной симуляцией у хозяина и повторным подключением.
|
||||
- [ ] Проверить сетевую партию на двух компьютерах и улучшить отображение проблем с подключением.
|
||||
|
||||
## Ближайший этап
|
||||
|
||||
Ускорить выдачу работ в мастерских и на стройке. Начать с индекса активных заказов и сократить повторные проверки складов. Текущее состояние описано в [docs/roadmap-status.md](../../roadmap-status.md).
|
||||
|
||||
### Рубеж первой играбельной версии
|
||||
|
||||
- [x] Начать с трёх поселенцев. Обеспечить каждому своё спальное место и собрать шесть свободных порций еды.
|
||||
- [x] Дать игроку выбирать ягодные кусты и места стройки, менять приоритеты работ и ставить время на паузу.
|
||||
- [x] Замедлять работу голодных жителей, чтобы снабжение влияло на темп стройки.
|
||||
- [x] Показывать прогресс и выполнение цели. Сохранять прогресс, приоритеты и номера команд обоих игроков.
|
||||
@@ -0,0 +1,41 @@
|
||||
# M00. Инвентаризация поведения и происхождения
|
||||
|
||||
## Результат и исходное состояние
|
||||
|
||||
Этап устанавливает проверяемую цель для самостоятельной игры. Покрываются различимые игровые поведения Stonehearth 1.1 и полного ACE серии 0.9.6.22 по публичным описаниям, доступным до 2 декабря 2026 года. Имена, тексты, сценарии и материалы нового проекта создаются самостоятельно либо используются по разрешению. Каждая незакрытая неопределённость остаётся видимой в [реестре паритета](../parity.md).
|
||||
|
||||
Исходный прототип содержит добычу, доставку, строительство, потребности и кооператив на двоих. Существующий план P0–P5 и [архитектурные записи](../../architecture.md) описывают его текущие соглашения. В сборке закреплена VoidLibrary `7b0fea6095f603f9e1904f66dfdc7752f4be4792`, где проект уже использует Binary, Core и Testing. Для следующих задач действует [порядок использования VoidLibrary](../void-library.md).
|
||||
|
||||
## Материалы этапа
|
||||
|
||||
| Для работы | Где лежит результат |
|
||||
|---|---|
|
||||
| Проверить исходное описание, применимый выпуск и открытые вопросы для конкретной механики | [Базовая игра](../base-evidence.md) · [ACE](../ace-evidence.md) · [Исходные идентификаторы](../parity.md) |
|
||||
| Опознать старую сборку, повторить проверки, подготовить контрольную карту и три сохранения на стройке | [Прототип и маршрут Q-HOME](../prototype-handoff.md) |
|
||||
| Найти исходные файлы иконок, решение по правам и задание художнику на каждую группу материалов | [Реестр и художественное направление M03](../../art/demo-inventory.md) |
|
||||
| Выбрать механизм для последовательного эталона и поточного прогона | [Проверка закреплённой VoidLibrary](../void-library.md) · [Контракт M01](M01.md) |
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. Сохранить сведения о проверенной сборке прототипа, тестах, форматах сохранения и сетевого обмена. Показать, какие исторические решения меняет воксельный мир и почему старый исполняемый файл остаётся доступен для старых колоний.
|
||||
2. По публичным описаниям разложить поведение на отдельные проверяемые пункты. Для каждого указать источник и версию, условия запуска, эффект для игрока, задействованные системы, целевой этап и тест. Отдельно учесть варианты культур, мирный режим, развилки событий, воду, профессии и торговлю. Зафиксировать вопрос, если сведения не позволяют установить исход поведения.
|
||||
3. Создать оригинальное художественное направление и список необходимых для M03 моделей, текстур, звуков и шрифтов. Для каждого материала записать автора, происхождение, разрешённые способы использования и подтверждение. Проверить происхождение трёх уже имеющихся иконок домов до их возможного включения в новый пакет.
|
||||
4. Для каждой будущей технической задачи сначала проверить подходящую возможность VoidLibrary и её ограничения. Для отсутствующей возможности найти существующий issue или создать новый в Void/Library, связать его с локальной задачей и реализацией. Проверка не предполагает автоматического переноса игрового кода в библиотеку.
|
||||
5. Подготовить требования к нагрузочным сценам и маршруту M03, затем передать границы сохранения, правил и владения данными в [M01](M01.md). Содержание реестра ведут вместе с планами [S19](../systems/S19.md), [S20](../systems/S20.md) и [S21](../systems/S21.md).
|
||||
|
||||
## Свидетельства и граница новой разработки
|
||||
|
||||
Принять снимок прототипа по трём независимым признакам. В записи сборки должны быть коммит, pin библиотеки и комплект тестов. В записи совместимости — старые сохранения 13 и LAN 11 с описанием, какой сборкой их открыть. В записи нагрузки — железо, число потоков, состав мира и включённые стадии. Отдельно отметить выполненную кросс-сборку с Wine и будущую нативную проверку Windows.
|
||||
|
||||
Для каталога механик владелец сверяет описание разработчика, выпуск, до которого оно применимо, и особые случаи при включённых модулях. Например, сезон и полив проверяются раздельно, затем вместе на тех же полях. Для двух развилок с разными наградами завести две проверки. При несовпадающих описаниях сохранить оба источника и открытый вопрос. Передать в M01 только подтверждённые ограничения ядра, а список открытых игровых вопросов оставить в реестре до их разрешения.
|
||||
|
||||
Для трёх штатных иконок сверить каждую с установленным автором и условиями распространения. Коммит добавления помогает найти историю файла. Если происхождение осталось неизвестным, описать требуемое назначение пиктограммы и заказать или создать новый рисунок в собственном стиле.
|
||||
|
||||
## Приёмка
|
||||
|
||||
- У каждого обнаруженного поведения есть источник, оригинальный эквивалент и проверка либо явно открытый вопрос. Строка без подтверждения остаётся незавершённой.
|
||||
- Запись о каждом материале первой демонстрации позволяет установить происхождение и права. Материал без подтверждения заменён до включения в распространяемую сборку.
|
||||
- Исходная сборка и ограничения прототипа зафиксированы отдельно от целей нового мира. Мастер-план и реестр указывают, какие документы понадобятся исполнителю следующего этапа.
|
||||
- Для будущих задач описан способ найти подходящую функцию VoidLibrary и связать обнаруженный пробел с issue. Номера issues добавляются только после проверки.
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Реестр паритета](../parity.md) · [VoidLibrary](../void-library.md)
|
||||
@@ -0,0 +1,43 @@
|
||||
# M01. Независимый такт и согласованное состояние
|
||||
|
||||
## Результат и зависимости
|
||||
|
||||
После [M00](M00.md) симуляция работает своим фиксированным тактом, а интерфейс отображает её снимок. Новый контракт используется одиночной партией и будущим хостом. Цель частоты — 20 тактов в секунду. Текущий `World::step()` уже применяет часть работы через пул, но вызывается из таймера окна, а общий мир и сетевое обслуживание связаны с клиентом. Его результаты и тесты служат исходной точкой для проверки перехода.
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. В [S01](../systems/S01.md) определить стадии чтения, параллельного расчёта и применения. Разделить непересекающиеся изменения и конкурирующие заявки на общие данные. Выбрать устойчивый порядок применения по постоянным идентификаторам, исключив зависимость от порядка завершения задач.
|
||||
2. Ввести постоянные идентификаторы мира, объектов, стеков, заданий, резервов и передач. Ссылка не зависит от позиции в контейнере. Симуляция владеет резервами, каждый инвентарь имеет одного владельца. Отмена и удаление цели освобождают или переназначают резервы, груз остаётся учтённым.
|
||||
3. Передавать ввод как версионированные команды игрока с номером и целевым городом. Авторитетная симуляция проверяет права и назначает такт. Повтор получает тот же результат. При каждой успешной загрузке создаётся новая инкарнация сеанса, которая отсекает старые команды и результаты рабочих задач.
|
||||
4. Снимать неизменяемое состояние для интерфейса и фоновую запись на границе такта. В новом сохранении хранить данные, влияющие на будущее мира, включая генератор случайных чисел, резервы, ожидающие события и модули правил. Загрузка сначала проверяет целостность и ссылки, затем переключает мир целиком. Ошибка оставляет текущую партию открытой. Подробности закрепить в [S15](../systems/S15.md) и [S16](../systems/S16.md).
|
||||
5. Ввести выбор совместимых модулей при создании мира и сохранить их версии и контрольные суммы. Определить контракт явного состояния скрипта и атомарного применения его предложений в [S19](../systems/S19.md). Внутренний сценарий с двумя клиентами проверяет общую поверхность команд до публичного кооператива M09.
|
||||
6. Для механизмов потоков, бинарной записи и тестов проверить существующие возможности VoidLibrary по [матрице](../void-library.md). Для отсутствующей возможности найти или создать issue в Void/Library и привязать к локальной реализации. Конкретный API выбирать по проверенной версии библиотеки.
|
||||
|
||||
## Первый переход с текущего клиента
|
||||
|
||||
### Потактный эталон прототипа
|
||||
|
||||
Для контрольного прогона мир создаётся с одним логическим исполнителем и `settlement::ExecutionMode::SerialReference`. Этот режим выполняет расчёт выбора работ, поиск пути и движение в вызывающем потоке. Сначала все свободные жители выбирают задание по одному состоянию, затем мир разбирает совпадающие заявки в порядке жителей. Обычный конструктор и загрузчик по умолчанию используют пул с 2–64 рабочими потоками. Конфигурацию исполнения выбирает клиент при создании или чтении мира. Один файл сохранения подходит для обоих вариантов. [Интерфейс мира](../../../engine/include/settlement/core/world.hpp)
|
||||
|
||||
Из корня репозитория после сборки Windows запустить `build\settlement_core_tests.exe --tag replay`. Журнал теста задаёт номера команд и попытки шага, поэтому может снять паузу даже тогда, когда номер такта остановился. Проверка сравнивает квитанции команд и полные байты сохранения по мере продвижения мира. Непрерывная партия задаёт ожидаемый результат для загруженной копии. [Исполняемые сценарии](../../../tests/replay_tests.cpp)
|
||||
|
||||
Этот срез открывает разработку M01. Фиксированный такт вне окна, неизменяемые снимки для клиентов, инкарнация после загрузки и идемпотентный результат повтора требуют отдельных изменений. Для замены пула остаются проверки переполнения, частичного запуска, времени жизни захваченных данных при отказе и стоимости работы на малом и нагруженном мире. [Проверка VoidLibrary](../void-library.md)
|
||||
|
||||
### Переход к авторитетному такту
|
||||
|
||||
Ядро выполняет такты по 50 мс в отдельном потоке. На каждой завершённой границе `SimulationRuntime` публикует независимый снимок и квитанции приказов. Пока идёт новый такт, читатели могут продолжать работу с прежней версией. Остановка игрового времени сохраняет возможность отдать приказ. Результат загрузки заменяет мир после повторной проверки номера запроса и инкарнации, в том числе при откате того же сохранения. [Интерфейс владельца](../../../engine/include/settlement/core/simulation_runtime.hpp) · [Тесты такта и отказов](../../../tests/runtime_tests.cpp)
|
||||
|
||||
Селектор `--tag runtime` под Wine выполнил десять проверок. Среди них — 20 тактов за секунду ручных часов, чтение предыдущего снимка при задержанном рабочем задании и возврат к управляемой партии после отказа публикации. Независимая проверка и общая сборка охватили 92 случая ядра и 4 LAN. Дальнейшая приёмка M01 проверяет действия игрока через окно, обмен со старым LAN-клиентом и постоянные ссылки при удалении объектов. [Техническая проверка](../../agent-workflow/tasks/M01-V7.md)
|
||||
|
||||
Выделить одну воспроизводимую партию прототипа и записать последовательность приказов. Сначала пропустить её через очередь авторитетного мира и дать окну читать последний завершённый снимок. Далее заменить один участок независимого расчёта, сверить результат каждого такта, затем подключить следующий. Так первое расхождение привязано к конкретной стадии. Для суммы запасов, состояния задания и номера команды выводить в отчёт также идентификатор первого отличающегося объекта.
|
||||
|
||||
Проверить для нынешнего `WorkerPool` исполнителя `Void::Async::ThreadExecutor` с `FuturePool`. На частичном отказе запуска уже созданные потоки должны штатно завершиться. При заполненной очереди логическая работа остаётся в такте до исполнения. При одновременных заявках на предмет ожидаемый победитель определяется правилами арбитража. Доступность API и управляемое воспроизведение отказов записать до удаления прежнего пути. Эталонный последовательный исполнитель — новый тестовый режим. Исторический тест, отклоняющий конфигурацию с одним рабочим потоком, остаётся свидетельством поведения прототипа.
|
||||
|
||||
## Проверки и выход
|
||||
|
||||
- Один журнал команд воспроизводится из одного исходного состояния в последовательном эталонном режиме и на 2, 6 и 12 потоках. Сравнение включает каждый такт и продолжение после загрузки.
|
||||
- Два жителя претендуют на последний предмет. Результат одинаков при изменении порядка завершения рабочих задач, а количество предметов сохраняется.
|
||||
- Поздняя команда и результат задачи после загрузки другой или более ранней версии мира отклоняются. Повреждённое сохранение оставляет открытую партию без изменений.
|
||||
- Интерфейс и камера обслуживаются во время сохранения. Два внутренних клиента получают одинаковый авторитетный результат повторной команды.
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Паритет](../parity.md) · [VoidLibrary](../void-library.md) · Далее [M02](M02.md)
|
||||
@@ -0,0 +1,42 @@
|
||||
# M02. Редактируемый мир и движение по высоте
|
||||
|
||||
Связанные проверки реестра — [B01](../parity.md#b01).
|
||||
|
||||
## Результат и зависимости
|
||||
|
||||
После [M01](M01.md) ограниченный регион состоит из изменяемых вокселей. Игрок может исследовать рельеф, добывать материал и смотреть отдельные высоты. Поселенец пользуется дверью и соединением между этажами. Текущий прототип хранит двумерные координаты и A*, тогда как сцена уже отображается средствами Direct3D 11. Состояние чанков, навигация и изображение получают общее толкование геометрии.
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. В [S02](../systems/S02.md) определить идентификатор региона, целочисленные координаты и формат чанка. Сохранять seed, версию генератора и изменения игрока. Учесть землю, пустоту, опору, занятое пространство и разрешённые взаимодействия.
|
||||
2. Связать выделение мышью и изменение грунта с авторитетной командой. Обновлять ревизии затронутых чанков и их соседей. Отображать доступный слой и предварительный объём выемки через [S17](../systems/S17.md) и [S18](../systems/S18.md).
|
||||
3. В [S03](../systems/S03.md) определить габариты, высоту шага, проём, лестницу и доступную позицию выполнения работы. Путь запоминает использованные ревизии. Перекрытый проход вызывает перерасчёт или сообщает о недоступности, а не разрешает работу через стену.
|
||||
4. Ввести логическую активацию чанков по потребностям симуляции. Чтение и генерация могут завершиться заранее, но данные вступают в силу на согласованной границе такта. Если они запаздывают, симуляция ждёт. Ошибка чтения приостанавливает мир с сообщением и возможностью восстановления. Данные для изображения подгружаются отдельно.
|
||||
5. Встроить небольшой сценарий с наклонным склоном, дверью, лестницей и перекрытием на границе чанков. Сохранение фиксирует изменения грунта и незавершённый путь. Для вычислений и хранения повторно использовать подходящие возможности VoidLibrary по [матрице](../void-library.md). При отсутствии нужной возможности найти или создать issue и связать его с локальной реализацией.
|
||||
|
||||
## Контрольная площадка и владельцы данных
|
||||
|
||||
Поставить дверь в единственный проход между двумя уровнями и расположить площадку для работы по другую сторону границы чанка. Игрок должен видеть проём на срезе и иметь возможность указать именно верхнюю рабочую площадку. Рельеф и материал публикует S02, S03 проверяет свободный объём и подход к цели, S17 рисует геометрию подтверждённой версии. Курсор передаёт координату и намерение. Право изменить эту клетку и результат проверки опоры определяет симуляция.
|
||||
|
||||
Второй проход выполнить с обратной очередностью готовности соседних чанков. После удаления ступени старый маршрут ссылается на прежнюю ревизию. До следующего шага движения проверить затронутый сегмент, остановить жителя на допустимой клетке и найти обход или вернуть поручение на ожидание. Сохранить сразу после удаления опоры. При загрузке сравнить и геометрию, и следующий выбор жителя с непрерывной партией. Этот мир передаётся M03 как регрессия для работ на верхнем этаже.
|
||||
|
||||
## Проверки и выход
|
||||
|
||||
### Контракты первой реализации
|
||||
|
||||
Воксели имеют знаковые 32-битные координаты, высота растёт по оси `z`. Границы конечного региона задаются полуинтервалами с 64-битными концами, чтобы в них можно было включить последний положительный воксель. Чанк содержит 32³ ячеек; быстрее всего меняется индекс `x`. Отдельные результаты чтения обозначают воздух, недоступный чанк и координату за пределами региона. Генератор получает версию, seed и абсолютные координаты. Порядок подготовки страниц не влияет на материал.
|
||||
|
||||
Снимок региона разделяет неизменяемые страницы. Операция проверяет все ожидаемые ревизии, размер и бюджет до публикации. Пустая операция или запись прежнего материала сохраняет ревизию после проверки ожиданий. Дублированная координата отклоняет весь запрос. Изменение на грани оповещает соседний чанк, сохраняя его собственную ревизию материала. Реализация и проверки замены библиотечным API связаны с задачами о [знаковых координатах](https://git.faumaray.com/Void/Library/issues/11), [транзакциях страниц](https://git.faumaray.com/Void/Library/issues/14) и [зависимостях по ревизиям](https://git.faumaray.com/Void/Library/issues/13).
|
||||
|
||||
Житель занимает одну клетку в плане и две по высоте, поднимается на одну ступень. Поиск учитывает опору, свободное место для головы, дверь и соседние чанки, включая чтения, из-за которых путь не найден. Перед очередным перемещением житель перепроверяет переход. Удаление следующей ступени сохраняет его собственную позицию, груз и цель. Поиск через ещё не подготовленный чанк либо за пределами бюджета имеет отдельный результат.
|
||||
|
||||
Добыча создаёт авторитетный заказ с доступной соседней рабочей позицией. При завершении мир заранее проверяет правку и возможность зачислить материал по правилам S06. Удаление грунта и передача добычи выполняются одной операцией. Если для добычи нет места, заказ ждёт с указанием причины. Повтор принятой команды находит исходный заказ. Режим тестовой колонии имеет собственный манифест с версией генератора и определениями материалов.
|
||||
|
||||
Координатор принимает подготовленные чанки на назначенной границе такта в порядке координат. Во время ожидания он обслуживает загрузку и завершение программы. В сохранение попадают требуемые чанки, назначения работ и безопасная позиция после правки. Прежние колонии сохраняют прежнюю геометрию на высоте ноль. Форматы нового региона согласуются с подтверждённой версией сохранений M01. Текущий шейдер уже проецирует высоту `z`; луч выбора и видимый срез должны пользоваться той же проекцией. [Проектирование](../../agent-workflow/tasks/M02-P1.md) · [Проверка контрактов](../../agent-workflow/tasks/M02-F1.md)
|
||||
|
||||
- Житель проходит через вход, поднимается и работает на верхнем этаже. Закрытая стена не считается проходом. После перекрытия маршрута он строит обход либо показывает недоступность.
|
||||
- Игрок выкапывает тоннель и изменяет опору у края чанка. Геометрия, выбор мышью и проход согласованы с обеих сторон границы после сохранения и загрузки.
|
||||
- При перестановке порядка чтения и генерации журнал команд создаёт одинаковое состояние на каждом такте. Повреждённые данные не публикуются как загруженный чанк.
|
||||
- Сценарий работает на Windows x64, а его составляющие доступны для строительства и снабжения в [M03](M03.md).
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Паритет](../parity.md) · [VoidLibrary](../void-library.md)
|
||||
@@ -0,0 +1,33 @@
|
||||
# M03. Первое демо «Дом на склоне»
|
||||
|
||||
Связанные проверки реестра — [B02](../parity.md#b02), [B03](../parity.md#b03), [B04](../parity.md#b04), [B05](../parity.md#b05), [B06](../parity.md#b06).
|
||||
|
||||
## Игровой результат
|
||||
|
||||
После [M02](M02.md) игрок начинает одиночную партию с тремя жителями, размечает склон и строит обставленный двухэтажный дом. Жители добывают ресурсы, доставляют их, едят и спят. Демонстрация заканчивается заселением и продолжается после сохранения незавершённой стройки. В прототипе уже есть стартовая колония, добыча, доставка материалов и кровати. Для демо эти действия соединяются с новой геометрией и доступностью.
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. Подготовить небольшую воспроизводимую карту, ограниченный набор собственных моделей, текстур и звуков с учётом [S20](../systems/S20.md). Разместить дерево, камень, еду и доступный склад. Стартовый запас может помочь пройти сценарий, а его состав фиксируется в настройке демо.
|
||||
2. Дать игроку разметку выемки и предпросмотр двухэтажного чертежа с полами, стенами, входом и лестницей. Проверять рабочие позиции и опоры до выдачи каждой части строительства. Показывать материалы, прогресс и объяснение отсутствующего маршрута или сырья.
|
||||
3. Реализовать минимальные части [S04](../systems/S04.md), [S06](../systems/S06.md) и [S07](../systems/S07.md). Жители резервируют древесину и камень, забирают их, доставляют на площадку и изготавливают предметы для дома. Отмена снимает неиспользованные резервы, а уже переносимый груз сохраняет владельца.
|
||||
4. Добавить кровати, назначение места, сбор еды, голод и усталость по [S05](../systems/S05.md) и [S08](../systems/S08.md). Жители входят в дом и достигают верхнего этажа. Доступность проверяется по построенной геометрии.
|
||||
5. Дать сохранение и загрузку во время движения с грузом и посреди установки этажа. Проверить идентичность продолжения, информативную ошибку повреждённого файла и возврат к открытой партии. Минимальный собственный скриптовый эпизод проверяет контракт сохранения состояния [S19](../systems/S19.md).
|
||||
6. Измерить время реализации, частоты кадров и тактов, расходы на модели и известные затруднения жителей. Сопоставить результаты с контрольными сценами [S21](../systems/S21.md) и использовать их для оценки следующих этапов. При выборе механизмов следовать [правилу VoidLibrary](../void-library.md), связав недостающую возможность с найденным или созданным issue.
|
||||
|
||||
## Сценарий «Дом на склоне»
|
||||
|
||||
В [постановке Q-HOME](../prototype-handoff.md) закреплены seed, припасы, положение дома относительно стыка чанков и проверка владельца последней детали. [Производственная ведомость](../../art/demo-inventory.md) задаёт модели, материалы, движения, звуки и обозначения для этого маршрута.
|
||||
|
||||
На контрольной карте `Q-HOME` отметить источник древесины, добываемый камень, временный склад, место первого этажа и площадку второго. Зафиксировать seed, объём начальных припасов и состав чертежа. В смете должна быть хотя бы одна деталь, для которой обязательны добыча, доставка в мастерскую и последующая доставка на стройку. По пути от старта до сна в собственном доме игрок самостоятельно назначает участок и исправляет хотя бы одну видимую причину остановки.
|
||||
|
||||
Снять три контрольных сохранения. В первом строитель уже взял последнюю нужную деталь со склада. Во втором он несёт её к верхней площадке. В третьем работа по установке уже началась. Для каждого продолжения сверить число таких деталей, их владельца, стадию чертежа и свободный проход к кровати. Повторить один рейс с отменой и последующей выдачей работы. Первую публичную сборку запускать на Windows из поставляемого пакета. В отчёте демо разделить время реализации движка, правил, интерфейса и изготовления собственных материалов.
|
||||
|
||||
## Приёмочная партия
|
||||
|
||||
- С новой колонии игрок выкапывает склон, размещает склад и план, начинает стройку и наблюдает добычу, изготовление и перенос материалов.
|
||||
- Поселенцы строят нижний этаж, лестницу и верхний этаж в доступном порядке, ставят кровати, едят и спят. Показанная причина остановки позволяет устранить недостаток материала или прохода.
|
||||
- Сохранение во время рейса загружается с одним жителем, одним грузом и тем же незавершённым заказом. После загрузки строительство доходит до заселения.
|
||||
- Одиночная Windows-сборка запускается с собственными или разрешёнными материалами. Механики самодостаточного роста и расширенной экономики входят в [M04](M04.md).
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Паритет](../parity.md) · [VoidLibrary](../void-library.md)
|
||||
@@ -0,0 +1,31 @@
|
||||
# M04. Самодостаточное поселение
|
||||
|
||||
Связанные проверки реестра — [B07](../parity.md#b07), [B08](../parity.md#b08), [A06](../parity.md#a06), [A07](../parity.md#a07).
|
||||
|
||||
## Результат и исходная точка
|
||||
|
||||
После одиночного дома в [M03](M03.md) поселение может несколько раз произвести еду и материалы, принять нового жителя и расширить жильё. В прототипе уже есть возобновляемые участки, запасы, профессии, еда и сон. Стартовая партия включает готовые материалы, поэтому непрерывный производственный цикл ещё требует отдельной приёмки.
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. Расширить данные [S05](../systems/S05.md) до распорядка жителей и условий прибытия новых поселенцев. Зафиксировать порядок выбора потребностей и работ, объяснение приостановки и возврат к прерванному поручению. Дополнять модель здоровьем и настроением в объёме, требуемом реестром поведения.
|
||||
2. В [S07](../systems/S07.md) ввести определения профессий, навыков, инструментов и рецептов, а также очереди с повторением и целевым запасом. Смена роли влияет на новые поручения и корректно завершает или отменяет текущую работу согласно видимому состоянию.
|
||||
3. Связать возобновляемое поле и лесопосадку с работой поселенца, складом и потреблением. [S10](../systems/S10.md) отвечает за стадии роста и урожай, [S06](../systems/S06.md) — за объём запасов и передачу предметов, [S04](../systems/S04.md) — за распределение заданий и резервы.
|
||||
4. Добавить настройку вместимости и назначения склада, уведомления о нехватке сырья и заполнении. При удалении недоступного рабочего места освободить связанные резервы и сохранить уже добытый груз.
|
||||
5. Проверить существующие возможности VoidLibrary перед введением общих механизмов. Если нужного механизма нет, найти или создать issue в Void/Library и связать его с местной реализацией по [порядку интеграции](../void-library.md). Индекс производственных заказов измерять на сценариях с реальными полями и мастерскими.
|
||||
|
||||
## Длительный сценарий без внешнего пополнения
|
||||
|
||||
Для одной исходной колонии зафиксировать стартовый склад, запас семян, назначение профессий и желаемое количество продуктов. После двух полных циклов сбора проверить поступление еды, расход на жителей и остаток. Поселить новичка и расширить дом из добытых ресурсов. Зафиксировать, какой заказ дал причину для добычи, кто зарезервировал сырьё и какая доставка завершила заказ. Эти записи связывают объяснение в интерфейсе с фактическим состоянием мира.
|
||||
|
||||
В отдельном продолжении закрыть склад назначения после начала рейса. S06 сохраняет груз за носителем до подтверждённой доставки или выгрузки, S04 пересматривает резерв назначения, S07 сохраняет неудовлетворённую потребность мастерской. Затем назначить носителю новую профессию и открыть склад. Следующая допустимая работа должна учитывать перенесённый груз и ограничения роли. Повторить из сохранения непосредственно перед этими действиями. Проверить один и тот же баланс по складам, жителям и площадкам при разных числах потоков.
|
||||
|
||||
## Проверки и выход
|
||||
|
||||
- Колония из трёх жителей проходит не менее трёх циклов урожая и воспроизводства материалов, не опираясь на неисчерпаемый стартовый запас. Игрок может проследить потребление и пополнение.
|
||||
- После выполнения условий прибывает новый житель. Ему назначается работа и кровать, а для расширения жилья жители создают и доставляют необходимые материалы.
|
||||
- При полном складе, отсутствии ингредиента или отмене заказа работа получает объяснимое состояние. Освобождение места или добавление ингредиента позволяет её возобновить. Ни один стек или резерв не дублируется.
|
||||
- Сохранение во время смены профессии и перевозки урожая восстанавливает владельцев грузов и заказов. Повторный запуск с разным числом потоков сохраняет одинаковое состояние по тактам.
|
||||
- Готовы границы для климата и воды в [M05](M05.md), а также для развития города и торговли в [M06](M06.md).
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Паритет](../parity.md) · [VoidLibrary](../void-library.md)
|
||||
@@ -0,0 +1,31 @@
|
||||
# M05. Климат, вода и живая природа
|
||||
|
||||
Связанные проверки реестра — [B11](../parity.md#b11), [B12](../parity.md#b12), [A01](../parity.md#a01), [A02](../parity.md#a02), [A03](../parity.md#a03), [A04](../parity.md#a04), [A05](../parity.md#a05), [A10](../parity.md#a10), [A11](../parity.md#a11), [A12](../parity.md#a12), [A20](../parity.md#a20), [A21](../parity.md#a21), [A22](../parity.md#a22), [A25](../parity.md#a25).
|
||||
|
||||
## Результат и зависимости
|
||||
|
||||
После [M02](M02.md) и [M04](M04.md) игрок использует воду, сезоны, животных и растения как части экономики. Вода влияет на доступные культуры, урожай и снабжение. В прототипе уже есть ягоды, лён и древесные посадки, но объёмная вода и климат пока не представлены в его описании. Требуемые поведения и исходные свидетельства ведутся в [реестре паритета](../parity.md).
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. Определить календарь и правила смены погоды для каждого биома в [S09](../systems/S09.md). Сохранять текущий сезон и будущие события. Через интерфейс показывать влияние температуры, осадков и состояния поля на рост.
|
||||
2. Добавить воду в воксельный мир и расчёт между активными ячейками. Параллельные участки предлагают изменения, а перенос через границу чанка согласуется в устойчивом порядке. Ввести затворы и насосы, управление подачей и восстановление после изменения рельефа.
|
||||
3. Связать поле с доступной водой, сезонностью, трудом и хранением урожая в [S10](../systems/S10.md). Перевести питьё и связанные потребности жителей на те же запасы и задания, сохраняя проверяемость доступных ресурсов.
|
||||
4. Добавить необходимые по реестру виды диких и домашних животных, пастбища, кормление, ловлю и рыболовство. Учесть опыление, продукты и жизненные циклы. У животного и его продукции определён владелец, а удаление пастбища переводит его в объяснимое состояние.
|
||||
5. Активность воды и населённых участков определяет симуляция независимо от камеры. Временная выгрузка графики не прекращает жизнь города. Записывать незавершённые потоки, рост и резервы в сохранение через [S15](../systems/S15.md).
|
||||
6. Для подходящих функций работы с данными, вычисления и планирования использовать проверенные возможности VoidLibrary. Для отсутствующей общей возможности найти или создать issue и связать его с местной работой согласно [правилу](../void-library.md). В нагрузочном сценарии учитывать активные водные воксели отдельно от количества жителей.
|
||||
|
||||
## Эксперимент с одним изменяемым условием
|
||||
|
||||
Подготовить два одинаковых поля по разные стороны водозабора. Сначала включить только воду, затем добавить сезон по правилам нового мира. Вода на входе, в почве или русле и на выходе должна поддаваться учёту с явно заданными источниками и стоками. На границе чанков сохранить игру после расчёта потока и до следующего логического изменения. Полив, питание, накопленная стадия роста и ближайшее время сбора должны давать то же продолжение, что и при непрерывной игре.
|
||||
|
||||
Рядом разместить пастбище и пасеку. Удалить используемое пастбище в момент поручения и проверить переселение с учётом вместимости. Для пасеки сравнить состояние у подходящих и неподходящих растений. Включение напитков добавляет проверку выбора и удовлетворённости жителя. Для расширенных правил учесть подтверждённое поведение при отсутствии подходящего напитка. Снять результаты раздельно для поля, животного и жителя, затем повторить, пока камера находится в другом городе. Сценарии привязаны к наблюдениям A01, A10, A20 и A25.
|
||||
|
||||
## Приёмка
|
||||
|
||||
- Игрок проводит воду к полю через затвор. При изменении подачи и сезона показатель поля и следующий урожай изменяются согласно правилам. Сохранение и загрузка сохраняют воду, стадию роста и задание фермера.
|
||||
- Животные получают корм и дают продукцию, опылитель влияет на подходящие растения. Удаление пастбища или заполнение склада не создаёт дубликатов и не оставляет скрытый вечный резерв.
|
||||
- Вода на границе чанков не появляется и не исчезает из-за порядка завершения рабочих задач. После изменения грунта и задержки чтения чанка итоговый мир совпадает с эталонным прогоном.
|
||||
- Населённая область продолжает работу, когда камера показывает другое место. Результаты измерений и незакрытые ограничения передаются в [M06](M06.md) и [M08](M08.md).
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Паритет](../parity.md) · [VoidLibrary](../void-library.md)
|
||||
@@ -0,0 +1,31 @@
|
||||
# M06. Культуры, развитие города и торговля
|
||||
|
||||
Связанные проверки реестра — [B09](../parity.md#b09), [B10](../parity.md#b10), [B13](../parity.md#b13), [B18](../parity.md#b18), [A13](../parity.md#a13), [A15](../parity.md#a15), [A16](../parity.md#a16), [A17](../parity.md#a17), [A18](../parity.md#a18), [A19](../parity.md#a19).
|
||||
|
||||
## Игровой результат
|
||||
|
||||
После [M04](M04.md) и [M05](M05.md) поселения разных оригинальных культур развиваются различными путями. Игрок открывает профессии и производство, принимает торговцев и меняет снабжение города через сделки. Список различимых путей и эффектов ведётся в [реестре паритета](../parity.md). Новые названия, диалоги, внешний вид и сценарии относятся к собственному миру игры.
|
||||
|
||||
## Пакеты работ
|
||||
|
||||
1. В [S11](../systems/S11.md) определить город, его территорию, владельца имущества, уровень и условия роста. Культура предоставляет данные старта, ремёсел и развития. Состояние жителей и города хранится с постоянными идентификаторами и сохраняется при переходе между регионами.
|
||||
2. Подготовить самостоятельно созданные стартовые культуры и биомы согласно инвентаризации M00. Для каждого пути описать ресурсы, профессии, доступные постройки и ключевые развилки, затем связать их с данными [S07](../systems/S07.md) и контентом [S20](../systems/S20.md).
|
||||
3. Добавить торговые предложения, торговые места, цены, оплату и репутацию. Игрок видит доступное количество, цену и причину отказа. Стороны сделки и её резерв принадлежат авторитетной симуляции. Оплата и передача товара фиксируются как одна операция.
|
||||
4. Приобретаемые предметы проходят через обычное владение и склады [S06](../systems/S06.md). Уход торговца, отмена заказа или нехватка вместимости освобождают резервы и сохраняют учёт товара. Повторная команда возвращает полученный результат без второй оплаты.
|
||||
5. Добавить выбор городских улучшений и предусмотренный реестром перенос достижений в новую партию. Зафиксировать, какие значения влияют на доступность торговцев, и сохранять историю сделок вместе с версией правил мира.
|
||||
6. Оставить интерфейс городских прав пригодным для кооператива M09. Проверить существующие механизмы VoidLibrary до выбора общей реализации, а подтверждённый пробел связать с найденным или созданным issue по [порядку проекта](../void-library.md).
|
||||
|
||||
## Торговый день и повторное заселение
|
||||
|
||||
На одной карте подготовить два поселения с собственными именами и разными доступными ремесленными цепочками. В первом часть нужного товара можно изготовить, второму потребуется сделка. Прогнать торговый день в двух сохранениях с одинаковым богатством, различной историей сделок и сопоставимыми торговыми местами. Игрок видит основания допуска торговца, наличие свободного места и условия конкретной сделки. Тест сравнивает доступные предложения и причины различия.
|
||||
|
||||
В момент покупки последней партии повторить команду и загрузить состояние до доставки. Квитанция должна однозначно определить, что произошло с товаром, оплатой и репутацией. Перенос основателей в новую партию имеет собственные правила выбора жителей, предметов и достижений. Межрегиональная передача M08 продолжает существующий мир с прежними ID. Для этих двух случаев нужны отдельные сохранения и проверки. В M07 передать список открытых городом возможностей для событий, а в M09 — явные права покупателя и продавца на имущество.
|
||||
|
||||
## Проверки и выход
|
||||
|
||||
- Две стартовые культуры проходят путь от начальных запасов к устойчивому поселению через разные предусмотренные цепочки. Их различия и эквиваленты из реестра проверяются отдельными сценариями.
|
||||
- Игрок покупает товар, получает его на доступный склад и видит изменение оплаты и репутации. Повтор команды, разрыв соединения или отсутствие вместимости не создают второй товар и не списывают оплату дважды.
|
||||
- Одновременные претензии к последней партии разрешаются устойчиво. Отклонённая сделка освобождает свои резервы, а сохранение во время доставки сохраняет владельца груза.
|
||||
- Выполненный выбор роста и перенесённые достижения доступны после загрузки. Проверены условия для [M07](M07.md), [M08](M08.md) и совместной торговли в [M09](M09.md).
|
||||
|
||||
[Мастер-план](../../../PLAN.md) · [Паритет](../parity.md) · [VoidLibrary](../void-library.md)
|
||||
@@ -0,0 +1,58 @@
|
||||
# M07. Угрозы, оборона и самостоятельные кампании
|
||||
|
||||
Связанные проверки реестра — [B14](../parity.md#b14), [B15](../parity.md#b15), [B16](../parity.md#b16), [B17](../parity.md#b17), [B24](../parity.md#b24), [A08](../parity.md#a08), [A09](../parity.md#a09), [A14](../parity.md#a14), [A23](../parity.md#a23), [A24](../parity.md#a24), [A26](../parity.md#a26).
|
||||
|
||||
## Результат для игрока
|
||||
|
||||
Игрок готовит поселение к опасности, собирает отряд, задаёт патруль, поднимает тревогу, помогает раненым и возвращает город к обычной жизни. События учитывают достигнутую ступень развития, выбранную сложность и включённые при создании мира модули. Мирный режим получает предусмотренные для него пути прохождения.
|
||||
|
||||
Этап входит в [мастер-план](../../../PLAN.md) после [M04](M04.md), [M05](M05.md) и [M06](M06.md). Полнота определяется строками [реестра паритета](../parity.md), включая различимые боевые способности, способы лечения, развилки, последствия и условия повторения событий базовой игры и ACE. Для каждой строки создаются собственные персонажи, художественные материалы, тексты и сценарии.
|
||||
|
||||
## Исходное состояние и входные условия
|
||||
|
||||
В прототипе на `083b84e` житель добывает, переносит, строит, ест и спит. `AgentState` и `Profession` в публичном заголовке описывают этот хозяйственный цикл. Нужды, запасы и текущая работа уже участвуют в сохранении. Это исходная регрессионная опора для перехода между хозяйством и тревогой. [Текущий интерфейс мира](../../../engine/include/settlement/core/world.hpp) · [Описание прототипа](../../roadmap-status.md)
|
||||
|
||||
Перед началом требуются постоянные идентификаторы M01, объёмная доступность M02, возобновляемое снабжение M04, среда M05 и городское развитие M06. Минимальный собственный скриптовый обработчик события уже должен пройти сохранение и воспроизведение. Развитие публичного SDK продолжается в M10.
|
||||
|
||||
## Последовательность работ
|
||||
|
||||
| Пакет | Работа | Проверяемый выход |
|
||||
| --- | --- | --- |
|
||||
| M07.1 | Разобрать обязательные поведения на состояния здоровья, типы действий, экипировку, отряды и кампании. Связать их с системой, модулем правил и собственным контрольным событием. | Каждая строка охвата получает сценарий с наблюдаемым исходом. Пробелы в публичных сведениях сохраняются открытыми. |
|
||||
| M07.2 | Ввести здоровье, ранения, лечение и временные эффекты через [S12](../systems/S12.md). Связать способности с предметами [S06](../systems/S06.md) и профессиями [S07](../systems/S07.md). | Лечебное средство, время работы лекаря и изменение состояния пациента учитываются одной завершённой операцией. |
|
||||
| M07.3 | Добавить назначение отряда, выдачу экипировки, патруль, оборону точки, тревогу и прекращение тревоги. Поведение использует доступные позиции S03 и отменяемые задания S04. | Смена приказа освобождает прежние цели и возвращает переносимые вещи в учтённое состояние. |
|
||||
| M07.4 | Реализовать боевые действия, выбор цели, дальность, препятствия, способности и последствия в детерминированных стадиях [S01](../systems/S01.md). | Одинаковая последовательность приказов даёт одинаковые попадания, расход материалов и здоровье при разном количестве потоков. |
|
||||
| M07.5 | Ввести жизненный цикл кампании через [S13](../systems/S13.md). Добавить условия запуска, участников, выбор, награду, прекращение и восстановление после загрузки. | Решение и награда имеют постоянные идентификаторы и переживают загрузку на любом шаге события. |
|
||||
| M07.6 | Собрать оригинальные кампании и варианты сложности по реестру. Настроить подачу в [S18](../systems/S18.md), анимацию, звук и читаемость по [S20](../systems/S20.md). | Игрок понимает угрозу, причину недоступной команды и последствия выбора. Журнал события позволяет воспроизвести ошибку. |
|
||||
|
||||
Первой сквозной партией служит небольшой налёт на снабжаемый город. Игрок собирает защитников, отзывает гражданских, лечит одного раненого, ремонтирует повреждение и продолжает производство. После этого расширяются способности, фракции и кампании из реестра.
|
||||
|
||||
## Владение состоянием и контракты
|
||||
|
||||
- S12 владеет здоровьем, активными эффектами и состоянием боевого действия. S06 владеет предметами и боеприпасами. S04 владеет резервами работы и ресурсов.
|
||||
- S13 владеет состоянием кампании, очередью её будущих событий, выбором игрока и правом выдать результат. Сценарий обращается к игровым системам через проверяемые предложения S19.
|
||||
- Действие содержит постоянные идентификаторы исполнителя и цели, такт начала, условия исполнения и ожидаемую ревизию доступности. Удалённая цель завершает действие с объяснимым результатом.
|
||||
- Параллельные расчёты восприятия и доступности читают согласованное состояние. Расход экипировки, изменение здоровья, смерть, награды и перераспределение собственности применяются в установленном порядке.
|
||||
- Сохранение S15 включает очередь эффектов, будущие такты действий, участников события и состояние сценария. Рендер S17 получает снимок результата, интерфейс подаёт команды через S16.
|
||||
|
||||
Перед выбором технического примитива проверяется [матрица VoidLibrary](../void-library.md). Подходящую возможность закреплённой версии следует использовать. Для подтверждённого пробела сначала найти существующий issue или создать issue в `Void/Library`, затем связать его с задачей локальной реализации и проверкой. Семантика здоровья, кампаний и городских приказов остаётся явным игровым контрактом.
|
||||
|
||||
## Отмена и восстановление
|
||||
|
||||
Житель, который нёс материалы до тревоги, сохраняет груз и освобождает либо передаёт свой резерв по правилам S04. Недоступный пациент, исчезнувшая цель, разрушенная лестница и заполненный склад дают завершение или пересмотр действия с видимой причиной. По окончании тревоги житель получает доступную работу с учётом актуальных потребностей.
|
||||
|
||||
Прекращение события отменяет принадлежащие ему будущие действия и освобождает ресурсы. Уже полученные игроком предметы сохраняют владельцев. Ошибка скрипта откатывает предложения текущего обработчика и останавливает его с диагностикой. Выбранные модули мира сохраняются. Награда выдаётся по записи о завершении, повторное получение команды возвращает тот же результат.
|
||||
|
||||
## Приёмка
|
||||
|
||||
| Проверка | Условия и ожидаемый результат |
|
||||
| --- | --- |
|
||||
| M07-A01 | Во время доставки поднять тревогу, сменить приказ отряда и завершить столкновение. Количество предметов до и после соответствует созданию и расходу, оставшиеся работы можно продолжить. |
|
||||
| M07-A02 | Сохранить мир перед боевым действием и перед выбором в кампании. После загрузки сравнить каждый последующий такт с непрерывным прогоном. Совпадают здоровье, эффекты, случайность, решения и награды. |
|
||||
| M07-A03 | Перекрыть проход между отрядом и целью, удалить цель, одновременно назначить двух лекарей одному пациенту. Получить устойчивый исход без зависшего резерва. |
|
||||
| M07-A04 | Выполнить один журнал в последовательном эталоне и на 2, 6 и 12 рабочих потоках. Каноническое состояние каждого такта совпадает. |
|
||||
| M07-A05 | Пройти по одной полной цепочке для каждой обязательной развилки и сложности, включая мирный вариант. Результаты прикрепить к строкам реестра. |
|
||||
|
||||
## Выход этапа
|
||||
|
||||
Готовый пакет содержит игровые сценарии, собственные материалы, сохранения на ключевых переходах, журнал команд и результаты сравнений. Производительность столкновения измеряется в общем контрольном городе M11 с 500 жителями и отдельными 32 участниками события. Результаты на реальном Windows-стенде входят в [S21](../systems/S21.md). Для перехода к M08 должны быть закрыты ошибки владения, повторных наград и восстановления кампании.
|
||||
@@ -0,0 +1,55 @@
|
||||
# M08. Исследуемый фронтир и связанные регионы
|
||||
|
||||
## Результат для игрока
|
||||
|
||||
При создании мира игрок выбирает конечную область, расширяющийся фронтир или несколько связанных регионов. Исследование открывает новую местность, жители перемещаются между поселениями, а грузы доходят до назначения. Каждый населённый город продолжает выполнять работу, выращивать пищу и проживать события, пока камера находится в другом месте.
|
||||
|
||||
Этап развивает [мастер-план](../../../PLAN.md) после [M02](M02.md), [M04](M04.md) и [M06](M06.md). Основные владельцы контракта — [S02](../systems/S02.md), [S03](../systems/S03.md), [S14](../systems/S14.md) и [S15](../systems/S15.md). Все три режима мира входят в версию 1.0. Целевой бюджет составляет 500 полноценно моделируемых жителей суммарно по всем регионам. Обязательные наблюдаемые поведения исследования, переселения и торговли связаны с [реестром паритета](../parity.md).
|
||||
|
||||
## Исходное состояние и входные условия
|
||||
|
||||
Прототип на `083b84e` строит фиксированную начальную колонию с тремя жителями, размещёнными источниками ресурсов и плоскими координатами. Этот сценарий сохраняет значение для регрессий хозяйства. Новый M02 уже должен предоставить регион, чанки, высоту, ревизии геометрии и переходы навигации. [Сценарий прототипа](../../../engine/src/first_colony.cpp) · [Публичный интерфейс мира](../../../engine/include/settlement/core/world.hpp)
|
||||
|
||||
Входная проверка M01 гарантирует постоянные идентификаторы сущностей, стеков, заданий, резервов и передач. Сохранение уже умеет публиковать завершённое поколение данных и сохранять очередь будущих событий. Это необходимо до первого перехода жителя между регионами.
|
||||
|
||||
## Последовательность работ
|
||||
|
||||
| Пакет | Работа | Проверяемый выход |
|
||||
| --- | --- | --- |
|
||||
| M08.1 | Объединить адресацию всех режимов через идентификатор региона и целочисленные воксельные координаты. Задать seed, версию генератора и сохраняемые изменения. | Одинаковая ещё нетронутая область генерируется одинаково после разных маршрутов исследования. |
|
||||
| M08.2 | Разделить интерес камеры и необходимость симуляции. Зафиксировать причины удержания чанка для жителей, работ, маршрутов, резервов, воды и передач. | Отвод камеры освобождает графические данные по бюджету, активная работа поселения продолжается. |
|
||||
| M08.3 | Добавить загрузку, предварительную подготовку и высвобождение чанков. Логические такты активации задаются канонической очередью S01. | Задержка диска меняет ожидание у барьера, последовательность состояний мира остаётся воспроизводимой. |
|
||||
| M08.4 | Подключить генерацию фронтира и исследование территории к интерфейсу. Завершение фоновой задачи проверяет мир, сессию, запрос и ревизию назначения. | Возврат к исследованной области восстанавливает все изменения игрока. Повторный результат задачи отбрасывается. |
|
||||
| M08.5 | Ввести переход между связанными регионами через запись передачи и подтверждение приёма. Применить его к жителю, грузу, владельцу и зависимым заданиям. | На каждом шаге есть ровно один владелец жителя и имущества. |
|
||||
| M08.6 | Связать переходы с торговлей, маршрутом до границы, выбором назначения и наблюдаемым временем в пути. Расширить снимки и сохранения до нескольких регионов. | Игрок видит отправление, состояние груза и прибытие, а загруженный мир продолжает их с того же шага. |
|
||||
|
||||
Работы ведутся последовательно. Сначала один конечный регион проходит загрузку и высвобождение, затем этот механизм используется фронтиром, после него добавляется перенос между связанными регионами. UI и графическая подгрузка проверяются вместе с каждым переходом.
|
||||
|
||||
## Владение и переходы
|
||||
|
||||
S14 владеет реестром регионов, записью передачи, отправителем, получателем и состоянием приёма. S06 владеет составом груза. S04 отвечает за освобождение и восстановление резервов. S03 определяет достижимость входа и позиции прибытия. S15 сохраняет весь переход согласованно с обеими сторонами.
|
||||
|
||||
Отправка создаёт постоянный идентификатор передачи. После передачи из исходного инвентаря имущество принадлежит этой записи до единственного подтверждённого приёма. Повторное подтверждение возвращает уже известный результат. Житель в пути остаётся частью канонического состояния и общего бюджета населения. Задание, которое зависит от прибытия, ссылается на передачу по идентификатору.
|
||||
|
||||
Логическая активация чанка имеет назначенный такт. Физическое чтение и генерация могут завершаться заранее. Если к назначенному такту данные ещё готовятся, симуляция ожидает на барьере, интерфейс показывает состояние. Ошибка чтения либо проверки целостности приостанавливает продвижение соответствующей операции с возможностью повторить загрузку. Состояние мира и очередь активаций сохраняются. Порядок прихода фоновых результатов сохраняет каноническую историю.
|
||||
|
||||
В хеш состояния входят будущие события, передачи, резервы, генераторы случайных чисел и ожидающие логические операции. Восстанавливаемый кэш исключается после доказательства, что его содержимое и отсутствие дают одинаковое последующее поведение.
|
||||
|
||||
## VoidLibrary и технические зависимости
|
||||
|
||||
Проверять [матрицу VoidLibrary](../void-library.md) перед локальным кодом загрузки, хранения, фоновой работы, контроля целостности и журналирования. Подходящая возможность библиотеки обязательна к повторному использованию. Для отсутствующей возможности найти или создать issue в `Void/Library`, приложить минимальный контракт, Windows-условия и тест, затем связать issue с локальным пакетом работ. Логическая активация и единственное владение передачей описываются игровыми системами.
|
||||
|
||||
Заселённые области моделируются полностью. Оценка потребления памяти учитывает активные поселения, воду, незавершённые работы и пути. Объём испытаний фиксирует [S21](../systems/S21.md). Изменение реального ограничения мира оформляется отдельным продуктовым решением с доказательствами.
|
||||
|
||||
## Приёмка и восстановление
|
||||
|
||||
| Проверка | Условия и ожидаемый результат |
|
||||
| --- | --- |
|
||||
| M08-A01 | Исследовать один seed двумя разными маршрутами, сохранить мир и вернуться. Совпадают сгенерированный рельеф, постоянные идентификаторы и изменения игрока. |
|
||||
| M08-A02 | Запустить четыре региона по 125 жителей, перевести камеру в один из них. Во всех четырёх продолжаются еда, сон, производство, рост и предусмотренные события. Общий ресурсный баланс соблюдён. |
|
||||
| M08-A03 | Сохранить и аварийно прервать передачу до изъятия груза, после передачи владения записи перехода и после приёма. После загрузки остаются один житель, один груз и одно завершение заказа. |
|
||||
| M08-A04 | Задерживать и переставлять завершения чтения и генерации. Сравнить каждое каноническое состояние с последовательным эталоном и с 2, 6, 12 потоками. |
|
||||
| M08-A05 | Повредить необходимый чанк, удалить назначение в допустимый момент и заблокировать вход. Получить определённое ожидание, отказ либо возврат с видимой причиной и сохранённым имуществом. |
|
||||
| M08-A06 | На маршруте контрольного прогона открыть 128 новых чанков, изменить рельеф, оставить активную воду и сохранить груз в пути. Зафиксировать время барьеров, память, объём сохранения и рост очередей. |
|
||||
|
||||
После приёмки комплект поставляет три доступных режима создания мира, фиксированные испытательные миры и журнал границ владения. [M09](M09.md) использует этот же контракт при подключении игроков и передаче видимых областей.
|
||||
@@ -0,0 +1,57 @@
|
||||
# M09. Общий город и союзные поселения по LAN и интернету
|
||||
|
||||
Связанные проверки реестра — [B19](../parity.md#b19), [B20](../parity.md#b20), [B21](../parity.md#b21).
|
||||
|
||||
## Результат для игрока
|
||||
|
||||
В партии участвует до восьми человек, включая хозяина. Они могут управлять общим городом или основать отдельные союзные города в одном мире. Хозяин запускает авторитетную симуляцию, друзья подключаются напрямую по LAN либо интернету, торгуют, строят и помогают друг другу. Переподключение восстанавливает доступ к тому же поселению и подтверждённым командам.
|
||||
|
||||
Этап следует за [M08](M08.md) и развивает внутренний двухклиентский стенд [M01](M01.md). Его контракты находятся в [S16](../systems/S16.md), [S11](../systems/S11.md), [S14](../systems/S14.md) и [S15](../systems/S15.md). Отдельный Windows-сервер получает собственный этап [M12](M12.md) после выпуска 1.0. [Мастер-план](../../../PLAN.md) · [Реестр поведения](../parity.md)
|
||||
|
||||
## Исходное состояние и входные условия
|
||||
|
||||
В текущем прототипе есть два слота общей колонии, `LanSession`, команды с игроком и последовательностью и протокол версии 11. Тесты проверяют фиксированные сообщения, фрагментацию кадров, ограничения размера и совместную колонию через loopback. Эти сценарии дают полезную регрессию проверки входных данных и результата команды. [Интерфейс сессии](../../../app/lan_session.hpp) · [Текущий протокол](../../../app/lan_wire.hpp) · [LAN-тесты](../../../tests/lan_tests.cpp)
|
||||
|
||||
Воксельная игра использует новое поколение протокола и сохранений. M01 должен предоставить очередь команд, идентичность мира, новое воплощение сессии после загрузки, снимки и постоянные идентификаторы. M08 предоставляет полностью активные города в разных регионах и однократное владение грузами.
|
||||
|
||||
## Последовательность работ
|
||||
|
||||
| Пакет | Работа | Проверяемый выход |
|
||||
| --- | --- | --- |
|
||||
| M09.1 | Развить подключение в аутентифицированную сессию прямого LAN/WAN с шифрованием. Привязать подтверждённое соединение к игроку и выбранному миру. | Новый клиент получает версию игры, описание мира, права и состояние синхронизации. Неверные данные подключения дают объяснимый отказ. |
|
||||
| M09.2 | Ввести принадлежность городов и выдачу прав на операции. Поддержать общий город, отдельные союзные города, торговлю и совместные проекты. | Скрытая подмена идентификатора города или игрока отклоняется хозяином. Разрешённая помощь проверяется конкретным действием. |
|
||||
| M09.3 | Стабилизировать подтверждения команд, повтор, отклонение и очередность. Хозяин назначает такт исполнения и канонический порядок. | Повтор доставленной команды возвращает прежний результат, предмет или постройка создаются единожды. |
|
||||
| M09.4 | Передавать начальный снимок и изменения интересующих клиента областей. Разделить сетевую очередь, I/O, симуляцию и рендер. | Гость видит актуальные этажи, жителей, строительные стадии и причины остановки работ. |
|
||||
| M09.5 | Реализовать переподключение, дозапрос состояния, потерю связи и загрузку сохранения хозяином. | Старые команды и фоновые результаты отсеиваются при смене воплощения сессии. Ошибка загрузки сохраняет текущую партию. |
|
||||
| M09.6 | Расширить испытания до восьми участников, распределённых городов, торговли, тревоги и генерации фронтира. | Нативные партии на отдельных машинах подтверждают общий результат, права и восстановление. |
|
||||
|
||||
Режим общего города проверяется первым на двух клиентах. Затем вводится раздельное владение, после него расширяется число участников и набор удалённых регионов. Сетевой код использует поверхность команд одиночной игры.
|
||||
|
||||
## Авторитет, версии и загрузка
|
||||
|
||||
Хозяин владеет игровым временем, состоянием мира, приёмом команд и журналом результатов. Клиент владеет камерой и локальными настройками интерфейса. Запрос гостя содержит намерение, мир, воплощение сессии и последовательность. Сервер самостоятельно определяет личность отправителя, права на город, допустимость цели и ресурсов.
|
||||
|
||||
Начальное согласование сверяет версии протокола, мира, правил, контента и скриптовой среды. Набор модулей закреплён при создании мира. Присоединение сообщает точную причину расхождения и ожидаемую конфигурацию. Оригинальные пакеты устанавливаются в рамках процесса модификаций M10.
|
||||
|
||||
Загрузка выполняется транзакцией. Хозяин сначала проверяет всё новое состояние. При успехе он ограждает старые команды и фоновые задачи, публикует новое воплощение сессии и полный снимок. Повторная загрузка более раннего сохранения того же мира также создаёт новое воплощение. Клиент применяет только сообщения текущей сессии. При ошибке в проверке продолжается текущая партия с её прежними правами и очередями.
|
||||
|
||||
Права охватывают строительство, склад, профессию, отряд, торговлю, общий проект и управление временем. Состояния отключённого игрока и его города сохраняются. Симуляция населённых городов продолжается независимо от видимости и присутствия владельца.
|
||||
|
||||
## VoidLibrary, ограничения и диагностика
|
||||
|
||||
Сначала проверять [матрицу VoidLibrary](../void-library.md) для транспорта, бинарных сообщений, аутентификации, шифрования, очередей, журналирования и диагностики. Использовать подходящую существующую возможность. Для недостающего примитива найти или создать issue в `Void/Library`, связать его с задачей локальной реализации и тестом отказа. Выбор библиотечного средства подтверждается актуальными заголовками и Windows-сборкой.
|
||||
|
||||
Параметры кадра и очереди ограничиваются версионируемым протоколом. Повреждённые размеры, неизвестные команды, повторные и запрещённые запросы проверяются до изменения мира. Медленному клиенту доступен пересбор состояния из нового снимка. Интерфейс показывает подключение, ожидание, потерю связи и восстановление. Длительные сетевые операции обслуживаются независимо от окна и такта.
|
||||
|
||||
## Приёмка
|
||||
|
||||
| Проверка | Условия и ожидаемый результат |
|
||||
| --- | --- |
|
||||
| M09-A01 | На двух физических Windows-ПК пройти совместное строительство, сохранение и восстановление по LAN, затем прямое интернет-подключение. Журнал содержит сборки, права и параметры соединения. |
|
||||
| M09-A02 | Одновременно приказать потратить последний предмет, поставить постройку на одну клетку и изменить один заказ. Получить один допустимый исход и явные результаты остальных команд. |
|
||||
| M09-A03 | Повторить принятую и отклонённую команду, подменить игрока и чужой город. Повторы возвращают сохранённый результат, запрещённые действия сохраняют прежнее состояние мира. |
|
||||
| M09-A04 | Задержать пакеты и фоновые результаты, загрузить раннее сохранение и другой мир. Сообщения прошлой сессии отбрасываются. Ошибочная загрузка оставляет текущий мир работоспособным. |
|
||||
| M09-A05 | Отключить гостя во время перехода жителя с грузом. После загрузки и возврата гостя остаются один житель, один груз, один заказ и актуальные права. |
|
||||
| M09-A06 | Подключить хозяина и семь гостей к четырём регионам с 500 жителями суммарно. Использовать полный сценарий [M11](M11.md), включая генерацию, торговлю и сохранение. Отдельно измерить сетевые очереди и объёмы. |
|
||||
|
||||
Выходной комплект включает доказательства физического подключения, повторяемые тесты сети, контрольные сохранения и диагностику отказов. Изменения S16, S11, S14 и S15 проходят общую проверку владельцев и границ загрузки.
|
||||
@@ -0,0 +1,57 @@
|
||||
# M10. Публичный SDK, модули правил и завершение контента
|
||||
|
||||
Связанные проверки реестра — [B22](../parity.md#b22), [B23](../parity.md#b23). В мастерской шаблонов игрок сохраняет свою постройку и размещает второй экземпляр с самостоятельными работами, материалами и доступными входами. [Контракт шаблонов S08](../systems/S08.md)
|
||||
|
||||
## Результат для игрока и автора модов
|
||||
|
||||
Игрок собирает совместимый набор механик при создании мира. Автор добавляет собственные предметы, рецепты, профессии, события и художественные материалы через опубликованный формат пакетов и скриптовый API. Валидатор объясняет зависимости, конфликт версий и ошибки данных. Сохранение и сетевая партия точно определяют использованную конфигурацию.
|
||||
|
||||
Этап завершает публичные инструменты после игровых систем [M04](M04.md)–[M09](M09.md). Фундамент правил и минимальный скриптовый контракт закладываются в M01 и используются собственными событиями до M10. Основные документы — [S19](../systems/S19.md), [S20](../systems/S20.md), [S15](../systems/S15.md), [S16](../systems/S16.md) и [S18](../systems/S18.md). [Мастер-план](../../../PLAN.md) · [Реестр паритета](../parity.md)
|
||||
|
||||
## Исходное состояние и входные условия
|
||||
|
||||
Прототип определяет типы предметов, рецепты и профессии в C++-перечислениях. Сборка использует Void Binary, Core и Testing на закреплённом коммите `7b0fea6095f603f9e1904f66dfdc7752f4be4792`. M10 развивает проверенные до этого этапа определения нового мира и контракт скриптов. [Интерфейс мира](../../../engine/include/settlement/core/world.hpp) · [Текущая сборка](../../../CMakeLists.txt)
|
||||
|
||||
Каждая игра создаёт самостоятельное содержимое. Входом для реестра остаются публичные описания поведения базовой игры и ACE на принятую дату среза. У M10 есть собственные игровые эквиваленты и записи об авторах, происхождении и условиях использования ресурсов. Открытая строка реестра получает отдельную задачу проверки либо реализации.
|
||||
|
||||
## Последовательность работ
|
||||
|
||||
| Пакет | Работа | Проверяемый выход |
|
||||
| --- | --- | --- |
|
||||
| M10.1 | Закрепить публичную версию форматов, имён определений, зависимостей и API. Описать переход от внутреннего пакета к распространяемому. | Пакет имеет постоянную идентичность, версию, перечень зависимостей, правила и ресурсы. |
|
||||
| M10.2 | Выпустить валидатор пакетов и разрешение зависимостей. Проверять ссылки, циклы, конфликтующие определения, ресурсы и требования игрового API. | Ошибка указывает конкретный файл и определение, выбранный мир получает разрешённый и воспроизводимый набор. |
|
||||
| M10.3 | Завершить интерфейс выбора модулей при создании мира. Показывать влияние на доступные профессии, рецепты, события и соседние механики. | Игрок понимает требуемые зависимости и получает причину недопустимой комбинации до старта. |
|
||||
| M10.4 | Опубликовать скриптовый API, описание состояния, событий, игровой случайности, лимитов и ошибок. | Пример события проходит сохранение, воспроизведение и сетевую игру с тем же результатом. |
|
||||
| M10.5 | Выпустить обучающие пакеты с предметом, производственной цепочкой, профессией и развилкой события. Использовать тот же путь загрузки, что у контента игры. | Другой автор повторяет примеры по документации и получает проверяемый результат. |
|
||||
| M10.6 | Пройти полный реестр поведения и каталог собственных моделей, анимаций, звуков и текстов. Проверить локализацию, читаемость и совместимые наборы. | Каждая обязательная строка имеет собственный эквивалент и доказательство приёмки. Остатки явно перечислены для M11. |
|
||||
|
||||
Примеры SDK создаются как небольшие законченные истории. Один пакет добавляет корм и рецепт его изготовления, второй расширяет профессию проверяемым заданием, третий запускает событие с сохранённым выбором и наградой. Собственный тестовый мир использует все три пакета одновременно.
|
||||
|
||||
## Контракты пакетов и скриптов
|
||||
|
||||
Набор правил выбирается при создании мира. S19 хранит разрешённые версии модулей, зависимостей, скриптовой среды и контрольные суммы. Сохранение ссылается на тот же набор, а согласование подключения S16 сверяет его до получения игровых команд. Повреждённый или отсутствующий пакет даёт конкретное сообщение о восстановлении нужной версии.
|
||||
|
||||
Предложенный технический базис — Lua 5.4.9 с закреплённой сборкой. До публикации требуется нативная проверка встраивания и поведения ограничений. Долговременное состояние сценария хранится явно сериализуемыми значениями через S19 и S15. Вызовы получают упорядоченные входы, контролируемую игровую случайность и ограниченные операции над игровыми идентификаторами.
|
||||
|
||||
Обработчик накапливает изменения собственного состояния и предложения миру. При успехе система проверяет и публикует весь результат на определённом такте. При ошибке либо превышении лимита предложения отбрасываются, состояние сохраняет прежнюю версию, симуляция сообщает неисправный авторитетный модуль. Хозяин может восстановить исправную версию набора и продолжить сохранение. Выбранные механики и их идентичность сохраняются в записи мира.
|
||||
|
||||
Инструкции Lua, выделение памяти и операции хоста имеют отдельные детерминированные лимиты. Длительные игровые расчёты выполняются штатными системами с запросом и результатом. В API доступны только документированные возможности игры и предоставленные ресурсы пакета. Сериализация опирается на явные значения, идентификаторы и запланированные события.
|
||||
|
||||
## VoidLibrary и производство материалов
|
||||
|
||||
Каждый пакет реализации проходит проверку [матрицы VoidLibrary](../void-library.md). Подходящие загрузчики, проверки данных, плагины, конфигурация, бинарный ввод-вывод и диагностические средства берутся из библиотеки после проверки их реального контракта. Если требуемая возможность отсутствует, найти существующий issue либо создать issue в `Void/Library`, затем связать локальную реализацию, воспроизводящий пример и условия Windows. Номер issue должен вести на реальную запись.
|
||||
|
||||
S20 ведёт записи происхождения и лицензий для моделей, анимации, текстур, шрифтов, звуков и музыки. Пакеты используют собственную художественную систему, названия и тексты. Контрольный процесс упаковки сверяет содержимое дистрибутива с реестром разрешённых материалов.
|
||||
|
||||
## Приёмка
|
||||
|
||||
| Проверка | Условия и ожидаемый результат |
|
||||
| --- | --- |
|
||||
| M10-A01 | По опубликованным примерам добавить предмет, рецепт, профессию и событие. Валидатор принимает пакет, игра выполняет цепочку, пользователь видит понятные названия и результаты. |
|
||||
| M10-A02 | Проверить отсутствующую зависимость, цикл, конфликт определений, неверный тип поля и несовместимую версию. Ошибка указывает причину и путь, создание мира завершается после исправления набора. |
|
||||
| M10-A03 | Сохранить модифицированный мир посреди обработки цепочки, загрузить и воспроизвести его на 2, 6 и 12 потоках. Канонические такты совпадают с эталоном. |
|
||||
| M10-A04 | Выполнить обработчик с бесконечным циклом, чрезмерным выделением памяти, ошибочным ответом и ошибкой после подготовки предложений. Лимит срабатывает, частично опубликованных изменений нет. |
|
||||
| M10-A05 | Подключить гостя с иной версией пакета, затем с правильной. Первое согласование даёт причину, второе восстанавливает состояние и права без смены правил мира. |
|
||||
| M10-A06 | Пройти каждый обязательный модуль отдельно, совместимые пары и связанные группы из реестра. Доказательства поведения, версия пакета и происхождение материалов прикреплены к записи приёмки. |
|
||||
|
||||
Выход M10 содержит версию SDK, исходные обучающие пакеты, валидатор, эксплуатационную диагностику, каталог материалов и актуальный реестр паритета. [M11](M11.md) проверяет этот комплект в распространяемой Windows-сборке.
|
||||
@@ -0,0 +1,67 @@
|
||||
# M11. Приёмка и выпуск Windows 1.0
|
||||
|
||||
## Цель выпуска
|
||||
|
||||
Игрок получает устанавливаемую Windows x64 игру, в которой работают три типа мира, собственные оригинальные механики по реестру базовой игры и ACE, модульные правила и кооператив до восьми человек. Контрольная нагрузка обеспечивает 500 полноценно моделируемых жителей суммарно по миру, 20 тактов/с и 1080p60 на принятом стенде. Сохранения, права игроков, материалы и моды проходят проверку в том же пакете, который получают игроки.
|
||||
|
||||
Этап закрывает [M00](M00.md)–[M10](M10.md). Приёмку координирует [S21](../systems/S21.md), результаты принадлежат конкретной сборке, конфигурации мира и оборудованию. [Мастер-план](../../../PLAN.md) · [Реестр паритета](../parity.md) · [Политика VoidLibrary](../void-library.md)
|
||||
|
||||
## Наблюдаемая исходная точка
|
||||
|
||||
Текущий CMake требует Windows-цель, CMake 4+, а отражательные тесты — GCC 16 с C++26 reflection. Игровое ядро объявляет C++20. Void Library закреплена на `7b0fea6095f603f9e1904f66dfdc7752f4be4792`. Эти требования необходимо явно сохранить либо изменить проверенным решением по мере разработки. [CMake](../../../CMakeLists.txt) · [Инструкции сборки](../../../README.md)
|
||||
|
||||
Исторический тест экономики измеряет ядро на 80×80 с 50–500 жителями, а синтетический прогон использует 2 500 жителей с общими заданиями. В отчёте экономики 12 потоков медленнее 6 при каждом указанном размере. Новый приёмочный прогон включает графику, сохранения, подгрузку и сеть. [Отчёт экономики](../../../benchmarks/colony-performance.md) · [Синтетическая нагрузка](../../../benchmarks/parallel-workers.md)
|
||||
|
||||
## Последовательность подготовки
|
||||
|
||||
| Пакет | Работа | Проверяемый выход |
|
||||
| --- | --- | --- |
|
||||
| M11.1 | Замкнуть реестр паритета и проверку источников. Сопоставить обязательную строку, собственный эквивалент, модуль и результат сценария. | Каждое обязательное поведение имеет доказательство, незавершённые работы видны в списке дефектов. |
|
||||
| M11.2 | Заморозить версии программы, SDK, правил и набора исходных данных контрольных миров. Собрать Release штатным Windows-путём. | Воспроизводимая сборка имеет коммит, версии инструментов, зависимостей и пакетный манифест. |
|
||||
| M11.3 | Прогнать корректность, сохранения, детерминизм, сеть и отказы модов. Добавить длительное хозяйство и события. | Каждая ошибка связана с журналом, контрольным миром и проверкой восстановления. |
|
||||
| M11.4 | Выполнить три нативных измерения каждой контрольной нагрузки. Снять кадры, такты, очереди, память и передачу данных. | Цели подтверждены измерениями и одинаковым объёмом полезной работы. |
|
||||
| M11.5 | Проверить интерфейс, обучение, высотные срезы, масштаб, управление и сообщения об ошибках. Упаковать собственные материалы и необходимые runtime-библиотеки. | Новая партия, загрузка, установка мода и присоединение доступны из поставляемого интерфейса. |
|
||||
| M11.6 | Провести независимый обзор интегрированного состояния, устранить находки и повторить затронутые испытания. Проверить установку и восстановление предыдущей версии. | Комплект доказательств соответствует фактическому дистрибутиву и принятому объёму 1.0. |
|
||||
|
||||
Общие файлы CMake, форматы и манифесты интегрирует один владелец. По [правилу VoidLibrary](../void-library.md) каждое новое средство сначала сопоставляется с возможностями библиотеки. Недостающий примитив получает найденный либо созданный issue в `Void/Library` и связь с локальным кодом до его реализации. Проверка issue и закреплённой версии входит в обзор выпуска.
|
||||
|
||||
## Контрольные миры и оборудование
|
||||
|
||||
Предложенный эталон оборудования — Ryzen 5 5600, Radeon RX 6600, 16 ГБ оперативной памяти и SSD. Измерения выполняются нативно на Windows x64 при 1080p и средних настройках. В отчёт входят версия Windows, драйвер, сборка, частоты, фоновые условия и размещение данных. Для сетевой нагрузки гости запускаются на отдельных машинах.
|
||||
|
||||
| Нагрузка | Зафиксированное содержимое |
|
||||
| --- | --- |
|
||||
| Большой город | Один регион 512×512×128, 256 удерживаемых симуляцией чанков 32³, 500 активных жителей, 200 жителей в начальном виде камеры, 10 000 стеков, 2 000 заданий, 32 768 активных водных вокселей и дополнительно 32 участника события. |
|
||||
| Четыре действующих города | Четыре региона по 125 жителей с теми же суммарными запасами, заданиями, водой и участниками события. Хозяин и семь гостей управляют общим и союзными городами, торгуют и путешествуют. Маршрут открывает 128 новых чанков, сценарий включает изменение рельефа и сохранение груза в пути. |
|
||||
| Проверка пределов | 2 500 полноценно моделируемых жителей с зафиксированными отношениями запасов и работ из контрольной нагрузки. Измеряются корректность, полезная работа, очереди и память, а достигнутые кадры и такты публикуются как результат. |
|
||||
|
||||
Состав мира, seed, пути камеры, журналы команд и ожидаемые операции фиксируются вместе с контрольными данными. Генератор указывает точное число жителей, предметов, событий и активных чанков. Начальные количества и потребление за прогон входят в отчёт. Размер сохранения измеряется для точной версии данных. Эти миры задают проверенный диапазон нагрузки, продуктовые ограничения карты требуют отдельного решения.
|
||||
|
||||
## Измерения и условия приёмки
|
||||
|
||||
Каждый основной мир проходит пять минут прогрева и три отдельных прогона по 30 минут. Один прогон содержит 36 000 логических тактов при штатных 20 тактах/с. Отдельно измеряются операции сохранения, присоединения, переподключения, перехода региона и массового изменения геометрии.
|
||||
|
||||
- Целевой p95 длительности такта составляет максимум 50 мс, p95 кадра — 16,7 мс. Дополнительно проверяются фактические 20 тактов/с, частота кадров и накопленный отрыв от реального времени.
|
||||
- Времена отдельных пиков, p99 и максимум публикуются для каждой тяжёлой операции. Барьеры чтения и генерации учитываются в задержке продвижения симуляции.
|
||||
- Записываются пик и динамика RSS, графической памяти, активных чанков, глубины очередей и объёма сетевых данных. Проверяется возврат очередей к нормальному уровню после нагрузки.
|
||||
- Полезная работа выражается завершёнными заказами, доставленными материалами, произведённой пищей и состоянием жителей. Пропущенная симуляция или потерянные задачи проявляются в сравнении канонического состояния.
|
||||
- Сохранение посреди стройки, события, сбора урожая и межрегиональной доставки проверяется против непрерывного прогона. Повреждённый файл сохраняет текущую открытую партию и показывает причину отказа.
|
||||
|
||||
## Матрица выпуска
|
||||
|
||||
| Проверка | Ожидаемый результат |
|
||||
| --- | --- |
|
||||
| M11-A01 | Все обязательные строки реестра имеют источник, собственную реализацию, модуль и успешный сценарий приёмки. |
|
||||
| M11-A02 | Последовательный эталон и 2, 6, 12 потоков дают одинаковый канонический хеш каждого такта, включая отложенные чтения, загрузку и события. |
|
||||
| M11-A03 | Большой город и четыре действующих города проходят указанные три измерения на реальном Windows-стенде с полными журналами ресурсов. |
|
||||
| M11-A04 | Два физических ПК проходят LAN и прямой интернет, а полный стенд выдерживает хозяина и семь гостей. Проверены повторные, просроченные и запрещённые команды. |
|
||||
| M11-A05 | Отдельный пользователь проходит создание мира, строительство, потребности, сохранение, моды и возврат в сетевую игру по поставляемому обучению. |
|
||||
| M11-A06 | Дистрибутив запускается на чистой Windows x64 с включёнными runtime-библиотеками. Материалы и зависимости совпадают с реестром происхождения. |
|
||||
|
||||
Существующие команды исходной проверки доступны через `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\build.ps1` и через `ctest --test-dir <каталог-сборки> --output-on-failure` после CMake-конфигурации. Новые сценарии получают конкретные команды в S21 при их реализации и записываются в журнал проверки с рабочим каталогом и кодом завершения.
|
||||
|
||||
## Условия выпуска и восстановления
|
||||
|
||||
Ошибки потери имущества, повторного владения, повреждения сохранения, обхода прав, несовпадения канонических состояний и обязательных сценариев требуют исправления до приёмки. При изменении формата хранится резервная копия последнего исправного сохранения. Возврат к предыдущему выпуску использует соответствующий пакет и его совместимые данные. Перед публикацией требуется отдельное разрешение на внешнее распространение.
|
||||
|
||||
Выход этапа содержит пакет игры, сведения о версиях, результаты измерений и тестов, реестр поведения, происхождение материалов, известные остаточные ограничения и инструкцию восстановления. После этого [M12](M12.md) добавляет постоянный сервер на той же симуляции.
|
||||
@@ -0,0 +1,56 @@
|
||||
# M12. Постоянный выделенный Windows-сервер
|
||||
|
||||
## Результат для хозяина мира
|
||||
|
||||
После выпуска 1.0 владелец запускает мир отдельным Windows-процессом. Он работает, пока игроки выходят и возвращаются. Хозяин может штатно остановить процесс, сделать резервную копию, обновить сборку и восстановить сохранение с прежними городами, жителями, правами и заказами.
|
||||
|
||||
Этап использует итог [M11](M11.md), авторитетную симуляцию [M01](M01.md), передачу регионов [M08](M08.md) и подключение [M09](M09.md). Контрактами владеют [S01](../systems/S01.md), [S15](../systems/S15.md), [S16](../systems/S16.md), [S19](../systems/S19.md) и [S21](../systems/S21.md). Сервер входит в последовательность развития после версии 1.0. [Мастер-план](../../../PLAN.md) · [Реестр поведения](../parity.md)
|
||||
|
||||
## Исходное состояние и входные условия
|
||||
|
||||
Текущая сборка содержит клиент, headless-симулятор, benchmark и тесты. LAN обслуживается клиентским приложением, а архитектурные записи описывают авторитет хозяина. Итог M09 должен уже отделить приём сообщений и игровой такт от оконного интерфейса. M12 использует ту же реализацию мира, команд, сохранений и правил для постоянного процесса. [Текущие цели CMake](../../../CMakeLists.txt) · [Запись об авторитете](../../architecture.md)
|
||||
|
||||
Перед началом обязательны совместимые версии игры, проверенные права городов, аутентифицированное соединение, восстановление передачи груза и транзакционная загрузка. Нативные испытания M11 дают исходную производительность и размер сохраняемого мира.
|
||||
|
||||
## Последовательность работ
|
||||
|
||||
| Пакет | Работа | Проверяемый выход |
|
||||
| --- | --- | --- |
|
||||
| M12.1 | Выделить безоконную точку запуска поверх авторитетного runtime. Задать явный каталог мира, конфигурации, модов и журналов. | Процесс создаёт или открывает мир и принимает тот же протокол, что player-hosted партия. |
|
||||
| M12.2 | Ввести состояние запуска, проверки конфигурации и готовности. Дать консоли команды наблюдения, сохранения и штатного завершения. | Ошибка каталога, порта, модуля или данных имеет конкретную диагностику до публикации доступности. |
|
||||
| M12.3 | Добавить управление допуском игроков и сохранёнными правами городов. Серверное администрирование привязать к отдельной роли. | Входящий игрок получает свой прежний доступ, административная команда проверяет полномочия. |
|
||||
| M12.4 | Реализовать периодическое сохранение, резервные поколения и штатную остановку на согласованной границе такта. | Остановка публикует полностью проверенное сохранение и завершается после записи, активные передачи сохраняют владельцев. |
|
||||
| M12.5 | Описать и проверить обновление, перенос каталога, восстановление резервной копии и возврат сборки. | Для каждой процедуры есть проверяемая последовательность и совместимый набор программы, модулей и данных. |
|
||||
| M12.6 | Прогнать многодневное хозяйство, уход последнего игрока, перезапуск, возвращение и нагрузку нескольких регионов. | Мир продолжает штатные действия и восстанавливает операции в пути после нового запуска. |
|
||||
|
||||
Конфигурация перечисляет только действительные настройки реализации. Адрес прослушивания, порт, каталоги и доступ выводятся в инструкции поставки с их фактическими значениями. Значения по умолчанию и процедура запуска подтверждаются тестом готового Windows-пакета.
|
||||
|
||||
## Владение, время и постоянные данные
|
||||
|
||||
Процесс сервера владеет авторитетным миром, его временем, журналом команд, правами и сохранениями. Камера и интерфейс каждого клиента остаются на стороне игрока. Глобальный бюджет 500 жителей применяется суммарно ко всем активным городам и регионам в штатном контрольном испытании. После ухода последнего игрока сервер продолжает ту же симуляцию и запланированные события.
|
||||
|
||||
Долговременные данные включают идентичность мира, население, имущество, заявки и резервы, события, передачи регионов, игроков и права городов. Запуск создаёт новое воплощение сетевой сессии, восстанавливает данные и только после проверки принимает команды. Клиенты переподключаются, сверяют правила и получают актуальные снимки.
|
||||
|
||||
Штатная остановка прекращает приём новых игровых команд, дожидается допустимой границы такта и завершения публикации сохранения, затем закрывает соединения с понятным результатом. Если запись не удалась, сервер сообщает ошибку, сохраняет исправное поколение и возможность повторной записи. Аварийный перезапуск использует последнее полностью опубликованное поколение.
|
||||
|
||||
## VoidLibrary и эксплуатация
|
||||
|
||||
Перед реализацией проверить [матрицу VoidLibrary](../void-library.md) для жизненного цикла процесса, конфигурации, журналов, хранения, расписания и транспорта. Подходящую возможность существующего модуля нужно использовать с её проверенным Windows-контрактом. Подтверждённое отсутствие нужной возможности получает найденный либо созданный issue в `Void/Library`. Задача и локальная реализация ссылаются на него и указывают заменяемый примитив.
|
||||
|
||||
У администратора доступны состояние процесса, количество игроков и жителей, текущий такт, отставание, память, объём очередей, последняя удачная запись и причина последней ошибки. Журналы используют игровые и технические идентификаторы, а учётные секреты остаются в приватном изменяемом состоянии. Инструкция описывает восстановление после заполнения диска, недоступного порта, сбоя пакета правил и повреждённого сохранения.
|
||||
|
||||
Обновление сначала проверяется на копии последнего завершённого сохранения. Принимающая версия должна подтвердить набор правил и совместимость данных. Резервный пакет содержит программу, перечень модулей и соответствующее сохранение. Факт реального внешнего размещения и разрешение на него оформляются при отдельной поставке сервера.
|
||||
|
||||
## Приёмка
|
||||
|
||||
| Проверка | Условия и ожидаемый результат |
|
||||
| --- | --- |
|
||||
| M12-A01 | Развернуть пакет на чистой Windows x64, создать мир и подключить существующий клиент 1.0 с совместимой версией. Сервер работает без окна игры и показывает готовность. |
|
||||
| M12-A02 | Два игрока создают отдельные города, отправляют груз и выходят. После заданного числа тактов возвращаются к продолжающему жить миру с ожидаемыми запасами и событиями. |
|
||||
| M12-A03 | Штатно остановить сервер во время стройки и межрегиональной доставки. После запуска есть те же права, один житель, один груз и одно завершение каждого заказа. |
|
||||
| M12-A04 | Прервать процесс на разных шагах записи. Восстановление выбирает последнее полностью опубликованное поколение, повреждённые части имеют конкретную диагностику. |
|
||||
| M12-A05 | Повторить запуск с занятым портом, отсутствующим модулем, неверным правом доступа и заполненным диском. Программа сохраняет исправные данные и показывает действие для восстановления. |
|
||||
| M12-A06 | Запустить четыре региона с 500 жителями суммарно, подключать до восьми игроков к отдельному серверу и выполнить длительный сценарий S21. Зафиксировать такты, отставание, очередь записи, память, переподключения и повторяемость. |
|
||||
| M12-A07 | Проверить обновление на копии мира и возврат к резервному пакету. Клиенты получают согласованную версию и свой прежний доступ. |
|
||||
|
||||
Выход включает готовый Windows-пакет, проверенную процедуру запуска и восстановления, пример конфигурации с фактическими параметрами, версии зависимостей и журналы испытаний. Дополнительные идеи после паритета получают отдельные записи и продуктовые решения, сохраняя проверяемость серверного этапа.
|
||||
@@ -0,0 +1,84 @@
|
||||
# Реестр поведения Stonehearth 1.1 и ACE 0.9.6.22
|
||||
|
||||
Реестр нужен, чтобы утверждение о паритете можно было проверить в работающей игре. Базовая версия и изменения ACE учитываются раздельно, даже если они описывают один промысел. Модуль правил определяет, какая механика активна в конкретной партии. Настройки мира фиксируются при создании.
|
||||
|
||||
Исходные 24 наблюдения базовой игры и 26 наблюдений ACE сохраняют свои номера. Для каждого пункта последняя колонка ведёт к проверенному выпуску или конкретному вопросу. Продолжение реестра, просмотренные выпуски и ещё открытые диапазоны приведены в [сверке базовой игры](base-evidence.md) и [сверке ACE](ace-evidence.md). Дата отсечения — 2 декабря 2026 года. Метка строки задаёт постоянный идентификатор требования и его приёмочного сценария, например `AT-B03` для `B03`. Во всех строках исходное состояние разработки — **запланировано**. Сценарий описывает собственную будущую проверку. Для принятой строки добавить ссылку на результат с коммитом, seed, набором модулей и наблюдаемым исходом.
|
||||
|
||||
Всего в первом проходе 80 идентификаторов. Новые строки — [B25–B40](base-evidence.md#b25) и [A27–A40](ace-evidence.md#a27). Все 80 требуют приёмки на собственной игре.
|
||||
|
||||
## Базовая игра
|
||||
|
||||
| ID | Модуль правил | Наблюдаемое поведение | Собственный сценарий и ожидаемый результат | Система и этап | Свидетельство |
|
||||
|---|---|---|---|---|---|
|
||||
| <a id="b01"></a>B01 | Мир | Процедурный рельеф | Заданный seed повторяет расположение доступных ресурсов при новом старте. | [S02](systems/S02.md) · [M02](milestones/M02.md) | [Сверка B01](base-evidence.md#b01) |
|
||||
| <a id="b02"></a>B02 | Строительство | Комнаты объединяются в сложный план | Соединить два крыла своего дома и проверить, что общая часть пола строится один раз. | [S08](systems/S08.md) · [M03](milestones/M03.md) | [Сверка B02](base-evidence.md#b02) |
|
||||
| <a id="b03"></a>B03 | Строительство | Вертикальная сборка дома | Построить верхний этаж с кроватью и пройти к ней по лестнице. | [S08](systems/S08.md) · [M03](milestones/M03.md) | [Сверка B03](base-evidence.md#b03) |
|
||||
| <a id="b04"></a>B04 | Строительство | Редактирование отдельных вокселей | Изменить выступ настила и пересчитать смету и занятое пространство. | [S08](systems/S08.md) · [M03](milestones/M03.md) | [Сверка B04](base-evidence.md#b04) |
|
||||
| <a id="b05"></a>B05 | Строительство | Доступность места работы | Убрать доступ к секции крыши. Игрок видит причину и продолжает ту же стройку после установки лестницы. | [S03](systems/S03.md) · [M03](milestones/M03.md) | [Сверка B05](base-evidence.md#b05) |
|
||||
| <a id="b06"></a>B06 | Строительство | Временные леса | Пройти строительство высокой секции, затем проверить освобождение клеток временного доступа. | [S08](systems/S08.md) · [M03](milestones/M03.md) | [Сверка B06](base-evidence.md#b06) |
|
||||
| <a id="b07"></a>B07 | Общество | Изменение настроения от условий жизни | Обеспечить едой и жильём две группы с разным исходным состоянием. Сводка объясняет изменение настроения. | [S05](systems/S05.md) · [M04](milestones/M04.md) | [Сверка B07](base-evidence.md#b07) |
|
||||
| <a id="b08"></a>B08 | Экономика | Пропитание и рост поселения | Перейти от лагерных запасов к своему снабжению и разместить нового жителя в рабочем городе. | [S11](systems/S11.md) · [M04](milestones/M04.md) | [Сверка B08](base-evidence.md#b08) |
|
||||
| <a id="b09"></a>B09 | Профессии | Различия стартовых культур | Проверить оригинальную культуру, начинающую с охоты и камня, и культуру с другим путём снабжения. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка B09](base-evidence.md#b09) |
|
||||
| <a id="b10"></a>B10 | Мир | Достопримечательности при генерации | Найти собственную руину в контрольном сиде. После загрузки сохраняются её положение и изменения. | [S02](systems/S02.md) · [M06](milestones/M06.md) | [Сверка B10](base-evidence.md#b10) |
|
||||
| <a id="b11"></a>B11 | Климат | Выбор начального сезона | Запустить один биом в двух сезонах и наблюдать разные стартовые погодные условия. | [S09](systems/S09.md) · [M05](milestones/M05.md) | [Сверка B11](base-evidence.md#b11) |
|
||||
| <a id="b12"></a>B12 | Земледелие | Сезон влияет на развитие культуры | Сравнить два урожая одинаковой посадки в предпочитаемый и другой сезон. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка B12](base-evidence.md#b12) |
|
||||
| <a id="b13"></a>B13 | Общество | Перенос группы в новую колонию | После развития поселения выбрать отправляющихся жителей и груз. Проверить состав прибывшей группы в следующей партии. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка B13](base-evidence.md#b13) |
|
||||
| <a id="b14"></a>B14 | Кампании | Сотрудничество открывает новую ветвь | Договориться с собственной соседней общиной поставками. После выполнения открывается профессия. | [S13](systems/S13.md) · [M07](milestones/M07.md) | [Сверка B14](base-evidence.md#b14) |
|
||||
| <a id="b15"></a>B15 | Профессии | Специалист изменяет землю | После открытия специальности создать доступный участок рельефа и проверить новые пути к нему. | [S07](systems/S07.md) · [M07](milestones/M07.md) | [Сверка B15](base-evidence.md#b15) |
|
||||
| <a id="b16"></a>B16 | Кампании | Необязательное финальное столкновение | Две допустимые цепочки дают доступ к собственному финалу. Отложить его, затем пройти с участием работников и отряда. | [S13](systems/S13.md) · [M07](milestones/M07.md) | [Сверка B16](base-evidence.md#b16) |
|
||||
| <a id="b17"></a>B17 | Оборона | Спасение раненого | Доставить упавшего жителя к постели и продолжить уход после загрузки. Условия его возвращения к службе остаются открытыми. | [S12](systems/S12.md) · [M07](milestones/M07.md) | [Сверка B17](base-evidence.md#b17) |
|
||||
| <a id="b18"></a>B18 | Путешественники | Посещение и оценка поселения | Предоставить гостевую кровать и сравнить визиты в двух условиях обстановки. Проверить оценку и однократное получение подарка. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка B18](base-evidence.md#b18) |
|
||||
| <a id="b19"></a>B19 | Кооператив | Отдельные поселения у общего хозяина | Два игрока основывают соседние города и видят разрешённые объекты одного мира. | [S16](systems/S16.md) · [M09](milestones/M09.md) | [Сверка B19](base-evidence.md#b19) |
|
||||
| <a id="b20"></a>B20 | Кооператив | Обмен между городами | Обменять товар и деньги, переподключить покупателя и проверить обе стороны операции. | [S11](systems/S11.md) · [M09](milestones/M09.md) | [Сверка B20](base-evidence.md#b20) |
|
||||
| <a id="b21"></a>B21 | Кооператив | Совместная помощь при нападении | Гость поддерживает оборону союзного города с разрешения владельца. | [S12](systems/S12.md) · [M09](milestones/M09.md) | [Сверка B21](base-evidence.md#b21) |
|
||||
| <a id="b22"></a>B22 | Инструменты | Сохранение и повторное применение чертежа | Сохранить собственный шаблон, разместить его в другом месте и проверить проходимость входов. | [S08](systems/S08.md) · [M10](milestones/M10.md) | [Сверка B22](base-evidence.md#b22) |
|
||||
| <a id="b23"></a>B23 | Моды | Настраиваемые предметы и события | Независимо созданный пакет добавляет предмет и встречу через новый API. Набор остаётся узнаваемым после загрузки. | [S19](systems/S19.md) · [M10](milestones/M10.md) | [Сверка B23](base-evidence.md#b23) |
|
||||
| <a id="b24"></a>B24 | Профессии | Ремесленник создаёт помощника для повторяемой работы | Создать собственного помощника и передать ему повторяемое поручение. Проверить, что житель и помощник не выдают два результата одного задания. | [S04](systems/S04.md) · [M07](milestones/M07.md) | [Сверка B24](base-evidence.md#b24) |
|
||||
|
||||
## Дополнения и изменения ACE
|
||||
|
||||
| ID | Модуль правил | Наблюдаемое поведение | Собственный сценарий и ожидаемый результат | Система и этап | Свидетельство |
|
||||
|---|---|---|---|---|---|
|
||||
| <a id="a01"></a>A01 | Земледелие | Ирригация меняет урожай | Разделить поле канавой, подать воду только на одну сторону и сравнить рост. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A01](ace-evidence.md#a01) |
|
||||
| <a id="a02"></a>A02 | Вода | Регулируемая подача через затвор | Закрыть затвор, дождаться перераспределения воды, сохранить и вновь открыть. | [S09](systems/S09.md) · [M05](milestones/M05.md) | [Сверка A02](ace-evidence.md#a02) |
|
||||
| <a id="a03"></a>A03 | Вода | Подъём воды насосом | Заполнить верхнюю ёмкость из нижней. Учесть объём на обеих сторонах границы чанка. | [S09](systems/S09.md) · [M05](milestones/M05.md) | [Сверка A03](ace-evidence.md#a03) |
|
||||
| <a id="a04"></a>A04 | Добыча | Ресурс зависит от места добычи | Добыть разные материалы на берегу и под водой. Проверить результаты при одинаковой разметке. | [S02](systems/S02.md) · [M05](milestones/M05.md) | [Сверка A04](ace-evidence.md#a04) |
|
||||
| <a id="a05"></a>A05 | Биомы | Особая флора и ресурсы нагорья | Освоить оригинальный высокогорный биом, выстроив снабжение из его локальных ресурсов. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A05](ace-evidence.md#a05) |
|
||||
| <a id="a06"></a>A06 | Ремесло | Градации топлива | Задать топку с требованием к качеству топлива. Проверить выбор подходящей партии и расход. | [S07](systems/S07.md) · [M04](milestones/M04.md) | [Сверка A06](ace-evidence.md#a06) |
|
||||
| <a id="a07"></a>A07 | Ремесло | Многостадийное производство металла | Довести заказ от добытого материала через промежуточные стадии до готового изделия, сохранив работу на середине. | [S07](systems/S07.md) · [M04](milestones/M04.md) | [Сверка A07](ace-evidence.md#a07) |
|
||||
| <a id="a08"></a>A08 | Оборона | Предпочтения экипировки отряда | Изменить разрешённый комплект, дождаться переоснащения и проверить возврат прежних вещей. | [S12](systems/S12.md) · [M07](milestones/M07.md) | [Сверка A08](ace-evidence.md#a08) |
|
||||
| <a id="a09"></a>A09 | Оборона | Маршрут патруля | Назначить точки обхода, прервать тревогой и проверить возобновление после отбоя. | [S12](systems/S12.md) · [M07](milestones/M07.md) | [Сверка A09](ace-evidence.md#a09) |
|
||||
| <a id="a10"></a>A10 | Жители | Питьё как потребность комфорта | Предложить приемлемый и непереносимый напитки. Отсутствие напитка влияет на самочувствие без смерти от жажды. | [S05](systems/S05.md) · [M05](milestones/M05.md) | [Сверка A10](ace-evidence.md#a10) |
|
||||
| <a id="a11"></a>A11 | Ремесло | Приготовление напитков | Довести производство собственного напитка от сырья до потребления, сохранить загрузку станции. | [S07](systems/S07.md) · [M05](milestones/M05.md) | [Сверка A11](ace-evidence.md#a11) |
|
||||
| <a id="a12"></a>A12 | Качество | Рацион влияет на продукцию стада | Сравнить обычный и специализированный корм в одинаковом стаде по результату сбора продукции. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A12](ace-evidence.md#a12) |
|
||||
| <a id="a13"></a>A13 | Качество | Качество изделия влияет на ценность | Изготовить два экземпляра разных качеств, сравнить цену и сохранить различие при переноске. | [S06](systems/S06.md) · [M06](milestones/M06.md) | [Сверка A13](ace-evidence.md#a13) |
|
||||
| <a id="a14"></a>A14 | Питомцы | Память об умершем питомце | Проверить собственный памятный объект после утраты питомца и отсутствие второй выдачи при загрузке. | [S10](systems/S10.md) · [M07](milestones/M07.md) | [Сверка A14](ace-evidence.md#a14) |
|
||||
| <a id="a15"></a>A15 | Торговля | Торговец занимает место на рынке | Подготовить подходящее торговое место. Посетитель занимает его, обслуживает покупателя и освобождает при уходе. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка A15](ace-evidence.md#a15) |
|
||||
| <a id="a16"></a>A16 | Торговля | Уровни города и рынка ограничивают торговцев | Повысить только уровень места, затем города. Проверить доступные категории торговцев до и после. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка A16](ace-evidence.md#a16) |
|
||||
| <a id="a17"></a>A17 | Торговля | Запрашиваемый товар получает особую цену | Продать одинаковые изделия двум разным торговцам и объяснить разницу спросом. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка A17](ace-evidence.md#a17) |
|
||||
| <a id="a18"></a>A18 | Торговля | Предпочтения категорий посещения | Ограничить одну категорию, повторить одинаковую последовательность рыночных дней и проверить состав посетителей. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка A18](ace-evidence.md#a18) |
|
||||
| <a id="a19"></a>A19 | Торговля | История сделок влияет на будущие посещения | При сопоставимом богатстве сравнить город с торговой историей и без неё. | [S11](systems/S11.md) · [M06](milestones/M06.md) | [Сверка A19](ace-evidence.md#a19) |
|
||||
| <a id="a20"></a>A20 | Пасека | Результат опыления зависит от окружения | Сравнить ульи у подходящих и неподходящих растений, сохранить на границе цикла. Урожай учитывается однократно. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A20](ace-evidence.md#a20) |
|
||||
| <a id="a21"></a>A21 | Погода | Затопление и заморозки влияют на посевы | Сопоставить защищённую гряду, затопленную и морозостойкую посадки. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A21](ace-evidence.md#a21) |
|
||||
| <a id="a22"></a>A22 | Животные | Сезонное появление и ловля дичи | Повторить сезонное наблюдение по заданным сидам. Проверить добычу и заменяемый ингредиент в рецепте. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A22](ace-evidence.md#a22) |
|
||||
| <a id="a23"></a>A23 | События | Мирный путь сезонной кампании | На мирной сложности выбрать путь без боёв, сохранить перед наградой и проверить исход при первом и повторном прохождении. | [S13](systems/S13.md) · [M07](milestones/M07.md) | [Сверка A23](ace-evidence.md#a23) |
|
||||
| <a id="a24"></a>A24 | События | Сезонное окно и продолжение события | Довести город до второго уровня и запустить зимнюю историю в её календарном окне. Загрузить уже начатую историю после закрытия окна и проверить продолжение. | [S13](systems/S13.md) · [M07](milestones/M07.md) | [Сверка A24](ace-evidence.md#a24) |
|
||||
| <a id="a25"></a>A25 | Логистика | Смена пастбища переселяет животных | Удалить одно пастбище при разной свободной вместимости другого. Посчитать переведённых и оставшихся животных. | [S10](systems/S10.md) · [M05](milestones/M05.md) | [Сверка A25](ace-evidence.md#a25) |
|
||||
| <a id="a26"></a>A26 | Потребности | Раненый выбирает между лечением и едой | Довести жителя, который восстанавливается после ранения, до критического голода. Проверить выбранное действие и лечение после еды. | [S05](systems/S05.md) · [M07](milestones/M07.md) | [Сверка A26](ace-evidence.md#a26) |
|
||||
|
||||
## Как довести инвентарь до полного покрытия
|
||||
|
||||
На M00 сверить описания выпущенных версий последовательно, от ранних записей до последнего исправления целевого выпуска. За каждой записью указать редакцию правил и источник действующего к отсечке поведения. Если новая версия меняет старое правило, оставить связь обеих строк и указать, при какой конфигурации проверять каждое. Раннее объявление или сообщение о планах автора требует подтверждения поставки. Исправленную ошибку учесть как регрессионный сценарий, когда она раскрывает самостоятельное правило.
|
||||
|
||||
| Открытый участок инвентаризации | Владелец и критерий закрытия |
|
||||
|---|---|
|
||||
| Профессии, повышение уровня, доступ к станкам и уникальные цепочки культур | S07 и S11 на M04–M06. Выписать отдельные условия открытия, отличающиеся входы и результаты. Косметические варианты одного результата можно связать с одной строкой. |
|
||||
| Пища, лечение, настроение, отношения и животные | S05, S10 и S12. Для каждого отличающегося выбора жителя указать триггер, последствия отказа и взаимодействие с другими потребностями. |
|
||||
| Все сюжетные пути, финалы, сезонные события и режимы сложности | S13 на M07. У каждой отличающейся ветви свои условия входа, исход, признак повторяемости и проверка возобновления. В частности, проверить опубликованные ветви сотрудничества и нападений. |
|
||||
| Выпуски ACE до торгового обновления, промежуточные исправления и замены механик в серии 0.9.6 | M00 и владельцы всех затронутых систем. Пройти публичные журналы выпусков, отмечая проверенный диапазон, последний просмотренный выпуск, введение/изменение поведения и вопросы без свидетельства. |
|
||||
| Общеигровые инструменты, обратная связь UI, шаблоны, связи между поселениями и моды | S08, S16, S18 и S19. Проверить отдельно видимость/управление у хозяина и гостя, комбинации правил и восстановление после ошибки. |
|
||||
| Несколько примеров при неизвестной полноте | M10 сверяет каждую группу до уровня различимого поведения. M11 принимает только строки с результатом на Windows и отдельно проверяет завершение обхода источников. Пустая группа или недоказанное поведение остаются открытыми. |
|
||||
|
||||
Собственный фронтир, связанные регионы, управление общим поселением и целевая нагрузка 500 жителей определены решениями этого проекта. Их принимают [M08](milestones/M08.md), [M09](milestones/M09.md) и [S21](systems/S21.md). Для заимствования кода или материалов реестр не используется. Происхождение собственной реализации и каждого поставляемого материала ведут по [M00](milestones/M00.md) и [S20](systems/S20.md).
|
||||
|
||||
[Мастер-план](../../PLAN.md)
|
||||
@@ -0,0 +1,35 @@
|
||||
# От сохранения прототипа до «Дома на склоне»
|
||||
|
||||
## Как открыть старую колонию
|
||||
|
||||
Последняя исходная сборка прототипа — `083b84e11ad113259400a0eeb6a4047cf2df8110`. У начала работ над M00 (`0deacb3`) те же игровые исходники, CMake и тесты. Для старого файла `.settlement` запустить `settlement_viewer.exe` этой сборки и в главном меню выбрать «Открыть файл…». Для игры вдвоём оба участника используют LAN 11. Архив P0–P5 и исходный коммит позволяют воспроизвести исполняемые файлы. У будущего воксельного мира своё поколение формата и протокола. [Инструкция для Windows](../../README.md) · [Меню и файлы](../viewer.md) · [История P0–P5](history/prototype-p0-p5.md)
|
||||
|
||||
| Что проверено 2 декабря 2026 года | Как повторить и сопоставить результат |
|
||||
|---|---|
|
||||
| Windows x64 Release, CMake 4.5.0, GCC 16.2.0 UCRT, закреплённая VoidLibrary `7b0fea6095f603f9e1904f66dfdc7752f4be4792`. В кросс-сборке под Wine 11 прошли 28 тестов ядра и 4 LAN, включая обмен с гостем через loopback. | В настроенной сборке выполнить `cmake --build <build-dir> --parallel` и `ctest --test-dir <build-dir> -V --output-on-failure`. Сверить число **отдельных тестов** в выводе обеих CTest-сюит. Нативный прогон Windows на двух ПК остаётся отдельной проверкой. [Команды и среда](../agent-workflow/STATE.md) |
|
||||
| Запись использует версию 13. Чтение поддерживает 1–13. Версия сетевого протокола — 11. | В исходном коммите сверить `save_version` и диапазон `read_save`, а также `protocol_version`. Сохранение старой колонии открывается старым клиентом независимо от разработки нового ядра. [Кодек](../../engine/src/world_save.cpp) · [Сообщения LAN](../../app/lan_wire.hpp) |
|
||||
| Локальный архив прототипа `build/settlement-windows-x64.zip` содержит viewer, симулятор, benchmark, обе тестовые программы и три DLL. SHA-256 проверенного архива — `36bd1ca012247a1b9c563dabf866d077b3125a47b079c2d0cf2cef0cffa46f16`. | Хеш опознаёт конкретный архив. Исходная ревизия доступна в Git. Для повторной сборки в отдельном каталоге извлечь этот коммит и выполнить его `build.ps1`. При подготовке публичного демо проверить права на ресурсы внутри самого viewer. [Материалы демо](../art/demo-inventory.md) |
|
||||
|
||||
### Какие нагрузки сравнимы
|
||||
|
||||
В экономической сцене Windows Release на Ryzen 9 9950X3D мир 80×80 с seed 2026 обслуживает фермеров, лесорубов, шахтёров и строителей. После 32 тактов прогрева измеряли 240 тактов ядра, медиана трёх прогонов. При 500 жителях p95 составил 268,7 мкс на шести потоках и 279,7 мкс на двенадцати. Отрисовка, сохранение и сеть в этот интервал не входят. [Состав экономики и исходные измерения](../../benchmarks/colony-performance.md)
|
||||
|
||||
В синтетической сцене seed 42, поле 512×512, 8% закрытых клеток, 10 000 общих работ и 2 500 жителей. 250 тактов включают первоначальное назначение и поиск пути. На восьми потоках завершено 2 520 работ, p95 — 5,49 мс. В сравнении на двенадцати потоках p95 — 4,25 мс. Модель процессора в этой записи не указана. [Параметры и команды](../../benchmarks/scale-50-vs-2500.md) · [Сравнение потоков](../../benchmarks/parallel-workers.md)
|
||||
|
||||
Для нового мира `Q-TOWN500` задаёт 500 жителей в одном регионе, `Q-REGIONS500` распределяет тех же 500 по четырём, `Q-STRESS2500` проверяет пределы и сохранность. Перед каждым сравнением фиксируются версия игры и правил, исходный мир, команды, камера и контрольная сумма. Приёмка на Windows x64 включает кадры 1080p, полную симуляцию и пики во время сохранения. Состав мира, эталонный ПК, длительности и бюджеты заданы в [протоколе S21](systems/S21.md).
|
||||
|
||||
## Маршрут Q-HOME
|
||||
|
||||
Это контрольная постановка для M02–M03. Seed — `20261202`, один регион, трое жителей, девять порций еды, пустой склад материалов и ноль готовых строительных деталей. Версия генератора и определения правил будут приложены к первому воспроизводимому миру. Для маршрута используются целые координаты `(x,y,z)`, высота — `z`. Контрольные точки фиксируют требования к площадке, включая стык чанков 32³. [Координаты мира](systems/S02.md) · [Сценарий M03](milestones/M03.md)
|
||||
|
||||
1. Начать лагерь на ровной полосе около `(23,16,8)`. Разметить склад у `(25,16,8)`, рабочее место у `(26,13,8)` и выемку в склоне под дом. Пометить дерево к западу от лагеря и добываемый камень в выемке. Участки обязаны обеспечивать смету дома и мебели. Число добытых и израсходованных единиц снять из утверждённых игровых рецептов при создании фикстуры.
|
||||
2. Разместить дом с основанием 6×5 по `x=29..34, y=15..19`, входом с западной стороны, нижним настилом на `z=8` и верхней площадкой на `z=12`. В чертеже есть опоры, дверь, внутренняя лестница с проёмом, верхний настил и три кровати, одна из них наверху. Убрать доступ к верхней площадке, дождаться объяснения причины в интерфейсе, восстановить лестницу и продолжить тот же заказ.
|
||||
3. Для последней секции верхнего настила нужна одна специально учтённая пилёная деталь. Получить её из добытого дерева в мастерской и положить на склад. Сделать отдельные сохранения после выдачи детали со склада, на подходе к месту установки наверху и во время самой установки. Для каждого записать такт, ID заказа и строителя, текущего владельца детали, остаток в хранилищах и прогресс секции.
|
||||
4. Открыть каждое сохранение отдельно и повторить оставшиеся команды непрерывной партии. Деталь находится ровно у одного владельца до использования, секция получает её один раз. В отдельном прогоне отменить доставку после получения груза, вновь назначить работу и проверить тот же баланс. Для повреждённой копии сохранения проверить сообщение и возможность продолжить открытую партию.
|
||||
5. Завершить дом, приготовить или собрать еду, назначить кровати, дождаться еды и сна всех троих. Верхняя кровать достижима через дверь и лестницу при снятии крыши камерой и после загрузки. У каждого контрольного исхода хранить исходный файл, последовательность команд, такт и наблюдаемый результат. Выполнение этого маршрута относится к приёмке демо.
|
||||
|
||||
## Что получает M01
|
||||
|
||||
Авторитетный мир принимает команду и владеет единственными экземплярами груза, заказа и резерва. Клиент читает завершённый такт. Для нового поколения сохраняются постоянные ID, состояние случайности, резервы, запланированные события, версии и контрольные суммы правил. Успешная загрузка меняет инкарнацию сеанса. При ошибке открытый мир продолжает работу. Реализация этих гарантий проверяется поэтапно. [Такт](systems/S01.md) · [Сохранение](systems/S15.md) · [Права и сеанс](systems/S16.md) · [Правила](systems/S19.md)
|
||||
|
||||
Первый исполняемый тест M01 использует доступное каноническое представление прототипа — байты сохранения 13 после каждого такта, включая маршрут, логические счётчики и команды игроков. Из одного начального состояния журнал проходит в последовательном эталоне и на 2, 6 и 12 рабочих потоках. Непрерывная партия задаёт ожидаемое продолжение после загрузки. Порядок применения предложений и судьбу последнего доступного предмета проверяют игровыми утверждениями. Перед изменением исполнителя действует [проверка API VoidLibrary](void-library.md).
|
||||
@@ -0,0 +1,88 @@
|
||||
# S01. Время, выполнение задач и многопоточная симуляция
|
||||
|
||||
Система обеспечивает 20 логических тактов в секунду и одинаковую историю мира при разном числе рабочих потоков. Целевой мир содержит 500 полноценно моделируемых жителей во всех населённых регионах. Камера, интерфейс, сетевой обмен и запись сохранения продолжают обслуживаться во время расчёта. Этот документ развивает [мастер-план](../../../PLAN.md) и задаёт основу для всех игровых систем.
|
||||
|
||||
## Исходное состояние
|
||||
|
||||
На коммите `083b84e` метод `World::step()` выполняет последовательность стадий с ожиданием результатов пула. Общий выбор заданий и продвижение групп жителей уже используют рабочие потоки. Пул содержит общую очередь, мьютекс и `std::future` на каждую отправку. Тест параллельного поиска подтверждает завершение 24 заданий при шести потоках. Он даёт исходную регрессию для новой схемы. [Реализация мира](../../../engine/src/world.cpp) · [Пул](../../../engine/include/settlement/core/worker_pool.hpp) · [Тесты](../../../tests/core_tests.cpp)
|
||||
|
||||
Исторический замер колонии показывает, что шесть потоков быстрее двенадцати на всех опубликованных размерах. При разбиении работ нужно учитывать стоимость постановки задачи и ожидания. [Замеры экономики](../../../benchmarks/colony-performance.md)
|
||||
|
||||
## Владение состоянием и новые контракты
|
||||
|
||||
Следующие контракты вводятся в M01. Их названия описывают новые понятия, которым предстоит получить типы и тесты.
|
||||
|
||||
| Контракт | Владелец и правила |
|
||||
| --- | --- |
|
||||
| Мир и такт | Координатор симуляции владеет номером такта, паузой, журналом принятых команд и публикацией состояния. Скорость игры задаёт частоту исполнения одинаковых логических шагов. |
|
||||
| Идентификаторы | Мир выдаёт постоянные идентификаторы сущностей, стеков, работ, резервов и передач. Счётчики входят в сохранение. Удалённый идентификатор повторно не используется. |
|
||||
| Задача стадии | Получает номер мира, поколение сессии, логический такт, ревизии входа, диапазон ответственности и снимок данных. Возвращает подготовленные изменения. |
|
||||
| Общий ресурс | [S04](S04.md) владеет резервами, [S06](S06.md) — размещением предметов, [S02](S02.md) — геометрией. Остальные системы обращаются через их операции и результаты. |
|
||||
| Снимок для потребителей | Неизменяемое опубликованное состояние с номером такта. Рендер, UI, сеть и сохранение удерживают свою ссылку до завершения чтения. |
|
||||
|
||||
Система распределяет непересекающиеся группы сущностей между задачами. Изменения готовятся в буферах стадии. Координатор проверяет результат и публикует завершённый такт. Это позволяет сохранить предыдущую согласованную границу при ошибке исполнителя. Общие претензии к предметам, рабочим местам и клеткам разрешаются по правилам соответствующей системы в устойчивом порядке идентификаторов.
|
||||
|
||||
## Последовательность одного такта
|
||||
|
||||
1. Принять команды, которым хост назначил текущий такт, в записанном каноническом порядке. Проверить права и актуальность мира через [S16](S16.md).
|
||||
2. Применить предусмотренные на этот такт активации чанков и события. Готовность физического чтения проверяется на барьере. Если обязательные данные задержались, логическое время ждёт, а интерфейс показывает ожидание.
|
||||
3. Подготовить снимки изменившейся геометрии, запасов и потребностей. Выполнить локальные расчёты групп сущностей и получить предложения работ.
|
||||
4. Разрешить конкурирующие резервы, запустить запросы маршрутов и принять их результаты на назначенной логической стадии. Перед применением проверить ревизии и существование целей.
|
||||
5. Рассчитать движение, работу, потребление и локальные изменения среды. Проверить межсистемные операции и завершить их в стабильном порядке.
|
||||
6. Проверить инварианты, увеличить номер такта, опубликовать снимок и передать его сохранению, сети и диагностике.
|
||||
|
||||
Зависимость между стадиями выражается явно. Новая система объявляет чтение, запись и порядок относительно существующих стадий. При независимых наборах данных стадии могут выполняться совместно. Размер пакета работ определяется измерениями одинаковой нагрузки. Изменение размера пакета сохраняет игровую историю.
|
||||
|
||||
## Детерминизм и восстановление
|
||||
|
||||
Случайные решения используют версионированный генератор с сохранённым состоянием и отдельными потоками значений для логических владельцев. Порядок исполнения CPU-задач не распределяет случайные значения между жителями. Обход общих коллекций, разрешение равной оценки и присвоение новых идентификаторов имеют устойчивый порядок. Игровое время выражено тактами. Часы ОС используются для темпа и измерений.
|
||||
|
||||
Хеш такта включает все поля, влияющие на будущее мира, в том числе отложенные события, текущие резервы, передачи, состояние правил и генераторов. Для исключённого кэша требуется проверка, что его удаление и повторное построение сохраняют следующий результат. Сетевой транспорт и камера имеют отдельное состояние.
|
||||
|
||||
Результат старого поколения сессии отклоняется. Исключение рабочего задания останавливает продвижение на согласованной границе и сохраняет диагностический контекст. Неудачный такт можно воспроизвести по журналу. При выходе прекращается приём новых команд, завершаются либо отменяются подготовительные задачи, затем освобождаются снимки и исполнители. Запись сохранения работает по контракту [S15](S15.md).
|
||||
|
||||
## Пакеты реализации и этапы
|
||||
|
||||
| Пакет | Работа | Завершение |
|
||||
| --- | --- | --- |
|
||||
| S01-A · [M01](../milestones/M01.md) | Выделить логические часы, владельца мира, постоянные ID и однопоточное эталонное выполнение. | Один журнал команд воспроизводится до каждого такта. |
|
||||
| S01-B · M01 | Отделить клиентский цикл, сетевой ввод и публикацию снимков. | Долгий расчёт сохраняет отзывчивость камеры и UI. |
|
||||
| S01-C · M01–[M03](../milestones/M03.md) | Перенести независимые расчёты в стадии, формализовать выдачу результатов и отмену. | Сценарий дома совпадает при 2, 6 и 12 потоках и после загрузки. |
|
||||
| S01-D · [M05](../milestones/M05.md)–[M09](../milestones/M09.md) | Подключить среду, регионы и авторитетную сеть к общей последовательности. | Задержка I/O и переподключение сохраняют последовательность состояний. |
|
||||
| S01-E · [M11](../milestones/M11.md) | Настроить пакетирование по измерениям и проверить длительную нагрузку. | Достигнуты бюджеты [S21](S21.md), очереди не растут без границы. |
|
||||
|
||||
## VoidLibrary и распределение реализации
|
||||
|
||||
Перед изменением исполнителя проверить закреплённую VoidLibrary по [общему правилу](../void-library.md). Подходящие средства очередей, потоков, времени, результатов и диагностики использовать через их подтверждённые публичные API. Игровой порядок тактов и резервов задаётся этим планом. Если требуемой возможности нет, найти либо создать issue в `Void/Library`, связать его с пакетом и локальной реализацией. Отсутствие удобного имени класса само по себе не доказывает пробел библиотеки.
|
||||
|
||||
Первый пакет имеет одного владельца контрактов времени, ID и публикации. После закрепления интерфейсов отдельные исполнители берут адаптацию навигации, экономики и клиента с раздельными файлами. Интеграционный тест проверяет целый такт.
|
||||
|
||||
## Неизменяемый снимок M01
|
||||
|
||||
`World::capture() const` возвращает `std::shared_ptr<const World>`. Владелец вызывает его после завершения всех заданий стадии. Логические поля мира и доступные читателю счётчики находятся в едином копируемом `detail::WorldState`. Снимок владеет отдельными контейнерами жителей, запасов, маршрутов, работ и резервов. Конфигурация числа исполнителей остаётся доступной читателю. Пул, обратные вызовы исполнителя и восстанавливаемый кэш маршрутов принадлежат рабочему миру. Ошибка выделения памяти передаётся владельцу. [Интерфейс и данные](../../../engine/include/settlement/core/world.hpp) · [Копирование](../../../engine/src/world.cpp)
|
||||
|
||||
Четыре проверки `settlement_core_tests.exe --tag snapshot` прошли в Windows x64 Release под Wine. Они проверяют копии в эталоне и на 2/6 потоках, удержание данных при дальнейшем развитии и уничтожении исходного мира, паузу с материалом в руках, вложенные маршруты и резервы, чтение из второго потока и освобождение обратных вызовов вместе с рабочим миром. Полный прогон дал 46 случаев ядра и 4 LAN, включая формат сохранения 13 и протокол 11. [Проверки снимков](../../../tests/snapshot_tests.cpp)
|
||||
|
||||
Для сцены из существующего `benchmarks/colony.cpp` на карте 80 × 80 с шестью потоками выполнены три прогона для 50 и 500 жителей. После 32 тактов прогрева снимок создавался после каждого из 240 тактов. Измерение охватывает выделение и копирование в `capture()`. Чтение снимка и освобождение ссылки выполнялись за пределами интервала. Медианы трёх p50/p95 составили 2/4 мкс для 50 жителей и 23/68 мкс для 500. Отдельные p95 составили 4, 7 и 4 мкс, затем 68, 81 и 67 мкс. Это измерение кросс-сборки GCC 16.2.0 под Wine 11.
|
||||
|
||||
Общая библиотечная публикация неизменяемого состояния отслеживается в Void/Library. Переход на неё требует проверок удержания старой версии, независимости от изменяемого источника, согласованной версии и освобождения читателей при остановке. Игровое копирование выполняет `World::capture()`. [Void/Library #5](https://git.faumaray.com/Void/Library/issues/5)
|
||||
|
||||
## Приёмка
|
||||
|
||||
В срезе S01-04 `SimulationRuntime` владеет изменяемым миром в отдельном потоке Void. Шаг соответствует 50 мс монотонных часов. Очередь допускает по умолчанию 256 операций вместе с исполняемой, а перегрузка возвращает `Busy`. После каждой операции владелец может выполнить один просроченный такт, сохраняя обслуживание команд. Пауза мира и остановка тактов из-за меню имеют отдельные состояния. При продолжении отсчёт начинается заново. [Интерфейс владельца](../../../engine/include/settlement/core/simulation_runtime.hpp)
|
||||
|
||||
Публикация содержит UUID мира и инкарнации, ревизию, неизменяемые мир и правила, следующие номера запросов двух клиентов. `latest()` возвращает последний завершённый снимок, а `snapshot_for_save()` дополнительно проверяет рабочее состояние владельца. Читатель может удерживать предыдущие поколения, поэтому потребление памяти зависит от числа таких ссылок. Новая команда подготавливает копию журнала квитанций. Потактное продвижение и точные повторы используют уже опубликованный журнал.
|
||||
|
||||
Исключение при такте, команде или подготовке публикации переводит владельца в `Faulted`. Предыдущий снимок и завершённые квитанции доступны для чтения, новые изменения получают ошибку. Восстановление требует подходящего кандидата загрузки. `begin_load()` фиксирует текущую инкарнацию и номер запроса, который проверяется повторно непосредственно при переключении мира. Более новый запрос отменяет публикацию старого кандидата. Каждая успешная загрузка создаёт новую инкарнацию, в том числе при откате того же мира.
|
||||
|
||||
Регрессии `--tag runtime` проверяют 20 тактов в секунду с управляемыми часами и эталон на 1/2/6/12 исполнителях, команды на паузе, чтение во время заблокированной задачи, отказы и восстановление, порядок загрузок, переполнение очереди и завершение принятых операций при выходе. Подключение окна к этому интерфейсу выполняется отдельным срезом. [Проверки владельца](../../../tests/runtime_tests.cpp)
|
||||
|
||||
На ветке `system/s01-simulation` три параллельные стадии мира используют закреплённые `Void::Async::ThreadExecutor` и `FuturePool`. При заполнении лимита координатор выполняет задание сам. Стадия дожидается ранее принятых заданий и при исключении. Последовательный эталон вызывает те же игровые операции. На журнале из 750 тактов канонические сохранения после каждого такта совпали у эталона и вариантов с 2, 6 и 12 потоками, в том числе при лимите одного задания и после загрузки в процессе переноски. [Исполнитель](../../../engine/include/settlement/core/worker_pool.hpp) · [Проверки отказов](../../../tests/executor_tests.cpp) · [Воспроизведение](../../../tests/replay_tests.cpp)
|
||||
|
||||
В Windows x64-сборках под Wine при шести потоках медиана измерений p95 такта при переходе на Void изменилась с 86 до 96 мкс для 50 жителей и с 407 до 333 мкс для 500. Нативные замеры Windows, неизменяемая публикация завершённого такта и восстановление после ошибки остаются отдельными проверками.
|
||||
|
||||
- Сравнить хеш каждого такта на последовательном эталоне и 2/6/12 потоках, включая одинаковые команды и сохранение внутри стройки.
|
||||
- Задержать выбранные задачи, завершить их в обратном порядке, отменить мир во время расчёта. Новое поколение принимает только свои результаты.
|
||||
- Инъецировать ошибку в середину стадии. Опубликованное состояние остаётся последним завершённым тактом, предметы и резервы согласованы.
|
||||
- Выполнить три нативных Windows-прогона контрольных городов из [M11](../milestones/M11.md). Измерить полезную работу, время стадий, очереди, память и накопленное отставание.
|
||||
- Привязать покрываемые игровые проверки к [реестру паритета](../parity.md). Цель 2 500 жителей проверяет устойчивость и инварианты отдельно от рабочего бюджета 500.
|
||||
@@ -0,0 +1,96 @@
|
||||
# S02. Воксельный мир и процедурная генерация
|
||||
|
||||
Связанные проверки реестра — [B01](../parity.md#b01), [B10](../parity.md#b10), [A04](../parity.md#a04).
|
||||
|
||||
Система хранит изменяемое пространство, в котором жители роют тоннели, строят этажи и переходят между регионами. Один формат мира поддерживает конечную карту, растущий фронтир и связанные регионы. Первая реализация обслуживает ограниченную карту для демо дома. Общее направление задано [мастер-планом](../../../PLAN.md).
|
||||
|
||||
## Исходное состояние
|
||||
|
||||
На `083b84e` `GridPosition` содержит `x` и `y`, а проходимость хранится плоским массивом `blocked_`. Стартовый сценарий создаёт карту 32×32 с тремя жителями и фиксированно размещёнными запасами. Существующий seed полезен как регрессия повторяемого старта. Новая геометрия требует отдельного поколения сохранений. [Типы мира](../../../engine/include/settlement/core/world.hpp) · [Начальная колония](../../../engine/src/first_colony.cpp)
|
||||
|
||||
## Данные и ответственность
|
||||
|
||||
### Исполняемая основа ограниченного региона
|
||||
|
||||
`VoxelRegion` хранит ненулевой ID, seed, версию генератора и границы. Ячейки имеют знаковые координаты `int32`, а концы полуинтервалов используют `int64`, включая верхнюю границу `INT32_MAX + 1`. Деление на размер чанка округляет вниз, поэтому координата −1 попадает в чанк −1 и локальную ячейку 31. Индекс внутри страницы вычисляется как `x + 32 * (y + 32 * z)`. Результат `sample()` различает загруженный воздух, недоступную страницу и выход за границы. [Публичный контракт](../../../engine/include/settlement/core/voxel_region.hpp) · [Реализация](../../../engine/src/voxel_region.cpp)
|
||||
|
||||
Копия региона разделяет каталог и страницы через неизменяемые объекты. `directory()` возвращает владеющую ссылку на прежний каталог. Изменение создаёт новый каталог и копирует затронутые страницы. Срок жизни снимка охватывает все его материалы. Номер региона и `ChunkStamp` связывают чтение с состоянием доступности и ревизией страницы. Владелец мира дополнительно проверяет инкарнацию сеанса при загрузке партии.
|
||||
|
||||
`prepare_generated()` независимо готовит страницу генератора 1. Он кодирует seed, версию и координаты опорных столбцов в little-endian через `Void::Binary::Writer`, затем использует FNV-1a из `Void::Hash`. Интерполяция сетки с шагом 16 даёт высоты от −8 до 8. Верхние три слоя состоят из почвы, нижние — из камня. Соседние столбцы по горизонтальной оси отличаются по высоте максимум на одну ячейку. Область вне частичного чанка заполнена воздухом. Для seed 42 чанк (−1, −1, −1) имеет FNV-1a `13302332479434111011`; этот результат отдельно воспроизведён по закодированным полям. Подготовка не меняет каталог региона.
|
||||
|
||||
`prepare_restored()` проверяет полный размер страницы, ненулевую ревизию, материалы и воздух за границами, затем копирует данные вызывающего кода. `activate()` принимает весь набор подготовленных страниц одной операцией. Она проверяет точный дескриптор региона, дубликаты, бюджет и отсутствие уже опубликованной страницы. `edit()` проверяет ожидаемую ревизию каждой ячейки, даже если материал уже совпадает. Повтор координаты отклоняет весь запрос. Пустая и тождественная запись сохраняют ревизии. Исчерпанная ревизия запрещает изменение страницы. Все новые страницы, каталог и результат готовятся до публикации. При отказе прежние указатели, материалы и ревизии сохраняются.
|
||||
|
||||
Список изменённых чанков упорядочен по координатам `x,y,z`; список ячеек — по мировым координатам. Правка на грани добавляет пересекающего регион соседа в `dirty_chunks`. Это касается и недоступных соседей. Диагонали не включаются. Неизменившийся сосед сохраняет свою ревизию материала. Активация страницы оповещает все её соседние грани. Выгрузка страниц появится с отдельным контрактом сохранения их ревизий.
|
||||
|
||||
| Материал | Значение | Проход | Опора |
|
||||
| --- | --- | --- | --- |
|
||||
| Воздух | 0 | Свободен | Нет |
|
||||
| Почва | 1 | Занят | Есть |
|
||||
| Камень | 2 | Занят | Есть |
|
||||
| Закрытая дверь | 3 | Занят | Нет |
|
||||
| Открытая дверь | 4 | Свободен | Нет |
|
||||
|
||||
Навигация и изображение используют общие `voxel_blocks_passage()` и `voxel_provides_support()`. Генератор создаёт природные материалы. Игровая команда определяет право изменить дверь и обновляет обе её ячейки одной операцией, в том числе через границу страниц.
|
||||
|
||||
По умолчанию разрешены 256 страниц и 4096 ячеек в запросе. Лимиты полезных данных резидентного региона и одной транзакции равны 16 МиБ каждый. Проверяемая арифметика учитывает объекты страниц, каталог, сортируемый запрос, временную страницу и массивы результата до их выделения. На проверенной Windows x64-сборке страница занимает 32 776 байтов, запись каталога — 32 байта, каталог с 256 страницами — 8 398 872 байта. Служебные данные распределителя, подготовленные страницы и старые снимки, удерживаемые потребителями, имеют отдельный расход памяти. Будущий владелец ограничивает число таких потребителей.
|
||||
|
||||
Проверки `--tag voxel-region` покрывают отрицательные и предельные координаты, частичные страницы, порядок завершения настоящих задач на 2/6/12 исполнителях, границы двери, загрузку, точный отказ целого набора и неизменяемые снимки. На заполненном каталоге правка одной ячейки сохранила прежние 255 страниц. Отдельная программа по очереди вызвала отказ каждого выделения памяти при генерации, восстановлении, активации и правке двух страниц; все отказы сохранили прежний каталог. Переход на библиотечную реализацию должен повторить эти проверки. [Тесты региона](../../../tests/voxel_region_tests.cpp) · [Знаковая арифметика в VoidLibrary](https://git.faumaray.com/Void/Library/issues/11) · [Атомарные страницы в VoidLibrary](https://git.faumaray.com/Void/Library/issues/14)
|
||||
|
||||
Windows x64 Release с GCC 16.2 под Wine 11 прошла 14 проверок региона и весь CTest — 155 тестов ядра, 9 LAN, 14 клиента и испытание кадра с видимым D3D11 и WARP. В одном прогоне подготовка и активация 256 страниц заняли 57 917 мкс, правка одной ячейки — 11 мкс. Это измерение относится к данному прогону под Wine. Нативная Windows и аппаратная частота кадров ещё не проверены.
|
||||
|
||||
| Новый контракт | Содержимое и владелец |
|
||||
| --- | --- |
|
||||
| Позиция мира | Постоянный ID региона и знаковые целочисленные координаты вокселя. Вертикальная ось — `z`, горизонтальная плоскость — `x,y`. |
|
||||
| Регион | Seed, версия генератора, выбранные правила, границы конечного режима и каталог чанков. Координатор мира владеет жизненным циклом. |
|
||||
| Чанк | Координата, ревизия геометрии и ячейки материалов. Первоначальный размер 32³ согласован с контрольными нагрузками. |
|
||||
| Изменение геометрии | Команда содержит область, ожидаемую ревизию и операцию. Результат включает изменённые чанки и новые ревизии. |
|
||||
| Логическая активация | Требуемый чанк, такт активации, причины удержания и состояние чтения/генерации. [S14](S14.md) ведёт межрегиональный интерес. |
|
||||
|
||||
Сущности, предметы и здания ссылаются на постоянные ID и позиции. Перестройка хранения чанка сохраняет эти ссылки. Геометрия сообщает материал, занятость, опору и физические границы. [S03](S03.md) выводит из неё доступность движения, [S08](S08.md) — возможность очередного строительного действия. [S17](S17.md) получает снимок для геометрии кадра.
|
||||
|
||||
Материал определяется стабильным идентификатором из набора содержимого. Правила прочности, добычи и воздействия воды входят в выбранный набор правил. Численные параметры хранятся в его версии. При недостающем определении загрузка объясняет, какой пакет требуется.
|
||||
|
||||
## Генерация и редактирование
|
||||
|
||||
Генерация состоит из устойчивых стадий рельефа, слоёв материалов, пещер, воды и размещения природных объектов. Каждая стадия получает seed региона и координату. Значения на общих границах вычисляются по мировой координате, поэтому соседние чанки можно строить в любом порядке. Объект, пересекающий несколько чанков, получает одного владельца и постоянный ID из канонической операции размещения.
|
||||
|
||||
Изменения игрока сохраняются вместе с версией исходной генерации. После обновления игры ранее исследованная область восстанавливает прежнее содержимое. Версия генератора входит в манифест сохранения. Повторное построение исходных данных допускается при совпадающем генераторе и наборе содержимого.
|
||||
|
||||
Игровое редактирование проходит через команды [S01](S01.md). Сначала проверяются права, границы, пересечение с занятыми объектами и требования операции. Затем назначаются рабочие действия добычи или строительства. Завершение работы меняет геометрию, увеличивает ревизию и публикует область изменения. Предпросмотр остаётся отдельным состоянием интерфейса.
|
||||
|
||||
При разрушении опоры система публикует изменённую доступность и даёт связанным системам обработать жителя, предмет или конструкцию. Порядок этих последствий закрепляется сценарием и правилами мира. Изменение сразу нескольких чанков фиксируется одной логической операцией, чтобы соседние системы видели согласованную границу.
|
||||
|
||||
## Загрузка, параллелизм и сбои
|
||||
|
||||
Генерация и чтение независимых чанков выполняются рабочими заданиями по неизменяемому запросу. Завершение физического I/O готовит данные. Симуляция активирует их на заранее назначенном такте. При задержке обязательного чанка координатор ждёт на барьере. Рендер может независимо держать видимые чанки и удалять свою геометрию из памяти.
|
||||
|
||||
Населённые области и области с активными путями, резервами, водой или передачами удерживаются причинами симуляции. Ошибка чтения обязательного чанка останавливает продвижение с указанием области и файла. Повторное чтение выполняется для того же поколения. Устаревший результат генерации отбрасывается после загрузки другого состояния мира.
|
||||
|
||||
Для отрицательных координат используется математическое деление с округлением вниз. Локальная координата всегда попадает в диапазон чанка. Размеры областей и операции сложения проверяются до выделения памяти. Ошибка команды возвращает результат игроку до изменения геометрии.
|
||||
|
||||
## Порядок реализации
|
||||
|
||||
1. В [M01](../milestones/M01.md) закрепить позицию, постоянные ID, версию генератора и контракт изменения геометрии вместе с сохранением.
|
||||
2. В [M02](../milestones/M02.md) построить ограниченный регион, операции чтения материала и изменения клетки, затем лестницу, тоннель и навес. Подключить выбор мышью и срез по высоте.
|
||||
3. В [M03](../milestones/M03.md) связать добычу и строительство дома с реальными изменениями вокселей. Строитель видит последствия законченного пола и стены на следующей предусмотренной стадии.
|
||||
4. В [M05](../milestones/M05.md) добавить биомы, сезонные определения и интерфейс среды для [S09](S09.md) и [S10](S10.md).
|
||||
5. В [M08](../milestones/M08.md) расширить каталог и логическую активацию на фронтир и связанные регионы. Проверить восстановление исследованной области после выгрузки.
|
||||
|
||||
Публичный контракт позиции и чанка получает одного владельца до параллельной работы над навигацией, генератором и рендером. Историю поведения каждой стадии связать с [реестром паритета](../parity.md).
|
||||
|
||||
## VoidLibrary
|
||||
|
||||
Геометрические примитивы, целочисленная математика, контейнеры, случайные числа и бинарные операции сначала сверяются с закреплённой VoidLibrary. Подтверждённую подходящую реализацию использовать. Для недостающей возможности перед локальной разработкой найти либо открыть issue в `Void/Library`, записать требуемую семантику и ссылку в пакете. Статус API и ограничения вести в [матрице библиотеки](../void-library.md).
|
||||
|
||||
## Приёмочные сценарии
|
||||
|
||||
| Сценарий | Наблюдаемый результат |
|
||||
| --- | --- |
|
||||
| Генерация соседей в обратном порядке | Материалы, вода и объекты на границе совпадают побайтово в каноническом представлении. |
|
||||
| Отрицательные координаты | Ячейки `-1`, `0` и `31/32` получают правильный чанк и локальное положение. |
|
||||
| Тоннель через границу чанка | Добыча открывает проход, маршрут использует его после обновления ревизии. |
|
||||
| Сохранение после частичной выемки | Загруженный мир сохраняет материал каждой изменённой клетки и все незавершённые работы. |
|
||||
| Задержанное чтение и ошибочный файл | История до барьера одинакова, интерфейс сообщает ожидание или ошибку, повтор не дублирует объекты. |
|
||||
| Камера покидает город | Население и активные процессы продолжают двигаться в логическом времени. |
|
||||
|
||||
В [S21](S21.md) учитывать время генерации, число активных чанков, память исходных данных и геометрии кадра раздельно. Размер контрольной сцены фиксирует воспроизводимую нагрузку.
|
||||
@@ -0,0 +1,92 @@
|
||||
# S03. Навигация и доступность взаимодействий
|
||||
|
||||
Связанные проверки реестра — [B05](../parity.md#b05).
|
||||
|
||||
Система отвечает за достижимый путь к рабочему месту, предмету, кровати или соседнему региону. Дверь, лестница, опора и свободное пространство над головой участвуют в одной модели движения. Для демо житель должен подняться на второй этаж построенного дома и безопасно вернуться за материалами. Система включена в [мастер-план](../../../PLAN.md).
|
||||
|
||||
## Исходное состояние
|
||||
|
||||
В прототипе есть A*, фиксированный порядок соседей и кэш запросов. Изменение проходимости инвалидирует маршруты. Тесты проверяют проход через отверстие в стене и открытие ранее недоступной шахты. Карта использует двумерную позицию, а маршрут хранится последовательностью клеток внутри жителя. [Мир](../../../engine/src/world.cpp) · [Типы](../../../engine/include/settlement/core/world.hpp) · [Тесты маршрутов](../../../tests/core_tests.cpp)
|
||||
|
||||
## Первый исполняемый срез M02
|
||||
|
||||
Модуль `voxel_navigation` работает с неизменяемым `VoxelRegion`. `voxel_standing` проверяет опору, клетку ног и клетку головы. `voxel_transition` использует те же проверки для одного горизонтального перехода с подъёмом или спуском на одну клетку. При изменении высоты дополнительно проверяется объём, через который проходит голова. Закрытая дверь препятствует движению, открытая дверь допускает проход. Земля и камень предоставляют опору. [Интерфейс](../../../engine/include/settlement/core/voxel_navigation.hpp) · [Реализация](../../../engine/src/voxel_navigation.cpp)
|
||||
|
||||
`find_voxel_path` получает ID региона, UUID текущей инкарнации, старт, множество целей и явное окно поиска. Путь содержит очередные позиции после старта. Его стоимость равна числу переходов. При равной стоимости выбирается первая цель в порядке координат, соседи каждой позиции перечисляются в том же порядке. Поиск использует `Void::Algorithms::bfs` из закреплённой версии библиотеки. Множество вершин относится к заданному окну, список соседей вычисляется по запросу. До выделения массивов проверяется полный размер окна. Разреженный регион с большой протяжённостью требует меньшего окна для конкретной задачи.
|
||||
|
||||
`find_voxel_interaction_path` строит доступные позиции контакта с указанной клеткой. К ней должна примыкать грань тела жителя. Цель может находиться у ног, у головы, под ногами или непосредственно над головой. Цель должна быть загружена. Право добывать материал, менять дверь и удалять опору проверяет владелец работы. Выбранная позиция взаимодействия и следующий переход доступны для повторной проверки перед действием.
|
||||
|
||||
Позиции контакта за пределами окна поиска сохраняются для проверки отрицательного ответа. Если такой контакт допускает размещение жителя, достигнутый допустимый выход из окна даёт `SearchBoundary`, а достигнутый неопределённый переход требует загрузки данных. При известном отсутствии выхода результат остаётся `Unreachable`. Заблокированные контакты внутри окна не доказывают недоступность всех внешних позиций. Общий предел целей учитывает и пропущенные контакты.
|
||||
|
||||
Каждый ответ содержит `VoxelReadSet` с ID региона, инкарнацией и упорядоченными уникальными ревизиями прочитанных чанков. В набор входят опора, свободное место над головой, заблокированные соседи и недоступные страницы. `current` проверяет тот же сеанс и все эти ревизии. Загрузка недоступной страницы делает прежний отрицательный ответ устаревшим. Правка непрочитанного чанка сохраняет ответ пригодным. Сам ответ и его маршрут удерживают собственные данные. Для замены локального набора библиотечным повторить проверки опоры через границу чанка, открытия прохода, загрузки страницы и смены инкарнации. [Void/Library #13](https://git.faumaray.com/Void/Library/issues/13)
|
||||
|
||||
Найденный путь является кратчайшим среди известных переходов в заданном окне. Отрицательный ответ различает доказанную недоступность, недостающие данные и возможность выхода за границу окна. Отдельные результаты обозначают исчерпание бюджета, отмену, неверный запрос и отказ выделения памяти. До быстрого случая совпавших старта и цели проверяется геометрия тела. Применяющий результат код должен проверять и его статус, и актуальность набора чтений.
|
||||
|
||||
Недостающие данные требуют ожидания, когда они могут продолжить путь из уже достигнутой позиции. Известная сплошная стена или занятая клетка ног окончательно запрещает переход, даже если его проверка прочитала недоступную опору. Прочитанные ревизии сохраняются в ответе. Недоступная цель за доказанно непроходимой стеной сама по себе не создаёт достижимый проход. Выход за окно учитывается после проверки допустимого перехода через его границу.
|
||||
|
||||
Пределы по умолчанию составляют 65 536 вершин, 1 000 000 шагов алгоритма, 4 000 000 чтений клеток, 64 цели, 4096 ревизий и 8 МиБ рабочих данных. Бюджет учитывает четыре массива `size_t` и посещённость из Void BFS, собираемый маршрут и зарезервированный набор ревизий. Список соседей из 12 элементов находится в стеке. Владелец сохраняет входные данные запроса и страницы мира отдельно. Измерение памяти распределителя и принудительный отказ системного распределителя остаются отдельными проверками.
|
||||
|
||||
Ёмкости проверяются также против `vector::max_size()`. Непредставимая ёмкость возвращает `LimitExceeded` через каждую из четырёх публичных операций. Проверка с `max_dependencies = max_size() + 1` и максимальным байтовым бюджетом воспроизводит этот отказ без выделения указанной памяти.
|
||||
|
||||
Селектор `--tag voxel-navigation` проверяет двухклеточную дверь, ступени на границе `x=31/32` и работу наверху, удаление следующей опоры, прежний неизменяемый снимок, место для головы, недоступную опору через отрицательную границу по высоте, постороннюю правку, смену сеанса и предельные координаты. Стоимости сравниваются с независимым полным обходом 16 малых плоских карт. Запросы в настоящем пуле с 2, 6 и 12 потоками дают те же маршруты и ревизии. [Проверки](../../../tests/voxel_navigation_tests.cpp)
|
||||
|
||||
На совместной базе S02 `e7046a9` сборка Windows x64 GCC 16.2 и все десять проверок навигации прошли под Wine 11. Полный `ctest -V` прошёл четыре набора с 165 случаями ядра, 9 LAN, 14 клиента и испытанием кадра с видимой цепочкой D3D11 и WARP. Проверка заняла 4,66 с. Нативная Windows и связь навигации с исполнением работ в `World` проверяются при последующей интеграции M02.
|
||||
|
||||
Проверка замечаний к `7a7ff32` воспроизвела ожидание отсутствующей страницы под сплошным полом и исключение `vector::reserve` при непредставимой ёмкости. После исправления прошли 13 проверок навигации и четыре полных набора с 168 случаями ядра, 9 LAN, 14 клиента и испытанием кадра за 4,61 с. Отдельно проверены недоступная цель за известной стеной, загруженная цель взаимодействия за ней, запрещённый переход за границу окна и настоящий ожидающий загрузки проход. Один предыдущий полный прогон встретил прежнюю проверку немедленного допуска при восстановлении клиента после сбоя, `viewer_session_tests.cpp:363`. Повтор этого набора и итоговый полный прогон прошли. Проверяемый файл клиента в этом срезе не изменялся.
|
||||
|
||||
Проверка замечания к `17389b2` воспроизвела ложную недоступность при единственном пригодном контакте за границей окна. После исправления узкое окно возвращает `SearchBoundary`, расширенное достигает той же позиции контакта. Изолированный старт и незагруженный проход проверены отдельно. Под Wine прошли 14 проверок навигации и полный `ctest -V` с блокировкой общего интерактивного окружения. Все четыре набора прошли, включая 169 случаев ядра, 9 LAN, 14 клиента и испытание кадра за 4,74 с.
|
||||
|
||||
## Пространственная модель
|
||||
|
||||
Позицию и материал предоставляет [S02](S02.md). Профиль движения определяет объём тела, высоту шага и разрешённые переходы. Для M02 нужен профиль обычного поселенца, движение по опоре, ступеням и лестницам. Особые способы движения добавляются вместе с соответствующими животными и боевыми участниками.
|
||||
|
||||
Достижимость объекта задаётся набором позиций взаимодействия. Для кровати это место подхода, для станка — рабочая сторона, для стройки — доступная позиция установки части. Вход в занятую геометрию объекта не требуется. Позиции проверяются повторно перед действием, поскольку поставленная стена может закрыть подход.
|
||||
|
||||
Локальная навигация строится по чанкам. Узлы соединения описывают допустимые переходы между их границами. Дальний поиск сначала определяет цепь областей, затем уточняет путь в каждой. При равной стоимости используются устойчивый порядок соседей и координаты. Игровая стоимость хранится целочисленно.
|
||||
|
||||
## Новые интерфейсы
|
||||
|
||||
| Контракт | Значимые поля и результат |
|
||||
| --- | --- |
|
||||
| Запрос пути | ID запроса и жителя, поколение мира, профиль движения, старт, множество целевых взаимодействий, ревизии областей и логический момент потребления результата. |
|
||||
| Результат пути | Достижимый маршрут либо причина недоступности, выбранная позиция взаимодействия, стоимость и перечень проверенных ревизий. |
|
||||
| Изменение доступности | Изменённые области, новые ревизии и вид изменения. Оно инвалидирует только зависимые результаты и отрицательные ответы. |
|
||||
| Исполнение пути | Текущая позиция, следующий переход, курсор и версия цели. Житель хранит устойчивые данные продолжения, производные поисковые структуры восстанавливаются. |
|
||||
|
||||
[S04](S04.md) заказывает маршруты при выборе работы и резервирует исполнителя. [S06](S06.md) формирует остановки доставки. [S08](S08.md) задаёт рабочие позиции по текущему строительному шагу. [S14](S14.md) оформляет переход между регионами. Поиск пути возвращает информацию, изменение владельца предмета или назначения работы выполняет соответствующая система.
|
||||
|
||||
## Выполнение и изменение мира
|
||||
|
||||
Поиск читает неизменяемый снимок навигации и выполняется в пуле [S01](S01.md). Применение привязано к логическому такту. При несовпадении проверяемой ревизии результат отменяется и запрос повторяется на актуальном снимке. Повтор проходит в том же устойчивом порядке запросов.
|
||||
|
||||
Перед каждым переходом проверяется допустимость следующей позиции. Если дверь закрылась или лестница исчезла, житель прекращает движение перед препятствием и заказывает пересчёт. Переносимый груз сохраняется у него. Работа получает состояние ожидания пути с причиной. Открытие прохода будит зависимую работу через событие изменения области.
|
||||
|
||||
Недоступность хранится вместе с ревизией, чтобы один и тот же житель не выполнял полный поиск на каждом такте. Модуль работы определяет, можно ли выбрать другую цель или отложить поручение. Временная занятость рабочей позиции отделяется от геометрической недоступности. Владение кроватью, станком и точкой установки проверяет диспетчер резервов.
|
||||
|
||||
Ключ кэша включает старт, цели, профиль и ревизии. Размер кэша ограничивается бюджетом памяти, а его очистка сохраняет канонический результат. Метрики кэша служат диагностике и не влияют на игровые выборы. Результаты старой сессии после загрузки мира отбрасываются.
|
||||
|
||||
## Пакеты реализации
|
||||
|
||||
1. В [M02](../milestones/M02.md) определить профиль поселенца и проверки опоры/свободного объёма. Создать сцены двери, тоннеля, ступеней и лестницы.
|
||||
2. Добавить локальный поиск и межчанковые соединения. Сравнить стоимость пути с эталонным поиском на маленьких мирах и закрепить разрешение равенств.
|
||||
3. Ввести позиции взаимодействия, ревизии и инвалидирование. Подключить добычу, переноску и строительство [M03](../milestones/M03.md).
|
||||
4. Расширить профили и правила доступа в [M05](../milestones/M05.md) и [M07](../milestones/M07.md). Каждая способность получает собственную сцену проходимости.
|
||||
5. Подключить логическую активацию требуемых областей и межрегиональные точки перехода в [M08](../milestones/M08.md).
|
||||
6. Измерить реальные запросы 500 жителей в [M11](../milestones/M11.md), включая массовое изменение прохода. Оптимизировать построение областей и повторные запросы по этим данным.
|
||||
|
||||
Общий контракт геометрии согласуется с S02 до работы над поиском. Адаптацию отдельного потребителя можно поручить другому исполнителю после появления проверенной точки запроса.
|
||||
|
||||
## VoidLibrary и проверки
|
||||
|
||||
Перед реализацией проверить алгоритмы графов, очереди приоритетов, математические примитивы и средства выполнения в VoidLibrary. Использовать существующие подходящие API из [матрицы](../void-library.md). Если необходимой возможности нет, найти либо создать issue в `Void/Library` и связать локальную реализацию с ним. Игровые проверки опоры и взаимодействия остаются явной частью контракта.
|
||||
|
||||
| Проверка | Условие прохождения |
|
||||
| --- | --- |
|
||||
| Дом на два этажа | Все кровати и рабочие позиции достигаются через двери и лестницу, маршрут не пересекает стену. |
|
||||
| Последняя лестница удалена | Житель останавливается в допустимой позиции, груз учтён, работа показывает причину ожидания. |
|
||||
| Проход открыт заново | Отрицательный результат устаревает по ревизии, отложенная работа возобновляется. |
|
||||
| Две одинаковые цели | На последовательном эталоне и 2/6/12 потоках выбираются те же цель и путь. |
|
||||
| Путь через ещё не прочитанный чанк | Задержка I/O меняет ожидание реального времени, последовательность тактов после барьера совпадает. |
|
||||
| Кэш очищен и партия загружена | Дальнейшие позиции и потребление ресурсов совпадают с непрерывным прогоном. |
|
||||
|
||||
Отчёт [S21](S21.md) содержит распределение времени запросов, число раскрытых узлов, перестроений областей и причин недоступности. Игровые сценарии связаны с [реестром паритета](../parity.md).
|
||||
@@ -0,0 +1,77 @@
|
||||
# S04. Работы, приоритеты и резервирование
|
||||
|
||||
Связанные проверки реестра — [B24](../parity.md#b24).
|
||||
|
||||
Диспетчер превращает решение игрока и потребности жителей в исполнимые поручения. Он выбирает исполнителя, закрепляет материалы и рабочее место, объясняет ожидание и освобождает обязательства после отмены. От него зависят строительство, ремесло, добыча, питание, лечение и торговля. Направление разработки задано [мастер-планом](../../../PLAN.md).
|
||||
|
||||
## Исходное состояние
|
||||
|
||||
В текущем `World` общие, ресурсные и производственные задания назначаются разными методами. Ресурсные работы имеют индекс кандидатов по профессиям. Производство перебирает заказы и склады, проверяет занятость позиции и резервирует сырьё после выбора жителя. Материалы и остановки хранят `StorageId`, источники — `ResourceNodeId`, назначения производства — `ProductionId`. Тесты проверяют резервирование, доставку и сохранение незавершённых работ. [Назначение работ](../../../engine/src/world.cpp) · [Структуры заказов](../../../engine/include/settlement/core/world.hpp) · [Тесты](../../../tests/core_tests.cpp)
|
||||
|
||||
## Реализованный срез S04-01: идентичность производства
|
||||
|
||||
У `ProductionOrder` появился постоянный `ProductionId`, а житель хранит `production_id` (`0` означает отсутствие назначения). Единственный счётчик `next_production_id_` входит в копируемое состояние мира. Заказы остаются отсортированными по ID, поиск выполняется через `lower_bound`; удаление нижнего заказа не требует исправлять ссылки жителей. Присвоенный ID не меняется в течение жизни заказа.
|
||||
|
||||
Все вставки, включая обстановку и клетки комнаты, проходят общий метод. До первого изменения проверяются ID и вместимость вектора для всей группы: кровать, ткацкий станок, комната с мебелью, дом и замещающие столярные заказы при сносе склада. Снос вычисляет нехватку каждого затронутого изделия по запасам **после** предполагаемого удаления, учитывая другие склады и уже существующие заказы, затем резервирует всю группу. Недостаток ID возвращает `Busy` без потери запасов, изменения заказов или номера команды. Последний выдаваемый ID — `UINT64_MAX - 1`; `UINT64_MAX` остаётся допустимым исчерпанным счётчиком. Прямой `queue_cabin` сообщает такую проверенную до изменений нехватку через `ProductionCapacityError`; диспетчер сохраняет повторяемый результат `Completed/Busy`, а runtime продолжает принимать команды.
|
||||
|
||||
`World::write_save(stream)` сохраняет прежний формат 13 и позиционные ссылки для совместимости, включая LAN 11. Явный `WorldSaveFormat::Current14` записывает настоящие ID производства, складов и источников, а также следующий ID производства. Новые checkpoint используют внешнюю схему 2 и тело 14. Схема 1 принимает тела 1–13; несовместимые пары отклоняются даже при корректных контрольных суммах. Импорт старого тела назначает производству ID по порядку записей; современные сохранения сохраняют историю выдачи после удаления последнего, максимального или всех заказов. Чтение проверяет ненулевые упорядоченные ID, следующий ID и ссылки до разыменования; новые проверки не добавляют квадратичный поиск.
|
||||
|
||||
Используются закреплённые `Void::Numeric::checked_add`, Binary и Crypto из `7b0fea6095f603f9e1904f66dfdc7752f4be4792`. Отдельного библиотечного восстанавливаемого генератора ID пока нет: [Void/Library #7](https://git.faumaray.com/Void/Library/issues/7). Локальную проверку и продвижение счётчика в `World::reserve_production` / `append_production` можно заменить после подтверждения того же поведения на Windows x64, включая групповую проверку и исчерпание.
|
||||
|
||||
Проверки: [production_identity_tests.cpp](../../../tests/production_identity_tests.cpp), [checkpoint_tests.cpp](../../../tests/checkpoint_tests.cpp), [replay_tests.cpp](../../../tests/replay_tests.cpp). Срез проверен Windows x64 GCC 16.2 через Wine: 9 проверок `--tag production-id`, полный verbose CTest — 115 core и 4 LAN. Replay сравнивает тело 14 на каждом такте в serial/2/6/12, включая сохранение в пути и дырку в ID. Существующие двоичные эталоны формата 13 совпали во всех четырёх режимах: 738386 байт (`d50ce3f5cd339e2c87c83cb599075813caf86c6384e5caaab776d57e4b727cc7`) и 393857 байт (`05972620f0ce29b1f6a3ebdd0315eb2e9faebc6629dfe38d0e804b19d86b7b0f`). Сохранён настоящий checkpoint схемы 1, полученный старым encoder до изменения. Нативный запуск Windows и MSVC не выполнялись. Общие поручения, самостоятельные ID резервов, передача владения и отмена груза остаются последующими срезами S04/S06.
|
||||
|
||||
## Данные и владение
|
||||
|
||||
| Новый объект | Ответственность |
|
||||
| --- | --- |
|
||||
| Поручение | Постоянный ID, город-владелец, инициатор, тип действия, цель, требования профессии, приоритет, зависимые действия и причина ожидания. |
|
||||
| Назначение | Пара ID поручения и жителя, поколение исполнения, текущий безопасный шаг и прогресс. |
|
||||
| Резерв | Постоянный ID, владелец-поручение, объект или количество, срок логической проверки и состояние. |
|
||||
| Предложение назначения | Результат оценки кандидата по снимку с ревизиями. Оно становится назначением только после проверки всех претензий. |
|
||||
|
||||
S04 владеет жизненным циклом поручений и реестром резервов. [S06](S06.md) владеет фактическими предметами и вместимостью. Операция получения резерва проверяет доступное количество через S06 и публикует обязательства согласованно. Системы производства и строительства описывают требования и завершение шага. Они не создают собственный независимый учёт занятых предметов.
|
||||
|
||||
Все долговременные ссылки используют ID. Перестановка вектора, выгрузка графических ресурсов и сохранение сохраняют их смысл. Загрузка проверяет существование владельца и цели каждого резерва. Незавершённая передача между регионами владеет своим грузом по контракту [S14](S14.md).
|
||||
|
||||
## Выбор работы
|
||||
|
||||
Перед оценкой система обновляет индексы по городу, профессии, области и доступности. Изменение запасов, маршрута, навыка или состояния заказа активирует только зависимых кандидатов. Полный поиск используется для проверки корректности индекса в тестах.
|
||||
|
||||
Оценка идёт по устойчивому порядку критериев — срочность потребности, приоритет игрока, пригодность профессии, стоимость подхода, возраст задания, ID. Конкретные коэффициенты находятся в выбранном модуле правил. Возраст ожидания зависит от логических тактов. Для каждого отказа сохраняется причина, которую показывает [S18](S18.md).
|
||||
|
||||
Рабочие потоки оценивают независимые группы кандидатов на снимке. Координатор принимает предложения в каноническом порядке. Набор ресурсов, рабочая позиция и назначение жителя закрепляются одной операцией. Если хотя бы одна претензия уже занята, предложение отклоняется целиком и возвращается к следующему циклу выбора. Такое разрешение исключает частичное удержание материалов за невыданной работой.
|
||||
|
||||
## Исполнение, прерывание и отмена
|
||||
|
||||
Поручение проходит состояния ожидания условий, доступности, назначения, исполнения и завершения. Блокировка сохраняет причину и подписку на событие, способное её снять. Удаление цели и отмена инициатором — явные завершающие переходы.
|
||||
|
||||
Обычная смена профессии заканчивает текущий безопасный шаг. Критическая потребность или опасность могут прервать его раньше согласно правилу действия. Каждый тип шага объявляет результат прерывания. Материал до получения остаётся на складе, материал в руках остаётся у жителя, установленная деталь принадлежит стройке. Диспетчер освобождает только неиспользованные обязательства и создаёт действие возврата либо новой доставки для реального груза.
|
||||
|
||||
Прогресс действия фиксируется на логическом такте. Повтор результата завершения с тем же ID исполнения возвращает прежний итог. Инвентарь не расходуется и изделие не появляется повторно. При потере маршрута работа ждёт пересчёта, а уничтожение цели вызывает отмену связанных резервов. При смерти или передаче жителя его назначение разбирается тем же явным переходом.
|
||||
|
||||
## Пакеты и зависимости
|
||||
|
||||
1. В [M01](../milestones/M01.md) согласовать ID, переходы и атомарное применение с [S01](S01.md), [S06](S06.md) и [S15](S15.md).
|
||||
2. В [M03](../milestones/M03.md) провести один сквозной набор действий добычи, переноски, установки детали, еды и сна. Каждое действие имеет тест отмены.
|
||||
3. В [M04](../milestones/M04.md) добавить производственные индексы, потребности складов, зависимости заказов и смену профессии. Сравнить назначение с медленным эталонным перебором.
|
||||
4. В [M05](../milestones/M05.md)–[M07](../milestones/M07.md) подключать земледелие, лечение и тревогу через тот же жизненный цикл.
|
||||
5. В [M08](../milestones/M08.md)–[M09](../milestones/M09.md) закрепить межрегиональное продолжение и проверку прав города. Сетевой повтор команды использует уже созданное поручение.
|
||||
|
||||
На первом пакете один исполнитель владеет общими типами поручений и резервов. После фиксации интерфейсов адаптация каждого вида работ получает отдельные файлы и проверки.
|
||||
|
||||
## VoidLibrary
|
||||
|
||||
Проверить библиотечные контейнеры, очереди, состояния и средства планирования по [матрице VoidLibrary](../void-library.md). Подходящий существующий механизм использовать после проверки его семантики отмены и порядка. До написания недостающей возможности в игре найти либо создать issue в `Void/Library`, приложить воспроизводимый контракт и связать его с реализацией. Игровые приоритеты и право города на действие определяются этими планами.
|
||||
|
||||
## Приёмка и измерения
|
||||
|
||||
| Сцена | Проверяемый итог |
|
||||
| --- | --- |
|
||||
| Два плотника и одна доска | Одно назначение владеет материалом, второе объясняет ожидание. Количество резервов не превышает запас. |
|
||||
| Отмена дома с грузом в пути | Неиспользованные резервы сняты, груз остаётся учтённым и получает доступное назначение. |
|
||||
| Снос склада во время назначения | Старое предложение отклоняется по ревизии, оно не резервирует новый объект на освободившемся месте. |
|
||||
| Голод и смена профессии | Действие завершает предусмотренный безопасный шаг, потребность обслуживается, новый заказ соответствует новой роли. |
|
||||
| Повтор завершения и загрузка | Расходы и выпуск продукции происходят один раз, ID поручения и резервов сохраняются. |
|
||||
| Индекс и полный перебор | При одной истории мира они выбирают одинаковые назначения и причины ожидания. |
|
||||
|
||||
Для 500 жителей и 2 000 заданий измерять время оценки, число проверенных кандидатов, конфликтов и повторных запросов. Увеличение потоков сравнивать при одинаковом выполненном объёме. Проверки каждой профессии и потребности зарегистрировать в [реестре паритета](../parity.md), бюджеты принять через [S21](S21.md).
|
||||
@@ -0,0 +1,66 @@
|
||||
# S05. Жизнь и поведение жителей
|
||||
|
||||
Связанные проверки реестра — [B07](../parity.md#b07), [A10](../parity.md#a10), [A26](../parity.md#a26).
|
||||
|
||||
Система делает жителя постоянным участником поселения с потребностями, профессией, здоровьем и собственной историей. Все 500 целевых жителей продолжают жить во всех населённых регионах независимо от камеры. Первая версия поддерживает бытовой цикл демо, дальнейшая — различимые поведения базовой игры и ACE из [реестра паритета](../parity.md). Приоритеты проекта закреплены в [мастер-плане](../../../PLAN.md).
|
||||
|
||||
## Исходное состояние
|
||||
|
||||
Прототип хранит голод, усталость, профессию, маршрут, груз и состояние работы внутри `Agent`. Житель ест после текущего поручения, отдыхает в назначенной кровати либо на земле. Голод и усталость замедляют работу. Смена профессии влияет на последующие назначения. Эти правила и сохранение сна проверяются тестами. [Agent и потребности](../../../engine/include/settlement/core/world.hpp) · [Регрессионные сценарии](../../../tests/core_tests.cpp)
|
||||
|
||||
В стартовой партии три жителя, а завершение сценария зависит от назначенных кроватей и свободной еды. Новая система сохраняет этот небольшой цикл как раннюю проверку, затем добавляет устойчивое снабжение и рост города. [Исходная колония](../../../engine/src/first_colony.cpp)
|
||||
|
||||
## Данные и межсистемные границы
|
||||
|
||||
| Новое состояние | Владелец и потребители |
|
||||
| --- | --- |
|
||||
| Личность жителя | Постоянный ID, имя, принадлежность городу, черты и история значимых событий. S05 владеет жизненным циклом. |
|
||||
| Потребности | Целочисленные значения и пороги, расписание изменений и текущая цель обслуживания. Правила определяются модулем мира. |
|
||||
| Бытовая деятельность | Намерение поесть, поспать, общаться или восстановиться. Исполнимое поручение и резервы принадлежат [S04](S04.md). |
|
||||
| Связи | ID назначенной кровати, знакомых жителей и связанных объектов. Удаление объекта обрабатывается явным событием. |
|
||||
| Состояние здоровья | Повреждения и лечение ведёт [S12](S12.md). S05 использует их для доступности деятельности и потребностей. |
|
||||
| Профессия | Опыт, навыки и доступ к рецептам ведёт [S07](S07.md). S05 предоставляет личность и текущие возможности. |
|
||||
|
||||
Инвентарь жителя находится под учётом [S06](S06.md), маршруты — [S03](S03.md). Житель обращается к этим системам по ID. Изменение города или региона выполняется через единый переход, который сохраняет личность, вещи, потребности и связанные обязательства.
|
||||
|
||||
Модуль правил задаёт численные пороги и скорость изменения потребностей. Набор модулей закреплён при создании мира. Отключённая при старте потребность не создаёт работы и производственные обязательства. Зависимости выбора проверяет [S19](S19.md).
|
||||
|
||||
## Планирование повседневной жизни
|
||||
|
||||
На стадии потребностей рассчитываются новые значения и приоритеты намерений. Расчёт независимых жителей выполняется параллельно по снимку. Общие претензии к еде, кровати, месту отдыха или пациенту разрешает S04 в каноническом порядке.
|
||||
|
||||
Система различает обычную потребность, срочную потребность и немедленную опасность. Обычная потребность даёт завершить безопасный шаг работы. Срочная создаёт запрос прерывания по контракту действия. Опасность передаёт управление защитному поведению S12. После обслуживания житель заново оценивает доступную работу с учётом сохранённых обязательств. Переносимый предмет остаётся учтённым на всех переходах.
|
||||
|
||||
Распорядок использует игровой календарь и свойства жителя. Случайные решения берут значения из сохраняемого потока этого жителя. Видимость и частота кадров не меняют частоту логической оценки. Оптимизация может разнести запланированные проверки по тактам при сохранении утверждённой семантики.
|
||||
|
||||
Модель настроения собирает именованные эффекты с причиной, силой и временем окончания. Одно событие получает постоянный ID, чтобы повторная доставка события после загрузки не удваивала эффект. Интерфейс показывает связь между условиями и состоянием жителя. Социальные действия и отношения добавляются по подтверждённым строкам реестра, с оригинальными текстами и представлением.
|
||||
|
||||
## Восстановление и сложные случаи
|
||||
|
||||
При удалении кровати её назначение снимается, резерв отдыха освобождается, выбирается допустимая альтернатива. При отсутствии еды житель сохраняет объяснимое состояние ожидания и может выполнять доступные действия согласно активному правилу. Тяжёлые последствия голода и ран применяются через S12 с тем же игровым временем.
|
||||
|
||||
Житель, потерявший путь во время бытовой деятельности, останавливается в допустимой позиции. Резерв предмета проверяется и освобождается либо переносится при смене цели. Смерть или уход обрабатываются единым событием жизненного цикла. Оно отменяет назначение, возвращает резервы и передаёт реальные вещи по правилу мира. При загрузке проверяются существование кроватей, целей и связанных жителей.
|
||||
|
||||
Каждый житель в пути между регионами имеет одного владельца — регион либо запись передачи. До подтверждения прибытия его потребности и сроки событий продолжаются по логическим тактам в состоянии передачи. Политика действий в пути задана тем же модулем, что и само путешествие.
|
||||
|
||||
## Последовательность реализации
|
||||
|
||||
| Пакет | Содержание и результат |
|
||||
| --- | --- |
|
||||
| S05-A · [M03](../milestones/M03.md) | Еда, сон, кровать, усталость, безопасное прерывание. Три жителя строят дом, заселяют его и повторяют бытовой цикл после загрузки. |
|
||||
| S05-B · [M04](../milestones/M04.md) | Распорядок, настроение, черты и рост населения. Новому жителю можно назначить работу и обеспечить питание без ручного восстановления связей. |
|
||||
| S05-C · [M05](../milestones/M05.md) | Питьё, сезонные условия и взаимодействия с животными по реестру. Зависимости потребностей проверяются при выборе правил мира. |
|
||||
| S05-D · [M06](../milestones/M06.md)–[M07](../milestones/M07.md) | Культурные варианты, социальные события, здоровье, тревога и возвращение к труду. Каждая ветка имеет наблюдаемую причину и результат. |
|
||||
| S05-E · [M08](../milestones/M08.md)–[M11](../milestones/M11.md) | Переходы между регионами и длительная жизнь 500 жителей. Камера не приостанавливает удалённые города. |
|
||||
|
||||
Типы личности и бытовых намерений закрепляются одним исполнителем совместно с контрактом S04. После этого отдельные потребности можно реализовывать в независимых модулях.
|
||||
|
||||
## VoidLibrary и приёмка
|
||||
|
||||
Механизмы состояний, времени, событий, коллекций и случайных значений сверить с [VoidLibrary](../void-library.md). Подходящую библиотечную возможность использовать. Для отсутствующей возможности перед локальной реализацией найти или создать issue в `Void/Library` и связать его с пакетом. Семантика настроения и игровых потребностей фиксируется собственными определениями правил.
|
||||
|
||||
- Сравнить потребности, выбранные цели и состояние вещей каждого жителя после каждого такта на последовательном эталоне и 2/6/12 потоках.
|
||||
- Сохранить жителя во время еды, сна и прерывания переноски. После загрузки порция расходуется один раз, груз сохраняется, кровать имеет прежнего владельца.
|
||||
- Удалить назначенную кровать и перекрыть путь к кладовой. Житель получает объяснимую альтернативу либо ожидание, занятость освобождается.
|
||||
- Переместить камеру между четырьмя городами. При одинаковых командах история всех 500 жителей совпадает с запуском, где камера не двигалась.
|
||||
- Запустить мир с разрешённым набором отключённых потребностей. Отсутствующие модули не порождают неразрешимые заказы. Проверки вариантов включить в [S21](S21.md).
|
||||
Loaded 100 of 167 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user