Skip to content

Conversation

@sileht
Copy link
Member

@sileht sileht commented Dec 11, 2025

Currently has the root object has "ignore" to allow root keys from the
engine, we can't change the default validator

Currently has the root object has "ignore" to allow root keys from the
engine, we can't change the default validator

Change-Id: I304fd6ef4f6202252842c965f9a59d4376531405
Copilot AI review requested due to automatic review settings December 11, 2025 07:10
@mergify mergify bot deployed to Mergify Merge Protections December 11, 2025 07:10 Active
@mergify
Copy link
Contributor

mergify bot commented Dec 11, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify
Copy link
Contributor

mergify bot commented Dec 11, 2025

🧪 CI Insights

Here's what we observed from your CI run for 04c0124.

🟢 All jobs passed!

But CI Insights is watching 👀

@mergify mergify bot requested a review from a team December 11, 2025 07:11
Copy link

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.

Pull request overview

This PR enhances configuration validation by adding strict field validation to Pydantic models in the scopes configuration. The change prevents users from accidentally providing invalid field names (like includes instead of include) by setting extra="forbid" on all scope-related models.

Key Changes

  • Added extra="forbid" to four Pydantic models: FileFilters, SourceFiles, SourceManual, and Scopes
  • Updated existing test to expect 4 validation errors instead of 3 to reflect stricter validation
  • Added new test case to specifically validate the extra field rejection behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
mergify_cli/ci/scopes/config/scopes.py Adds model_config = pydantic.ConfigDict(extra="forbid") to all scope-related Pydantic models to prevent extra fields in configuration
mergify_cli/tests/ci/scopes/test_cli.py Updates error count expectation from 3 to 4 in existing test and adds new test case test_match_scopes_invalid to verify extra fields are properly rejected

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mergify mergify bot merged commit 1e98eef into main Dec 11, 2025
16 checks passed
@mergify mergify bot deleted the devs/sileht/scope-validation/I304fd6ef4f6202252842c965f9a59d4376531405 branch December 11, 2025 14:37
@mergify
Copy link
Contributor

mergify bot commented Dec 11, 2025

Merge Queue Status

✅ The pull request has been merged at 04c0124

This pull request spent 40 minutes 39 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants