You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New issues are filed in Linear, never in the `database-issues` GitHub repo. `database-issues` is legacy. Its open issues are still valid to read, link, and close, so an existing `database-issues#NNNN` reference in code or a comment stays as it is.
40
+
41
+
Reference the Linear issue by its its key, e.g. `Closes: SQL-450`. Don't include the full URL containing the issue title.
42
+
43
+
When a change closes a legacy GitHub issue, `Fixes database-issues#NNNN` works for auto-closing.
44
+
38
45
## Cargo.lock discipline
39
46
40
47
Never regenerate the entire Cargo.lock — bare `cargo update` bumps every semver-compatible dep and introduces unrelated breakage (e.g., `os_info` pulling in `objc2` on macOS, `chrono-tz` changing timezone data, `serde_path_to_error` changing error formats).
Copy file name to clipboardExpand all lines: .agents/skills/mz-debug-ci/SKILL.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,9 +71,11 @@ Extract from the URL:
71
71
**Before diving into logs**, fetch the build annotations. They contain pre-extracted error messages, stack traces, and links to known flaky test issues — this saves significant time compared to grepping through raw logs.
72
72
73
73
```bash
74
-
bk api /pipelines/<PIPELINE>/builds/<BUILD_NUMBER>/annotations --no-pager 2>&1
74
+
bk api /pipelines/<PIPELINE>/builds/<BUILD_NUMBER>/annotations --no-pager 2>/dev/null
75
75
```
76
76
77
+
Note that `bk` can't be piped through `2>&1`.
78
+
77
79
The response is JSON. Each annotation has:
78
80
-`style`: `"error"` for failures
79
81
-`body_html`: HTML containing the error summary, including:
@@ -97,12 +99,12 @@ Only fetch full logs when annotations don't provide enough detail. Triage in thi
@@ -223,7 +223,6 @@ Determine the right framework based on what you're testing:
223
223
***SQL correctness, types, functions** (no external systems, no concurrency): sqllogictest (`.slt` in `test/sqllogictest/`).
224
224
Use `mode cockroach`, test NULLs and edge cases.
225
225
Do NOT modify files in `test/sqllogictest/sqlite` or `test/sqllogictest/cockroach` (upstream).
226
-
When adding new tests to slt files, prefer adding them to an existing slt file rather than creating new slt files, if you are able to quickly find an existing slt file where the new tests fit naturally.
227
226
Do NOT drive data-dependent assertions with a `LOAD GENERATOR COUNTER` source plus `mz_unsafe.mz_sleep(...)` to wait for ingestion: the counter emits rows over wall-clock time, so the check races ingestion and flakes in CI. Use a plain `CREATE TABLE` with deterministic `INSERT`s.
228
227
When a statically-monotonic operator needs a `FROM SOURCE` load generator (whose row timing is nondeterministic), split coverage: test the plan shape with `EXPLAIN PHYSICAL PLAN` over the `FROM SOURCE` table (no data, non-flaky), and test runtime row correctness with a one-shot `SELECT` over a plain `CREATE TABLE` + `INSERT`.
229
228
***Sources/sinks, Kafka, catalog, pgwire** (external systems): testdrive (`.td` in `test/testdrive/`).
@@ -240,7 +239,19 @@ Determine the right framework based on what you're testing:
240
239
***Performance micro-benchmarks**: Feature Benchmark scenarios in `misc/python/materialize/feature_benchmark/scenarios`.
241
240
See `doc/developer/feature-benchmark.md`.
242
241
243
-
In most cases, appending to an existing `.slt` or `.td` file is sufficient.
244
242
For functional issues, aim for at least two different test frameworks that can independently detect the regression.
245
243
246
244
Read `doc/developer/guide-testing.md` for more detail on test frameworks.
245
+
246
+
### Extend an existing file, do not create a new one
247
+
248
+
It is preferred to extend an existing mzcompose-based test, a `.td` file or `.slt` file when appropriate. Write the smallest test that fails without the fix.
249
+
250
+
A panic is caught by CI automatically. Just run the statement that panics. Do not add an assertion on the panic message.
251
+
252
+
## Prove a regression test is red before you call it done
253
+
254
+
A regression test that has never failed proves nothing. Whenever the test is meant to demonstrate a bug, verify both directions before reporting:
255
+
256
+
1. With the fix removed run the test and confirm it fails, for the expected reason. Read the failure output.
257
+
2. Restore the fix, run the test again, and confirm it passes.
Copy file name to clipboardExpand all lines: AGENTS.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@ Use the `mz-test` skill before running ANY tests, even mid-task — the canonica
10
10
commands aren't the obvious ones (e.g. `bin/sqllogictest --optimized`, not
11
11
`cargo build --bin sqllogictest`).
12
12
13
+
Use the `mz-run` skill before building, running, formatting, or linting. `bin/fmt` and `bin/lint` are the canonical entry points, NOT `cargo fmt`, `rustfmt`, or a bare `cargo clippy`. `bin/environmentd`, not `cargo build --bin environmentd`.
14
+
15
+
Use the `mz-commit` skill before `git commit`, `git push`, or `gh pr create`.
16
+
17
+
Use the `mz-debug-ci` skill before the first `bk` or `gh pr checks` command, or when handed a Buildkite URL.
0 commit comments