Repository navigation
Commit 3b4f0b9
ci(temporal-conformance): PostgreSQL service on pgvector's PG 16 image; merge-queue run on live paths (#37155)
Fixes #37095
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用户无感。CI 里带数据库的测试任务改用带 pgvector 的 PostgreSQL
镜像(按指纹锁定),新增一条验证向量扩展的测试;按你的裁决 B(记录 7146156389),改到相关文件时合并队列也跑这个任务,PR
阶段仍不跑。
- 为什么做:知识检索的 pgvector 存储需要真实数据库验证;你已定这个任务不设为必过(「#37155
不需要」),所以队列里的这次运行只作提示,变红不挡合并。
- 出错会怎样:坏镜像不会被拦下,会进 main 并让之后的主干运行变红;改回原镜像一行即可撤回。每 30 天约多花 1,550
分钟机器时间(下限)。
- 要你做什么:批准并手工合并。契约审核复审 PASS:记录 7149149161,Head-sha
`e6cb50b2549117a8a9cfd7e4c44fc3b6759235df`。可选:合并前在分支
`claude/issue-37095-ci-pgvector` 上手动触发一次 `ci.yml`,看 `Temporal
Conformance (live PG + MySQL)` 成功、driver-sql 步骤含
`sql-driver-37095-pgvector-extension.test.ts (2
tests)`;不跑的话,席位在合并后读主干这一跑,变红即回滚。
## What changes
1. **Image** (`temporal-conformance`'s postgres service):
`mirror.gcr.io/library/postgres:16` becomes
`mirror.gcr.io/pgvector/pgvector:0.8.7-pg16@sha256:484e838076e04939d27d3e176e91c86eea96236126023be8d3059761122e579f`.
- The image is pgvector's own, built `FROM postgres:16-bookworm`, so the
PostgreSQL major, the entrypoint, `pg_isready` and `psql` are unchanged.
The `vector` extension is built in.
- **Registry reachability:** pulled through `mirror.gcr.io`, the repo's
convention for every service image (Google's Docker Hub cache, which
avoids Docker Hub's anonymous per-IP quota, #22541). On 2026-11-24
`mirror.gcr.io` answered 200 for the tag `0.8.7-pg16` and for the digest
itself.
- **Pin:** exact tag plus index digest (`tag@sha256`). Docker pulls by
the digest, so a re-pushed tag cannot change the server. The digest is
the same on mirror.gcr.io and Docker Hub. No other workflow here pins a
digest; the review's nit asked for it, and `services.*.image` accepts
the form. No actionlint runs in this repo to object.
2. **Merge-queue run on path hits.** The maintainer ruled card What 2 =
B (ruling record 7146156389), verbatim: 「B:改成「改到相关文件时,合并队列里也跑这个任务」。这会推翻
#22998 的裁决,每次相关合并都多花分钟数。」
- Before this PR, `temporal-conformance` ran on push to main, schedule
and workflow_dispatch only, never on `pull_request` or `merge_group`
(#22998, THE TWO SPEEDS).
- It now also runs on `merge_group` when the entry's diff touches the
new `temporal_live` output of the existing `dorny/paths-filter` step in
the `filter` job (the mechanism the ui jobs already use on the queue).
- New `if:`: `… && github.event_name != 'pull_request' &&
(github.event_name != 'merge_group' ||
needs.filter.outputs.temporal_live != 'false')`.
- It fails open like the ui outputs: a queue build whose filter step
failed reads `''`, which becomes `'true'`, so the job runs.
- `pull_request` stays excluded. Push, schedule and dispatch are
unchanged, and the job still reads no queue verdict (`MAIN_ONLY_JOBS`),
so a queue hit also runs again on the push that follows.
- **Advisory on the queue.** `Temporal Conformance (live PG + MySQL)` is
NOT a required context (`scripts/check-required-contexts.mjs` holds it
as a #22998 tombstone). A red queue run therefore does not eject the
entry: the entry lands and the red shows on `main` (push, the 4-hourly
run, the release lane's full-battery read).
- This PR adds no `REQUIRED_CONTEXTS` row. Enrolment would be its own
maintainer ruling, as #30461 was for dogfood.
3. **`temporal_live` paths:**
- `packages/plugins/knowledge-pgvector/**`: the store's package. It does
not exist yet; #37100 adds it, and the step that runs its tests is a
separate governed edit.
- `packages/drivers/driver-sql/**`: the job runs this whole suite
against the live servers.
- `packages/metadata-protocol/src/**/*live-mysql*` and
`…/*live-postgres*`: the same set the step's `live-mysql live-postgres`
substrings select, including `live-mysql-database.isolation.test.ts` and
the testkit.
-
`packages/runtime/src/**/cascade-delete-multivalue-lookup-real-driver*`:
the file the runtime step selects.
- The 22 `packages/services/service-analytics/src/__tests__` files whose
live-PostgreSQL cells key on `OS_TEST_POSTGRES_URL` (#21564). No glob
selects exactly these, so they are listed, and a new such file must be
added by hand: analytics-faces-one-lowering,
cube-measure-field-type-door, cube-measure-relationship-path-type,
dataset-duration-measure, dataset-tools,
home-amount-consolidated-measure, json-stored-door-live-drivers,
json-stored-door-undeclared-join, list-at-scalar-operator-both-faces,
native-sql-aggregate-policies, native-sql-base-column-qualify,
native-sql-boolean-comparand-door, native-sql-empty-sum-order-window,
native-sql-measure-number-presentation,
native-sql-number-comparand-door, native-sql-offset-only-window,
objectql-echo-bucket-enumeration, objectql-echo-date-bucket,
objectql-echo-offset-only-window, objectql-face-order-limit,
order-key-selected, read-scope-temporal-coercion.
- `.github/workflows/ci.yml`.
- Left out on purpose: the rest of core, formula, driver-memory,
driver-mongodb and service-analytics (the non-SQL leg's server-less
tests). Most merges touch them, so including them would run the job on
nearly every queue entry. The review accepted this.
4. **Rule text revised** to name the one exception: `ci.yml`'s THE TWO
SPEEDS header, the `filter.outputs` comments and the paths-filter step
comment, plus `docs/agents/multi-agent-discipline.md` (Two speeds
paragraph), which cites ruling record 7146156389.
- Still stating the old rule, untouched on purpose: the tombstone prose
in `scripts/check-required-contexts.mjs`. It is about the required set,
which this PR does not change.
5. **Test:**
`packages/drivers/driver-sql/src/sql-driver-37095-pgvector-extension.test.ts`,
PG-only, declared through `declareDialectCell(PG_CELL)` like every live
driver-sql file:
- no URL: a named skip;
- `OS_EXPECT_LIVE_DIALECT_MATRIX=1` without a URL: red.
- What it does: `CREATE EXTENSION IF NOT EXISTS vector`; reads the
extension's schema from `pg_extension` and qualifies the type and
operator with it; orders three rows by the pgvector L2 distance operator
and checks the distances (0, 1, sqrt 26).
- The job's driver-sql step runs this package's whole suite with the URL
and the flag.
- No adapter code (#37100).
- `skip-changeset`: a `*.test.ts` under `src/`, and driver-sql's
`files[]` is `dist`, `README.md`, `CHANGELOG.md`.
## Monthly minutes
- **Before (advisory, not a gate):** `Temporal Conformance (live PG +
MySQL)` success durations over the 15 most recent `schedule` runs:
median **~541 s** (max 708 s, n about 16; one API row errored).
- **After:** NOT MEASURED. The new image's median and the per-hit cost
need the first runs. The expected difference per run is the image pull
alone.
- **Added queue minutes.** Method: count first-parent commits on
`origin/main` that touch the `temporal_live` paths (`git log
--first-parent --since --until -- PATHS`), multiplied by the 541 s
median. With the revised path list:
- **30-day window** 2026-10-25 to 2026-11-24 (checkout deepened to
2026-10-24): 172 of 5275 commits hit, 49 of them `ci.yml`. That is
**~1,550 runner-minutes (~26 h) per 30 days**.
- **10-day window** 2026-11-14 to 2026-11-24: 51 of 1605 commits hit
(only 3 of them `ci.yml`; the `ci.yml` churn was heavier earlier in the
month). Scaled to 30 days that is about 153 hits, ~1,380 minutes.
- The review's ~1,130 minutes was this same 10-day scaling on the
earlier, shorter path list (43 hits).
- All of these are lower bounds: re-queued or ejected entries run the
job again. Push and schedule minutes are unchanged.
## Tests
<details><summary>Live run, PostgreSQL 16.15 + apt pgvector 0.6.0
(local; the CI image's 0.8.7 is not yet exercised)</summary>
- URL + `OS_EXPECT_LIVE_DIALECT_MATRIX=1`:
- `✓ src/sql-driver-37095-pgvector-extension.test.ts (2 tests)`
- `✓ src/live-dialect-matrix.isolation.test.ts (20 tests | 1 skipped)`
- VERDICT command-exit 0
- No URL: named skip, exit 0.
- No URL, with the flag: exit 1 with the named provisioning failure.
- **Negative leg:** a server without the extension: exit 1, `extension
"vector" is not available`. A plain `postgres:16` image would give this
red.
- `pnpm --filter @objectstack/driver-sql typecheck`: exit 0. The new
file is in `--listFiles`.
- Not re-run on e6cb50b: that commit changes only `ci.yml` and docs.
</details>
<details><summary>Gates (head
e6cb50b)</summary>
- `dispatch-gates --commands`: 87 families derived; `--ran`: `87
derived, 84 run, 3 NOT-MEASURED, 0 UNRUN`.
- The 3 exit 3 PREREQUISITE NOT MET (they need the whole workspace's
`dist/`): `check:dts-closure`, `check:dual-build-cjs-loads`,
`check:lean-entry-closure`. CI owns them.
- `check:doc-formula-expressions` first exited 3 and was 0 after
building formula and lint.
- Exit 0 among them: `check:required-contexts`,
`check:pm-expected-skips`, `check:stall-guard-budget`,
`check:stall-guard-headroom`, `check:shard-attestation`,
`scheduled-full-run.mjs --self-test`, `check:nul-bytes`.
- `check-governed-merges.mjs --branch`: GOVERNED, landing tier H(人合).
readWorkflowDiff, verbatim: `Tier H by content —
.github/workflows/ci.yml: a uses: / image not used anywhere on the base
tree: mirror.gcr.io/pgvector/pgvector:0.8.7-pg16; an existing job no
longer holds uses: mirror.gcr.io/library/postgres:16:
temporal-conformance; an if: added or changed in a job that already ran:
job:temporal-conformance; a uses: / image dropped from the file:
mirror.gcr.io/library/postgres:16`.
- `overlap-check`: `VERDICT clean exit 0` against origin/main
49c8e0f.
</details>
## Acceptance notes
- Docs drift, not changed here:
`docs/qa/platform-checklist/areas/integration-system.json` and
`docs/adr/0104-field-runtime-value-shape-contract.md` still describe
this job's service as `postgres:16`.
- Card acceptance "the test passes in that job" is not yet read: on this
PR's runs the job is skipped by design.
- The first live reading comes from either an operator dispatch of
`ci.yml` on this branch (with the maintainer; not triggered here) or
this PR's own queue run, because `ci.yml` is on the path list.
- That queue run is advisory, so read it before the entry lands; a red
there is a revert.
## Read first
1. The temporal-conformance `if:` and the `temporal_live` filter: the
governed behaviour change.
2. The postgres `image:` line and its comment.
3. The new test file.
**Two-minute check:** open the first run of `Temporal Conformance (live
PG + MySQL)` on this change. It should run (not skip), and its
driver-sql step should list `✓
src/sql-driver-37095-pgvector-extension.test.ts (2 tests)`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYpRrYuqSLCvbSk9zrL)_
<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYpEsWWE9Y5YtSsDgqZ -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0439a04 commit 3b4f0b9
3 files changed
Lines changed: 188 additions & 15 deletions
File tree
- .github/workflows
- docs/agents
- packages/drivers/driver-sql/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
334 | | - | |
| 338 | + | |
335 | 339 | | |
336 | 340 | | |
337 | 341 | | |
| |||
340 | 344 | | |
341 | 345 | | |
342 | 346 | | |
343 | | - | |
344 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
345 | 350 | | |
346 | 351 | | |
347 | 352 | | |
348 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
349 | 360 | | |
350 | 361 | | |
351 | 362 | | |
| |||
445 | 456 | | |
446 | 457 | | |
447 | 458 | | |
448 | | - | |
449 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
450 | 463 | | |
451 | 464 | | |
452 | 465 | | |
| |||
770 | 783 | | |
771 | 784 | | |
772 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
773 | 824 | | |
774 | 825 | | |
775 | 826 | | |
| |||
2427 | 2478 | | |
2428 | 2479 | | |
2429 | 2480 | | |
2430 | | - | |
2431 | | - | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
2432 | 2485 | | |
2433 | 2486 | | |
2434 | 2487 | | |
2435 | 2488 | | |
2436 | 2489 | | |
2437 | 2490 | | |
2438 | | - | |
| 2491 | + | |
2439 | 2492 | | |
2440 | 2493 | | |
2441 | 2494 | | |
2442 | 2495 | | |
2443 | 2496 | | |
2444 | 2497 | | |
2445 | | - | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
2446 | 2510 | | |
2447 | 2511 | | |
2448 | 2512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
0 commit comments