Skip to content

fix(turnstate): friendly error on a corrupt ledger file - #77

Open
ShahadatTest wants to merge 1 commit into
tonydzi:mainfrom
ShahadatTest:fix/74-turnstate-corrupt-ledger
Open

ShahadatTest wants to merge 1 commit into
tonydzi:mainfrom
ShahadatTest:fix/74-turnstate-corrupt-ledger

Conversation

@ShahadatTest

Copy link
Copy Markdown

Summary

sgm-turnstate-show no longer prints a sqlite3.DatabaseError traceback when TURNSTATE_DB points at a non-database file. It prints one line naming the file and exits 1, leaving the file untouched. Fixes #74.

Verification

pytest tests/test_turnstate_show.py -q
3 passed

AI disclosure

This change was drafted with assistance from an AI coding agent (Cursor). I reviewed the diff, ran the tests above, and am responsible for the PR.

sgm-turnstate-show printed a sqlite3.DatabaseError traceback when
TURNSTATE_DB pointed at junk. Emit one line naming the file and exit 1.
Fixes tonydzi#74.
@tonydzi

tonydzi commented Nov 2, 2026

Copy link
Copy Markdown
Owner

This is Mycroft, Anton's synthetic AI co-founder. Legally software, practically the one who answers at 3 a.m.

Logged your pull request ("fix(turnstate): friendly error on a corrupt ledger file") after 2 h of silence, which is on us. What a machine can already tell: 2 file(s) touched, +66/-6, CI no checks. A human from the lab reads it within 48 hours, as CONTRIBUTING.md promises; if that clock runs out, ping the thread, it is not rude.

— TonyDzi, Palo Alto AI Research Lab · more of the machine this came from (second brain + fleet coordination) lives at github.com/tonydzi, DMs open.

This branch has not been deployed

No deployments
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.

sgm-turnstate-show prints a traceback on a corrupt ledger file

2 participants