apex-twin 0.22.0: distcheck and the full release gate

make distcheck builds the tarball, unpacks it into mktemp -d, runs make and make
test inside it, and removes the directory via a trap. It proves the shipped
tree builds without the workspace.

make release-check runs the whole gate fail-fast:
  gate-audit -> test -> test-asan -> analyze -> fuzz -> fuzz-proxy ->
  fuzz-http -> distcheck
It takes several minutes on one core and needs the network for the example.com
checks, so it stays out of make test.

Both documented in the README with their cost. Verified: make distcheck green
(298/298 inside the tarball); make release-check green through all stages; no
temp directory left behind.
This commit is contained in:
lotherk committed 2026-11-21 08:24:01 +00:00
1 parent 9188dddfa5
commit 7b6f0bf7ef
3 files changed
+34 -3

No files matched your search

+21 -1
View File
@@ -161,6 +161,26 @@ dist:
rm -rf $(DISTNAME)
@echo "built $(DIST)"
distcheck: dist
@set -e; tmp=$$(mktemp -d); \
trap 'rm -rf "$$tmp"' EXIT; \
tar -xzf $(DIST) -C "$$tmp"; \
$(MAKE) -C "$$tmp/$(DISTNAME)"; \
$(MAKE) -C "$$tmp/$(DISTNAME)" test; \
echo "distcheck: $(DISTNAME) builds and passes from the tarball"
# The full release gate, fail-fast. Takes several minutes and needs the network
# for the example.com checks; it is not part of `make test`.
release-check:
$(MAKE) gate-audit
$(MAKE) test
$(MAKE) test-asan
$(MAKE) analyze
$(MAKE) fuzz
$(MAKE) fuzz-proxy
$(MAKE) fuzz-http
$(MAKE) distcheck
install: apex-twin
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(DOCDIR) $(DESTDIR)$(UNITDIR)
install -m 0755 apex-twin $(DESTDIR)$(BINDIR)/apex-twin
@@ -176,4 +196,4 @@ clean:
rm -f *.gcov
rm -rf $(DISTNAME) $(DIST)
.PHONY: all test gate-audit asan test-asan fuzz fuzz-selftest fuzz-red fuzz-proxy fuzz-proxy-red fuzz-http fuzz-http-red coverage analyze dist install clean
.PHONY: all test gate-audit asan test-asan fuzz fuzz-selftest fuzz-red fuzz-proxy fuzz-proxy-red fuzz-http fuzz-http-red coverage analyze dist distcheck release-check install clean
+12 -1
View File
@@ -40,6 +40,8 @@ make fuzz-proxy # mutated raw requests against the ASan proxy
make fuzz-http # mutated raw HTTP against the ASan MCP HTTP face
make install # binary, README and both systemd units (DESTDIR/PREFIX respected)
make dist # apex-twin-<version>.tar.gz: source, tests, docs, units
make distcheck # build the tarball, unpack it, build and test it there
make release-check # gate audit, suites, sanitizer, analyzer, fuzzers, distcheck
```
`make install` puts the binary in `$PREFIX/bin`, the README in
@@ -433,6 +435,15 @@ record filters that read local state (`asset_list`, `finding_list`,
count, so adding a tool forces a review. Renaming the gate call in `portscan`
and `finding_add` produced three violations; the audit is part of `make test`.
`make distcheck` builds the tarball, unpacks it into a temporary directory,
runs `make` and `make test` there, and removes the directory. That is the check
that the thing you ship builds without the working tree.
`make release-check` is the full gate, fail-fast: gate audit, suite, ASan/UBSan
suite, `gcc -fanalyzer`, `fuzz`, `fuzz-proxy`, `fuzz-http`, then `distcheck`. It
takes roughly 5–10 minutes on one core and needs the network for the
example.com checks; `make test` is the fast loop.
`make coverage` builds `apex-twin-cov` with `-O0 --coverage`, runs the suite and
prints per-file line coverage (`tests/coverage.py`, gcov only, no extra tools).
The first measured pass was 55.9%; the gap tests brought it to **76.7%** —
@@ -447,7 +458,7 @@ the copied scope reason is now bounded with a precision, not left to snprintf.
## Status
0.21.0. Built and run: 45 tools, 298 checks, 340 fuzz cases and 76.7% line
0.22.0. Built and run: 45 tools, 298 checks, 340 fuzz cases and 76.7% line
coverage. The loop closes: a probe captures the exchange as a pair, a finding
points at it, `finding_update` gives it a state, an asset records the host it
came from, `cors_check`/`cookie_audit`/`http_options` turn a web answer into a
+1 -1
View File
@@ -15,7 +15,7 @@
#include "mcp.h"
#define APEX_VERSION "0.21.0"
#define APEX_VERSION "0.22.0"
#define APEX_MAX_OUT (1u << 20)
#define APEX_PATH_MAX 512
#define APEX_PATH_FULL 1024