One non-object JSON record makes the session catalog exit

Open Beginner friendly
#71 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@he-yufeng is already working on this.

Since Nov 20, 2026.

  • #72 by @he-yufeng — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
json, python
Domain
cli

Research direction

The payload names no files, so start from the code path behind corecoder --list-sessions and find where each saved .json entry is read and .get is called on it. Reproduce with a temporary home containing one valid session and one file whose contents are [], then make the catalog skip any record that does not decode to a JSON object. The load-by-ID path should route the same non-object case into the existing invalid-session/not-found result rather than raising TypeError. Done when both commands leave the files untouched, the valid session still lists, and resuming the bad entry returns the not-found result.

Written by the indexing model from the issue text.

Description

In the published 0.14.0 wheel, corecoder --list-sessions lists a valid saved session as expected. If the same directory also contains a .json file whose contents are [], the command exits with AttributeError: 'list' object has no attribute 'get' and never shows the valid session. Loading the non-object record by ID raises TypeError instead of returning the existing not-found result.

Both checks were done with a fresh temporary home and fixture files, with no provider key. The catalog should skip records that are not JSON objects, and resuming one should follow the existing invalid-session path. Neither command should rewrite the entries.

Dominant language
Python
Stars
1.8k
Forks
453
Avg merge
6h 16m
Merged PRs (30d)
15

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 he-yufeng/CoreCoder

All issues in he-yufeng/CoreCoder

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.