fix(ci): make issue triage labeling deterministic - #1206
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31ca315e07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76f0f02db2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee06e942f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
The Claude issue-triage workflow advertises priority, component, complexity, and status labels that do not exist in this repository. Its only label tool accepted arbitrary candidate labels, silently ignored unknown names, and immediately added every candidate that happened to exist. Because the tool was add-only, label discovery mutated the live issue and Claude could not undo mistakes.
This has recurred since the helper was introduced on July 16: at least 12 triage comments explicitly report accidental label application. On issue #1205, an enhancement tracker ended up labeled as a bug, documentation request, duplicate, good first issue, question, and Cloud issue as well.
What Changed
--add-labelinterface with one semantic classification:--type bug|enhancement|documentation|question --component cloud|none.Implementation Details
The helper reads the issue's current labels only to identify obsolete values in the automated triage ownership set (
bug,enhancement,documentation,question, andcloud). It first uses GitHub's additive labels endpoint to apply the requested type and optional Cloud component, then deletes obsolete owned labels individually. Labels owned by templates, maintainers, or other automation are never included in a replacement payload, so a label added concurrently after the read is preserved. If the additive request fails, no destructive mutation has occurred.Repeated valid calls converge on one type and one Cloud/non-Cloud component choice. Unsupported attempts and failed reads stop before the first write. Duplicate detection remains read-only; Claude links the original issue in prose rather than labeling or closing the new issue.
Testing
Automated
uv run pytest -p pytest_mock --no-cov -q tests/test_claude_issue_triage.py: 11 passedjust fast-check: Ruff checks and formatting passed; ty passedbash -n scripts/edit-issue-labels.sh: passedgit diff --check: passedThe focused suite parses the edited workflow as YAML and asserts the single semantic helper contract, the four-type/MCP-component taxonomy, exact additive POST/targeted DELETE ordering, preservation of non-triage labels, no mutation after a failed read, and no deletion after a failed additive request.
Manual
Risks / Follow-ups