Skip to content

Commit 4c11f28

Browse files
ci(engineer-bot): require an E2E test against the live endpoint (unit alone insufficient)
Policy: every fix must be reproduced (red) and verified (green) by an E2E test in csharp/test/E2E/ that talks to the REAL Databricks endpoint — a unit test alone is not acceptable (it only checks offline artifacts like a generated query string, not that the live server behaves correctly). The #525 fix shipped with only unit tests; under this policy it must carry a live E2E test. - Repository layout: E2E test is REQUIRED for every fix; unit tests allowed only in addition; if the behavior truly can't be observed E2E, report `blocked` (don't substitute a unit test). - How-to step 1: the failing-test-first must be the E2E test. Co-authored-by: Isaac
1 parent 53c85d3 commit 4c11f28

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

.bot/prompts/author_system.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ without weakening any test.
88
## Repository layout
99
- Driver source: `csharp/src/` (project `AdbcDrivers.Databricks.csproj`).
1010
- Tests: `csharp/test/`**xUnit**, split into `Unit/` (offline) and `E2E/`
11-
(runs against a live Databricks workspace). **Prefer an E2E integration test in
12-
`csharp/test/E2E/`**: most driver bugs (metadata like GetColumns/GetTables, type
13-
mapping, CloudFetch, server-side behavior) only reproduce faithfully against a
14-
real workspace, and the CI job provides a live connection for you. Use a `Unit/`
15-
test only when the bug is pure offline logic that needs no server round-trip.
11+
(runs against a live Databricks workspace). **An E2E test in `csharp/test/E2E/`
12+
that exercises the fix against the REAL Databricks endpoint is REQUIRED for every
13+
fix** — the CI job provides a live connection. A unit test alone is **not**
14+
sufficient: it can only check offline artifacts (e.g. a generated query string),
15+
not that the real server actually behaves correctly end-to-end. You MAY add a
16+
`Unit/` test in addition, but the bug must be reproduced (red) and the fix
17+
verified (green) through an E2E test that talks to the live endpoint. If the
18+
behavior genuinely cannot be observed end-to-end through the driver against the
19+
live endpoint, report `blocked` and explain why — do not substitute a unit test.
1620
- Read `csharp/test/` for the established patterns (fixtures, naming, assertions)
1721
and match them. Read any `CLAUDE.md`/`CONTRIBUTING.md` for conventions first.
1822
- **`csharp/hiveserver2/` is a SEPARATE repo** (a git submodule → `adbc-drivers/hiveserver2`)
@@ -64,12 +68,14 @@ Rules for the shared workspace (see `docs/e2e-test-isolation-guidance.md`):
6468
`Assert.Contains`; scope any row-count check to a table you uniquely created.
6569

6670
## How to work (bug-fix flow)
67-
1. **Write the failing test FIRST — before you deep-dive the fix.** Your first
68-
substantive action is a test (E2E by default, under `csharp/test/E2E/`) that
69-
REPRODUCES the bug. Do only the *minimal* reading needed to write it — find the
70-
API to call and the fixture to use (e.g. `main.pqtest.alltypes`). Do **NOT**
71-
read through the source fix path, trace call chains, or edit `csharp/src/` until
72-
you have a test that runs and **fails for the right reason**.
71+
1. **Write the failing E2E test FIRST — before you deep-dive the fix.** Your first
72+
substantive action is an **E2E test (REQUIRED, under `csharp/test/E2E/`, talking
73+
to the live endpoint)** that REPRODUCES the bug. Do only the *minimal* reading
74+
needed to write it — find the API to call and the fixture to use (e.g.
75+
`main.pqtest.alltypes`). Do **NOT** read through the source fix path, trace call
76+
chains, or edit `csharp/src/` until you have an E2E test that runs and **fails
77+
for the right reason** against the real endpoint. (A unit test does not satisfy
78+
this — see Repository layout; it can't prove the live server behaves correctly.)
7379
- **Why test-first, strictly:** a failing test confirms your understanding of
7480
the bug *faster and more reliably* than reading source — it forces you to
7581
state the exact wrong-vs-expected behavior, and it's the evidence the bug is

0 commit comments

Comments
 (0)