contractcheck

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package contractcheck validates the structural correspondence between the consumer repo's aiwf.yaml `contracts:` block, the contract entities in the tree, and the on-disk schema/fixtures paths. It produces `contract-config` findings for the cases listed in §10 of docs/pocv3/plans/contracts-plan.md:

  • entries[].id has no matching contract entity in the tree;
  • entries[].schema does not exist as a regular file;
  • entries[].fixtures does not exist as a directory;
  • a contract entity has no entries[] binding (advisory).

The validator-name reference rule (entries[].validator must name a validator in the validators map) is enforced earlier by aiwfyaml.Validate and never reaches this package.

This package is the disk-touching counterpart to the entity-tree checks in internal/check/. It returns check.Finding so its output composes with the rest of the validation envelope.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *tree.Tree, contracts *aiwfyaml.Contracts, repoRoot string) []check.Finding

Run produces contract-config findings against the configured bindings. A nil Contracts argument is treated as "no bindings" and returns nil.

Errors are findings: a missing binding doesn't crash the run; the caller's overall validation envelope simply gets a contract-config entry to surface.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL