Skip to main content

ovecc architecture check

The same report as architecture diff, with the verdict in the exit code: 1 when a contract finding crosses the threshold.

Usage: ovecc architecture check [OPTIONS]

The default threshold is high — any divergence, forbidden dependency, restricted access, missing required dependency, slice breach, or interface bypass fails the build.

In CI

- run: npx ovecc index .
- run: npx ovecc architecture check --fail-on high

Put that in your pipeline and the pull request fails on the drift, instead of a reviewer noticing three months later, or nobody noticing at all.

Progressive adoption

A contract you cannot adopt is a contract nobody adopts. --freeze accepts every current violation into the baseline store, so you can turn the gate on today and pay the debt down over time.

ovecc architecture check --freeze # accept today's violations
ovecc architecture check # from now on, only new ones gate

The store lives in .ovecc/architecture/baseline/ — one file per component, one sorted rule<TAB>file<TAB>specifier line per violation, so concurrent branches merge line by line.

There are no line numbers in the store. An entry survives edits around the import; renaming the file resurrects the violation on purpose, because moving a file is the moment to pay its debt.

The ratchet

In new-violations mode (the default), baselined entries stop gating — the report header counts them — and every check ratchets: entries whose violation no longer exists leave the store. The debt counter never climbs back.

strict mode ignores the baseline entirely, so the whole debt gates again. That is the end state, not the starting one.

Behavioral coupling in the baseline

Behavioral coupling goes into the same store, one line per coupled file pair (behavioral-coupling<TAB>left file<TAB>right file). Accepting today's pairs does not silence the component pair for good: the next file that joins the coupling comes back on its own, even though a single pair would never have raised the finding.

Coverage floors cannot be baselined

Unlike every other verdict, min_coverage cannot be frozen. A floor is one aggregate per component, so accepting it once accepts the whole condition — which is what deleting the declaration already does.

Options

OptionEffect
--fail-on medium|high|anySeverity that fails the build (default high)
--freezeAccept the current violations into the baseline store

Plus the global options.

Exit codes

CodeMeaning
0No finding crossed the threshold
1A contract finding crossed it

Full contract in the exit-code reference.