diff --git a/apps/esp32_lvgl/CMakeLists.txt b/apps/esp32_lvgl/CMakeLists.txt index 4f6dc180..9e969be5 100644 --- a/apps/esp32_lvgl/CMakeLists.txt +++ b/apps/esp32_lvgl/CMakeLists.txt @@ -13,7 +13,6 @@ include(CTest) add_library(trailmate_esp32_lvgl_app_shell src/esp32_lvgl_idf_app_runtime_access.cpp src/esp32_lvgl_app_shell.cpp - src/esp32_lvgl_historical_source_descriptor.cpp src/esp32_lvgl_startup_runtime.cpp src/esp32_lvgl_loop_runtime.cpp src/esp32_lvgl_runtime_config.cpp @@ -40,13 +39,6 @@ if(BUILD_TESTING) add_test(NAME trailmate_esp32_lvgl_app_shell_smoke COMMAND trailmate_esp32_lvgl_app_shell_smoke) - add_executable(trailmate_esp32_lvgl_historical_source_descriptor_smoke - tests/esp32_lvgl_historical_source_descriptor_smoke.cpp) - target_link_libraries(trailmate_esp32_lvgl_historical_source_descriptor_smoke - PRIVATE trailmate_esp32_lvgl_app_shell) - add_test(NAME trailmate_esp32_lvgl_historical_source_descriptor_smoke - COMMAND trailmate_esp32_lvgl_historical_source_descriptor_smoke) - add_executable(trailmate_esp32_lvgl_startup_runtime_smoke tests/esp32_lvgl_startup_runtime_smoke.cpp) target_link_libraries(trailmate_esp32_lvgl_startup_runtime_smoke diff --git a/apps/esp32_lvgl/README.md b/apps/esp32_lvgl/README.md index 425147fe..8aabb3cb 100644 --- a/apps/esp32_lvgl/README.md +++ b/apps/esp32_lvgl/README.md @@ -19,7 +19,8 @@ UX Pack presents. Build entrypoint = `builds/esp_idf` -Historical source identity = `removed root esp_idf` +Removed root history is documented only in +`docs/archive/REMOVED_LEGACY_ROOTS.md`. Component source list = `builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake` @@ -59,9 +60,6 @@ target_family = esp32_lvgl default_ux_pack_id = compatibility build_entrypoint = builds/esp_idf component_sources = builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake -historical_root_name = removed root esp_idf -historical_role = pre-refactor ESP-IDF/LVGL implementation root -replacement_owner = apps/esp32_lvgl + builds/esp_idf ``` Runtime owner files: diff --git a/apps/esp32_lvgl/src/esp32_lvgl_app_shell.cpp b/apps/esp32_lvgl/src/esp32_lvgl_app_shell.cpp index 9c3f04c2..549ac75b 100644 --- a/apps/esp32_lvgl/src/esp32_lvgl_app_shell.cpp +++ b/apps/esp32_lvgl/src/esp32_lvgl_app_shell.cpp @@ -43,10 +43,7 @@ bool Esp32LvglAppShell::validate() const std::strcmp(config_.default_ux_pack_id, activeUxPackId()) == 0 && ui_lvgl_ux::findUxPackById(activeUxPackId()) != nullptr && config_.build_entrypoint != nullptr && - config_.component_sources != nullptr && - config_.historical_root_name != nullptr && - config_.historical_role != nullptr && - config_.replacement_owner != nullptr; + config_.component_sources != nullptr; } } // namespace esp32_lvgl diff --git a/apps/esp32_lvgl/src/esp32_lvgl_app_shell.h b/apps/esp32_lvgl/src/esp32_lvgl_app_shell.h index 5bc8da45..520cd8d7 100644 --- a/apps/esp32_lvgl/src/esp32_lvgl_app_shell.h +++ b/apps/esp32_lvgl/src/esp32_lvgl_app_shell.h @@ -1,7 +1,5 @@ #pragma once -#include "esp32_lvgl_historical_source_descriptor.h" - #include "product_composition/target_profile.h" namespace trailmate @@ -18,12 +16,6 @@ struct Esp32LvglAppShellConfig const char* default_ux_pack_id = "compatibility"; const char* build_entrypoint = "builds/esp_idf"; const char* component_sources = "builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake"; - const char* historical_root_name = - esp32LvglHistoricalSourceDescriptor().historical_root_name; - const char* historical_role = - esp32LvglHistoricalSourceDescriptor().historical_role; - const char* replacement_owner = - esp32LvglHistoricalSourceDescriptor().replacement_owner; }; class Esp32LvglAppShell diff --git a/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.cpp b/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.cpp deleted file mode 100644 index 310eb44a..00000000 --- a/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "esp32_lvgl_historical_source_descriptor.h" - -namespace trailmate::apps::esp32_lvgl -{ - -const Esp32LvglHistoricalSourceDescriptor& -esp32LvglHistoricalSourceDescriptor() -{ - static const Esp32LvglHistoricalSourceDescriptor descriptor{}; - return descriptor; -} - -} // namespace trailmate::apps::esp32_lvgl diff --git a/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.h b/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.h deleted file mode 100644 index 23ece452..00000000 --- a/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -namespace trailmate::apps::esp32_lvgl -{ - -struct Esp32LvglHistoricalSourceDescriptor -{ - const char* historical_root_name = "removed root esp_idf"; - const char* historical_role = "pre-refactor ESP-IDF/LVGL implementation root"; - const char* replacement_owner = "apps/esp32_lvgl + builds/esp_idf"; -}; - -const Esp32LvglHistoricalSourceDescriptor& -esp32LvglHistoricalSourceDescriptor(); - -} // namespace trailmate::apps::esp32_lvgl diff --git a/apps/esp32_lvgl/tests/esp32_lvgl_app_shell_smoke.cpp b/apps/esp32_lvgl/tests/esp32_lvgl_app_shell_smoke.cpp index 5b18af32..9db39588 100644 --- a/apps/esp32_lvgl/tests/esp32_lvgl_app_shell_smoke.cpp +++ b/apps/esp32_lvgl/tests/esp32_lvgl_app_shell_smoke.cpp @@ -23,12 +23,6 @@ int main() assert(std::strcmp(config.build_entrypoint, "builds/esp_idf") == 0); assert(std::strcmp(config.component_sources, "builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake") == 0); - assert(std::strcmp(config.historical_root_name, - "removed root esp_idf") == 0); - assert(std::strcmp(config.historical_role, - "pre-refactor ESP-IDF/LVGL implementation root") == 0); - assert(std::strcmp(config.replacement_owner, - "apps/esp32_lvgl + builds/esp_idf") == 0); assert(ui_lvgl_ux::findUxPackById(shell.activeUxPackId()) != nullptr); ui::menu::MenuModel menu; diff --git a/apps/esp32_lvgl/tests/esp32_lvgl_historical_source_descriptor_smoke.cpp b/apps/esp32_lvgl/tests/esp32_lvgl_historical_source_descriptor_smoke.cpp deleted file mode 100644 index cf724071..00000000 --- a/apps/esp32_lvgl/tests/esp32_lvgl_historical_source_descriptor_smoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "esp32_lvgl_historical_source_descriptor.h" - -#include -#include - -int main() -{ - const auto& descriptor = - trailmate::apps::esp32_lvgl::esp32LvglHistoricalSourceDescriptor(); - - assert(std::strcmp(descriptor.historical_root_name, - "removed root esp_idf") == 0); - assert(std::strcmp(descriptor.historical_role, - "pre-refactor ESP-IDF/LVGL implementation root") == 0); - assert(std::strcmp(descriptor.replacement_owner, - "apps/esp32_lvgl + builds/esp_idf") == 0); - return 0; -} diff --git a/apps/linux_sim_shell/CMakeLists.txt b/apps/linux_sim_shell/CMakeLists.txt index 856f3f74..d99216f3 100644 --- a/apps/linux_sim_shell/CMakeLists.txt +++ b/apps/linux_sim_shell/CMakeLists.txt @@ -13,7 +13,6 @@ trailmate_add_ui_lvgl_ux_packs(trailmate_ui_lvgl_ux_packs) add_library(trailmate_linux_sim_shell src/linux_sim_app_shell.cpp - src/linux_sim_historical_source_descriptor.cpp src/linux_sim_runtime_entry.cpp src/linux_sim_runtime_entry_adoption_probe.cpp src/linux_sim_runtime_renderer.cpp @@ -48,13 +47,6 @@ if(BUILD_TESTING) add_test(NAME trailmate_linux_sim_app_shell_smoke COMMAND trailmate_linux_sim_app_shell_smoke) - add_executable(trailmate_linux_sim_historical_source_descriptor_smoke - tests/linux_sim_historical_source_descriptor_smoke.cpp) - target_link_libraries(trailmate_linux_sim_historical_source_descriptor_smoke - PRIVATE trailmate_linux_sim_shell) - add_test(NAME trailmate_linux_sim_historical_source_descriptor_smoke - COMMAND trailmate_linux_sim_historical_source_descriptor_smoke) - add_executable(trailmate_linux_sim_runtime_entry_adoption_probe_smoke tests/linux_sim_runtime_entry_adoption_probe_smoke.cpp) target_link_libraries(trailmate_linux_sim_runtime_entry_adoption_probe_smoke diff --git a/apps/linux_sim_shell/README.md b/apps/linux_sim_shell/README.md index 1f6ff002..c10e91c1 100644 --- a/apps/linux_sim_shell/README.md +++ b/apps/linux_sim_shell/README.md @@ -20,7 +20,8 @@ UX Pack presents. Build entrypoint = `builds/linux_cmake` -Historical source identity = `removed root linux_sim` +Removed root history is documented only in +`docs/archive/REMOVED_LEGACY_ROOTS.md`. ## Future Responsibilities @@ -52,7 +53,6 @@ Current source: ```text target_id = linux_sim ux_pack_id = simulator_full -historical_source = removed root linux_sim ``` -No simulator runtime behavior changes in Phase 8 Correction. +No simulator runtime behavior changes in the app shell baseline. diff --git a/apps/linux_sim_shell/src/linux_sim_app_shell.cpp b/apps/linux_sim_shell/src/linux_sim_app_shell.cpp index 45703f17..66fcd5a0 100644 --- a/apps/linux_sim_shell/src/linux_sim_app_shell.cpp +++ b/apps/linux_sim_shell/src/linux_sim_app_shell.cpp @@ -40,17 +40,12 @@ const char* LinuxSimAppShell::activeUxPackId() const bool LinuxSimAppShell::validate() const { - const auto& historical_source = linuxSimHistoricalSourceDescriptor(); return config_.target_id != nullptr && targetProfile() != nullptr && product_composition::findTargetUxBinding(targetId()) != nullptr && config_.ux_pack_id != nullptr && std::strcmp(config_.ux_pack_id, activeUxPackId()) == 0 && - ui_lvgl_ux::findUxPackById(activeUxPackId()) != nullptr && - config_.historical_source != nullptr && - historical_source.historical_root_name != nullptr && - historical_source.historical_role != nullptr && - historical_source.replacement_owner != nullptr; + ui_lvgl_ux::findUxPackById(activeUxPackId()) != nullptr; } } // namespace linux_sim_shell diff --git a/apps/linux_sim_shell/src/linux_sim_app_shell.h b/apps/linux_sim_shell/src/linux_sim_app_shell.h index d97380d9..a159a12b 100644 --- a/apps/linux_sim_shell/src/linux_sim_app_shell.h +++ b/apps/linux_sim_shell/src/linux_sim_app_shell.h @@ -1,7 +1,5 @@ #pragma once -#include "linux_sim_historical_source_descriptor.h" - #include "product_composition/target_profile.h" namespace trailmate @@ -15,8 +13,6 @@ struct LinuxSimAppShellConfig { const char* target_id = "linux_sim"; const char* ux_pack_id = "simulator_full"; - const char* historical_source = - linuxSimHistoricalSourceDescriptor().historical_root_name; }; class LinuxSimAppShell diff --git a/apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.cpp b/apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.cpp deleted file mode 100644 index 50762d91..00000000 --- a/apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "linux_sim_historical_source_descriptor.h" - -namespace trailmate::apps::linux_sim_shell -{ - -const LinuxSimHistoricalSourceDescriptor& linuxSimHistoricalSourceDescriptor() -{ - static const LinuxSimHistoricalSourceDescriptor descriptor{}; - return descriptor; -} - -} // namespace trailmate::apps::linux_sim_shell diff --git a/apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.h b/apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.h deleted file mode 100644 index b6505550..00000000 --- a/apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -namespace trailmate::apps::linux_sim_shell -{ - -struct LinuxSimHistoricalSourceDescriptor -{ - const char* historical_root_name = "removed root linux_sim"; - const char* historical_role = "pre-refactor Linux simulator implementation root"; - const char* replacement_owner = "apps/linux_sim_shell + modules/ui_ascii_runtime"; -}; - -const LinuxSimHistoricalSourceDescriptor& linuxSimHistoricalSourceDescriptor(); - -} // namespace trailmate::apps::linux_sim_shell diff --git a/apps/linux_sim_shell/tests/linux_sim_app_shell_smoke.cpp b/apps/linux_sim_shell/tests/linux_sim_app_shell_smoke.cpp index 9127cfa0..856794f8 100644 --- a/apps/linux_sim_shell/tests/linux_sim_app_shell_smoke.cpp +++ b/apps/linux_sim_shell/tests/linux_sim_app_shell_smoke.cpp @@ -1,5 +1,4 @@ #include "linux_sim_app_shell.h" -#include "linux_sim_historical_source_descriptor.h" #include "ui_lvgl_ux_packs/ux/ux_menu_provider.h" #include "ui_lvgl_ux_packs/ux/ux_pack_registry.h" @@ -22,14 +21,6 @@ int main() assert(std::strcmp(shell.targetProfile()->app_shell, "apps/linux_sim_shell") == 0); assert(shell.targetProfile()->status == product_composition::TargetSupportStatus::Active); - const auto& descriptor = - trailmate::apps::linux_sim_shell::linuxSimHistoricalSourceDescriptor(); - assert(std::strcmp(config.historical_source, - descriptor.historical_root_name) == 0); - assert(std::strcmp(descriptor.historical_role, - "pre-refactor Linux simulator implementation root") == 0); - assert(std::strcmp(descriptor.replacement_owner, - "apps/linux_sim_shell + modules/ui_ascii_runtime") == 0); assert(ui_lvgl_ux::findUxPackById(shell.activeUxPackId()) != nullptr); ui::menu::MenuModel menu; diff --git a/apps/linux_sim_shell/tests/linux_sim_historical_source_descriptor_smoke.cpp b/apps/linux_sim_shell/tests/linux_sim_historical_source_descriptor_smoke.cpp deleted file mode 100644 index 8aafe025..00000000 --- a/apps/linux_sim_shell/tests/linux_sim_historical_source_descriptor_smoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "linux_sim_historical_source_descriptor.h" - -#include -#include - -int main() -{ - const auto& descriptor = - trailmate::apps::linux_sim_shell::linuxSimHistoricalSourceDescriptor(); - - assert(std::strcmp(descriptor.historical_root_name, - "removed root linux_sim") == 0); - assert(std::strcmp(descriptor.historical_role, - "pre-refactor Linux simulator implementation root") == 0); - assert(std::strcmp(descriptor.replacement_owner, - "apps/linux_sim_shell + modules/ui_ascii_runtime") == 0); - return 0; -} diff --git a/apps/linux_uconsole_gtk/CMakeLists.txt b/apps/linux_uconsole_gtk/CMakeLists.txt index 7969b2e8..92d4641a 100644 --- a/apps/linux_uconsole_gtk/CMakeLists.txt +++ b/apps/linux_uconsole_gtk/CMakeLists.txt @@ -41,7 +41,6 @@ set(TRAIL_MATE_UCONSOLE_REAL_GTK_SOURCES add_library(trailmate_linux_uconsole_gtk_shell src/linux_uconsole_gtk_app_shell.cpp - src/linux_uconsole_gtk_historical_source_descriptor.cpp src/linux_uconsole_gtk_page_registry_adoption.cpp src/linux_uconsole_gtk_page_registry_renderer.cpp src/linux_uconsole_gtk_runtime_entry_adoption_probe.cpp @@ -203,13 +202,6 @@ if(BUILD_TESTING) add_test(NAME trailmate_linux_uconsole_gtk_app_shell_smoke COMMAND trailmate_linux_uconsole_gtk_app_shell_smoke) - add_executable(trailmate_linux_uconsole_gtk_historical_source_descriptor_smoke - tests/linux_uconsole_gtk_historical_source_descriptor_smoke.cpp) - target_link_libraries(trailmate_linux_uconsole_gtk_historical_source_descriptor_smoke - PRIVATE trailmate_linux_uconsole_gtk_shell) - add_test(NAME trailmate_linux_uconsole_gtk_historical_source_descriptor_smoke - COMMAND trailmate_linux_uconsole_gtk_historical_source_descriptor_smoke) - add_executable(trailmate_linux_uconsole_gtk_runtime_entry_adoption_probe_smoke tests/linux_uconsole_gtk_runtime_entry_adoption_probe_smoke.cpp) target_link_libraries(trailmate_linux_uconsole_gtk_runtime_entry_adoption_probe_smoke diff --git a/apps/linux_uconsole_gtk/README.md b/apps/linux_uconsole_gtk/README.md index 85f5009d..8d3a26ee 100644 --- a/apps/linux_uconsole_gtk/README.md +++ b/apps/linux_uconsole_gtk/README.md @@ -21,7 +21,8 @@ UX Pack presents. Build entrypoint = `builds/linux_cmake` -Historical source identity = `removed root linux_uconsole` +Removed root history is documented only in +`docs/archive/REMOVED_LEGACY_ROOTS.md`. ## Future Responsibilities @@ -53,7 +54,6 @@ Current source: ```text target_id = uconsole ux_pack_id = uconsole_desktop -historical_source = removed root linux_uconsole ``` -No GTK runtime behavior changes in Phase 8 Correction. +No GTK runtime behavior changes in the app shell baseline. diff --git a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.cpp b/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.cpp index 90806301..d09cb669 100644 --- a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.cpp +++ b/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.cpp @@ -41,18 +41,12 @@ const char* LinuxUConsoleGtkAppShell::activeUxPackId() const bool LinuxUConsoleGtkAppShell::validate() const { - const auto& historical_source = - linuxUConsoleGtkHistoricalSourceDescriptor(); return config_.target_id != nullptr && targetProfile() != nullptr && product_composition::findTargetUxBinding(targetId()) != nullptr && config_.ux_pack_id != nullptr && std::strcmp(config_.ux_pack_id, activeUxPackId()) == 0 && - ui_lvgl_ux::findUxPackById(activeUxPackId()) != nullptr && - config_.historical_source != nullptr && - historical_source.historical_root_name != nullptr && - historical_source.historical_role != nullptr && - historical_source.replacement_owner != nullptr; + ui_lvgl_ux::findUxPackById(activeUxPackId()) != nullptr; } } // namespace linux_uconsole_gtk diff --git a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.h b/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.h index bfe2c837..cc92f7ab 100644 --- a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.h +++ b/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.h @@ -1,7 +1,5 @@ #pragma once -#include "linux_uconsole_gtk_historical_source_descriptor.h" - #include "product_composition/target_profile.h" namespace trailmate @@ -15,8 +13,6 @@ struct LinuxUConsoleGtkAppShellConfig { const char* target_id = "uconsole"; const char* ux_pack_id = "uconsole_desktop"; - const char* historical_source = - linuxUConsoleGtkHistoricalSourceDescriptor().historical_root_name; }; class LinuxUConsoleGtkAppShell diff --git a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.cpp b/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.cpp deleted file mode 100644 index 8eeb9e83..00000000 --- a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "linux_uconsole_gtk_historical_source_descriptor.h" - -namespace trailmate::apps::linux_uconsole_gtk -{ - -const LinuxUConsoleGtkHistoricalSourceDescriptor& -linuxUConsoleGtkHistoricalSourceDescriptor() -{ - static const LinuxUConsoleGtkHistoricalSourceDescriptor descriptor{}; - return descriptor; -} - -} // namespace trailmate::apps::linux_uconsole_gtk diff --git a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.h b/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.h deleted file mode 100644 index b9fe96f3..00000000 --- a/apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -namespace trailmate::apps::linux_uconsole_gtk -{ - -struct LinuxUConsoleGtkHistoricalSourceDescriptor -{ - const char* historical_root_name = "removed root linux_uconsole"; - const char* historical_role = "pre-refactor uConsole GTK implementation root"; - const char* replacement_owner = "apps/linux_uconsole_gtk + modules/ui_gtk_runtime"; -}; - -const LinuxUConsoleGtkHistoricalSourceDescriptor& -linuxUConsoleGtkHistoricalSourceDescriptor(); - -} // namespace trailmate::apps::linux_uconsole_gtk diff --git a/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_app_shell_smoke.cpp b/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_app_shell_smoke.cpp index a66f03df..b3feceb9 100644 --- a/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_app_shell_smoke.cpp +++ b/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_app_shell_smoke.cpp @@ -1,5 +1,4 @@ #include "linux_uconsole_gtk_app_shell.h" -#include "linux_uconsole_gtk_historical_source_descriptor.h" #include "ui_lvgl_ux_packs/ux/ux_menu_provider.h" #include "ui_lvgl_ux_packs/ux/ux_pack_registry.h" @@ -21,15 +20,6 @@ int main() assert(shell.targetProfile() != nullptr); assert(shell.targetProfile()->renderer == product_composition::TargetRenderer::Gtk); - const auto& descriptor = - trailmate::apps::linux_uconsole_gtk:: - linuxUConsoleGtkHistoricalSourceDescriptor(); - assert(std::strcmp(config.historical_source, - descriptor.historical_root_name) == 0); - assert(std::strcmp(descriptor.historical_role, - "pre-refactor uConsole GTK implementation root") == 0); - assert(std::strcmp(descriptor.replacement_owner, - "apps/linux_uconsole_gtk + modules/ui_gtk_runtime") == 0); assert(ui_lvgl_ux::findUxPackById(shell.activeUxPackId()) != nullptr); ui::menu::MenuModel menu; diff --git a/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_historical_source_descriptor_smoke.cpp b/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_historical_source_descriptor_smoke.cpp deleted file mode 100644 index b28e2ed9..00000000 --- a/apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_historical_source_descriptor_smoke.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "linux_uconsole_gtk_historical_source_descriptor.h" - -#include -#include - -int main() -{ - const auto& descriptor = - trailmate::apps::linux_uconsole_gtk:: - linuxUConsoleGtkHistoricalSourceDescriptor(); - - assert(std::strcmp(descriptor.historical_root_name, - "removed root linux_uconsole") == 0); - assert(std::strcmp(descriptor.historical_role, - "pre-refactor uConsole GTK implementation root") == 0); - assert(std::strcmp(descriptor.replacement_owner, - "apps/linux_uconsole_gtk + modules/ui_gtk_runtime") == 0); - return 0; -} diff --git a/apps/nrf52_node/APP_SHELL_MANIFEST.md b/apps/nrf52_node/APP_SHELL_MANIFEST.md index 4e5a14b3..772efdd9 100644 --- a/apps/nrf52_node/APP_SHELL_MANIFEST.md +++ b/apps/nrf52_node/APP_SHELL_MANIFEST.md @@ -18,10 +18,8 @@ Future authoritative build entrypoint: - `builds/pio_nrf52` -Historical source identities: - -- `removed root esp_pio` -- `removed root gat562_mesh_evb_pro` +Removed root history is documented only in +`docs/archive/REMOVED_LEGACY_ROOTS.md`. ## Future Responsibilities @@ -66,8 +64,4 @@ UX Pack Runtime Binding: product-composition target UX binding. The nRF52 shell stays independent of LVGL UX pack runtime code. -Historical source descriptor: - -- `nrf52_historical_source_descriptor` - No behavior change in Phase 8 Build/AppShell Executable Convergence. diff --git a/apps/nrf52_node/README.md b/apps/nrf52_node/README.md index 88402141..29f7da22 100644 --- a/apps/nrf52_node/README.md +++ b/apps/nrf52_node/README.md @@ -19,7 +19,8 @@ UX Pack presents. Build entrypoint = `builds/pio_nrf52` -Historical source identity = `removed root esp_pio` and `removed root gat562_mesh_evb_pro` +Removed root history is documented only in +`docs/archive/REMOVED_LEGACY_ROOTS.md`. ## Future Responsibilities @@ -55,10 +56,6 @@ Current config: ```text target_family = nrf52_node default_ux_pack_id = tiny_node_status -historical_generic_root_name = removed root esp_pio -historical_board_root_name = removed root gat562_mesh_evb_pro -historical_role = pre-refactor PlatformIO/nRF52 implementation roots -replacement_owner = apps/nrf52_node + builds/pio_nrf52 + boards/gat562_mesh_evb_pro ``` -No behavior change in Phase 8 Build/AppShell Executable Convergence. +No behavior change in the app shell baseline. diff --git a/apps/nrf52_node/library.json b/apps/nrf52_node/library.json index fe70b40c..c3afc42f 100644 --- a/apps/nrf52_node/library.json +++ b/apps/nrf52_node/library.json @@ -6,7 +6,6 @@ "srcDir": "src", "srcFilter": [ "-<*>", - "+", "+", "+", "+", diff --git a/apps/nrf52_node/src/nrf52_historical_source_descriptor.cpp b/apps/nrf52_node/src/nrf52_historical_source_descriptor.cpp deleted file mode 100644 index 7bb9bec9..00000000 --- a/apps/nrf52_node/src/nrf52_historical_source_descriptor.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "nrf52_historical_source_descriptor.h" - -namespace trailmate::apps::nrf52_node -{ - -const Nrf52HistoricalSourceDescriptor& nrf52HistoricalSourceDescriptor() -{ - static const Nrf52HistoricalSourceDescriptor descriptor{}; - return descriptor; -} - -} // namespace trailmate::apps::nrf52_node diff --git a/apps/nrf52_node/src/nrf52_historical_source_descriptor.h b/apps/nrf52_node/src/nrf52_historical_source_descriptor.h deleted file mode 100644 index 0f0f48ca..00000000 --- a/apps/nrf52_node/src/nrf52_historical_source_descriptor.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -namespace trailmate::apps::nrf52_node -{ - -struct Nrf52HistoricalSourceDescriptor -{ - const char* historical_generic_root_name = "removed root esp_pio"; - const char* historical_board_root_name = "removed root gat562_mesh_evb_pro"; - const char* historical_role = "pre-refactor PlatformIO/nRF52 implementation roots"; - const char* replacement_owner = - "apps/nrf52_node + builds/pio_nrf52 + boards/gat562_mesh_evb_pro"; -}; - -const Nrf52HistoricalSourceDescriptor& nrf52HistoricalSourceDescriptor(); - -} // namespace trailmate::apps::nrf52_node diff --git a/apps/nrf52_node/src/nrf52_node_app_shell.cpp b/apps/nrf52_node/src/nrf52_node_app_shell.cpp index c031ebdf..cf36852c 100644 --- a/apps/nrf52_node/src/nrf52_node_app_shell.cpp +++ b/apps/nrf52_node/src/nrf52_node_app_shell.cpp @@ -39,11 +39,7 @@ bool Nrf52NodeAppShell::validate() const product_composition::findTargetUxBinding(targetId()) != nullptr && config_.target_family != nullptr && config_.default_ux_pack_id != nullptr && - std::strcmp(config_.default_ux_pack_id, activeUxPackId()) == 0 && - config_.historical_generic_root_name != nullptr && - config_.historical_board_root_name != nullptr && - config_.historical_role != nullptr && - config_.replacement_owner != nullptr; + std::strcmp(config_.default_ux_pack_id, activeUxPackId()) == 0; } } // namespace nrf52_node diff --git a/apps/nrf52_node/src/nrf52_node_app_shell.h b/apps/nrf52_node/src/nrf52_node_app_shell.h index 07452b55..dd8f4077 100644 --- a/apps/nrf52_node/src/nrf52_node_app_shell.h +++ b/apps/nrf52_node/src/nrf52_node_app_shell.h @@ -1,7 +1,5 @@ #pragma once -#include "nrf52_historical_source_descriptor.h" - #include "product_composition/target_profile.h" namespace trailmate @@ -16,14 +14,6 @@ struct Nrf52NodeAppShellConfig const char* target_id = "gat562_mesh_evb_pro"; const char* target_family = "nrf52_node"; const char* default_ux_pack_id = "tiny_node_status"; - const char* historical_generic_root_name = - nrf52HistoricalSourceDescriptor().historical_generic_root_name; - const char* historical_board_root_name = - nrf52HistoricalSourceDescriptor().historical_board_root_name; - const char* historical_role = - nrf52HistoricalSourceDescriptor().historical_role; - const char* replacement_owner = - nrf52HistoricalSourceDescriptor().replacement_owner; }; class Nrf52NodeAppShell diff --git a/apps/nrf52_node/tests/nrf52_historical_source_descriptor_smoke.cpp b/apps/nrf52_node/tests/nrf52_historical_source_descriptor_smoke.cpp deleted file mode 100644 index b8417f2c..00000000 --- a/apps/nrf52_node/tests/nrf52_historical_source_descriptor_smoke.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "nrf52_historical_source_descriptor.h" - -#include -#include - -int main() -{ - const auto& descriptor = - trailmate::apps::nrf52_node::nrf52HistoricalSourceDescriptor(); - - assert(std::strcmp(descriptor.historical_generic_root_name, - "removed root esp_pio") == 0); - assert(std::strcmp(descriptor.historical_board_root_name, - "removed root gat562_mesh_evb_pro") == 0); - assert(std::strcmp(descriptor.historical_role, - "pre-refactor PlatformIO/nRF52 implementation roots") == 0); - assert(std::strcmp(descriptor.replacement_owner, - "apps/nrf52_node + builds/pio_nrf52 + boards/gat562_mesh_evb_pro") == 0); - return 0; -} diff --git a/apps/nrf52_node/tests/nrf52_node_app_shell_smoke.cpp b/apps/nrf52_node/tests/nrf52_node_app_shell_smoke.cpp index 7e0b431f..f98b6437 100644 --- a/apps/nrf52_node/tests/nrf52_node_app_shell_smoke.cpp +++ b/apps/nrf52_node/tests/nrf52_node_app_shell_smoke.cpp @@ -16,13 +16,5 @@ int main() assert(std::strcmp(shell.activeUxPackId(), "tiny_node_status") == 0); assert(shell.targetProfile() != nullptr); assert(shell.targetProfile()->renderer == product_composition::TargetRenderer::Headless); - assert(std::strcmp(config.historical_generic_root_name, - "removed root esp_pio") == 0); - assert(std::strcmp(config.historical_board_root_name, - "removed root gat562_mesh_evb_pro") == 0); - assert(std::strcmp(config.historical_role, - "pre-refactor PlatformIO/nRF52 implementation roots") == 0); - assert(std::strcmp(config.replacement_owner, - "apps/nrf52_node + builds/pio_nrf52 + boards/gat562_mesh_evb_pro") == 0); return 0; } diff --git a/builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake b/builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake index 6e4b5c24..af16aa49 100644 --- a/builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake +++ b/builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake @@ -10,7 +10,6 @@ set(TRAILMATE_ESP_IDF_APP_SHELL_SOURCES "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_idf_app_registry.cpp" "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_idf_app_runtime_access.cpp" "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_app_shell.cpp" - "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.cpp" "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_startup_runtime.cpp" "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_loop_runtime.cpp" "${TRAILMATE_ROOT}/apps/esp32_lvgl/src/esp32_lvgl_runtime_config.cpp") diff --git a/builds/pio_nrf52/src/nrf52_node_wrapper_baseline.cpp b/builds/pio_nrf52/src/nrf52_node_wrapper_baseline.cpp index 60660c80..ee11ac2d 100644 --- a/builds/pio_nrf52/src/nrf52_node_wrapper_baseline.cpp +++ b/builds/pio_nrf52/src/nrf52_node_wrapper_baseline.cpp @@ -1,4 +1,3 @@ -#include "nrf52_historical_source_descriptor.h" #include "nrf52_node_app_shell.h" namespace @@ -11,13 +10,7 @@ bool g_wrapper_valid = false; extern "C" void setup() { trailmate::apps::nrf52_node::Nrf52NodeAppShell shell; - const auto& historical_source = - trailmate::apps::nrf52_node::nrf52HistoricalSourceDescriptor(); - g_wrapper_valid = shell.validate() && - historical_source.historical_generic_root_name != nullptr && - historical_source.historical_board_root_name != nullptr && - historical_source.historical_role != nullptr && - historical_source.replacement_owner != nullptr; + g_wrapper_valid = shell.validate(); } extern "C" void loop() diff --git a/docs/audits/ESP_IDF_FINAL_OWNER_MIGRATION_PLAN.md b/docs/audits/ESP_IDF_FINAL_OWNER_MIGRATION_PLAN.md index 4b9b263a..24320f31 100644 --- a/docs/audits/ESP_IDF_FINAL_OWNER_MIGRATION_PLAN.md +++ b/docs/audits/ESP_IDF_FINAL_OWNER_MIGRATION_PLAN.md @@ -44,8 +44,7 @@ entrypoints must not compile or include it. ## Delete Condition For `esp_idf_legacy_implementation_adapter` - no new calls are added; -- `apps/esp32_lvgl` uses `esp32_lvgl_historical_source_descriptor` for - historical identity; +- historical descriptor retired from active app shell; - build/component/source ownership no longer requires compiling `esp_idf_legacy_implementation_adapter.cpp`; - active checker forbids new ESP-IDF legacy adapter callers. diff --git a/docs/audits/LEGACY_COMPAT_TEMP_SURFACE_INVENTORY.md b/docs/audits/LEGACY_COMPAT_TEMP_SURFACE_INVENTORY.md index 8646a6d0..da7066f7 100644 --- a/docs/audits/LEGACY_COMPAT_TEMP_SURFACE_INVENTORY.md +++ b/docs/audits/LEGACY_COMPAT_TEMP_SURFACE_INVENTORY.md @@ -258,8 +258,7 @@ Current location: Current callers: - docs and checkers recognize it as archive-only. -- final app shell records it through - `apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.*`. +- active app shells do not retain source-descriptor metadata for it. Current responsibility: - archive-only historical simulator source and scripts. @@ -284,7 +283,8 @@ Delete condition: - Satisfied by Batch 4 Root Legacy Elimination. Risk: -- medium; source is archive-only but still referenced by descriptors and docs. +- low-medium; source is archive-only and now referenced only by historical + documentation and retirement checkers. ## Surface: legacy/app_implementations/linux_uconsole @@ -299,8 +299,7 @@ Current location: Current callers: - docs and checkers recognize it as archive-only. -- final app shell records it through - `apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.*`. +- active app shells do not retain source-descriptor metadata for it. Current responsibility: - archive-only historical uConsole GTK source, packaging files, scripts, and @@ -327,7 +326,8 @@ Delete condition: Risk: - high; this archive still contains real business/page/packaging history that - must be migrated or deliberately replaced before deletion. + must be migrated or deliberately replaced before deletion, but no active app + shell descriptor keeps it alive. ## Surface: legacy/app_implementations/linux_unoq @@ -379,7 +379,6 @@ Current location: Current callers: - docs and inventory only after Batch 2. -- `apps/esp32_lvgl` uses `esp32_lvgl_historical_source_descriptor.*`. - `builds/esp_idf/ESP_IDF_COMPONENT_SOURCES.cmake` owns migrated ESP-IDF source lists. @@ -390,8 +389,8 @@ Is this final architecture? - No. Final owner: -- `apps/esp32_lvgl` for app shell metadata and `builds/esp_idf` for build - entrypoint wiring. +- `apps/esp32_lvgl` for app shell/runtime ownership and `builds/esp_idf` for + build entrypoint wiring. Disposition: - Deleted. @@ -419,8 +418,6 @@ Current location: Current callers: - docs and inventory only after Batch 1. -- `builds/pio_nrf52/src/nrf52_node_wrapper_baseline.cpp` now uses - `apps/nrf52_node/src/nrf52_historical_source_descriptor.*`. - `builds/pio_nrf52/platformio.ini` no longer adds the legacy root include path. Current responsibility: @@ -527,144 +524,152 @@ Risk: ## Surface: linux_sim_historical_source_descriptor (formerly linux_sim_legacy_source_descriptor) Category: -- transitional descriptors +- retired descriptors Current location: -- `apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.*` -- `apps/linux_sim_shell/tests/linux_sim_historical_source_descriptor_smoke.cpp` +- removed from active app source and tests. Current callers: -- `apps/linux_sim_shell/src/linux_sim_app_shell.*` -- `apps/linux_sim_shell/CMakeLists.txt` -- `tools/architecture/check_legacy_app_roots_burndown_ready.py` -- `tools/architecture/check_phase8_layout_ready.py` +- none from active app or build code. +- `tools/architecture/check_legacy_disposition_execution_ready.py` and + `tools/architecture/check_no_root_legacy_ready.py` assert it stays retired. Current responsibility: -- records `historical_root_name`, `historical_role`, and replacement owner - metadata for the final LinuxSim app shell. +- Historical descriptor retired from active app shell. Removed root history is + documented only in `docs/archive/REMOVED_LEGACY_ROOTS.md`. Is this final architecture? -- No. +- Yes. Final owner: -- `apps/linux_sim_shell` as historical source metadata, not runtime-reachable - legacy root path. +- `apps/linux_sim_shell` owns the app shell; docs/archive owns removed root + history. Disposition: -- Must Rename. +- Deleted. + +Final status: +- Historical descriptor retired from active app shell. Delete condition: -- rename to historical source descriptor or delete once docs/archive records - the legacy root history; remove the concrete `legacy/...` root_path field. - Batch 1 completed the rename and removed the `root_path` field. +- Satisfied once docs/archive records removed root history and active app/build + code has no descriptor files, targets, includes, or fields. Risk: -- medium; app shell validation currently reads this descriptor. +- low; app shell validation no longer reads this descriptor. ## Surface: linux_uconsole_gtk_historical_source_descriptor (formerly linux_uconsole_gtk_legacy_source_descriptor) Category: -- transitional descriptors +- retired descriptors Current location: -- `apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.*` -- `apps/linux_uconsole_gtk/tests/linux_uconsole_gtk_historical_source_descriptor_smoke.cpp` +- removed from active app source and tests. Current callers: -- `apps/linux_uconsole_gtk/src/linux_uconsole_gtk_app_shell.*` -- `apps/linux_uconsole_gtk/CMakeLists.txt` -- `tools/architecture/check_legacy_app_roots_burndown_ready.py` -- `tools/architecture/check_phase8_layout_ready.py` +- none from active app or build code. +- `tools/architecture/check_legacy_disposition_execution_ready.py` and + `tools/architecture/check_no_root_legacy_ready.py` assert it stays retired. Current responsibility: -- records `historical_root_name`, `historical_role`, and replacement owner - metadata for the final uConsole GTK app shell. +- Historical descriptor retired from active app shell. Removed root history is + documented only in `docs/archive/REMOVED_LEGACY_ROOTS.md`. Is this final architecture? -- No. +- Yes. Final owner: -- `apps/linux_uconsole_gtk` as historical source metadata, plus - `builds/linux_cmake` for package/build metadata. +- `apps/linux_uconsole_gtk` owns the app shell; `builds/linux_cmake` owns + build metadata; docs/archive owns removed root history. Disposition: -- Must Rename. +- Deleted. + +Final status: +- Historical descriptor retired from active app shell. Delete condition: -- rename to historical source descriptor or delete once docs/archive records - the legacy root history; remove the concrete `legacy/...` root_path field. - Batch 1 completed the rename and removed the `root_path` field. +- Satisfied once docs/archive records removed root history and active app/build + code has no descriptor files, targets, includes, or fields. Risk: -- high; it currently hides the fact that uConsole archive still contains - page and packaging material that may need migration. +- medium; uConsole history is still important, but no descriptor keeps it in + the active app shell. ## Surface: nrf52_historical_source_descriptor Category: -- transitional descriptors +- retired descriptors Current location: -- `apps/nrf52_node/src/nrf52_historical_source_descriptor.*` -- `apps/nrf52_node/tests/nrf52_historical_source_descriptor_smoke.cpp` +- removed from active app source and tests. Current callers: -- `apps/nrf52_node/src/nrf52_node_app_shell.*` -- `builds/pio_nrf52/src/nrf52_node_wrapper_baseline.cpp` +- none from active app or build code. +- `tools/architecture/check_legacy_disposition_execution_ready.py` and + `tools/architecture/check_no_root_legacy_ready.py` assert it stays retired. Current responsibility: -- records historical PIO and GAT562 root identity after active wrapper stopped - including `nrf52_pio_legacy_implementation_adapter.h`. +- Historical descriptor retired from active app shell. Removed root history is + documented only in `docs/archive/REMOVED_LEGACY_ROOTS.md`. Is this final architecture? -- No as a permanent source descriptor; yes as a short-lived historical record - during root deletion preparation. +- Yes. Final owner: -- `apps/nrf52_node`, `builds/pio_nrf52`, and `boards/gat562_mesh_evb_pro`. +- `apps/nrf52_node`, `builds/pio_nrf52`, and + `boards/gat562_mesh_evb_pro`; docs/archive owns removed root history. Disposition: -- Must Rename. +- Deleted. + +Final status: +- Historical descriptor retired from active app shell. Delete condition: -- delete once `docs/archive` records removed root history and PIO/GAT562 source - ownership no longer requires historical source identity in app/runtime code. +- Satisfied once docs/archive records removed root history and active app/build + code has no descriptor files, targets, includes, or fields. Risk: -- medium; it is intentionally metadata-only and does not expose a root path - field, but it still names historical roots. +- low-medium; the wrapper no longer compiles or includes this descriptor. ## Surface: esp32_lvgl_historical_source_descriptor Category: -- transitional descriptors +- retired descriptors Current location: -- `apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.*` -- `apps/esp32_lvgl/tests/esp32_lvgl_historical_source_descriptor_smoke.cpp` +- removed from active app source and tests. Current callers: -- `apps/esp32_lvgl/src/esp32_lvgl_app_shell.*` +- none from active app or build code. +- `tools/architecture/check_legacy_disposition_execution_ready.py` and + `tools/architecture/check_no_root_legacy_ready.py` assert it stays retired. Current responsibility: -- records historical ESP-IDF root identity while the ESP-IDF final owner - migration plan is established. +- Historical descriptor retired from active app shell. Removed root history is + documented only in `docs/archive/REMOVED_LEGACY_ROOTS.md`. Is this final architecture? -- No as a permanent source descriptor; it is a migration landing record only. +- Yes. Final owner: -- `apps/esp32_lvgl` and `builds/esp_idf`. +- `apps/esp32_lvgl` and `builds/esp_idf`; docs/archive owns removed root + history. Disposition: -- Must Rename. +- Deleted. + +Final status: +- Historical descriptor retired from active app shell. Delete condition: -- delete once ESP-IDF component/source ownership has moved out of - `legacy/app_implementations/esp_idf` and historical root removal is recorded. +- Satisfied once docs/archive records removed root history and active app/build + code has no descriptor files, targets, includes, or fields. Risk: -- medium-high; ESP-IDF is still an active build dependency. +- medium; ESP-IDF remains an active build path, but descriptor metadata is no + longer part of the app shell contract. ## Surface: ui_headless_runtime descriptor consumer diff --git a/tools/architecture/check_legacy_disposition_execution_ready.py b/tools/architecture/check_legacy_disposition_execution_ready.py index ea7d305f..2d452dde 100644 --- a/tools/architecture/check_legacy_disposition_execution_ready.py +++ b/tools/architecture/check_legacy_disposition_execution_ready.py @@ -8,9 +8,13 @@ from pathlib import Path ROOT = Path(__file__).resolve().parents[2] INVENTORY = "docs/audits/LEGACY_COMPAT_TEMP_SURFACE_INVENTORY.md" +GENERATED_BUILD_PREFIXES = ( + "builds/linux_cmake/build/", + "builds/pio_nrf52/.pio/", +) -HISTORICAL_DESCRIPTOR_FILES = [ +RETIRED_HISTORICAL_DESCRIPTOR_FILES = [ "apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.h", "apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.cpp", "apps/linux_sim_shell/tests/linux_sim_historical_source_descriptor_smoke.cpp", @@ -57,8 +61,12 @@ def iter_files(base: Path): if not base.exists(): return for path in base.rglob("*"): - if path.is_file(): - yield path + if not path.is_file(): + continue + rel = path.relative_to(ROOT).as_posix() + if rel.startswith(GENERATED_BUILD_PREFIXES): + continue + yield path def check_no_legacy_source_descriptor_files(failures: list[str]) -> None: @@ -66,66 +74,37 @@ def check_no_legacy_source_descriptor_files(failures: list[str]) -> None: rel = path.relative_to(ROOT).as_posix() if "legacy_source_descriptor" in rel: failures.append(f"apps/ still contains legacy_source_descriptor file: {rel}") + if "historical_source_descriptor" in rel: + failures.append(f"apps/ still contains historical_source_descriptor file: {rel}") -def check_historical_descriptors(failures: list[str]) -> None: - for rel in HISTORICAL_DESCRIPTOR_FILES: - require_file(rel, failures) +def check_historical_descriptors_retired(failures: list[str]) -> None: + for rel in RETIRED_HISTORICAL_DESCRIPTOR_FILES: + if (ROOT / rel).exists(): + failures.append( + f"historical descriptor must stay retired from active app surface: {rel}" + ) forbidden = [ - 'root_path = "legacy/', - "active_root", - "source_root_path", + "historical_source_descriptor", + "HistoricalSourceDescriptor", + "historical_root_name", + "historical_generic_root_name", + "historical_board_root_name", + "replacement_owner", ] - for rel in HISTORICAL_DESCRIPTOR_FILES: - path = ROOT / rel - if not path.is_file(): - continue - text = read(rel) - for token in forbidden: - if token in text: - failures.append(f"{rel} contains forbidden historical descriptor token: {token}") - - require_tokens( - "apps/linux_sim_shell/src/linux_sim_historical_source_descriptor.h", - [ - "LinuxSimHistoricalSourceDescriptor", - "historical_root_name", - "historical_role", - "replacement_owner", - ], - failures, - ) - require_tokens( - "apps/linux_uconsole_gtk/src/linux_uconsole_gtk_historical_source_descriptor.h", - [ - "LinuxUConsoleGtkHistoricalSourceDescriptor", - "historical_root_name", - "historical_role", - "replacement_owner", - ], - failures, - ) - require_tokens( - "apps/nrf52_node/src/nrf52_historical_source_descriptor.h", - [ - "Nrf52HistoricalSourceDescriptor", - "historical_generic_root_name", - "historical_board_root_name", - "replacement_owner", - ], - failures, - ) - require_tokens( - "apps/esp32_lvgl/src/esp32_lvgl_historical_source_descriptor.h", - [ - "Esp32LvglHistoricalSourceDescriptor", - "historical_root_name", - "historical_role", - "replacement_owner", - ], - failures, - ) + scanned_suffixes = {".h", ".hpp", ".cpp", ".cc", ".cxx", ".cmake", ".ini", ".json"} + for root_name in ["apps", "builds", "cmake"]: + for path in iter_files(ROOT / root_name): + if path.suffix not in scanned_suffixes and path.name != "CMakeLists.txt": + continue + rel = path.relative_to(ROOT).as_posix() + text = path.read_text(encoding="utf-8", errors="ignore") + for token in forbidden: + if token in text: + failures.append( + f"{rel} contains retired historical descriptor token: {token}" + ) def check_nrf52_gat562_final_owner_surface(failures: list[str]) -> None: @@ -217,6 +196,7 @@ def check_esp_idf_landing_plan(failures: list[str]) -> None: "team_ui_store", "idf_entry", "esp_idf_legacy_implementation_adapter", + "historical descriptor retired from active app shell", "no ESP-IDF legacy root is deleted", ], failures, @@ -231,7 +211,7 @@ def check_inventory_updated(failures: list[str]) -> None: for token in [ "linux_sim_historical_source_descriptor (formerly linux_sim_legacy_source_descriptor)", "linux_uconsole_gtk_historical_source_descriptor (formerly linux_uconsole_gtk_legacy_source_descriptor)", - "Batch 1 completed the rename and removed the `root_path` field", + "Historical descriptor retired from active app shell", "nrf52_historical_source_descriptor", "esp32_lvgl_historical_source_descriptor", "ui_headless_runtime descriptor consumer", @@ -262,7 +242,7 @@ def main() -> int: failures: list[str] = [] check_no_legacy_source_descriptor_files(failures) - check_historical_descriptors(failures) + check_historical_descriptors_retired(failures) check_nrf52_gat562_final_owner_surface(failures) check_pio_nrf52_legacy_dependency_extracted(failures) check_esp_idf_landing_plan(failures) diff --git a/tools/architecture/check_no_root_legacy_ready.py b/tools/architecture/check_no_root_legacy_ready.py index a517fd46..00358b76 100644 --- a/tools/architecture/check_no_root_legacy_ready.py +++ b/tools/architecture/check_no_root_legacy_ready.py @@ -14,14 +14,22 @@ ACTIVE_ROOTS = [ "boards", "cmake", ] +GENERATED_BUILD_PREFIXES = ( + "builds/linux_cmake/build/", + "builds/pio_nrf52/.pio/", +) def iter_files(base: Path): if not base.exists(): return for path in base.rglob("*"): - if path.is_file(): - yield path + if not path.is_file(): + continue + rel = path.relative_to(ROOT).as_posix() + if rel.startswith(GENERATED_BUILD_PREFIXES): + continue + yield path def read(path: Path) -> str: @@ -30,6 +38,14 @@ def read(path: Path) -> str: def main() -> int: failures: list[str] = [] + retired_historical_descriptor_tokens = [ + "historical_source_descriptor", + "HistoricalSourceDescriptor", + "historical_root_name", + "historical_generic_root_name", + "historical_board_root_name", + "replacement_owner", + ] if (ROOT / "legacy").exists(): failures.append("root legacy/ directory must not exist") @@ -46,6 +62,16 @@ def main() -> int: failures.append( f"{rel} contains forbidden legacy_source_descriptor filename" ) + if root_name in {"apps", "builds", "cmake"}: + if "historical_source_descriptor" in rel: + failures.append( + f"{rel} contains forbidden historical_source_descriptor filename" + ) + for token in retired_historical_descriptor_tokens: + if token in text: + failures.append( + f"{rel} contains retired historical descriptor token: {token}" + ) if not (ROOT / "docs/archive/REMOVED_LEGACY_ROOTS.md").is_file(): failures.append("missing docs/archive/REMOVED_LEGACY_ROOTS.md")