Skip to content

ci(depguard): enforce architecture boundaries in lint and CI#130

Open
kangeunchan wants to merge 2 commits intoaltuslabsxyz:mainfrom
kangeunchan:ci/depguard-boundaries
Open

ci(depguard): enforce architecture boundaries in lint and CI#130
kangeunchan wants to merge 2 commits intoaltuslabsxyz:mainfrom
kangeunchan:ci/depguard-boundaries

Conversation

@kangeunchan
Copy link
Copy Markdown
Collaborator

Enhancement Description

Enforce architecture boundaries in CI with depguard to prevent forbidden dependency directions.

Summary

This PR adds depguard-based architectural checks and documentation so boundary violations are caught automatically during lint/CI.

Previously, boundary enforcement relied heavily on manual review:

  • forbidden imports could regress between reviews
  • architecture checks were not consistently automated
  • remediation guidance was not centralized

Now lint enforces boundary rules and documents the expected dependency direction.

What Changed

1) Enabled depguard architecture rules

Updated:

  • .golangci.yml

Rules enforce boundary constraints for application and ports packages.

2) Added staged allowlist for known legacy violations

  • scoped allowlist keeps rollout practical
  • new violations are still blocked by CI

3) Added architecture boundary documentation

Added:

  • docs/architecture-boundaries.md

Documentation includes:

  • enforced boundaries
  • rationale
  • remediation approach

4) Tests

Validation is lint/CI-focused for this change.

Why This Is Needed

This is an architecture governance improvement.
Automated boundary checks reduce review burden and prevent dependency-direction regressions.

Behavior Notes / Regression Impact

No runtime behavior change.
CI/lint behavior becomes stricter for forbidden imports.

Validation Performed

  • golangci-lint run --enable-only depguard ./...
  • go test ./...

Signed-off-by: kangeunchan <kangeunchan080310@gmail.com>
Signed-off-by: kangeunchan <kangeunchan080310@gmail.com>
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.

1 participant