Repository navigation
fix(query): CLI query output carries the learning sidecar's lesson annotations - #13
Merged
Merged
Conversation
…esson annotations The subgraph renderer has supported learning=<status>[:stale] NODE annotations since the work-memory overlay shipped, and both explain and the MCP server attach the .graphify_learning.json sidecar at load time. The CLI query loader builds its graph directly from graph.json and never attached the overlay, so the same question answered over MCP showed the lessons while the CLI answer silently dropped them — despite the docs promising query surfaces a Lesson hint. Attach the overlay in the CLI query path exactly like serve._load_graph: display-only, fail-safe to an empty overlay, byte-identical output when no sidecar exists. The :stale marker renders too. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Defect
The work-memory overlay renders as
learning=<status>[:stale]inside NODE lines — but only when the loaded graph object carriesG.graph["_learning_overlay"].serve._load_graph(the MCP loader) attaches it, andgraphify explainmerges the sidecar itself — the CLIqueryhandler builds its graph straight fromgraph.json(cli.py, thenode_link_graphload in the query branch) and never attaches the overlay. Result, verified on the live deployment: the same question answered over MCP shows the lessons; the CLI answer silently drops them.Maker-docs check
The maker documents the intended behavior explicitly — twice:
graphify explain/query/GRAPH_REPORT.md/ the HTML viewer surface them where you look (aLesson:hint, a colored node ring)."So
querysurfacing lessons is documented shipped behavior; the CLI loader just never got the attach. This is a documented-behavior-vs-implementation gap, not a feature request.Community check
gh search issues/prson Graphify-Labs/graphify for "learning overlay", "lesson query", "learning sidecar": zero reports. Nearest neighbors are Graphify-Labs#2821 / Graphify-Labs#3026 (other node attributes un-rendered by query) — different fields, same family of gap.Fix
Attach the overlay in the CLI query path exactly like
serve._load_graphdoes:G.graph["_learning_overlay"] = load_learning_overlay(gp), display-only, fail-safe to{}on any error. The renderer (_subgraph_to_text) already sanitizes the status and counts the suffix against the token budget, so both surfaces now emit the identicallearning=<status>[:stale]form. Without a sidecar the output stays byte-identical.Tests
learning=preferred]on the annotated node onlylearning=tentative:stale](the "code changed — re-verify" marker)learning=anywhere (output unchanged)🤖 Generated with Claude Code