fluid-core/Makefile
tegwick 76912adef8
Some checks failed
ci / build (push) Failing after 1m6s
Generate contract types, pin fixtures to spec, add build and ADRs
Completes FLUID-WP-0002. The record types in internal/contract are
generated from schemas/ by a dependency-free generator; fixtures
transcribed from the spec's worked examples validate against those
schemas and round-trip through the generated types with
DisallowUnknownFields, so a spec change that misses the schemas fails
CI rather than drifting silently.

Adds identifier prefix helpers, Makefile, GitHub Actions, and five ADRs
recording the Go choice, out-of-process attachment, the wire contract as
boundary, the evidence store, and revision identity.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KmVxhJ35tCo7rE7UnLwWu

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 1116572@bnt-lap001
Assistant-Session: 8ba9bb93-a72a-4883-b189-2499cce5c400
2026-09-04 02:03:12 +02:00

54 lines
1.3 KiB
Makefile

# FLUID core — build, generation and conformance.
#
# The record types in internal/contract are generated from schemas/. Never edit
# them by hand: run `make generate`.
GO ?= go
PYTHON ?= python3
PKGS := ./...
.PHONY: all
all: generate build vet test validate
.PHONY: generate
generate: ## Regenerate Go types from schemas/
$(GO) run ./tools/schemagen
gofmt -w internal/contract
.PHONY: build
build:
$(GO) build $(PKGS)
.PHONY: vet
vet:
$(GO) vet $(PKGS)
.PHONY: test
test: validate
$(GO) test $(PKGS)
.PHONY: validate
validate: ## Validate spec-derived fixtures against the schemas
$(PYTHON) conformance/validate_schemas.py
.PHONY: check-generated
check-generated: ## Fail if generated code is stale relative to schemas/
@$(MAKE) --no-print-directory generate
@if ! git diff --quiet -- internal/contract; then \
echo "internal/contract is stale — run 'make generate' and commit the result"; \
git --no-pager diff --stat -- internal/contract; \
exit 1; \
fi
.PHONY: conformance
conformance: ## Full conformance suite (grows through FLUID-WP-0007)
$(GO) test ./conformance/... $(PKGS)
.PHONY: clean
clean:
rm -rf bin internal/contract/*.broken
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'