Add semantic hash table tools, lock scaffolding, and H2 dual-hash migration scaffold

This commit is contained in:
Bill
2026-02-24 11:13:31 -07:00
parent 1a761c62e5
commit f4f3633b11
12 changed files with 665 additions and 6 deletions

View File

@@ -8,6 +8,9 @@ class ASTNode {
public:
std::string id;
std::string conceptType;
std::string semanticHash; // Optional semantic identity hash: H<version>:<hex>
std::string semanticHashLockState; // "locked" or "unlocked" (empty == unlocked)
std::string semanticHashLockReason; // Optional rationale for lock transitions
ASTNode* parent = nullptr;
int spanStartLine = -1;
int spanStartCol = -1;
@@ -27,6 +30,10 @@ public:
return spanStartLine >= 0 && spanStartCol >= 0 && spanEndLine >= 0 && spanEndCol >= 0;
}
bool isSemanticHashLocked() const {
return semanticHashLockState == "locked";
}
// Multi-valued child: append to role
void addChild(const std::string& role, ASTNode* child) {
child->parent = this;