CHORE: Prepare for lisp-repair implementation

This commit is contained in:
2026-04-11 14:25:28 -04:00
parent 393c86c7cf
commit 7eff65505a
14 changed files with 585 additions and 92 deletions

View File

@@ -0,0 +1,48 @@
#+TITLE: Root Cause Analysis: Consolidation VI - Task Orchestrator Implementation
#+DATE: 2026-04-11
#+FILETAGS: :rca:orchestrator:consensus:integrity:
* Executive Summary
The implementation of Consolidation VI (Task Orchestrator) aimed to introduce parallel multi-backend consensus, GTD task integrity, and delegation. During the build, a critical dependency failure was identified in the `safety-harness` module.
* 1. Issue: Undefined `SAFETY-HARNESS-VALIDATE`
** Symptoms
Existing `SAFETY-SUITE` tests failed with `#<UNDEFINED-FUNCTION SAFETY-HARNESS-VALIDATE>`.
** Root Cause
The function `safety-harness-validate` was exported in `package.lisp` but never actually defined in `safety-harness.lisp`. Only the internal recursive walker `safety-harness-ast-walk` existed. This represents a "Hollow Export" bug where the interface was designed but the implementation was truncated or skipped in a previous session.
** Resolution
Defined `safety-harness-validate` as a wrapper around `read-from-string` and `safety-harness-ast-walk`.
* 2. Design Decision: Deliberate Consensus
** Requirement
Multi-backend support to reduce hallucinations and increase reliability.
** Solution
Implemented `bt:make-thread` parallel queries in `ask-neuro`.
** Trade-off
Selected "Majority Rules" over "First-to-Finish".
- *Pros:* Higher accuracy, mathematically consistent.
- *Cons:* Slower (latency limited by the slowest provider).
** Invariant Alignment
Aligns with PSF Mandate 4 (Radical Transparency) and Invariant 2 (Technical Mastery) by ensuring decisions are auditable and consistent across multiple brains.
* 3. Design Decision: Task Integrity Gate
** Requirement
Prevent illegal GTD state transitions.
** Solution
Added `task-integrity-check` in `symbolic.lisp`.
** Invariant Alignment
Enforces the "High-Integrity Memory" mandate by ensuring the Org-mode AST remains semantically valid according to GTD rules (e.g., no orphaned active tasks).
* 4. PSF Mandate Violations during Session (Corrected)
** Violations
1. Editing without prior commit.
2. Direct `.lisp` edits vs Literate Org tangling.
3. Multi-function edits per block.
** Correction
1. Performed a retrospective commit.
2. Synchronized `neurosymbolic.org` and `core.org` with source code.
3. Refactored the Markdown flight plan into an Org-mode flight plan.
* 5. Permanent Learnings
- *Check Exports:* Always verify that symbols exported in `package.lisp` have a corresponding definition in the literate source.
- *Strict PSF Mode:* Enable a pre-save hook or agent check to ensure all edits are performed within `#+begin_src` blocks in Literate Org files to avoid synchronization debt.