Skip to content

[Fix] Automation labels show "Codeql Triage" instead of "CodeQL Triage"#455

Merged
mrubens merged 2 commits into
developfrom
fix/codeql-triage-label-casing-3d69w8cgf5o5s
Jul 16, 2026
Merged

[Fix] Automation labels show "Codeql Triage" instead of "CodeQL Triage"#455
mrubens merged 2 commits into
developfrom
fix/codeql-triage-label-casing-3d69w8cgf5o5s

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

Internal polish from Slack feedback (no tracked issue).

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

formatAutomationLabel now spells the CodeQL brand correctly, so codeql_triage surfaces as CodeQL Triage (not Codeql Triage) anywhere automation keys are humanized (task filters, analytics labels, attribution).

Token overrides use a Map so unconstrained token lookups never accidentally pick up Object.prototype keys such as constructor or toString.

How it was tested

  • Asserts formatAutomationLabel('codeql_triage') === 'CodeQL Triage'
  • Asserts prototype keys title-case normally (constructorConstructor)
  • pnpm --filter @roomote/web exec vitest run src/lib/task-creator-filter.test.ts (12 passed)
  • Pre-push suite (oxlint, residual lint, check-types:fast, knip) passed on push

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

Humanize codeql_triage as "CodeQL Triage" instead of "Codeql Triage".
@roomote-roomote

roomote-roomote Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

0 issues outstanding.

  • packages/types/src/automation-label.ts:19 Use an own-property lookup for token overrides. Because word is unconstrained, inherited keys such as constructor and toString currently resolve to Object.prototype functions, so formatAutomationLabel('constructor') emits function Object() { [native code] } instead of Constructor. A Map or Object.hasOwn(AUTOMATION_LABEL_TOKEN_OVERRIDES, word) avoids treating prototype properties as overrides.

Reviewed 7afec2a · fixed in e8d5cc3

@roomote-roomote

roomote-roomote Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the token-override review issue.

  • Switched AUTOMATION_LABEL_TOKEN_OVERRIDES to a Map so only real brand tokens resolve, not Object.prototype keys
  • Added regression coverage for constructor and toString
  • Shipped in e8d5cc3

No review threads to resolve (finding was on the top-level summary only). Left CLA alone as requested.

Use a Map for token overrides so formatAutomationLabel never treats
Object.prototype properties as brand-casing mappings.
@mrubens
mrubens marked this pull request as ready for review July 16, 2026 22:40
@mrubens
mrubens merged commit c658c4e into develop Jul 16, 2026
15 of 16 checks passed
@mrubens
mrubens deleted the fix/codeql-triage-label-casing-3d69w8cgf5o5s branch July 16, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant