Skip to content

test(security): the ungated-router list may only shrink, so a new entry fails (#16375) - #16955

Merged
mrveiss merged 2 commits into
issue-16375-gate-three-routersfrom
issue-16375-gate-mutating-routers
Sep 18, 2026
Merged

mrveiss merged 2 commits into
issue-16375-gate-three-routersfrom
issue-16375-gate-mutating-routers

Conversation

@mrveiss

@mrveiss mrveiss commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Refs #16375

Stacked on #16896 (base issue-16375-gate-three-routers). Merge #16896 first, then retarget this PR to main. It is stacked because both PRs edit adjacent lines of KNOWN_UNGATED.

Thinking Path

#16375 asks that KNOWN_UNGATED shrink to empty, and that the baseline only shrink. The file said so in a comment ("The list may only SHRINK"), but no test enforced it:

  • test_no_new_config_router_is_ungated_and_undocumented fails for an ungated router that is not listed.
  • test_the_known_ungated_list_has_not_gone_stale fails for a listed router that is now gated.

Together they force the list to equal the live ungated set. Neither stops a PR that adds an ungated router and its list entry together, which is the one move the comment forbids.

I followed the repo's existing pattern for a comment that must fail (comment_line_number_citations_test.py's _MAX_BASELINE: "raising this number is the deliberate act"). A count alone misses a swap (one entry fixed, a new one added), so a frozen superset backs it up. No git-history comparison: CI's checkouts are shallow.

What Changed

repo_tests/config_router_auth_coverage_test.py only:

  • _EVER_UNGATED: the 36 modules of fix(security): authenticate every skills route, and require admin to change, fetch or execute (#16368) #16370's first run, recovered from the commit that added the file (afccf73b4).
    • test_the_known_ungated_list_only_ever_shrinks fails if KNOWN_UNGATED holds anything outside it, so a new module cannot be parked.
  • _MAX_KNOWN_UNGATED = 27: test_the_ceiling_is_pinned_to_the_list requires len(KNOWN_UNGATED) == 27.
    • Growth fails.
    • Every removal must lower the number, as a deliberate edit.
    • It also catches an entry removed once and later put back, which the superset cannot.

No router is gated here. The router-by-router triage and the next steps are on #16375.

Acceptance criteria

This PR delivers part of #16375: the "may only shrink" rule the coordinator asked for, which the issue's AC2 ("shrinks to empty, under its equality rule") depends on. AC1 to AC3 stay open, so this is Refs, not Closes.

Verification

Single-issue rationale

This delivers one part of #16375 (the ungated-router list may only shrink) and closes nothing: #16375's other criteria stay open, with the router-by-router triage handed off on the issue. It is stacked on #16896 because both edit adjacent lines of the same list, and it is kept separate so the guard can land ahead of the gating work.

Model Used

Claude Opus 5 (claude-opus-5)

…ry fails (#16375)

KNOWN_UNGATED said "the list may only SHRINK" in a comment. The equality
tests stop an ungated router that is not listed, but not one added to the
list alongside it. Two assertions now back the comment:

- every entry must be in _EVER_UNGATED, the 36 modules of #16370's first
  run, so a new module cannot be parked in the list;
- len(KNOWN_UNGATED) must equal _MAX_KNOWN_UNGATED (27), so growth fails
  and each removal must lower the ceiling as a deliberate edit. That also
  catches an entry removed once and later put back, which the superset
  cannot.
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f0413d49-4f78-4f9d-8992-acd1c1ab313a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

There is no PR queue limit, and this is not a request to defer this PR. Work proceeds one issue at a time without a cap on open PRs; review capacity is the constraint.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Merge the ones whose CI has finished and review has passed: gh pr merge <number> --squash --delete-branch
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci land-next Landing set: CI capacity goes to these PRs first (owner direction 2026-09-18, #15397) security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant