Repository navigation
feat(crush): session adapter for Crush [3/3] - #27
Open
LarsArtmann wants to merge 3 commits into
Open
LarsArtmann wants to merge 3 commits into
LarsArtmann wants to merge 3 commits into
Conversation
LarsArtmann
added a commit
to LarsArtmann/mindwalk
that referenced
this pull request
Sep 9, 2026
…ck loop Capture what every future session needs to keep the upstream stream healthy: the three open PRs (cosmtrek#25-cosmtrek#27) and their branches, the jj colocation (reversible via rm -rf .jj), the exact restack loop after an upstream merge (fetch, rebase --skip-emptied, delete snapped bookmark, push), the force-push rules, and the fork CI posture (lint reports without blocking until the debt sweep).
LarsArtmann
force-pushed
the
crush-adapter-core
branch
from
September 9, 2026 17:01
9bfc175 to
d2d2f2f
Compare
LarsArtmann
force-pushed
the
crush-adapter-core
branch
from
September 9, 2026 17:02
d2d2f2f to
1cc58f0
Compare
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Crush users currently have no way to visualize their sessions. This adds Crush as a fourth first-class harness alongside Claude Code, Codex, and pi — same rail, same trace model, same judge input.
What changed
internal/adapter/crush: reads the SQLite-backedcrush.db(per-project.crush/or global data dir) via the published, read-only go-crush-data SDK (v0.3.0) — sealed part types, schema-drift detection, no ORM.crush://session/<id>handle, so the server's filesystem-based code works unchanged.projects.jsonregistry, merges sessions across every project database, and routes each session id back to its source db.agenttool's child rows) normalize into the standard agent metadata, so the Agent Lens works without new code paths.ToolCallID(from refactor(adapter): shared helpers + tool-call pairing contract [2/3] #26), including results split across messages.testdata/crush/crush.db) + full test battery: parts parser branches, agent graph tiers, synthetic-path routing, timestamps, diagnostics, stress and fuzz coverage.Wiring (server registration, flags, endpoints) follows in separate PRs to keep this one reviewable; this PR is package-atomic — the adapter is one Go package and cannot compile in halves.
Validation
go build ./...go test -count=1 ./...— green at the branch tip in a clean checkout (no local Crush data; the fixture carries everything)Series
Part 3/3, stacks on #25 and #26. The library-extraction discussion in #15 is the reason the Crush reading layer lives in a published module rather than inline SQL here.
💘 Generated with Crush
Reviewing this stacked series
GitHub shows the cumulative diff against
master, so "Files changed" also includes parts #25 and #26. This PR's own delta is only the last commit,feat(crush): session adapter for Crush— reviewing that single commit gives the actual scope of this change.Test fixture
testdata/crush/crush.dbis a committed 24 KB SQLite database with a root session, one sub-agent child session (parent_session_idset), and assorted message-part shapes. It is not a black box — regenerate or inspect it with:The builder writes the same schema and seed data the adapter tests assert against, so it doubles as documentation of the expected database shape.