-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (49 loc) · 2.61 KB
/
Copy pathMakefile
File metadata and controls
61 lines (49 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# freerouter Makefile.
.PHONY: build run up down test conformance oss-clean check oracle-capture parity live-verify
# build compiles the pure-Go gateway binary into bin/freerouter. CGO_ENABLED=0 is
# load-bearing: the SQLite backend is modernc.org/sqlite (no CGO, no system libs).
build:
CGO_ENABLED=0 go build -o bin/freerouter ./cmd/freerouter
# run builds then launches the gateway. With no configuration it comes up as a real,
# durable personal metered gateway on :8080 (health at /healthz). Ctrl-C to stop.
run: build
./bin/freerouter
# up / down drive the docker compose personal-gateway (see docker-compose.yml).
up:
docker compose up --build
down:
docker compose down
# test runs the full freerouter suite.
test:
go test ./...
# conformance runs the executable forge<->freerouter contract GATE: the C-*
# assertions (docs/design/contract.md §8) exercised against the LINKED, in-process
# meter (github.com/3dl-dev/forge/meterlib) via internal/metertest — nothing mocked
# at the meter boundary. This is the gate forge's meterlib must keep passing.
conformance:
go test -v ./internal/conformance/...
# oss-clean runs the OSS-CLEAN merge gate: scans the tracked source and FAILS if a
# commit would leak a secret or bake operator-specific identity into the open-source
# core. Dependency-light (bash + git + grep). See docs/dev/oss-clean.md.
oss-clean:
bash scripts/oss-clean.sh
# oracle-capture (re-)captures OpenRouter's PUBLIC surface (models list + OpenAPI schema)
# into the committed golden fixtures under test/oracle/openrouter/. OpenRouter is the
# parity ORACLE; the parity harness (internal/parity) compares freerouter against these
# captured fixtures, never against hand-written expected values. Needs outbound HTTPS to
# openrouter.ai; on a blocked network it prints a clear message and leaves the committed
# fallback fixtures intact. See docs/dev/parity-harness.md.
oracle-capture:
go run ./cmd/oraclecapture
# parity runs the oracle-derived parity-verification harness: it loads the captured oracle
# fixtures and asserts freerouter's real /models + chat/completions shapes conform.
parity:
go test -v ./internal/parity/...
# live-verify proves REAL third-party provider connectivity (not mock upstreams). Runs the
# livevendor-tagged adapter + parity tests against whatever provider keys are in the env; each
# self-skips when its key is unset. See docs/dev/live-verification.md for the key names.
live-verify:
bash scripts/live-verify.sh
# check is the local pre-merge flow: the OSS-CLEAN gate first (cheap, fails fast on
# a leak), then the full suite and the contract conformance gate.
check: oss-clean test conformance