Skip to content

Commit 16bdf31

Browse files
authored
test(task-61-p1-d1): complete e2e shape matrix
Completes the HTTP E2E deployment shape matrix by adding qdrant-postgres, pgvector-neo4j, and pgvector-nebula shapes; targeted/manual workflow callers; Makefile shortcuts; docs; ci-flake-policy clarification; and unit contracts pinning the full 2x3 matrix plus path-targeted trigger coverage.
1 parent accda9e commit 16bdf31

11 files changed

Lines changed: 246 additions & 13 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: E2E HTTP pgvector + Nebula
2+
3+
# Extended deployment shape: pgvector (vector) + Nebula (graph).
4+
# Runs on manual dispatch and on PRs that touch backend/shape surfaces.
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
paths:
10+
- ".github/workflows/e2e-http-*.yml"
11+
- "docker-compose.yml"
12+
- "envs/**"
13+
- "aperag/config.py"
14+
- "tests/e2e_http/**"
15+
- "aperag/indexing/**"
16+
- "aperag/graph_curation/**"
17+
- "aperag/vectorstore/**"
18+
- "aperag/domains/retrieval/**"
19+
- "aperag/domains/knowledge_graph/**"
20+
- "deploy/aperag/**"
21+
workflow_dispatch:
22+
23+
permissions:
24+
contents: read
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
e2e-http-compose:
32+
if: ${{ !github.event.pull_request.draft }}
33+
uses: ./.github/workflows/e2e-http-shape.yml
34+
secrets: inherit
35+
with:
36+
shape: pgvector-nebula
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: E2E HTTP pgvector + Neo4j
2+
3+
# Extended deployment shape: pgvector (vector) + Neo4j (graph).
4+
# Runs on manual dispatch and on PRs that touch backend/shape surfaces.
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
paths:
10+
- ".github/workflows/e2e-http-*.yml"
11+
- "docker-compose.yml"
12+
- "envs/**"
13+
- "aperag/config.py"
14+
- "tests/e2e_http/**"
15+
- "aperag/indexing/**"
16+
- "aperag/graph_curation/**"
17+
- "aperag/vectorstore/**"
18+
- "aperag/domains/retrieval/**"
19+
- "aperag/domains/knowledge_graph/**"
20+
- "deploy/aperag/**"
21+
workflow_dispatch:
22+
23+
permissions:
24+
contents: read
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
e2e-http-compose:
32+
if: ${{ !github.event.pull_request.draft }}
33+
uses: ./.github/workflows/e2e-http-shape.yml
34+
secrets: inherit
35+
with:
36+
shape: pgvector-neo4j
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: E2E HTTP Qdrant + PostgreSQL
2+
3+
# Extended deployment shape: Qdrant (vector) + PostgreSQL (graph).
4+
# Runs on manual dispatch and on PRs that touch backend/shape surfaces.
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
paths:
10+
- ".github/workflows/e2e-http-*.yml"
11+
- "docker-compose.yml"
12+
- "envs/**"
13+
- "aperag/config.py"
14+
- "tests/e2e_http/**"
15+
- "aperag/indexing/**"
16+
- "aperag/graph_curation/**"
17+
- "aperag/vectorstore/**"
18+
- "aperag/domains/retrieval/**"
19+
- "aperag/domains/knowledge_graph/**"
20+
- "deploy/aperag/**"
21+
workflow_dispatch:
22+
23+
permissions:
24+
contents: read
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
e2e-http-compose:
32+
if: ${{ !github.event.pull_request.draft }}
33+
uses: ./.github/workflows/e2e-http-shape.yml
34+
secrets: inherit
35+
with:
36+
shape: qdrant-postgres

