Step 543: add sprint 28 integration summary and closure gate
This commit is contained in:
@@ -3766,4 +3766,13 @@ target_link_libraries(step542_test PRIVATE
|
||||
tree_sitter_javascript tree_sitter_typescript
|
||||
tree_sitter_java tree_sitter_rust tree_sitter_go)
|
||||
|
||||
add_executable(step543_test tests/step543_test.cpp)
|
||||
target_include_directories(step543_test PRIVATE src)
|
||||
target_link_libraries(step543_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)
|
||||
|
||||
70
editor/src/Sprint28IntegrationSummary.h
Normal file
70
editor/src/Sprint28IntegrationSummary.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
// Step 543: Sprint 28 Integration + Summary
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct Sprint28Signals {
|
||||
bool operationSelectorApi = false; // Step 534
|
||||
bool symbolSelectorApi = false; // Step 535
|
||||
bool argumentShapeValidator = false; // Step 536
|
||||
bool constrainedExecutionTelemetry = false; // Step 537
|
||||
bool phase28aIntegration = false; // Step 538
|
||||
bool cppAdapter = false; // Step 539
|
||||
bool pyTsAdapter = false; // Step 540
|
||||
bool rustGoAdapter = false; // Step 541
|
||||
bool crossLanguageConsistencyGate = false; // Step 542
|
||||
};
|
||||
|
||||
struct Sprint28IntegrationResult {
|
||||
bool phase28aPass = false;
|
||||
bool phase28bPass = false;
|
||||
bool sprint28Pass = false;
|
||||
std::vector<std::string> notes;
|
||||
};
|
||||
|
||||
class Sprint28IntegrationSummary {
|
||||
public:
|
||||
static Sprint28IntegrationResult summarize(const Sprint28Signals& s) {
|
||||
Sprint28IntegrationResult r;
|
||||
r.phase28aPass = s.operationSelectorApi &&
|
||||
s.symbolSelectorApi &&
|
||||
s.argumentShapeValidator &&
|
||||
s.constrainedExecutionTelemetry &&
|
||||
s.phase28aIntegration;
|
||||
|
||||
r.phase28bPass = s.cppAdapter &&
|
||||
s.pyTsAdapter &&
|
||||
s.rustGoAdapter &&
|
||||
s.crossLanguageConsistencyGate;
|
||||
|
||||
r.sprint28Pass = r.phase28aPass && r.phase28bPass;
|
||||
r.notes = buildNotes(s, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
private:
|
||||
static std::vector<std::string> buildNotes(const Sprint28Signals& s,
|
||||
const Sprint28IntegrationResult& r) {
|
||||
std::vector<std::string> notes;
|
||||
if (!s.operationSelectorApi) notes.push_back("fail:step534_operation_selector");
|
||||
if (!s.symbolSelectorApi) notes.push_back("fail:step535_symbol_selector");
|
||||
if (!s.argumentShapeValidator) notes.push_back("fail:step536_argument_shape_validator");
|
||||
if (!s.constrainedExecutionTelemetry) notes.push_back("fail:step537_constrained_telemetry");
|
||||
if (!s.phase28aIntegration) notes.push_back("fail:step538_phase28a_integration");
|
||||
if (!s.cppAdapter) notes.push_back("fail:step539_cpp_adapter");
|
||||
if (!s.pyTsAdapter) notes.push_back("fail:step540_pyts_adapter");
|
||||
if (!s.rustGoAdapter) notes.push_back("fail:step541_rustgo_adapter");
|
||||
if (!s.crossLanguageConsistencyGate) notes.push_back("fail:step542_cross_language_consistency");
|
||||
|
||||
if (r.sprint28Pass) {
|
||||
notes.push_back("sprint28:legal_choice_execution_stable");
|
||||
notes.push_back("sprint28:multi_language_adapters_consistent");
|
||||
notes.push_back("sprint28:out_of_scope_and_hallucinated_edits_blocked");
|
||||
} else {
|
||||
if (!r.phase28aPass) notes.push_back("phase28a:blocked");
|
||||
if (!r.phase28bPass) notes.push_back("phase28b:blocked");
|
||||
}
|
||||
return notes;
|
||||
}
|
||||
};
|
||||
128
editor/tests/step543_test.cpp
Normal file
128
editor/tests/step543_test.cpp
Normal file
@@ -0,0 +1,128 @@
|
||||
// Step 543: Sprint 28 Integration + Summary (8 tests)
|
||||
|
||||
#include "Sprint28IntegrationSummary.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 Sprint28IntegrationResult& r, const std::string& note) {
|
||||
for (const auto& n : r.notes) if (n == note) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static Sprint28Signals allPass() {
|
||||
Sprint28Signals s;
|
||||
s.operationSelectorApi = true;
|
||||
s.symbolSelectorApi = true;
|
||||
s.argumentShapeValidator = true;
|
||||
s.constrainedExecutionTelemetry = true;
|
||||
s.phase28aIntegration = true;
|
||||
s.cppAdapter = true;
|
||||
s.pyTsAdapter = true;
|
||||
s.rustGoAdapter = true;
|
||||
s.crossLanguageConsistencyGate = true;
|
||||
return s;
|
||||
}
|
||||
|
||||
void test_all_signals_pass_sprint() {
|
||||
TEST(all_signals_pass_sprint);
|
||||
auto r = Sprint28IntegrationSummary::summarize(allPass());
|
||||
CHECK(r.phase28aPass, "phase28a should pass");
|
||||
CHECK(r.phase28bPass, "phase28b should pass");
|
||||
CHECK(r.sprint28Pass, "sprint should pass");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_phase28a_failure_blocks_sprint() {
|
||||
TEST(phase28a_failure_blocks_sprint);
|
||||
auto s = allPass();
|
||||
s.argumentShapeValidator = false;
|
||||
auto r = Sprint28IntegrationSummary::summarize(s);
|
||||
CHECK(!r.phase28aPass, "phase28a should fail");
|
||||
CHECK(!r.sprint28Pass, "sprint should fail");
|
||||
CHECK(hasNote(r, "fail:step536_argument_shape_validator"), "step536 failure note expected");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_phase28b_failure_blocks_sprint() {
|
||||
TEST(phase28b_failure_blocks_sprint);
|
||||
auto s = allPass();
|
||||
s.rustGoAdapter = false;
|
||||
auto r = Sprint28IntegrationSummary::summarize(s);
|
||||
CHECK(!r.phase28bPass, "phase28b should fail");
|
||||
CHECK(!r.sprint28Pass, "sprint should fail");
|
||||
CHECK(hasNote(r, "fail:step541_rustgo_adapter"), "step541 failure note expected");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_success_notes_emitted_on_full_pass() {
|
||||
TEST(success_notes_emitted_on_full_pass);
|
||||
auto r = Sprint28IntegrationSummary::summarize(allPass());
|
||||
CHECK(hasNote(r, "sprint28:legal_choice_execution_stable"), "success note missing");
|
||||
CHECK(hasNote(r, "sprint28:multi_language_adapters_consistent"), "success note missing");
|
||||
CHECK(hasNote(r, "sprint28:out_of_scope_and_hallucinated_edits_blocked"), "success note missing");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_blocked_phase_notes_emitted_on_failure() {
|
||||
TEST(blocked_phase_notes_emitted_on_failure);
|
||||
auto s = allPass();
|
||||
s.symbolSelectorApi = false;
|
||||
s.cppAdapter = false;
|
||||
auto r = Sprint28IntegrationSummary::summarize(s);
|
||||
CHECK(hasNote(r, "phase28a:blocked"), "phase28a blocked note expected");
|
||||
CHECK(hasNote(r, "phase28b:blocked"), "phase28b blocked note expected");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_multiple_failures_aggregate_notes() {
|
||||
TEST(multiple_failures_aggregate_notes);
|
||||
auto s = allPass();
|
||||
s.operationSelectorApi = false;
|
||||
s.pyTsAdapter = false;
|
||||
s.crossLanguageConsistencyGate = false;
|
||||
auto r = Sprint28IntegrationSummary::summarize(s);
|
||||
CHECK(hasNote(r, "fail:step534_operation_selector"), "step534 failure note missing");
|
||||
CHECK(hasNote(r, "fail:step540_pyts_adapter"), "step540 failure note missing");
|
||||
CHECK(hasNote(r, "fail:step542_cross_language_consistency"), "step542 failure note missing");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_all_false_signals_fail_all_phases() {
|
||||
TEST(all_false_signals_fail_all_phases);
|
||||
Sprint28Signals s;
|
||||
auto r = Sprint28IntegrationSummary::summarize(s);
|
||||
CHECK(!r.phase28aPass && !r.phase28bPass && !r.sprint28Pass, "all false should fail all phases");
|
||||
PASS();
|
||||
}
|
||||
|
||||
void test_single_phase28b_failure_keeps_phase28a_passed() {
|
||||
TEST(single_phase28b_failure_keeps_phase28a_passed);
|
||||
auto s = allPass();
|
||||
s.crossLanguageConsistencyGate = false;
|
||||
auto r = Sprint28IntegrationSummary::summarize(s);
|
||||
CHECK(r.phase28aPass, "phase28a should still pass");
|
||||
CHECK(!r.phase28bPass, "phase28b should fail");
|
||||
PASS();
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::cout << "Step 543: Sprint 28 Integration + Summary\n";
|
||||
|
||||
test_all_signals_pass_sprint(); // 1
|
||||
test_phase28a_failure_blocks_sprint(); // 2
|
||||
test_phase28b_failure_blocks_sprint(); // 3
|
||||
test_success_notes_emitted_on_full_pass(); // 4
|
||||
test_blocked_phase_notes_emitted_on_failure(); // 5
|
||||
test_multiple_failures_aggregate_notes(); // 6
|
||||
test_all_false_signals_fail_all_phases(); // 7
|
||||
test_single_phase28b_failure_keeps_phase28a_passed(); // 8
|
||||
|
||||
std::cout << "\nResults: " << passed << "/" << (passed + failed) << " passed\n";
|
||||
return failed == 0 ? 0 : 1;
|
||||
}
|
||||
40
progress.md
40
progress.md
@@ -9281,3 +9281,43 @@ C/C++, Python/TypeScript, and Rust/Go adapters.
|
||||
- `editor/src/CrossLanguageConsistencyGate.h` within header-size limit (`108` <= `600`)
|
||||
- `editor/tests/step542_test.cpp` within test-file size guidance (`132` lines)
|
||||
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
|
||||
|
||||
### Step 543: Sprint 28 Integration + Summary
|
||||
**Status:** PASS (8/8 tests)
|
||||
|
||||
Completes Sprint 28 integration by synthesizing Step 534-542 readiness signals
|
||||
into phase-level and sprint-level pass/fail outcomes with closure notes.
|
||||
|
||||
**Files added:**
|
||||
- `editor/src/Sprint28IntegrationSummary.h` - sprint integration module:
|
||||
- aggregates all Phase 28a and 28b gate signals
|
||||
- computes phase pass flags and final Sprint 28 pass flag
|
||||
- emits failure-note diagnostics for missing gates
|
||||
- emits completion notes on full sprint pass
|
||||
- `editor/tests/step543_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 28b failure
|
||||
|
||||
**Files modified:**
|
||||
- `editor/CMakeLists.txt` - `step543_test` target
|
||||
|
||||
**Verification run:**
|
||||
- `cmake -S editor -B editor/build-native` - PASS
|
||||
- `cmake --build editor/build-native --target step543_test step542_test` - PASS
|
||||
- `./editor/build-native/step543_test` - PASS (8/8)
|
||||
- `./editor/build-native/step542_test` - PASS (12/12) regression coverage
|
||||
|
||||
**Architecture gate check:**
|
||||
- `editor/src/Sprint28IntegrationSummary.h` within header-size limit (`70` <= `600`)
|
||||
- `editor/tests/step543_test.cpp` within test-file size guidance (`128` lines)
|
||||
- Header-only architecture and naming conventions remain aligned with `ARCHITECTURE.md`
|
||||
|
||||
**Sprint 28 totals (534-543):**
|
||||
- **Steps completed:** 10
|
||||
- **New tests in this sprint plan:** 112/112 passing
|
||||
- **Phase 28a (534-538):** 56/56 passing
|
||||
- **Phase 28b (539-543):** 56/56 passing
|
||||
|
||||
Reference in New Issue
Block a user