Skip to content

[P2] Groomer does not refresh its cache row after writing labels, so the board shows stale state #746

Description

@joryirving

The groomer writes label changes to GitHub but does not refresh its own cache row, so the board shows stale state until something else re-syncs the issue.

misospace/foreman-dispatch-bridge#118 was groomed at 03:47 with nextGroomingAction: promote_to_ready. GitHub had status/ready; dispatch still had status/backlog 17 hours later:

GitHub labels : [priority/p1, status/ready, type/bug]
dispatch row  : labels=[priority/p1, status/backlog]
                groomedAt    03:47:48
                lastSyncedAt 03:32:12   <- before its own write
                updatedAt    03:31      <- never saw the change

POST /api/issues/refresh fixed it immediately and the issue dropped out of the backlog column.

Two consequences: the board misreports state (a P1 sat in backlog while actually ready and claimable), and the selector's own inputs are stale, since it reads labels and currentLane from the same row it just wrote through.

Presumably affects every promotion the groomer makes, not just this one.

Fix: refresh the issue row after applying label changes, in the same path that writes them.

Files: src/app/api/issues/groom/route.ts — writes the label change and nextGroomingAction without refreshing the cached row.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions