Step 643: sprint 38 integration summary

This commit is contained in:
Bill
2026-02-17 21:46:54 -07:00
parent 9f37be1550
commit 0ae1ab830a
4 changed files with 218 additions and 0 deletions

View File

@@ -4666,4 +4666,13 @@ target_link_libraries(step642_test PRIVATE
tree_sitter_javascript tree_sitter_typescript
tree_sitter_java tree_sitter_rust tree_sitter_go)
add_executable(step643_test tests/step643_test.cpp)
target_include_directories(step643_test PRIVATE src)
target_link_libraries(step643_test PRIVATE
nlohmann_json::nlohmann_json
unofficial::tree-sitter::tree-sitter
tree_sitter_python tree_sitter_cpp tree_sitter_elisp
tree_sitter_javascript tree_sitter_typescript
tree_sitter_java tree_sitter_rust tree_sitter_go)
# Step 12: Dear ImGui shell scaffolding created (main.cpp exists but not built due to dependencies)

View File

@@ -0,0 +1,60 @@
#pragma once
// Step 643: Sprint 38 integration + summary
#include "JobDispatchTableGenerator.h"
#include "MqttBoilerplateGenerator.h"
#include "ProjectSkeletonGenerator.h"
#include "SQLiteDataLayerGenerator.h"
#include <string>
struct Sprint38IntegrationResult {
bool projectGenerated = false;
bool mqttGenerated = false;
bool sqliteGenerated = false;
bool dispatchGenerated = false;
bool cmakeReady = false;
bool hasMainEntry = false;
bool hasTopicHandlers = false;
bool compileReady = false;
};
class Sprint38IntegrationSummary {
public:
static Sprint38IntegrationResult run() {
Sprint38IntegrationResult out;
auto project = ProjectSkeletonGenerator::generate(
"hivemind_drone",
"HiveMind drone bootstrap",
{"nlohmann_json", "paho-mqttpp3", "SQLite3"});
out.projectGenerated = project.success;
out.cmakeReady = project.cmakeLists.find("add_executable(hivemind_drone") != std::string::npos;
out.hasMainEntry = project.mainCpp.find("int main") != std::string::npos;
auto mqtt = MqttBoilerplateGenerator::generate("DroneMqttClient", {
{"borg/energy/context", "EnergyContext", 1},
{"borg/jobs/pending", "PendingJob", 1},
{"borg/registry/commit", "RegistryCommit", 2}
});
out.mqttGenerated = mqtt.success;
out.hasTopicHandlers = mqtt.sourceCode.find("borg/jobs/pending") != std::string::npos;
auto sqlite = SQLiteDataLayerGenerator::generate({
{"jobs", {"id", "status", "payload"}},
{"executions", {"id", "job_id", "started_at"}}
});
out.sqliteGenerated = sqlite.success;
auto dispatch = JobDispatchTableGenerator::generate({
{"compile", {"cpp", "build"}, "CompilePayload", "runCompile"},
{"test", {"cpp", "test"}, "TestPayload", "runTests"}
});
out.dispatchGenerated = dispatch.success;
out.compileReady = out.projectGenerated && out.mqttGenerated &&
out.sqliteGenerated && out.dispatchGenerated &&
out.cmakeReady && out.hasMainEntry && out.hasTopicHandlers;
return out;
}
};

View File

@@ -0,0 +1,83 @@
// Step 643: Sprint 38 integration + summary (8 tests)
#include "Sprint38IntegrationSummary.h"
#include <iostream>
static int passed = 0, failed = 0;
#define TEST(name) { std::cout << " " << #name << "... "; }
#define PASS() { std::cout << "PASS\n"; ++passed; }
#define FAIL(msg) { std::cout << "FAIL: " << msg << "\n"; ++failed; }
#define CHECK(cond, msg) if (!(cond)) { FAIL(msg); return; }
void test_project_generation_is_successful() {
TEST(project_generation_is_successful);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.projectGenerated, "project generation should pass");
PASS();
}
void test_mqtt_generation_is_successful() {
TEST(mqtt_generation_is_successful);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.mqttGenerated, "mqtt generation should pass");
PASS();
}
void test_sqlite_generation_is_successful() {
TEST(sqlite_generation_is_successful);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.sqliteGenerated, "sqlite generation should pass");
PASS();
}
void test_dispatch_generation_is_successful() {
TEST(dispatch_generation_is_successful);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.dispatchGenerated, "dispatch generation should pass");
PASS();
}
void test_cmake_ready_signal_is_true() {
TEST(cmake_ready_signal_is_true);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.cmakeReady, "cmake should be ready");
PASS();
}
void test_main_entry_signal_is_true() {
TEST(main_entry_signal_is_true);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.hasMainEntry, "main entry should exist");
PASS();
}
void test_topic_handlers_signal_is_true() {
TEST(topic_handlers_signal_is_true);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.hasTopicHandlers, "topic handlers should be present");
PASS();
}
void test_compile_ready_signal_is_true() {
TEST(compile_ready_signal_is_true);
auto result = Sprint38IntegrationSummary::run();
CHECK(result.compileReady, "compile-ready should be true");
PASS();
}
int main() {
std::cout << "Step 643: Sprint 38 integration + summary\n";
test_project_generation_is_successful();
test_mqtt_generation_is_successful();
test_sqlite_generation_is_successful();
test_dispatch_generation_is_successful();
test_cmake_ready_signal_is_true();
test_main_entry_signal_is_true();
test_topic_handlers_signal_is_true();
test_compile_ready_signal_is_true();
std::cout << "\nResults: " << passed << "/" << (passed + failed) << " passed\n";
return failed == 0 ? 0 : 1;
}

