Skip to content

feature-ideation: bind publish re-run recognition to the run, not to markers in comments #1456

Open

Description

@don-petry

Problem

feature-ideation's publish job makes a re-run of a partly failed publish safe with hidden markers: each Discussion and comment it posts carries <!-- feature-ideation:op=<plan hash>:<index> -->, and a re-run skips entries already marked. A marker counts only where GitHub reports viewerDidAuthor for the publish token (#1418).

For the workflow's GITHUB_TOKEN, that identity is github-actions[bot], which every workflow in the calling repository shares. After a partial publish, the plan hash is visible in what was already posted. Another workflow that posts attacker-influenced text as github-actions[bot] in the Ideas category could plant a marker before the re-run. That could suppress a planned comment, or send a planned Discussion's follow-up comment and label to the planted Discussion.

The maintainer accepted this as a known limit on 2026-11-03 for #1418.

Proposal

Bind re-run recognition to state only the same workflow run holds. publish would save the node ids it creates or comments on, keyed by plan entry, as an artifact of the run, uploaded with if: always() so a failed attempt still saves it. A re-run attempt would read that list instead of trusting markers found in comments. Markers could stay as a fallback for display only.

Done when

  • A re-run attempt of the same workflow run skips exactly the entries the earlier attempt published, using the saved list, with no lookup of comment or Discussion bodies.
  • A marker planted by any other actor, including another workflow running as github-actions[bot], has no effect.
  • bats tests cover a partial first attempt, a re-run that finishes it, and a planted marker.
  • Confirm first that artifacts from an earlier attempt are readable from a re-run attempt of the same run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions