Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
*.so
*.dylib
/mcpproxy
/mcpproxy-server
/warmtiktoken
/test/launcher-server/launcher-server
__debug_bin*

# Playwright MCP artifacts
.playwright-mcp/

# osgrep local server config (contains a local auth token)
.osgrep/

# Bleve search index directories
index.bleve/
*.bleve/
Expand Down
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,21 @@ repos:
exclude: '\.(patch|diff)$'
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files
# A 43 MB `warmtiktoken` Mach-O binary was committed at the repo root
# in #1153 (go build in the wrong cwd). Screenshots and verification
# reports are legitimately 1-6 MB, so cap well above them.
args: ['--maxkb=8192']

- repo: local
hooks:
- id: no-native-binaries
name: Reject compiled executables (Mach-O/ELF/PE)
entry: scripts/check-no-native-binaries.sh
language: script
# Uses `file(1)`; images are excluded to keep the hook fast.
exclude: '^(docs|website|assets|specs)/.*\.(png|jpe?g|gif|ico|webp|svg|pdf)$'

- id: gofmt
name: gofmt
entry: gofmt -w
Expand Down
14 changes: 14 additions & 0 deletions scripts/check-no-native-binaries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Pre-commit hook: refuse to commit compiled native executables (Mach-O, ELF,
# PE). `go build ./bench/cmd/warmtiktoken` run from the repo root drops a
# 43 MB binary at ./warmtiktoken, and one of those made it into #1153.
set -euo pipefail
rc=0
for f in "$@"; do
[ -f "$f" ] || continue
if file -b "$f" | grep -qE '^(Mach-O|ELF|PE32|MS-DOS executable)'; then
echo "refusing to commit native executable: $f (add it to .gitignore)" >&2
rc=1
fi
done
exit $rc
2 changes: 1 addition & 1 deletion test/e2e-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"compress": true,
"json_format": false
},
"api_key": "b255c7a2740f579778244f9fc0c871e5f5af02b46382dbfd47476563e3bd9958",
"api_key": "e2e-test-api-key-fixture",
"require_mcp_auth": false,
"read_only_mode": false,
"disable_management": false,
Expand Down
Binary file removed warmtiktoken
Binary file not shown.
Loading