View File

@@ -13106,3 +13106,69 @@ drone-side typed dispatch wiring.
- `editor/src/JobDispatchTableGenerator.h` (`55` <= `600`)
- `editor/tests/step642_test.cpp` within test-file size guidance (`125` lines)
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
### Step 643: Sprint 38 Integration + Summary
**Status:** PASS (8/8 tests)
Adds Sprint 38 end-to-end integration composition for project skeleton, MQTT
client scaffolding, SQLite data layer, and dispatch-table generation, with a
compile-readiness summary signal for the generated drone stack.
**Files added:**
- `editor/src/Sprint38IntegrationSummary.h` - sprint integration runner:
- composes Step 639-642 generators
- validates CMake/main/topic-handler readiness signals
- reports compile-ready summary status
- `editor/tests/step643_test.cpp` - 8 tests covering:
- per-generator success signals
- CMake/main/topic-handler readiness checks
- compile-ready aggregate signal
**Files modified:**
- `editor/CMakeLists.txt` - `step643_test` target
**Verification run:**
- `cmake -S editor -B editor/build-native` - PASS
- `cmake --build editor/build-native --target step643_test step642_test` - PASS
- `./editor/build-native/step643_test` - PASS (8/8)
- `./editor/build-native/step642_test` - PASS (12/12) regression coverage
**Architecture gate check:**
- `editor/src/Sprint38IntegrationSummary.h` (`60` <= `600`)
- `editor/tests/step643_test.cpp` within test-file size guidance (`83` lines)
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
## Sprint 38 Refactor Pass (Architecture Compliance)
**Status:** PASS
Completed end-of-sprint modified-files audit for Steps 634-643.
No additional refactor was required: all Sprint 38 files were already compliant
with size/function constraints and naming conventions.
**Verification run (full sprint matrix):**
- `cmake --build editor/build-native --target step634_test step635_test step636_test step637_test step638_test step639_test step640_test step641_test step642_test step643_test` - PASS
- `./editor/build-native/step634_test` - PASS (12/12)
- `./editor/build-native/step635_test` - PASS (12/12)
- `./editor/build-native/step636_test` - PASS (12/12)
- `./editor/build-native/step637_test` - PASS (12/12)
- `./editor/build-native/step638_test` - PASS (8/8)
- `./editor/build-native/step639_test` - PASS (12/12)
- `./editor/build-native/step640_test` - PASS (12/12)
- `./editor/build-native/step641_test` - PASS (12/12)
- `./editor/build-native/step642_test` - PASS (12/12)
- `./editor/build-native/step643_test` - PASS (8/8)
- Sprint 38 matrix total: **112/112 passing**
**Architecture gate check:**
- `editor/src/SchemaToCppGenerator.h` (`116` <= `600`)
- `editor/src/CapabilityDeclarationGenerator.h` (`68` <= `600`)
- `editor/src/DroneErrorSynthesis.h` (`62` <= `600`)
- `editor/src/PlatformCMakeTargetGenerator.h` (`43` <= `600`)
- `editor/src/Phase38aIntegration.h` (`61` <= `600`)
- `editor/src/ProjectSkeletonGenerator.h` (`67` <= `600`)
- `editor/src/MqttBoilerplateGenerator.h` (`56` <= `600`)
- `editor/src/SQLiteDataLayerGenerator.h` (`47` <= `600`)
- `editor/src/JobDispatchTableGenerator.h` (`55` <= `600`)
- `editor/src/Sprint38IntegrationSummary.h` (`60` <= `600`)
- Sprint 38 test files remain within test-file size guidance.
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`