Skip to content

fix(pr-fix-queue): repair items whose URL was already poisoned with a CI job URL #1118

Description

@itsmiso-ai

Repair PrFixQueueItem rows whose url was flipped to a CI job URL by the pre-#1098 code.

PR #1117 made the item URL write-once (set at first enqueue, backfilled only while empty) and moved CI job links out of the identity field, but it intentionally does not repair rows that were already poisoned: src/lib/pr-fix-queue.ts guards url with !existing.url, so a stored job URL (https://github.com/<repo>/actions/runs/<run>/job/<job>) is never replaced by a later PR-URL re-enqueue. Known-deployed example: item cmujtuwtk05r401sasa4v5ie6 on misospace/pinchflat#113.

Expected work: a targeted one-time normalization (script or backfill on the update path) that rewrites url to the PR URL (https://api.github.com/repos/<repo>/pulls/<pr> is derivable from repo + pr) when the stored value matches the Actions run/job URL shape and leaves every other value untouched, with tests in src/lib/pr-fix-queue.test.ts covering poisoned-row repair and no-touch of legit URLs.

Expected files: src/lib/pr-fix-queue.ts, src/lib/pr-fix-queue.test.ts.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions