diff --git a/.github/scripts/issue-version-triage.cjs b/.github/scripts/issue-version-triage.cjs index 26a7436569..e65fca9b00 100644 --- a/.github/scripts/issue-version-triage.cjs +++ b/.github/scripts/issue-version-triage.cjs @@ -381,8 +381,8 @@ async function ensureLabel(github, context, name, color, description) { // Reconcile only GitHub's explicit name conflict, without replaying the // write or treating other validation/access failures as success. const errors = creationError.response?.data?.errors; - if (creationError.status !== 422 || !Array.isArray(errors) || - !errors.some((item) => item?.resource === "Label" && + if (creationError.status !== 422 || !Array.isArray(errors) || !errors.length || + !errors.every((item) => item?.resource === "Label" && item.field === "name" && item.code === "already_exists")) { throw creationError; } diff --git a/.github/scripts/issue-version-triage.test.cjs b/.github/scripts/issue-version-triage.test.cjs index 9ddbe08769..1ef8768840 100644 --- a/.github/scripts/issue-version-triage.test.cjs +++ b/.github/scripts/issue-version-triage.test.cjs @@ -2761,10 +2761,12 @@ test("label-creation reconciliation requires the exact current label", async () test("label-creation non-conflict failures are not retried or hidden", async () => { for (const [status, errors] of [ - [401], [403], [429], [500], [422], [422, "unavailable"], + [401], [403], [429], [500], [422], [422, "unavailable"], [422, []], [422, [{ resource: "Label", field: "name", code: "invalid" }]], [422, [{ resource: "Issue", field: "name", code: "already_exists" }]], [422, [{ resource: "Label", field: "description", code: "already_exists" }]], + [422, [{ resource: "Label", field: "name", code: "already_exists" }, + { resource: "Label", field: "color", code: "invalid" }]], ]) { const { github, calls } = createGithub(); const failure = Object.assign(new Error("Creation failed"), { diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md index 3d5ffa5c2d..2a17c2825c 100644 --- a/docs/ISSUE_TRIAGE.md +++ b/docs/ISSUE_TRIAGE.md @@ -262,12 +262,6 @@ Version classification does not need the latest release and cannot establish relevant-fix availability. The synchronizer makes no release lookup, public comment, retest request or closure. -Labels are shared across reports. If concurrent reports both try to create the -same missing label, the synchronizer reconciles only an explicit already-exists -name conflict with one read of that label. It does not repeat the creation, -ignore access or other validation failures, or apply a prepared label decision -after the report or its labels have changed. - An explicit **Pulse version** field is authoritative even in a legacy inline or standalone report. An unknown or incomplete value must not be replaced by an upgrade's starting version in the title, a nearby agent/platform version or