Step 1991: Wire AST sidecar lifecycle hooks - openFile (DispatchPart2.h): auto-calls loadSidecarAST() after parse, returns annotationsRestored + staleAnnotations - saveBuffer (DispatchPart3.h): auto-calls saveSidecarAST() + saveSemannoSidecar() after write, returns annotationsSaved + sidecarPath + semannoPath Step 1992: Fix 9 schema stubs in Sprint 142/143/144 tool registrations - All 9 text/AST sync and merge tools now have proper inputSchema with required id and documented optional parameters (language, text, mode) Step 1993: Fix ingest_legacy_to_ir → generate_cpp_from_ir chain - ingest_legacy_to_ir now emits ir field (SemanticCoreIR format) alongside existing graph/api_intent/assumption/readiness fields - RecoveryNode → IRNode mapping: intent→kind, confidence in metadata - Neighbor lists become inferred edges; moduleId = "legacy:" + slug - generate_cpp_from_ir now accepts result["ir"] directly 15/15 tests passing across all three steps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.3 KiB
Whetstone Handoff — 2026-03-24
Session Summary
Three steps completed, all closing B-run pipeline gaps discovered during the whimptk Sprint 03 A/B test.
Step 1991 — AST sidecar lifecycle hooks (COMPLETE)
What: openFile and saveBuffer were the right abstraction points for
automatic sidecar round-trips, but they never called the sidecar functions.
Two targeted edits closed the gap:
DispatchPart2.h—openFilenow callsloadSidecarAST()after parse, returnsannotationsRestored+staleAnnotationsin result.DispatchPart3.h—saveBuffernow callssaveSidecarAST()+saveSemannoSidecar()after file write, returnsannotationsSaved,sidecarPath,semannoPathin result.
5/5 tests passing (step1991_test.cpp).
Step 1992 — Schema stub fix for Sprint 142/143/144 tools (COMPLETE)
What: 9 tools registered with empty {} schemas — MCP clients couldn't
discover the id parameter. All returned "id required" when called without
schema guidance.
Files patched:
RegisterSprint142Tools.h—sync_text_to_ast,get_sync_diagnostics,get_sync_identity_reportRegisterSprint143Tools.h—regenerate_text_from_ast,preview_regenerated_diff,get_regeneration_decisionsRegisterSprint144Tools.h—detect_text_ast_conflicts,preview_text_ast_merge,apply_text_ast_merge
All 9 now have proper required: [id] schemas with language/text/mode
optional properties and useful descriptions.
5/5 tests passing (step1992_test.cpp).
Step 1993 — ingest_legacy_to_ir → generate_cpp_from_ir chain fix (COMPLETE)
What: ingest_legacy_to_ir returned {graph, api_intent, assumption, ...}
but generate_cpp_from_ir expected {ir: SemanticCoreIR}. The B-run got
ir_invalid because the formats were incompatible.
Fix: RegisterLegacyIngestionTools.h — added buildIRFromGraph() helper
that maps RecoveryNode objects to IRNode/IREdge and constructs a valid
SemanticCoreIR. The ir field is now emitted alongside the existing output:
result = ingest_legacy_to_ir({source: "...", language: "cpp"})
generate_cpp_from_ir({ir: result["ir"], profile: "safe-first"}) // works
Mapping: core → Module, api_inference → Function, assumed → Effect,
unknown → Unknown. Neighbors become {relation: "inferred"} edges with
existence check. moduleId = "legacy:" + source.substr(0, 32).
5/5 tests passing (step1993_test.cpp).
What's Still Open
From the original B-run gap list, both gaps are now closed:
Schema stubs(Step 1992) ✓IR chain mismatch(Step 1993) ✓
The whimptk Sprint 03 B-run pipeline is now unblocked end-to-end:
ingest_legacy_to_ir → ir field → generate_cpp_from_ir → files
The next time whimptk Sprint 04 runs, use the proper pipeline:
start_recordingarchitect_intake(spec with Goals/Constraints/Acceptance Criteria sections)generate_taskitemsqueue_readyingest_legacy_to_iron any legacy headergenerate_cpp_from_irusingresult["ir"]apply_text_ast_merge+save_bufferto finalizeget_metrics
Build State
whetstone_mcpbinary:editor/build-native/whetstone_mcp(rebuilt)- All prior tests still passing (architecture gate unaffected)
- Daemon: restart with
tools/start-whetstone-daemon.shif needed