| name | build-and-verify |
| description | Build, compile, run server/client/cluster, execute unit/stateless/SQL tests, verify results, and troubleshoot build/test failures. Make sure to use this skill whenever the user mentions building, compiling, ninja, cmake, running tests, test failures, starting the server, or pre-commit checks, even if they just say 'it doesn't build' or 'the test broke'. |
Build & Verify
Binaries
| Binary | Path (stripped, preferred) | Fallback |
|---|
| Server / Client | build/programs/stripped/bin/proton | build/programs/proton |
| Unit tests | build/src/stripped/bin/unit_tests_dbms | build/src/unit_tests_dbms |
Stripped = 90 % smaller, faster startup, matches CI. Always prefer stripped; fall back only if the file does not exist.
Source-root rule — all build* dirs embed absolute source paths. Use each worktree's own build*; never share across checkouts.
Part 1 — Build
Always configure from inside the chosen build* directory with the repo's build.sh.
Do not substitute direct cmake -S/-B configure commands unless the user explicitly requests that workflow.
cd build && ../build.sh Debug
cd build && ninja
Part 2 — Test
Full run (pre-commit)
./run-all-tests.sh
./run-all-tests.sh --skip-smoke
./run-all-tests.sh --only unit
./run-all-tests.sh --port <tcp>
Targeted run (during issue work)
| What changed | Run this |
|---|
| C++ data structures / algorithms | ./run-unit-tests.sh <SuiteName> |
| SQL parsing / planner / execution | ./run-sql-tests.sh <test_id> |
| Streaming end-to-end behaviour | ./run-smoke-tests.sh -s <suite> |
| Unsure | ./run-all-tests.sh --skip-smoke then add smoke if behaviour changed |
Individual scripts
All scripts auto-manage server lifecycle and accept --help.
./run-unit-tests.sh
./run-unit-tests.sh StorageStream
./run-unit-tests.sh "ParserStream.ParseDDL"
./run-unit-tests.sh -l StorageStream
./run-sql-tests.sh
./run-sql-tests.sh 00001_select_1
./run-sql-tests.sh '0003_*'
./run-sql-tests.sh --port <tcp> 0003_*
./run-smoke-tests.sh
./run-smoke-tests.sh -s tumble_window
./run-smoke-tests.sh -s tumble_window -k 00_tumble_window_max
./run-smoke-tests.sh --collect-only
./run-smoke-tests.sh --port <tcp>
Writing tests
Server (manual start/stop)
Only needed when running SQL or smoke tests with --port / --reuse-server.
./start-local-proton.sh
build/programs/stripped/bin/proton client --port <tcp>
kill $(cat tmp_data_<tcp>/proton.pid)
Runtime data and logs: ./tmp_data_<tcp>/ — removed automatically on exit when the test script started the server. When using --port/--reuse-server, the directory is left untouched.
Test reports: tmp_data_<tcp>/logs/sql/ and tmp_data_<tcp>/logs/smoke/ (server-owned mode); ./tmp/sql_reports/ and ./tmp/smoke_logs/ (reuse mode).
Parallel-safe — each start-local-proton.sh picks a free port automatically;
multiple instances (or concurrent agents) coexist without conflicts.
Debugging
build/programs/stripped/bin/proton client --port <tcp> \
--query "SELECT * FROM system.processes"
build/programs/stripped/bin/proton client --port <tcp> --query "SHOW STREAMS"
build/programs/stripped/bin/proton client --port <tcp> --query "SHOW VIEWS"
tail -f ./tmp_data_<tcp>/data/var/log/proton-server/proton-server.log
tail -f ./tmp_data_<tcp>/data/var/log/proton-server/proton-server.err.log
References