Skip to content

fix: the labeler test no longer assumes area:ci exists in the repository's labels.yml - #67

Merged
TzuH-Hsu merged 2 commits into
mainfrom
fix/66-labeler-test-starter-areas
Sep 16, 2026
Merged

TzuH-Hsu merged 2 commits into
mainfrom
fix/66-labeler-test-starter-areas

Conversation

@TzuH-Hsu

Copy link
Copy Markdown
Owner

Summary

scripts/issue-labeler.test.js's last case hardcoded area:ci. It passes here and in adopters that kept the starter areas, and fails in every adopter that renamed them — found by simulating the v0.5.0 labeler set against a downstream repository with nine contract areas (not ok 14, make check red). The case now uses the first declared area, whatever it is, and passes trivially with none.

Related issue

Closes #66

Validation

  • L0 static — make verify green
  • L1 unit — 14/14 here; 14/14 with a labels.yml declaring only area:a-architecture … area:pm (real downstream copy); 14/14 with a labels.yml declaring no area:* at all
  • L3 — none; test-only

Risk / rollback

RISK: none — one test case generalised; the shipped labeler is unchanged.
Rollback: revert.

Checklist

  • Conventional Commit PR title
  • Linked issue using "Closes #N"
  • No secrets, no *.local.md files committed
  • Documentation updated where affected (none needed)

…ory's labels.yml

The last case ticked area:ci and asserted it was applied, which holds in
the template and fails in every adopter that renamed the starter areas —
which the template tells them to do. Reproduced against a downstream
repository with nine contract areas: make check red on day one. The case
now takes the first declared area, whatever its name, and passes
trivially when none is declared.

Closes #66

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TzuH-Hsu TzuH-Hsu added this to the v0.5.1 milestone Sep 16, 2026
@TzuH-Hsu TzuH-Hsu added the area:ci CI workflows and automation label Sep 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T06:23:28.388976Z 8e49b61 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c05d14b31

ℹ️ 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".

Comment thread scripts/issue-labeler.test.js Outdated
assert.deepEqual(r.toAdd, ['area:ci']);
if (areas.length === 0) return; // an adopter may have dropped the family entirely
const first = areas[0];
const r = changes(`### Area\n\n- [x] ${first} — declared\n- [x] area:not-declared-anywhere — n`, [], areas);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Generate a sentinel absent from the declared areas

When an adopter legitimately declares area:not-declared-anywhere after another area, this supposedly portable test selects two allowed labels, so toAdd contains both and make check fails. Because .github/labels.yml permits adopters to choose their own area names, derive a sentinel that is confirmed absent from areas rather than hard-coding another label name.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8e49b61: the sentinel starts as area:undeclared and grows -x until it is absent from the declared set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TzuH-Hsu
TzuH-Hsu merged commit eafbfd6 into main Sep 16, 2026
1 check passed
@TzuH-Hsu
TzuH-Hsu deleted the fix/66-labeler-test-starter-areas branch September 16, 2026 06:24
@github-actions github-actions Bot mentioned this pull request Sep 16, 2026
TzuH-Hsu pushed a commit that referenced this pull request Sep 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.5.1](v0.5.0...v0.5.1)
(2026-09-16)


### Bug Fixes

* the labeler test no longer assumes area:ci exists in the repository's
labels.yml
([#67](#67))
([eafbfd6](eafbfd6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI workflows and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scripts/issue-labeler.test.js assumes area:ci exists, so make check fails in any repo that renamed the starter areas

1 participant