Skip to content

Configure Architecture Guardian thresholds via repository-level .architecture.yml#26664

Merged
pelikhan merged 3 commits intomainfrom
copilot/fix-architecture-violations-another-one
Apr 16, 2026
Merged

Configure Architecture Guardian thresholds via repository-level .architecture.yml#26664
pelikhan merged 3 commits intomainfrom
copilot/fix-architecture-violations-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

Architecture Guardian flagged multiple large-file and oversized-function violations using default thresholds because the repository had no .architecture.yml. This PR adds explicit architecture thresholds so scans use repo-defined limits instead of implicit defaults.

  • What changed

    • Added a new root config file: .architecture.yml
    • Defined explicit threshold values for:
      • file blocker size
      • file warning size
      • function size warning
      • public export count info
    • Added inline comments to make severity semantics self-describing in-file.
  • Why this addresses the issue

    • The architecture workflow already supports .architecture.yml; this enables configuration-based governance directly at repo root.
    • Future architecture reports now evaluate against declared policy, not fallback defaults.
thresholds:
  # Go/JS/CJS/MJS files above this line count are BLOCKER violations.
  file_lines_blocker: 2000
  # Go/JS/CJS/MJS files above this line count are WARNING violations.
  file_lines_warning: 1000
  # Go/JS/CJS/MJS functions above this line count are WARNING violations.
  function_lines: 200
  # Go/JS/CJS/MJS modules above this public export count are INFO violations.
  max_exports: 10

Copilot AI linked an issue Apr 16, 2026 that may be closed by this pull request
9 tasks
Copilot AI and others added 2 commits April 16, 2026 15:47
Copilot AI changed the title [WIP] Fix architecture violations detected in recent commit Configure Architecture Guardian thresholds via repository-level .architecture.yml Apr 16, 2026
Copilot AI requested a review from pelikhan April 16, 2026 15:52
@pelikhan pelikhan marked this pull request as ready for review April 16, 2026 15:56
Copilot AI review requested due to automatic review settings April 16, 2026 15:56
@pelikhan pelikhan merged commit 0289796 into main Apr 16, 2026
@pelikhan pelikhan deleted the copilot/fix-architecture-violations-another-one branch April 16, 2026 15:56
Copy link
Copy Markdown
Contributor

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

Adds a repository-level .architecture.yml so Architecture Guardian uses explicit, repo-defined thresholds instead of fallback defaults.

Changes:

  • Introduced .architecture.yml at repo root
  • Configured thresholds for file line limits (blocker/warning), function length, and max public exports
  • Added inline comments clarifying severity semantics per threshold
Show a summary per file
File Description
.architecture.yml Defines Architecture Guardian thresholds for file size, function size, and export-count checks.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@github-actions github-actions Bot mentioned this pull request Apr 16, 2026
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.

Architecture Violations Detected — 2026-04-16

3 participants