Zig 0.15.x code intelligence server. Tests live in src/tests.zig. Build and test with zig build test.
Every GitHub issue must include a failing test case. No exceptions.
When creating an issue:
- Write a
test "issue-XX: <description>"block insrc/tests.zigthat fails on the currentmainbranch - Verify it fails:
zig build test 2>&1 | grep "issue-XX" - File the issue via
gh issue createwith this structure:- Title:
<module>: <concise description> - Body sections: Problem, Failing Test (the zig test block), Expected, Fix
- Labels:
bugfor defects,priority:p0for crashes,priority:p2for correctness
- Title:
- Commit the failing test on a branch:
issue-XX-failing-test - Do not fix the bug in the same commit as the failing test
If you cannot write a failing test, the issue is not well-defined enough to file.
- Use
std.testingandtesting.allocator - Use
std.heap.ArenaAllocatorfor Explorer tests - Always
defercleanup (arena.deinit, allocator.free) - One test per issue, named
test "issue-XX: <short description>" - Keep tests minimal — only exercise the specific broken code path
- No comments or documentation changes unless explicitly asked
- Prefer minimal, targeted fixes over refactors
- Follow existing patterns in the module you're editing