mirror of
https://github.com/zap-proto/zip.git
synced 2026-10-19 15:38:57 +00:00
The README gave no version to install and no service to run, never mentioned zipdoc, Described, ErrorHandler, the call plane's field-order rule, zipgen, CommandsFromSpec, Authorize or the MCP door's limits, and named APIs that do not exist (app.Add, app.Mount, a zip.Load that takes a prefix first). It now takes one service through REST, MCP, OpenAPI and the CLI with output from real runs, then covers each projection, the error format and the release that introduced it, and the security model. examples/local-service is that service: one SQLite-backed operation, doc comments run through zipdoc, a .mcp.json for Claude Code, and a test that checks every operation against every projection. It is a module of its own so the SQLite driver stays out of zip's graph. CI runs zipdoc -check and its tests. LLM.md is now a map of the code, the test commands, the release steps and the invariants that hold today. Co-authored-by: Hanzo Dev <[email protected]>
40 lines
2.1 KiB
YAML
40 lines
2.1 KiB
YAML
# Canonical CI config for zap-proto/zip — read by the hanzoai/ci reusable
|
|
# (.github/workflows/cicd.yml). zip is a LIBRARY: no images, no deploy — CI's
|
|
# whole job is proving the framework contract on every push, on OUR arc pool.
|
|
|
|
# The reference plugin, published per OS/arch on every tag. zip defines the
|
|
# install contract (zip.Plugin{URL, Sum}: fetch, verify the SHA-256 BEFORE the
|
|
# file is made executable, cache by digest), so zip is where a runnable proof of
|
|
# it belongs: any host can point at these bits and exercise its own install path
|
|
# without building anything. It is also what the pattern is for — the plugin is
|
|
# built ONCE here and every host picks up the same artifact.
|
|
#
|
|
# https://github.com/zap-proto/zip/releases/download/<tag>/example-billing-<os>-<arch>
|
|
# https://github.com/zap-proto/zip/releases/download/<tag>/binaries.json ← url + sha256
|
|
binaries:
|
|
- name: example-billing
|
|
main: ./examples/plugin/billing
|
|
platforms: [linux/amd64, linux/arm64, darwin/arm64]
|
|
|
|
test:
|
|
- name: go-vet
|
|
run: go vet ./...
|
|
- name: go-test
|
|
# The full suite includes the load-bearing contract pins: route-chain
|
|
# ORDER (middleware-first/handler-last — an inversion here silently breaks
|
|
# every auth gate in every app built on zip), the no-Next abort, empty-leaf
|
|
# group roots, static fallback, and the runtime/middleware packages.
|
|
run: go test -count=1 -timeout 10m ./...
|
|
- name: go-test-collector
|
|
# contract/ is a module of its own, so ./... above does not reach it and no
|
|
# consumer of zip inherits what it requires. It runs the collector's REAL
|
|
# receivers against a real zip app: the one thing proving that two
|
|
# deliberately separate declarations of the batch shapes still describe one
|
|
# thing. See contract/doc.go.
|
|
run: cd contract && go test -count=1 -timeout 5m ./...
|
|
- name: go-test-local-service
|
|
# examples/local-service is its own module so SQLite stays out of zip's
|
|
# graph. It checks its generated doc file is current, then asserts its op
|
|
# answers over REST, MCP, OpenAPI and the CLI.
|
|
run: cd examples/local-service && go tool zipdoc -check && go test -count=1 -timeout 5m ./...
|