feat: configurable allowed_labels + brand rate-limit label with bot.name - #1
Merged
sudsali merged 1 commit intoJul 10, 2026
Merged
Conversation
Two engine changes surfaced by the deequ/python-deequ/dqdl migrations:
1. allowed_labels was a hardcoded set, so issue-triage dropped repo-specific
labels (python-deequ's 'python', dqdl's 'java'). Now reads from .shadow.yml
bot.allowed_labels (list) or BOT_ALLOWED_LABELS env (comma-separated), each
entry scrubbed like any posted label. Empty/garbage falls back to the
original default set, so existing deployments are unchanged.
2. The rate-limit escalation label was a hardcoded 'shadow:rate-limited'
literal that ignored bot.name. Now branded f'{bot_name}:rate-limited', and
appended in act() AFTER the allowed_labels filter (like escalate_label) so
it actually reaches GitHub — an engine-generated label must not be dropped
by the model-proposed-label allowlist.
Adds tests/unit/test_allowed_labels.py (11 cases incl. an end-to-end act()
test asserting the branded label reaches add_labels) + README updates. Full
suite 538 pass.
sudsali
force-pushed
the
feat/configurable-allowed-labels-and-ratelimit-brand
branch
from
July 10, 2026 15:31
0973529 to
c6a9295
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small engine changes surfaced while migrating deequ / python-deequ / dqdl onto the shared engine.
1. Configurable
allowed_labelsThe issue-triage label allowlist was a hardcoded set
{bug, enhancement, question, documentation, help-wanted}, so adopters couldn't apply repo-specific labels (python-deequ'spython, dqdl'sjava) — the engine dropped them before the Labels API call.Now resolved from
.shadow.ymlbot.allowed_labels(a list) orBOT_ALLOWED_LABELS(comma-separated env), each entry scrubbed like any posted label. Empty / all-garbage config falls back to the original default set, so existing deployments are unchanged.2. Brand the rate-limit label with
bot.nameThe rate-limit escalation label was a hardcoded
shadow:rate-limitedliteral that ignoredbot.name. Nowf"{bot_name}:rate-limited", so a repo runningbot.name: deequ-botgetsdeequ-bot:rate-limited.Critically, this label is now appended in
act()after theallowed_labelsfilter (the same wayescalate_labelis), scoped toreason == "rate_limited". Previously it was written into the artifact but silently dropped by the allowlist filter, so it never reached GitHub or Slack — an engine-generated label must not be subject to the model-proposed-label allowlist.Tests
tests/unit/test_allowed_labels.py— 11 cases, including an end-to-endact()test that writes arate_limitedartifact, mocks the GitHub/Slack clients, and asserts the branded label actually reachesadd_labels(fails without the fix). Full suite: 538 pass.Compatibility
No behavior change for existing adopters:
allowed_labelsdefaults to the prior hardcoded set, and the rate-limit label only changes fromshadow:to<bot.name>:(identical for the defaultbot.name: shadow).