Makefile

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ help:
5656
@printf " make test-http-full Run full HTTP suite against an existing target\n"
5757
@printf " make test-http-up-compose / test-http-down-compose\n"
5858
@printf " make test-http-smoke-compose / test-http-full-compose\n"
59-
@printf " make test-http-smoke-compose-{lite,qdrant-neo4j,qdrant-nebula} (per-shape shortcuts)\n"
60-
@printf " make test-http-full-compose-{lite,qdrant-neo4j,qdrant-nebula} (provider-aware per-shape shortcuts)\n"
59+
@printf " make test-http-smoke-compose-{lite,qdrant-postgres,qdrant-neo4j,qdrant-nebula,pgvector-neo4j,pgvector-nebula} (per-shape shortcuts)\n"
60+
@printf " make test-http-full-compose-{lite,qdrant-postgres,qdrant-neo4j,qdrant-nebula,pgvector-neo4j,pgvector-nebula} (provider-aware per-shape shortcuts)\n"
6161
@printf " make test-http-up-k8s / test-http-down-k8s\n"
6262
@printf " make test-http-smoke-k8s / test-http-full-k8s\n"
6363
@printf " make benchmark-graph-extraction Run manual OpenRouter KG extraction benchmark\n\n"
@@ -216,8 +216,12 @@ static-check:
216216
.PHONY: test-all test-unit test-integration test-e2e test-e2e-perf benchmark-graph-extraction \
217217
test-http-bootstrap test-http-smoke test-http-full \
218218
test-http-up-compose test-http-down-compose test-http-smoke-compose test-http-full-compose \
219-
test-http-smoke-compose-lite test-http-smoke-compose-qdrant-neo4j test-http-smoke-compose-qdrant-nebula \
220-
test-http-full-compose-lite test-http-full-compose-qdrant-neo4j test-http-full-compose-qdrant-nebula \
219+
test-http-smoke-compose-lite test-http-smoke-compose-qdrant-postgres \
220+
test-http-smoke-compose-qdrant-neo4j test-http-smoke-compose-qdrant-nebula \
221+
test-http-smoke-compose-pgvector-neo4j test-http-smoke-compose-pgvector-nebula \
222+
test-http-full-compose-lite test-http-full-compose-qdrant-postgres \
223+
test-http-full-compose-qdrant-neo4j test-http-full-compose-qdrant-nebula \
224+
test-http-full-compose-pgvector-neo4j test-http-full-compose-pgvector-nebula \
221225
test-http-up-k8s test-http-down-k8s test-http-smoke-k8s test-http-full-k8s
222226
test-all: test-unit test-integration test-e2e
223227

@@ -311,21 +315,39 @@ test-http-full-compose:
311315
test-http-smoke-compose-lite:
312316
@SHAPE=lite ./tests/e2e_http/scripts/run_compose_smoke.sh
313317

318+
test-http-smoke-compose-qdrant-postgres:
319+
@SHAPE=qdrant-postgres ./tests/e2e_http/scripts/run_compose_smoke.sh
320+
314321
test-http-smoke-compose-qdrant-neo4j:
315322
@SHAPE=qdrant-neo4j ./tests/e2e_http/scripts/run_compose_smoke.sh
316323

317324
test-http-smoke-compose-qdrant-nebula:
318325
@SHAPE=qdrant-nebula ./tests/e2e_http/scripts/run_compose_smoke.sh
319326

327+
test-http-smoke-compose-pgvector-neo4j:
328+
@SHAPE=pgvector-neo4j ./tests/e2e_http/scripts/run_compose_smoke.sh
329+
330+
test-http-smoke-compose-pgvector-nebula:
331+
@SHAPE=pgvector-nebula ./tests/e2e_http/scripts/run_compose_smoke.sh
332+
320333
test-http-full-compose-lite:
321334
@SHAPE=lite ./tests/e2e_http/scripts/run_compose_full.sh
322335

336+
test-http-full-compose-qdrant-postgres:
337+
@SHAPE=qdrant-postgres ./tests/e2e_http/scripts/run_compose_full.sh
338+
323339
test-http-full-compose-qdrant-neo4j:
324340
@SHAPE=qdrant-neo4j ./tests/e2e_http/scripts/run_compose_full.sh
325341

326342
test-http-full-compose-qdrant-nebula:
327343
@SHAPE=qdrant-nebula ./tests/e2e_http/scripts/run_compose_full.sh
328344

345+
test-http-full-compose-pgvector-neo4j:
346+
@SHAPE=pgvector-neo4j ./tests/e2e_http/scripts/run_compose_full.sh
347+
348+
test-http-full-compose-pgvector-nebula:
349+
@SHAPE=pgvector-nebula ./tests/e2e_http/scripts/run_compose_full.sh
350+
329351
test-http-up-k8s:
330352
@./tests/e2e_http/runners/k8s/up.sh
331353

docs/zh-CN/architecture/ci-flake-policy.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
**生效日期**:2026-04-30(task #33 Layer 2 P0 codify)
44

5-
**适用范围**:所有 PR 的 `.github/workflows/e2e-http-{lite,qdrant-nebula,qdrant-neo4j}.yml` 三 variant CI。
5+
**适用范围**
6+
- baseline PR-trigger CI:`.github/workflows/e2e-http-{lite,qdrant-nebula,qdrant-neo4j}.yml` 三 variant。
7+
- extended targeted/manual CI(task #61 P1-D1):`.github/workflows/e2e-http-{qdrant-postgres,pgvector-neo4j,pgvector-nebula}.yml` 三 variant。它们只在 workflow 手动触发或 backend/shape surface 相关 PR 触发。
8+
9+
下文 §1 的 fail-rate 数据和 §2.2 人工放行白名单只覆盖已有历史样本的 baseline Nebula / Neo4j shape;新增 extended shapes 暂无历史白名单,失败时必须 rerun 或定位,不直接套用 §2.2。
610

711
**编辑历史**
812
- 2026-04-30 chenyexuan 初版 — fold-in Planetegg msg=46a0c5de gate wording + huangheng / Weston / ziang 多 PR cross-check forensics 实证。

tests/e2e_http/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ Provider-aware local flow for a named deployment shape:
8282
export E2E_ALIBABACLOUD_API_KEY=...
8383
export E2E_OPENROUTER_API_KEY=...
8484
make test-http-full-compose-lite
85+
make test-http-full-compose-qdrant-postgres
8586
make test-http-full-compose-qdrant-nebula
8687
make test-http-full-compose-qdrant-neo4j
88+
make test-http-full-compose-pgvector-neo4j
89+
make test-http-full-compose-pgvector-nebula
8790
```
8891

8992
Typical local flow against a Kubernetes-backed environment:

tests/e2e_http/runners/compose/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ This runner is intentionally replaceable. The suite must remain runnable against
2020
ApeRAG supports several real production deployment forms — different choices of vector backend (Qdrant or pgvector) and graph backend (PostgreSQL, Neo4j, or Nebula). Each named combination is a *shape*.
2121

2222
```
23-
SHAPE=lite ./tests/e2e_http/runners/compose/up.sh
24-
SHAPE=qdrant-neo4j ./tests/e2e_http/runners/compose/up.sh
25-
SHAPE=qdrant-nebula ./tests/e2e_http/runners/compose/up.sh
23+
SHAPE=lite ./tests/e2e_http/runners/compose/up.sh
24+
SHAPE=qdrant-postgres ./tests/e2e_http/runners/compose/up.sh
25+
SHAPE=qdrant-neo4j ./tests/e2e_http/runners/compose/up.sh
26+
SHAPE=qdrant-nebula ./tests/e2e_http/runners/compose/up.sh
27+
SHAPE=pgvector-neo4j ./tests/e2e_http/runners/compose/up.sh
28+
SHAPE=pgvector-nebula ./tests/e2e_http/runners/compose/up.sh
2629
```
2730

2831
Each shape file under `tests/e2e_http/shapes/<shape>.env` declares:
@@ -41,8 +44,17 @@ Adding a new shape = adding one new file. The runner / Makefile / CI all referen
4144
Shapes are named `<vector>-<graph>`, with **lite** as the special name for the single-PG (pgvector + PG-graph) ApeRAG-Lite deployment:
4245

4346
- **lite** — single-PG ApeRAG-Lite: pgvector + PG-graph, no qdrant/neo4j/nebula containers
47+
- **qdrant-postgres** — distributed vector, PG graph: Qdrant + PostgreSQL graph
4448
- **qdrant-neo4j** — distributed: Qdrant + Neo4j
4549
- **qdrant-nebula** — distributed: Qdrant + Nebula
50+
- **pgvector-neo4j** — mixed: pgvector + Neo4j
51+
- **pgvector-nebula** — mixed: pgvector + Nebula
52+
53+
The six shapes cover the full 2 x 3 backend matrix: vector backend
54+
(`qdrant` / `pgvector`) crossed with graph backend (`postgresql` /
55+
`neo4j` / `nebula`). The extended mixed shapes run from manual or
56+
backend-surface-targeted CI workflows so everyday PRs keep the original
57+
lite + qdrant graph-backend signal cost.
4658

4759
### Backward compatibility
4860

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SHAPE: pgvector-nebula — pgvector + Nebula.
2+
#
3+
# Postgres holds relational data and pgvector vector data. Graph data
4+
# lives in Nebula (activated via the "nebula" compose profile). This
5+
# validates that Nebula does not imply Qdrant.
6+
SHAPE_VECTOR_DB_TYPE=pgvector
7+
SHAPE_GRAPH_DB_TYPE=nebula
8+
SHAPE_COMPOSE_SERVICES="postgres redis es api indexing-worker"
9+
SHAPE_COMPOSE_PROFILES="--profile nebula"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SHAPE: pgvector-neo4j — pgvector + Neo4j.
2+
#
3+
# Postgres holds relational data and pgvector vector data. Graph data
4+
# lives in Neo4j (activated via the "neo4j" compose profile). This
5+
# validates that Neo4j does not imply Qdrant.
6+
SHAPE_VECTOR_DB_TYPE=pgvector
7+
SHAPE_GRAPH_DB_TYPE=neo4j
8+
SHAPE_COMPOSE_SERVICES="postgres redis es api indexing-worker"
9+
SHAPE_COMPOSE_PROFILES="--profile neo4j"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SHAPE: qdrant-postgres — distributed vector with PostgreSQL graph.
2+
#
3+
# Postgres holds relational data and graph lineage data. Vector data
4+
# lives in Qdrant. This validates the non-lite form where Qdrant is
5+
# selected while the graph backend remains PostgreSQL.
6+
SHAPE_VECTOR_DB_TYPE=qdrant
7+
SHAPE_GRAPH_DB_TYPE=postgresql
8+
SHAPE_COMPOSE_SERVICES="postgres redis es qdrant api indexing-worker"
9+
SHAPE_COMPOSE_PROFILES=""

0 commit comments

Comments
 (0)