Skip to content

fix(config-validator): accept scanner keys in $global and validate removeOnException#79

Open
Valyrian-Code wants to merge 1 commit into
RocketChat:developfrom
Valyrian-Code:fix/config-validator-global-keys
Open

fix(config-validator): accept scanner keys in $global and validate removeOnException#79
Valyrian-Code wants to merge 1 commit into
RocketChat:developfrom
Valyrian-Code:fix/config-validator-global-keys

Conversation

@Valyrian-Code
Copy link
Copy Markdown

Summary

Two validator gaps, both follow-ons to the $global inheritance fix:

  1. KNOWN_GLOBAL_KEYS was missing semgrep, trufflehog, claude, and piAgent. Using $global.semgrep (which now works at runtime) would cause npm run validate-config to report an unknown key error. Added all four keys and wired their content validators inside validateGlobal.

  2. validateLabels checked five keys but was missing removeOnException, even though the worker reads and applies it. Invalid values (non-array, non-string items) passed the validator unchecked.

Test plan

  • New tests: $global.semgrep/trufflehog/claude/piAgent accepted without unknown-key error
  • New tests: content validation fires for bad values inside $global.claude.model
  • New tests: labels.removeOnException accepted; non-array and non-string-items rejected
  • Full suite: npm test — 635 tests, 0 failures

…emoveOnException

KNOWN_GLOBAL_KEYS was missing semgrep, trufflehog, claude, and piAgent,
so using \$global.semgrep (functional since the config-inheritance fix)
caused validate-config to report an unknown key error despite the config
being correct. Also wires their content validators inside validateGlobal.

validateLabels was also missing removeOnException from its checked key
list even though the worker reads and applies it for exception label cleanup.
Copilot AI review requested due to automatic review settings May 22, 2026 01:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants