From 7384660e31c3d161142f0979e03f398390a5a010 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 17 Feb 2026 11:15:15 -0700 Subject: [PATCH] Step 583: add sprint 32 integration summary --- editor/CMakeLists.txt | 9 ++ editor/src/Sprint32IntegrationSummary.h | 70 +++++++++++++ editor/tests/step583_test.cpp | 128 ++++++++++++++++++++++++ progress.md | 44 ++++++++ 4 files changed, 251 insertions(+) create mode 100644 editor/src/Sprint32IntegrationSummary.h create mode 100644 editor/tests/step583_test.cpp diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index a2c3485..4f557ee 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -4126,4 +4126,13 @@ target_link_libraries(step582_test PRIVATE tree_sitter_javascript tree_sitter_typescript tree_sitter_java tree_sitter_rust tree_sitter_go) +add_executable(step583_test tests/step583_test.cpp) +target_include_directories(step583_test PRIVATE src) +target_link_libraries(step583_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) diff --git a/editor/src/Sprint32IntegrationSummary.h b/editor/src/Sprint32IntegrationSummary.h new file mode 100644 index 0000000..935be1c --- /dev/null +++ b/editor/src/Sprint32IntegrationSummary.h @@ -0,0 +1,70 @@ +#pragma once +// Step 583: Sprint 32 Integration + Summary + +#include +#include + +struct Sprint32Signals { + bool markdownSpecParser = false; // 574 + bool requirementNormalization = false; // 575 + bool scopeMilestoneDecomposer = false; // 576 + bool architectReviewSurface = false; // 577 + bool phase32aIntegration = false; // 578 + bool taskitemGeneratorV2 = false; // 579 + bool confidenceAmbiguityAnnotation = false; // 580 + bool acceptanceCriteriaBinding = false; // 581 + bool intakeQueueSimulationHarness = false; // 582 +}; + +struct Sprint32IntegrationResult { + bool phase32aPass = false; + bool phase32bPass = false; + bool sprint32Pass = false; + std::vector notes; +}; + +class Sprint32IntegrationSummary { +public: + static Sprint32IntegrationResult summarize(const Sprint32Signals& s) { + Sprint32IntegrationResult r; + r.phase32aPass = s.markdownSpecParser && + s.requirementNormalization && + s.scopeMilestoneDecomposer && + s.architectReviewSurface && + s.phase32aIntegration; + + r.phase32bPass = s.taskitemGeneratorV2 && + s.confidenceAmbiguityAnnotation && + s.acceptanceCriteriaBinding && + s.intakeQueueSimulationHarness; + + r.sprint32Pass = r.phase32aPass && r.phase32bPass; + r.notes = buildNotes(s, r); + return r; + } + +private: + static std::vector buildNotes(const Sprint32Signals& s, + const Sprint32IntegrationResult& r) { + std::vector notes; + if (!s.markdownSpecParser) notes.push_back("fail:step574_markdown_spec_parser"); + if (!s.requirementNormalization) notes.push_back("fail:step575_requirement_normalization"); + if (!s.scopeMilestoneDecomposer) notes.push_back("fail:step576_scope_milestone_decomposer"); + if (!s.architectReviewSurface) notes.push_back("fail:step577_architect_review_surface"); + if (!s.phase32aIntegration) notes.push_back("fail:step578_phase32a_integration"); + if (!s.taskitemGeneratorV2) notes.push_back("fail:step579_taskitem_generator_v2"); + if (!s.confidenceAmbiguityAnnotation) notes.push_back("fail:step580_confidence_ambiguity_annotation"); + if (!s.acceptanceCriteriaBinding) notes.push_back("fail:step581_acceptance_criteria_binding"); + if (!s.intakeQueueSimulationHarness) notes.push_back("fail:step582_intake_queue_simulation_harness"); + + if (r.sprint32Pass) { + notes.push_back("sprint32:architect_intake_pipeline_ready"); + notes.push_back("sprint32:taskitem_queue_quality_signals_ready"); + notes.push_back("sprint32:markdown_to_constrained_execution_stable"); + } else { + if (!r.phase32aPass) notes.push_back("phase32a:blocked"); + if (!r.phase32bPass) notes.push_back("phase32b:blocked"); + } + return notes; + } +}; diff --git a/editor/tests/step583_test.cpp b/editor/tests/step583_test.cpp new file mode 100644 index 0000000..16d6691 --- /dev/null +++ b/editor/tests/step583_test.cpp @@ -0,0 +1,128 @@ +// Step 583: Sprint 32 Integration + Summary (8 tests) + +#include "Sprint32IntegrationSummary.h" + +#include + +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; } else {} + +static bool hasNote(const Sprint32IntegrationResult& r, const std::string& note) { + for (const auto& n : r.notes) if (n == note) return true; + return false; +} + +static Sprint32Signals allPass() { + Sprint32Signals s; + s.markdownSpecParser = true; + s.requirementNormalization = true; + s.scopeMilestoneDecomposer = true; + s.architectReviewSurface = true; + s.phase32aIntegration = true; + s.taskitemGeneratorV2 = true; + s.confidenceAmbiguityAnnotation = true; + s.acceptanceCriteriaBinding = true; + s.intakeQueueSimulationHarness = true; + return s; +} + +void test_all_signals_pass_sprint() { + TEST(all_signals_pass_sprint); + auto r = Sprint32IntegrationSummary::summarize(allPass()); + CHECK(r.phase32aPass, "phase32a should pass"); + CHECK(r.phase32bPass, "phase32b should pass"); + CHECK(r.sprint32Pass, "sprint32 should pass"); + PASS(); +} + +void test_phase32a_failure_blocks_sprint() { + TEST(phase32a_failure_blocks_sprint); + auto s = allPass(); + s.architectReviewSurface = false; + auto r = Sprint32IntegrationSummary::summarize(s); + CHECK(!r.phase32aPass, "phase32a should fail"); + CHECK(!r.sprint32Pass, "sprint32 should fail"); + CHECK(hasNote(r, "fail:step577_architect_review_surface"), "step577 failure note expected"); + PASS(); +} + +void test_phase32b_failure_blocks_sprint() { + TEST(phase32b_failure_blocks_sprint); + auto s = allPass(); + s.acceptanceCriteriaBinding = false; + auto r = Sprint32IntegrationSummary::summarize(s); + CHECK(!r.phase32bPass, "phase32b should fail"); + CHECK(!r.sprint32Pass, "sprint32 should fail"); + CHECK(hasNote(r, "fail:step581_acceptance_criteria_binding"), "step581 failure note expected"); + PASS(); +} + +void test_success_notes_emitted_on_full_pass() { + TEST(success_notes_emitted_on_full_pass); + auto r = Sprint32IntegrationSummary::summarize(allPass()); + CHECK(hasNote(r, "sprint32:architect_intake_pipeline_ready"), "success note missing"); + CHECK(hasNote(r, "sprint32:taskitem_queue_quality_signals_ready"), "success note missing"); + CHECK(hasNote(r, "sprint32:markdown_to_constrained_execution_stable"), "success note missing"); + PASS(); +} + +void test_blocked_phase_notes_emitted_on_failure() { + TEST(blocked_phase_notes_emitted_on_failure); + auto s = allPass(); + s.markdownSpecParser = false; + s.taskitemGeneratorV2 = false; + auto r = Sprint32IntegrationSummary::summarize(s); + CHECK(hasNote(r, "phase32a:blocked"), "phase32a blocked note expected"); + CHECK(hasNote(r, "phase32b:blocked"), "phase32b blocked note expected"); + PASS(); +} + +void test_multiple_failure_notes_aggregate() { + TEST(multiple_failure_notes_aggregate); + auto s = allPass(); + s.requirementNormalization = false; + s.phase32aIntegration = false; + s.intakeQueueSimulationHarness = false; + auto r = Sprint32IntegrationSummary::summarize(s); + CHECK(hasNote(r, "fail:step575_requirement_normalization"), "step575 failure note missing"); + CHECK(hasNote(r, "fail:step578_phase32a_integration"), "step578 failure note missing"); + CHECK(hasNote(r, "fail:step582_intake_queue_simulation_harness"), "step582 failure note missing"); + PASS(); +} + +void test_all_false_signals_fail_all_phases() { + TEST(all_false_signals_fail_all_phases); + Sprint32Signals s; + auto r = Sprint32IntegrationSummary::summarize(s); + CHECK(!r.phase32aPass && !r.phase32bPass && !r.sprint32Pass, "all phases should fail"); + PASS(); +} + +void test_single_phase32b_failure_keeps_phase32a_passed() { + TEST(single_phase32b_failure_keeps_phase32a_passed); + auto s = allPass(); + s.confidenceAmbiguityAnnotation = false; + auto r = Sprint32IntegrationSummary::summarize(s); + CHECK(r.phase32aPass, "phase32a should remain pass"); + CHECK(!r.phase32bPass, "phase32b should fail"); + PASS(); +} + +int main() { + std::cout << "Step 583: Sprint 32 Integration + Summary\n"; + + test_all_signals_pass_sprint(); // 1 + test_phase32a_failure_blocks_sprint(); // 2 + test_phase32b_failure_blocks_sprint(); // 3 + test_success_notes_emitted_on_full_pass(); // 4 + test_blocked_phase_notes_emitted_on_failure(); // 5 + test_multiple_failure_notes_aggregate(); // 6 + test_all_false_signals_fail_all_phases(); // 7 + test_single_phase32b_failure_keeps_phase32a_passed();// 8 + + std::cout << "\nResults: " << passed << "/" << (passed + failed) << " passed\n"; + return failed == 0 ? 0 : 1; +} diff --git a/progress.md b/progress.md index 73b4313..6ee9e7c 100644 --- a/progress.md +++ b/progress.md @@ -10869,3 +10869,47 @@ queue-ready taskitems with confidence, escalation, and acceptance coverage. - `editor/src/IntakeToQueueSimulationHarness.h` within header-size limit (`96` <= `600`) - `editor/tests/step582_test.cpp` within test-file size guidance (`193` lines) - Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md` + +### Step 583: Sprint 32 Integration + Summary +**Status:** PASS (8/8 tests) + +Completes Sprint 32 integration by aggregating Phase 32a and 32b readiness +signals into phase/sprint outcomes with closure diagnostics. + +**Files added:** +- `editor/src/Sprint32IntegrationSummary.h` - sprint integration module: + - aggregates Phase 32a and 32b gate signals + - computes phase pass flags and Sprint 32 pass flag + - emits per-step failure notes and blocked phase notes + - emits sprint readiness notes on full pass +- `editor/tests/step583_test.cpp` - 8 tests covering: + - full sprint pass path + - phase-specific failure blocking behavior + - success/failure note emission behavior + - multi-failure aggregation behavior + - all-false boundary behavior + - phase isolation behavior on single 32b failure + +**Files modified:** +- `editor/CMakeLists.txt` - `step583_test` target + +**Verification run:** +- `cmake -S editor -B editor/build-native` - PASS +- `cmake --build editor/build-native --target step583_test step582_test` - PASS +- `./editor/build-native/step583_test` - PASS (8/8) +- `./editor/build-native/step582_test` - PASS (12/12) regression coverage + +**Architecture gate check:** +- `editor/src/Sprint32IntegrationSummary.h` within header-size limit (`70` <= `600`) +- `editor/tests/step583_test.cpp` within test-file size guidance (`128` lines) +- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md` + +**Phase 32b totals (579-583):** +- **Steps completed:** 5 +- **New tests in this phase plan:** 56/56 passing + +**Sprint 32 totals (574-583):** +- **Steps completed:** 10 +- **New tests in this sprint plan:** 112/112 passing +- **Phase 32a (574-578):** 56/56 passing +- **Phase 32b (579-583):** 56/56 passing