Skip to content

Phase 0 stabilization: CXDB optional + test harness#70

Merged
mattleaverton merged 5 commits intodanshapiro:mainfrom
mattleaverton:worktree-phase0-stabilization
Mar 31, 2026
Merged

Phase 0 stabilization: CXDB optional + test harness#70
mattleaverton merged 5 commits intodanshapiro:mainfrom
mattleaverton:worktree-phase0-stabilization

Conversation

@mattleaverton
Copy link
Copy Markdown
Collaborator

Summary

First two tasks from the stabilization plan:

  • Make CXDB optional — Remove the assertion that cxdb.binary_addr and cxdb.http_base_url are required. When CXDB config is absent, skip CXDB startup entirely. The engine already nil-checks all CXDB access, so this is a 4-line change with near-zero risk.
  • Script-based test graph suite — Six integration tests using tool_command nodes (no LLM involvement) that exercise engine traversal, routing, and failure handling:
    • Linear traversal (A → B → C)
    • Hill-climber verify loop (retry until 3rd attempt succeeds)
    • Conditional routing via diamond node
    • Tool node failure with status verification
    • No-CXDB config validation (proves the CXDB change works)
    • Workspace lifecycle (setup → work → verify with filesystem state)

Also includes the stabilization plan document outlining Phases 0–4 for architectural improvements.

Test plan

  • go build ./... — clean compile
  • go test ./internal/attractor/engine/... -run TestToolGraph — all 6 new tests pass
  • Existing tests unaffected (pre-existing failures unchanged)
  • Run with CXDB configured still works as before
  • Run without CXDB config (no cxdb section in YAML) succeeds

🤖 Generated with Claude Code

mattleaverton and others added 5 commits March 30, 2026 17:18
Remove the assertion that cxdb.binary_addr and cxdb.http_base_url are
required. When CXDB config is absent, skip CXDB startup entirely — the
engine already nil-checks all CXDB access. This lets users run graphs
without CXDB configured, running, or installed.

Also adds the stabilization plan document.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Six test graphs that exercise engine traversal, routing, and failure
handling using only tool_command nodes (no LLM involvement):

- Linear: basic A → B → C traversal
- HillClimber: verify loop that retries until success on 3rd attempt
- Conditional: diamond node routing on outcome
- FailFast: tool node failure with status verification
- NoCXDBConfig: validates CXDB-optional change (empty config accepted)
- WorkspaceLifecycle: setup → work → verify with filesystem state

These form the validation harness for Phase 0 stabilization work.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Key changes from team review:
- Add opencode as CLI backend for non-claude/codex providers; deprecate API
  backend entirely (new Phase 0.8)
- Kilroy should not understand worktrees — always launched INTO a worktree
  by the caller (simplifies Phase 2.2 from "extract to hooks" to "remove")
- Add self-introspection capability to supervisor (Phase 2.5.3) — system
  explains its own state, decisions, and plan in human-readable terms

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The "delete git entirely" approach pushed too much onto the caller. The
hook model is the right balance: engine fires lifecycle events, git hook
responds with worktree creation, per-node commits, and SHA tracking.
Opt-in, not enforced — but available without the caller reinventing it.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@mattleaverton mattleaverton merged commit 06f6e4f into danshapiro:main Mar 31, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant