Skip to content

fix: trust_sl action orphans books with no terminal status #229

Description

@deucebucket

Bug

In layer_api.py (~lines 334-341), the trust_sl action advances verification_layer to 4 and deletes the queue entry, but never sets status to a terminal value. Layer 4 requires items in the queue (JOIN queue q), so this book at verification_layer = 4, status = 'pending', with no queue entry, is never picked up by any layer again.

Impact

Books confidently identified by Skaldleita become permanently orphaned. Ironically, the highest-confidence identifications are the ones that get stuck.

Fix

Either set status = 'verified' (since trust_sl means high confidence), or keep the queue entry so Layer 4 can process the book.

Severity

Critical — high-confidence books silently drop out of the pipeline.

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