Lint & Verify Usage
In Ved, ved lint and ved verify are not tools that complain about line lengths or variable names. They are powerful mathematical verification engines designed to mathematically guarantee that your control loops are safe, deterministic, and idempotent before they are deployed.
ved lint
The linter acts as your first line of defense against structural divergence. It focuses on the internal consistency and safety of individual Domains and Transitions.
When you run ved lint, the CLI performs three distinct checks:
- Idempotency Verification: Every Effect Intent is examined. Using control flow analysis, the linter tries to trace a unique, state-derived idempotency key passed into the
emitkeyword. If it cannot prove idempotency, it outputsV-LNT-001. - Sandbox Adherence: Ensures that your code has not attempted to use unsupported proxy modules (like external C bindings) to read the filesystem or check the clock directly inside a pure slice.
- Cyclomatic Slicing Threats: Detects
whileloops or large array comprehensions that don't invoke theyieldkeyword. It statically estimates if the operation will blow past the Deterministic Scheduler's cycle boundaries.
You can configure the strictness of the linter in your ved.toml file or bypass specific lines using inline Pragmas. However, a bypassed lint rule is permanently attached to the compiled artifact's telemetry profile.
ved verify
While lint checks the structural purity of the code execution, ved verify acts on the orchestration topology. It requires your entire multi-domain project workspace.
When you run ved verify, it ensures:
- Authority Satisfaction: If
Domain Aattempts to send a command message toDomain B,verifymathematically evaluates their Authority type structures. IfAis inside a Workspace scope andBis inside a Root scope, the compilation halts. - Effect Contract Matching: It checks that all emitted
Effect Intentsinside your pure transitions are properly mapped to functioning, registeredEffect Adaptersin your deployment manifest. - Schema Migration Adjacency: If you change a Domain's
stateblock,verifyexamines the previous git tags or snapshot schemas. It ensures that there is a complete, un-skipped migration path from the oldest supported state format directly to the newly compiled format.
In a CI/CD pipeline, ved check is used for fast parsing, but ved verify is the definitive gating function before allowing a deployment release.