Skip to content

feat: wire mache to consume ley-line-open's leyline parse output#167

Merged
jamestexas merged 1 commit intomainfrom
refactor/wire-llo-leyline
Apr 25, 2026
Merged

feat: wire mache to consume ley-line-open's leyline parse output#167
jamestexas merged 1 commit intomainfrom
refactor/wire-llo-leyline

Conversation

@jamestexas
Copy link
Copy Markdown
Contributor

Summary

Align mache with ley-line-open (LLO) so leyline parse β†’ mache serve works end-to-end.

Changes

  1. node_defs schema: dir_id β†’ node_id β€” LLO produces (token, node_id, source_id), mache queried dir_id. This was the blocker β€” every MCP request failed.
  2. DiscoverOrStart: serve β†’ daemon β€” the daemon subcommand creates the UDS socket for coordination
  3. ASTWalker.ExtractGoImports β€” reads LLO's _imports table for qualified call resolution

Verified end-to-end

$ leyline parse ~/remotes/art/mache -o /tmp/test.db --lang go
190 parsed, 507 skipped β†’ 273K nodes, 28K refs, 2K defs, 1.1K imports

$ mache serve -s examples/go-schema.json /tmp/test.db
list_directory βœ…  find_callers βœ…  read_file βœ…

Test plan

  • task build passes
  • go test ./internal/graph/ ./internal/ingest/ passes
  • go test ./cmd/ passes (node_defs fixtures updated)
  • End-to-end: leyline parse β†’ mache serve β†’ MCP tools work

Align mache with LLO's table schemas and daemon protocol:

1. node_defs: rename dir_id β†’ node_id across all SQL queries, DDL,
   and test fixtures. Aligns with LLO's (token, node_id, source_id)
   schema. This was the blocker β€” every MCP request failed with
   "no such column: dir_id".

2. DiscoverOrStart: call `leyline daemon` instead of `leyline serve`.
   The daemon subcommand creates the UDS socket; serve does not.

3. ASTWalker.ExtractGoImports: reads LLO's _imports table for
   qualified call resolution (auth.Validate β†’ github.com/foo/auth).
   Table-presence guarded for older .dbs without _imports.

Verified end-to-end: leyline parse β†’ mache serve β†’ list_directory,
find_callers, read_file all work against LLO-produced .db with 273K
nodes, 28K refs, 2K defs, 1.1K imports.
@jamestexas jamestexas force-pushed the refactor/wire-llo-leyline branch from 306fb68 to 50a2a60 Compare April 25, 2026 21:59
@jamestexas jamestexas merged commit b096358 into main Apr 25, 2026
12 checks passed
@jamestexas jamestexas deleted the refactor/wire-llo-leyline branch April 25, 2026 22:00
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