p1: cap jq output, log refusals, fail contract without SDK

jq results are bounded (10k items / output cap) and return 400 when
exceeded. 401/403 log caller, host, and reason. make contract exits 1
unless firecrawl-py is present (SIFT_CONTRACT_SKIP_SDK=1 to skip).
This commit is contained in:
2026-09-22 22:02:38 -07:00
parent 9444a35322
commit 8e3a6cd339
6 changed files with 148 additions and 48 deletions
+4 -1
View File
@@ -30,7 +30,10 @@ contract:
@if command -v python3 >/dev/null 2>&1; then \
$(GO) build -tags sifttest -trimpath -ldflags "$(LDFLAGS)" -o bin/sift-test ./cmd/sift && \
python3 tests/contract/sdk_test.py; \
else echo "python3 not found; SDK contract skipped"; fi
else \
if [ "$$SIFT_CONTRACT_SKIP_SDK" = "1" ]; then echo "python3 missing; skipped"; \
else echo "python3 required for make contract" >&2; exit 1; fi; \
fi
install: build
install -d $(DESTDIR)$(PREFIX)/bin