Steps 266-268: Phase 10a — semantic annotation core + sidecar persistence (32/32 tests)

Step 266: 5 semantic annotation AST types (Intent, Complexity, Risk,
Contract, SemanticTag) with JSON roundtrip and compact AST integration.
Step 267: Sidecar AST persistence (.whetstone/<file>.ast.json) with
save/load/list RPC methods, MCP tools, and permission enforcement.
Step 268: Phase 10a integration tests — multi-file sidecar workflow,
all 5 types in compact view, idempotent roundtrip, source isolation.

Also includes Sprint 10 plan, GUI/installer polish, and Emacs integration fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-12 16:01:56 +00:00
parent c36fd92045
commit 976161dc4a
36 changed files with 2999 additions and 69 deletions

View File

@@ -13,6 +13,8 @@
#include <cstdio>
#include <cstring>
#include <filesystem>
#include <thread>
#include <chrono>
// ---------------------------------------------------------------------------
// ElispCommandBuilder — produces valid Elisp command strings
@@ -146,6 +148,7 @@ public:
if (!initFilePath.empty()) {
cmd += " --load \"" + initFilePath + "\"";
}
#ifdef _WIN32
cmd += " 2>&1";
FILE* pipe = openPipe(cmd.c_str(), "r");
if (!pipe) {
@@ -157,16 +160,31 @@ public:
outLog += buf;
}
int result = closePipe(pipe);
if (result == 0) {
daemonRunning_ = true;
return true;
}
if (isDaemonAlive()) {
if (result == 0 || isDaemonAlive()) {
daemonRunning_ = true;
return true;
}
lastError_ = outLog.empty() ? "Failed to start Emacs daemon" : outLog;
return false;
#else
// Launch daemon in the background to avoid blocking editor startup.
cmd += " >/tmp/whetstone-emacs-daemon.log 2>&1 &";
int result = runCommand(cmd);
if (result != 0) {
lastError_ = "Failed to start Emacs daemon";
return false;
}
outLog = "Starting Emacs daemon in background.";
for (int i = 0; i < 15; ++i) {
if (isDaemonAlive()) {
daemonRunning_ = true;
return true;
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
lastError_ = "Emacs daemon did not become ready in time";
return false;
#endif
}
// Check if daemon is running
@@ -426,4 +444,3 @@ private:
std::string lastInitPath_;
mutable std::string lastRunCommand_;
};