mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 09:35:59 -04:00
Reciprocal pointers so humans landing in CONTRIBUTING.md discover the agent/operational conventions in AGENTS.md, and agents landing in AGENTS.md discover the CLA gate and pre-PR checks. Adds a short Development section (test + fmt commands) and a Before-opening-a-PR checklist to CONTRIBUTING.md; CLA paragraph preserved verbatim and moved to its own section.
32 lines
1.1 KiB
Markdown
32 lines
1.1 KiB
Markdown
# AGENTS.md
|
|
|
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to open a pull request (CLA, dev setup, pre-PR checks).
|
|
|
|
## Tests
|
|
|
|
```bash
|
|
make test # Run all tests
|
|
make test F="server" # Filter by substring
|
|
TEST_FILTER="WebApi: #selector_all" make test # Filter main + subtest (separator: #)
|
|
TEST_VERBOSE=true make test
|
|
TEST_FAIL_FIRST=true make test
|
|
METRICS=true make test # Capture allocation/duration metrics as JSON
|
|
```
|
|
|
|
The custom test runner (`src/test_runner.zig`) detects memory leaks in debug builds. **A test that allocates without freeing fails** — not just lints.
|
|
|
|
## Formatting
|
|
|
|
```bash
|
|
zig fmt --check ./*.zig ./**/*.zig # Exact command CI runs
|
|
```
|
|
|
|
`zig build` depends on the fmt step, so a local build catches drift too.
|
|
|
|
## Conventions
|
|
|
|
Mirror the patterns in neighboring files. In particular:
|
|
|
|
- `@import` alias case follows the imported file's basename (`const Frame = @import("Frame.zig")`, `const ast = @import("ast.zig")`).
|
|
- Prefer struct-init type inference (`.{ ... }`) where the expected type is known from the function signature or variable annotation.
|