Skip to content

Extraction: add project-level .archignore exclusions - #97

Merged
LukasNiessen merged 6 commits into
mainfrom
feat/47-archignore-exclusions
Aug 24, 2026
Merged

LukasNiessen merged 6 commits into
mainfrom
feat/47-archignore-exclusions

Conversation

@LukasNiessen

@LukasNiessen LukasNiessen commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #47

What changed

  • load one optional .archignore from the located project root for direct enumeration and every architecture extraction
  • use the existing case-sensitive ArchUnit glob language, including rooted/basename/directory and Windows-separator behavior
  • support blank lines and full-line comments while rejecting unsupported negation and malformed project-relative patterns with located diagnostics
  • compose root-file, explicit CheckOptions, and built-in exclusions additively; nested .archignore files deliberately have no effect
  • share one owned policy snapshot between graph-cache key construction and source traversal
  • encode normalized policy path, presence, and exact-content SHA-256 fingerprint in schema-v3 cache keys
  • document the contract in the README, architecture decisions, internals, guide, and limitations

QA and controls

  • parser tests cover comments, whitespace/CRLF, literal inline hashes, negation, empty rooted patterns, parent segments, invalid ranges, NUL bytes, missing files, and exhaustive allocation failures
  • enumeration tests cover rooted versus basename patterns, directory pruning, Windows separators, defaults, explicit options, and nested-policy precedence
  • cache tests prove path/presence/content identity; an end-to-end test edits .archignore and observes a cache miss without clear_cache
  • a repository fixture proves the public enumerator and graph extractor; a fluent negative control proves CheckOptions exclusions add to the root file rather than replacing it

Local verification

  • zig fmt --check build.zig build.zig.zon src benchmark test/acceptance.zig test/dogfood.zig test/readme.zig test/readme test/fixtures/archignore
  • zig build test
  • zig build docs — 11 guide pages plus compiler API docs validated
  • zig build benchmark-check — 3,362 graph edges, stable digest, 8.71 s local total, 5,966,099 peak tracked bytes, zero retained tracked bytes, all budgets enforced
  • python -B scripts/check_ci.py — 10 immutable actions, 6 Zig archives

Hosted verification

  • run: https://github.com/LukasNiessen/ArchUnitZig/actions/runs/32730507530
  • Debug passed on Linux, Windows, and macOS; ReleaseSafe formatting/docs/performance passed on Linux
  • hosted benchmark artifact: 1,168,402,730 ns total, 5,966,099 peak tracked bytes, zero final tracked bytes
  • artifact retained the pinned digest and reports budgets_enforced: true

@LukasNiessen
LukasNiessen merged commit 0cfd837 into main Aug 24, 2026
5 checks passed
@LukasNiessen
LukasNiessen deleted the feat/47-archignore-exclusions branch August 24, 2026 13:13
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.

Extraction: project-level .archignore exclusions

1 participant