Skip to content

Re-running workflow on same commit creates duplicate phantom iterations #486

Description

@pedropaulovc

File: action/src/capture/iteration-capture.ts lines 43-65

Summary: Re-running workflow on same commit via "Re-run all jobs" button or workflow_dispatch with same PR_NUMBER creates duplicate phantom iteration rows. captureIteration computes revision = getIterationCount() + 1 and calls insertIteration unconditionally -- no head_sha dedup check, and schema only has UNIQUE(revision) not UNIQUE(head_sha).

Fix direction: short-circuit when iteration with same head_sha already exists, or add UNIQUE(head_sha) with ON CONFLICT DO NOTHING.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions