Skip to content

fix: pending_fix with no history entry creates invisible stuck books #228

Description

@deucebucket

Bug

In layer_ai_queue.py (~lines 694-698), when verify_drastic_change() returns None (complete failure) in standard mode, the code sets status = 'pending_fix' and deletes the queue entry, but creates NO history entry. The user cannot approve or reject it because the review UI reads from the history table.

Impact

Books vanish from all processing and review paths. No user-facing way to resolve them.

Fix

Create a history entry before setting pending_fix status, consistent with the "uncertain" handler at ~lines 648-658.

Severity

Critical — books become permanently invisible.

Found via pipeline logic audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions