Step 553: add sprint 29 integration summary and closure gate

This commit is contained in:
Bill
2026-02-17 10:23:35 -07:00
parent 29840c8e3e
commit 662b08147a
4 changed files with 247 additions and 0 deletions

View File

@@ -3856,4 +3856,13 @@ target_link_libraries(step552_test PRIVATE
tree_sitter_javascript tree_sitter_typescript
tree_sitter_java tree_sitter_rust tree_sitter_go)
add_executable(step553_test tests/step553_test.cpp)
target_include_directories(step553_test PRIVATE src)
target_link_libraries(step553_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,70 @@
#pragma once
// Step 553: Sprint 29 Integration + Summary
#include <string>
#include <vector>
struct Sprint29Signals {
bool constrainedRoutingRuleset = false; // 544
bool contextBundleMinimizer = false; // 545
bool confidenceCalibrator = false; // 546
bool costPolicyGuard = false; // 547
bool phase29aIntegration = false; // 548
bool costSuggestionEngine = false; // 549
bool workerEfficiencyDashboard = false; // 550
bool reviewGateRefinement = false; // 551
bool costQualityRegressionSuite = false; // 552
};
struct Sprint29IntegrationResult {
bool phase29aPass = false;
bool phase29bPass = false;
bool sprint29Pass = false;
std::vector<std::string> notes;
};
class Sprint29IntegrationSummary {
public:
static Sprint29IntegrationResult summarize(const Sprint29Signals& s) {
Sprint29IntegrationResult r;
r.phase29aPass = s.constrainedRoutingRuleset &&
s.contextBundleMinimizer &&
s.confidenceCalibrator &&
s.costPolicyGuard &&
s.phase29aIntegration;
r.phase29bPass = s.costSuggestionEngine &&
s.workerEfficiencyDashboard &&
s.reviewGateRefinement &&
s.costQualityRegressionSuite;
r.sprint29Pass = r.phase29aPass && r.phase29bPass;
r.notes = buildNotes(s, r);
return r;
}
private:
static std::vector<std::string> buildNotes(const Sprint29Signals& s,
const Sprint29IntegrationResult& r) {
std::vector<std::string> notes;
if (!s.constrainedRoutingRuleset) notes.push_back("fail:step544_routing_ruleset");
if (!s.contextBundleMinimizer) notes.push_back("fail:step545_context_minimizer");
if (!s.confidenceCalibrator) notes.push_back("fail:step546_confidence_calibrator");
if (!s.costPolicyGuard) notes.push_back("fail:step547_cost_policy_guard");
if (!s.phase29aIntegration) notes.push_back("fail:step548_phase29a_integration");
if (!s.costSuggestionEngine) notes.push_back("fail:step549_cost_suggestions");
if (!s.workerEfficiencyDashboard) notes.push_back("fail:step550_worker_dashboard");
if (!s.reviewGateRefinement) notes.push_back("fail:step551_review_gate_refinement");
if (!s.costQualityRegressionSuite) notes.push_back("fail:step552_cost_quality_regression");
if (r.sprint29Pass) {
notes.push_back("sprint29:routing_and_cost_policy_coherent");
notes.push_back("sprint29:context_width_reduced_without_quality_regression");
notes.push_back("sprint29:cost_controls_active_with_safety_preserved");
} else {
if (!r.phase29aPass) notes.push_back("phase29a:blocked");
if (!r.phase29bPass) notes.push_back("phase29b:blocked");
}
return notes;
}
};

View File

@@ -0,0 +1,128 @@
// Step 553: Sprint 29 Integration + Summary (8 tests)
#include "Sprint29IntegrationSummary.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; } else {}
static bool hasNote(const Sprint29IntegrationResult& r, const std::string& note) {
for (const auto& n : r.notes) if (n == note) return true;
return false;
}
static Sprint29Signals allPass() {
Sprint29Signals s;
s.constrainedRoutingRuleset = true;
s.contextBundleMinimizer = true;
s.confidenceCalibrator = true;
s.costPolicyGuard = true;
s.phase29aIntegration = true;
s.costSuggestionEngine = true;
s.workerEfficiencyDashboard = true;
s.reviewGateRefinement = true;
s.costQualityRegressionSuite = true;
return s;
}
void test_all_signals_pass_sprint() {
TEST(all_signals_pass_sprint);
auto r = Sprint29IntegrationSummary::summarize(allPass());
CHECK(r.phase29aPass, "phase29a should pass");
CHECK(r.phase29bPass, "phase29b should pass");
CHECK(r.sprint29Pass, "sprint should pass");
PASS();
}
void test_phase29a_failure_blocks_sprint() {
TEST(phase29a_failure_blocks_sprint);
auto s = allPass();
s.contextBundleMinimizer = false;
auto r = Sprint29IntegrationSummary::summarize(s);
CHECK(!r.phase29aPass, "phase29a should fail");
CHECK(!r.sprint29Pass, "sprint should fail");
CHECK(hasNote(r, "fail:step545_context_minimizer"), "step545 failure note expected");
PASS();
}
void test_phase29b_failure_blocks_sprint() {
TEST(phase29b_failure_blocks_sprint);
auto s = allPass();
s.costQualityRegressionSuite = false;
auto r = Sprint29IntegrationSummary::summarize(s);
CHECK(!r.phase29bPass, "phase29b should fail");
CHECK(!r.sprint29Pass, "sprint should fail");
CHECK(hasNote(r, "fail:step552_cost_quality_regression"), "step552 failure note expected");
PASS();
}
void test_success_notes_emitted_on_full_pass() {
TEST(success_notes_emitted_on_full_pass);
auto r = Sprint29IntegrationSummary::summarize(allPass());
CHECK(hasNote(r, "sprint29:routing_and_cost_policy_coherent"), "success note missing");
CHECK(hasNote(r, "sprint29:context_width_reduced_without_quality_regression"), "success note missing");
CHECK(hasNote(r, "sprint29:cost_controls_active_with_safety_preserved"), "success note missing");
PASS();
}
void test_blocked_phase_notes_emitted_on_failure() {
TEST(blocked_phase_notes_emitted_on_failure);
auto s = allPass();
s.costPolicyGuard = false;
s.workerEfficiencyDashboard = false;
auto r = Sprint29IntegrationSummary::summarize(s);
CHECK(hasNote(r, "phase29a:blocked"), "phase29a blocked note expected");
CHECK(hasNote(r, "phase29b:blocked"), "phase29b blocked note expected");
PASS();
}
void test_multiple_failure_notes_aggregate() {
TEST(multiple_failure_notes_aggregate);
auto s = allPass();
s.constrainedRoutingRuleset = false;
s.reviewGateRefinement = false;
s.costSuggestionEngine = false;
auto r = Sprint29IntegrationSummary::summarize(s);
CHECK(hasNote(r, "fail:step544_routing_ruleset"), "step544 note missing");
CHECK(hasNote(r, "fail:step551_review_gate_refinement"), "step551 note missing");
CHECK(hasNote(r, "fail:step549_cost_suggestions"), "step549 note missing");
PASS();
}
void test_all_false_signals_fail_all_phases() {
TEST(all_false_signals_fail_all_phases);
Sprint29Signals s;
auto r = Sprint29IntegrationSummary::summarize(s);
CHECK(!r.phase29aPass && !r.phase29bPass && !r.sprint29Pass, "all phases should fail");
PASS();
}
void test_single_phase29b_failure_keeps_phase29a_passed() {
TEST(single_phase29b_failure_keeps_phase29a_passed);
auto s = allPass();
s.workerEfficiencyDashboard = false;
auto r = Sprint29IntegrationSummary::summarize(s);
CHECK(r.phase29aPass, "phase29a should remain pass");
CHECK(!r.phase29bPass, "phase29b should fail");
PASS();
}
int main() {
std::cout << "Step 553: Sprint 29 Integration + Summary\n";
test_all_signals_pass_sprint(); // 1
test_phase29a_failure_blocks_sprint(); // 2
test_phase29b_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_phase29b_failure_keeps_phase29a_passed(); // 8
std::cout << "\nResults: " << passed << "/" << (passed + failed) << " passed\n";
return failed == 0 ? 0 : 1;
}

View File

@@ -9693,3 +9693,43 @@ reduction targets.
- `editor/src/CostQualityRegressionSuite.h` within header-size limit (`60` <= `600`)
- `editor/tests/step552_test.cpp` within test-file size guidance (`167` lines)
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
### Step 553: Sprint 29 Integration + Summary
**Status:** PASS (8/8 tests)
Completes Sprint 29 integration by synthesizing Step 544-552 readiness signals
into phase-level and sprint-level outcomes with closure diagnostics.
**Files added:**
- `editor/src/Sprint29IntegrationSummary.h` - sprint integration module:
- aggregates all Phase 29a and 29b gate signals
- computes phase pass flags and final Sprint 29 pass flag
- emits failure-note diagnostics for missing gates
- emits completion notes on full sprint pass
- `editor/tests/step553_test.cpp` - 8 tests covering:
- full sprint pass path
- phase-specific failure blocking behavior
- success/failure note emission
- multi-failure aggregation
- all-false boundary behavior
- phase-status isolation on single Phase 29b failure
**Files modified:**
- `editor/CMakeLists.txt` - `step553_test` target
**Verification run:**
- `cmake -S editor -B editor/build-native` - PASS
- `cmake --build editor/build-native --target step553_test step552_test` - PASS
- `./editor/build-native/step553_test` - PASS (8/8)
- `./editor/build-native/step552_test` - PASS (12/12) regression coverage
**Architecture gate check:**
- `editor/src/Sprint29IntegrationSummary.h` within header-size limit (`70` <= `600`)
- `editor/tests/step553_test.cpp` within test-file size guidance (`128` lines)
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
**Sprint 29 totals (544-553):**
- **Steps completed:** 10
- **New tests in this sprint plan:** 112/112 passing
- **Phase 29a (544-548):** 56/56 passing
- **Phase 29b (549-553):** 56/56 passing