Skip to content

chore(0.9.6): relabel 0.9.5.2 -> 0.9.6 — this batch is a real minor bump #24

chore(0.9.6): relabel 0.9.5.2 -> 0.9.6 — this batch is a real minor bump

chore(0.9.6): relabel 0.9.5.2 -> 0.9.6 — this batch is a real minor bump #24

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} · Python ${{ matrix.python }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
python: "3.12"
- os: ubuntu-latest
python: "3.12"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Show toolchain
run: |
uname -a
cc --version || true
python3 --version
- name: Build ak_search (native engine)
working-directory: tools/search
run: |
make
cp ak_search ../../server/bin/ak_search
chmod +x ../../server/bin/ak_search
file ../../server/bin/ak_search
- name: Run native C test harness (132 assertions)
run: |
./tools/search/tests/run_tests.sh | tee /tmp/ak_search_tests.log
grep -E '^=+$|PASS=' /tmp/ak_search_tests.log | tail -3
# Fail the job if any assertion failed.
if grep -q ' FAIL ' /tmp/ak_search_tests.log; then
echo "::error::ak_search test harness reported FAILs"
exit 1
fi
- name: Run Python unit tests (standard library, no deps)
run: |
python3 -m unittest discover -s tests/python -v
- name: MCP server smoke test (initialize + tools/list)
run: |
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| python3 server/algokiller_mcp.py > /tmp/mcp_smoke.json
# Parse responses with Python rather than grep — `json.dumps`
# emits `"id": 1` with a space by default, which the previous
# `grep -c '"id":1'` missed. Also locks the advertised tool
# count so a future schema-drift fails the gate.
python3 - <<'PY'
import json
got = {}
with open('/tmp/mcp_smoke.json') as f:
for line in f:
line = line.strip()
if not line:
continue
d = json.loads(line)
if 'id' in d:
got[d['id']] = d
assert 1 in got, f'no response to initialize; got ids={sorted(got)}'
assert 2 in got, f'no response to tools/list; got ids={sorted(got)}'
tools = got[2]['result']['tools']
assert len(tools) == 26, f'expected 26 tools (incl. pick_output_dir), got {len(tools)}'
# Spot-check a few must-be-present names so a silent rename of any
# critical tool fails the gate even if the total count is right.
names = {t['name'] for t in tools}
for required in ('bind_trace', 'pick_output_dir', 'trace_constscan',
'trace_cryptoinstr', 'write_artifact'):
assert required in names, f'missing required tool: {required}'
pv = got[1]['result']['protocolVersion']
print(f'MCP smoke ok: protocolVersion={pv}, tools={len(tools)}')
PY