[Bug]: malformed learning sidecar data can hide valid annotations

Open Beginner friendly
#5,019 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@azizur100389 is already working on this.

Since Nov 5, 2026.

  • #5024 by @azizur100389 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start with graphify.reflect.load_learning_overlay and trace how it parses the sidecar JSON and reads individual entries. Check the MCP loader’s handling of overlay errors as well. Treat a non-object root as an empty overlay and skip malformed rows while retaining valid entries; verify the reproductions with a sidecar containing null, [], and the mixed bad/good entries.

Written by the indexing model from the issue text.

Description

Reproduction

Confirmed on v8 at 59b5ab11 (0.9.102), Python 3.12 on Windows. No LLM or API credentials are needed.

Next to graph.json, save .graphify_learning.json containing {"nodes":{"bad":{"source_file":["app.py"]},"good":{"status":"preferred","score":2}}}. Call graphify.reflect.load_learning_overlay with the graph path. A second reproduction is a sidecar containing JSON null or [].

Actual behavior

A non-string source raises TypeError while resolving a path. The MCP loader catches the exception and drops the entire overlay, including healthy entries. A non-object JSON root raises AttributeError before entries are read.

Expected behavior

Treat a malformed root as an empty optional overlay, and keep healthy entries when an individual row is malformed.

The change concerns sidecar input handling. The staleness characterization in #4996 exercises the existing behavior for well-formed entries.

Dominant language
Python
Stars
124k
Forks
11.9k
Avg merge
2h 35m
Merged PRs (30d)
6

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Graphify-Labs/graphify

All issues in Graphify-Labs/graphify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.