Skip to content

Commit 1a9d149

Browse files
ci: temporal_live covers every source the live tests load, held by a closure gate (#38560)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XHogQ9ogKPxHhiFfT2UQgJi)_ Fixes #38528 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;合并队列里,凡是改到实时数据库测试实际依赖的源码的条目,都会先跑实时数据库一致性检查,再进主干。 - 为什么做:修掉主干变红的根因(实时数据库测试的触发名单只列了测试本身,没列它们加载的源码,一次改动因此绕过检查合入,主干随即变红)。 - 出错会怎样:最坏是队列多跑一个约十分钟、与其它检查并行的作业(近三百个条目里约三成会触发,原来约百分之六);新守卫若误报只会让检查线变红,整个改动可直接撤回。 - 要你做的:审批(本改动触及受治理的流水线文件,须你批准后由席位落地)。 ## The measured closure, row by row `node scripts/check-temporal-live-filter.mjs --list` at the PR head. The population is read out of the `temporal-conformance` job: every step that hands a test run `OS_TEST_POSTGRES_URL` / `OS_TEST_MYSQL_URL` (positional-selected files are live; in a whole-suite step a test is live when its own closure reads one of those URLs), plus every `*live-postgres*` / `*live-mysql*` test. 164 live tests: 125 driver-sql matrix files, 22 service-analytics files, 9 metadata-protocol files, 7 knowledge-pgvector files, 1 runtime file. The derivation reproduces the 22 service-analytics files the list used to name by hand, exactly. The closure is every file vitest loads for those tests: the test package's real `resolve.alias` (loaded from its `vitest.config.*`), `dist/` imports followed to the `src/` the job's build steps compile, relative imports, the config itself and its `setupFiles` / `globalSetup`. "Example test" names one live test that loads a file under the row, and the file it loads. | Row | New? | Closure files | Live tests loading it | Example test (file it loads) | |:--|:--|--:|--:|:--| | `packages/plugins/knowledge-pgvector/**` | kept | 13 | 7 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts`) | | `packages/drivers/driver-sql/**` | kept | 188 | 150 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`drivers/driver-sql/src/index.ts`) | | `packages/runtime/src/**/cascade-delete-multivalue-lookup-real-driver*` | kept | 1 | 1 | `runtime/src/cascade-delete-multivalue-lookup-real-driver.integration.test.ts` (`runtime/src/cascade-delete-multivalue-lookup-real-driver.integration.test.ts`) | | `packages/services/service-knowledge/src/**` | new | 20 | 7 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`services/service-knowledge/src/index.ts`) | | `packages/metadata-protocol/src/**` | new | 165 | 34 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts`) | | `packages/metadata-protocol/package.json` | new | 1 | 25 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`metadata-protocol/package.json`) | | `packages/services/service-analytics/src/**` | new | 74 | 22 | `services/service-analytics/src/__tests__/analytics-faces-one-lowering.test.ts` (`services/service-analytics/src/__tests__/analytics-faces-one-lowering.test.ts`) | | `packages/core/src/**` | new | 137 | 154 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`core/src/index.ts`) | | `packages/objectql/src/**` | new | 188 | 25 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`objectql/src/index.ts`) | | `packages/types/src/**` | new | 37 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`types/src/index.ts`) | | `packages/formula/src/**` | new | 26 | 26 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`formula/src/index.ts`) | | `packages/metadata/src/**` | new | 35 | 26 | `metadata-protocol/src/migrations/identity-index.live-postgres.test.ts` (`metadata/src/errors.ts`) | | `packages/metadata-core/src/**` | new | 41 | 155 | `metadata-protocol/src/migrations/identity-index.live-postgres.test.ts` (`metadata-core/src/index.ts`) | | `packages/metadata-fs/src/**` | new | 6 | 25 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`metadata-fs/src/index.ts`) | | `packages/lint/src/**` | new | 170 | 25 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`lint/src/runtime.ts`) | | `packages/sdui-parser/src/**` | new | 10 | 25 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`sdui-parser/src/index.ts`) | | `packages/observability/src/**` | new | 8 | 149 | `plugins/knowledge-pgvector/src/__tests__/reconcile-purge.live-postgres.test.ts` (`observability/src/index.ts`) | | `packages/services/service-settings/src/**` | new | 47 | 6 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`services/service-settings/src/index.ts`) | | `packages/plugins/embedder-openai/src/**` | new | 1 | 6 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`plugins/embedder-openai/src/index.ts`) | | `packages/platform-objects/src/system/**` | new | 20 | 6 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`platform-objects/src/system/index.ts`) | | `packages/drivers/driver-sqlite-wasm/src/**` | new | 5 | 1 | `services/service-analytics/src/__tests__/objectql-echo-bucket-enumeration.test.ts` (`drivers/driver-sqlite-wasm/src/index.ts`) | | `packages/spec/src/*.ts` | new | 3 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/stack.zod.ts`) | | `packages/spec/src/ai/**` | new | 25 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/ai/object-query-source.zod.ts`) | | `packages/spec/src/api/**` | new | 39 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/api/index.ts`) | | `packages/spec/src/automation/**` | new | 34 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/automation/node-executor.zod.ts`) | | `packages/spec/src/contracts/**` | new | 57 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/contracts/rls-membership-resolver.ts`) | | `packages/spec/src/conversions/**` | new | 132 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/conversions/walk.ts`) | | `packages/spec/src/data/**` | new | 126 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/data/index.ts`) | | `packages/spec/src/identity/**` | new | 13 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/identity/identity-assignment-body-writes.ts`) | | `packages/spec/src/integration/**` | new | 3 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/integration/connector.zod.ts`) | | `packages/spec/src/kernel/**` | new | 49 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/kernel/metadata-protection.zod.ts`) | | `packages/spec/src/marketplace/**` | new | 3 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/marketplace/marketplace.zod.ts`) | | `packages/spec/src/meta-spelling/**` | new | 4 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/meta-spelling/metadata-url-spelling.ts`) | | `packages/spec/src/qa/**` | new | 2 | 154 | `plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts` (`spec/src/qa/index.ts`) | | `packages/spec/src/security/**` | new | 13 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/security/index.ts`) | | `packages/spec/src/shared/**` | new | 42 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/shared/refusal-head.ts`) | | `packages/spec/src/system/**` | new | 57 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/system/index.ts`) | | `packages/spec/src/ui/**` | new | 53 | 162 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`spec/src/ui/view.zod.ts`) | | `packages/spec/package.json` | new | 1 | 155 | `metadata-protocol/src/migrations/identity-index.live-postgres.test.ts` (`spec/package.json`) | | `packages/metadata-protocol/vitest.config.ts` | new | 1 | 9 | `metadata-protocol/src/migrations/connector-connection-packageless-index.live-mysql.test.ts` (`metadata-protocol/vitest.config.ts`) | | `packages/runtime/vitest.config.ts` | new | 1 | 1 | `runtime/src/cascade-delete-multivalue-lookup-real-driver.integration.test.ts` (`runtime/vitest.config.ts`) | | `packages/services/service-analytics/vitest.config.ts` | new | 1 | 22 | `services/service-analytics/src/__tests__/analytics-faces-one-lowering.test.ts` (`services/service-analytics/vitest.config.ts`) | | `packages/qa/vitest-filter-preflight/src/**` | new | 2 | 1 | `runtime/src/cascade-delete-multivalue-lookup-real-driver.integration.test.ts` (`qa/vitest-filter-preflight/src/index.ts`) | | `packages/runtime/src/expected-read-refusal-noise.ts` | new | 1 | 1 | `runtime/src/cascade-delete-multivalue-lookup-real-driver.integration.test.ts` (`runtime/src/expected-read-refusal-noise.ts`) | | `scripts/vitest-memory-tmp.mjs` | new | 1 | 126 | `drivers/driver-sql/src/live-dialect-matrix.budget.test.ts` (`scripts/vitest-memory-tmp.mjs`) | | `scripts/js-comment-mask.mjs` | new | 1 | 1 | `drivers/driver-sql/src/live-dialect-matrix.isolation.test.ts` (`scripts/js-comment-mask.mjs`) | | `scripts/invoked-as.mjs` | new | 1 | 1 | `drivers/driver-sql/src/live-dialect-matrix.isolation.test.ts` (`scripts/invoked-as.mjs`) | | `scripts/check-temporal-live-filter.mjs` | new | 0 | 0 | not a closure file (the list's own trigger) | | `.github/workflows/ci.yml` | kept | 0 | 0 | not a closure file (the list's own trigger) | Totals: 164 live tests, 1858 closure files, 49 rows; removed rows: 25 Why each grain: - **A package's `src/**`** where the closure enters through the package barrel. The barrel re-exports nearly every module (core 137 of 143 non-test modules, objectql 188 of 194, lint 170 of 171, metadata-protocol 155 of 163), so a file-by-file list would go red on the next re-export. These rows are narrower than `packages/PKG/**`: manifests, configs, scripts and docs outside `src/` do not trigger the job. - **`packages/spec/src/` per namespace, not `src/**`.** `src/migrations/` (1,270 of 1,947 non-test modules, the conversion kits) and `src/studio/` are in no closure. The 16 namespace directories the barrel reaches are listed, plus `src/*.ts` for the barrel and its root modules. - **A narrower directory** where a test reaches one corner of a package: `platform-objects/src/system/**`, the 20 objects `KnowledgeServicePlugin` registers. - **A literal path** for a single file: the three vitest configs outside a `src/**` row, `spec/package.json` and `metadata-protocol/package.json` (imported as JSON), `runtime/src/expected-read-refusal-noise.ts`, and the three root scripts the configs and driver-sql's isolation test import. - **Removed rows (25), each now covered by a wider row:** `service-knowledge/src/testing.ts` (by `service-knowledge/src/**`), the two `metadata-protocol/src/**/*live-*` globs (by `metadata-protocol/src/**`), and the 22 per-file service-analytics rows (by `service-analytics/src/**`). That also retires the "a NEW such file must be added here by hand" step those rows carried. Other live-tier filters: no other filter in `ci.yml` schedules a live-server job. The `ui` group's reads below its "UI TEST READS OUTSIDE ui/" heading are already held both ways by `check:ci-filter-parity`. The guard covers `temporal_live` only. ## Dry run (dorny/paths-filter semantics) picomatch 4.0.7 (from the workspace store) with `{ dot: true }`, the options `dorny/paths-filter@v4` uses. A file matches when any row matches. The rows were parsed out of `ci.yml` at each ref. ```text 0af813f NO MATCH packages/core/src/capability-composition.ts 0af813f NO MATCH packages/services/service-knowledge/src/knowledge-service-plugin.ts 0af813f NO MATCH packages/metadata-protocol/src/migrations/seed-tenancy-backfill.ts 0af813f NO MATCH packages/spec/src/data/field.zod.ts 0af813f NO MATCH packages/runtime/src/route-ledger.ts 0af813f NO MATCH packages/spec/src/migrations/registry.ts 0af813f NO MATCH README.md ac3dc22 MATCH packages/core/src/capability-composition.ts ac3dc22 MATCH packages/services/service-knowledge/src/knowledge-service-plugin.ts ac3dc22 MATCH packages/metadata-protocol/src/migrations/seed-tenancy-backfill.ts ac3dc22 MATCH packages/spec/src/data/field.zod.ts ac3dc22 NO MATCH packages/runtime/src/route-ledger.ts ac3dc22 NO MATCH packages/spec/src/migrations/registry.ts ac3dc22 NO MATCH README.md ``` Cross-check of the gate's own matcher against picomatch, over every tracked file: all 28,936 tracked files at the head; picomatch matches 5,072 of them; the gate's literal / `*` / `**` matcher agrees on 28,936 of 28,936, 0 disagreements. Any row syntax outside that subset is refused by the gate, never guessed. ## Ablation The fix was committed first. One new row was deleted on disk at a time, the gate was run, and the file was restored with `git checkout HEAD --`. ```text $ (head ac3dc22, row 'packages/core/src/**' deleted on disk: 0+/1-) node scripts/check-temporal-live-filter.mjs ✗ check-temporal-live-filter: 137 workspace file(s) a live test loads are on no `temporal_live` row (164 live test(s), 1858 closure file(s)): packages/core/src/capability-composition.ts loaded by 154 test(s), e.g. packages/drivers/driver-sql/src/live-dialect-matrix.budget.test.ts -> packages/drivers/driver-sql/src/index.ts -> packages/drivers/driver-sql/src/sql-driver.ts -> packages/core/src/index.ts -> packages/core/src/capability-composition.ts exit 1 $ (head ac3dc22, row 'packages/services/service-knowledge/src/**' deleted on disk: 0+/1-) node scripts/check-temporal-live-filter.mjs ✗ check-temporal-live-filter: 20 workspace file(s) a live test loads are on no `temporal_live` row (164 live test(s), 1858 closure file(s)): packages/services/service-knowledge/src/knowledge-service-plugin.ts loaded by 6 test(s), e.g. packages/plugins/knowledge-pgvector/src/__tests__/acceptance.live-postgres.test.ts -> packages/services/service-knowledge/src/index.ts -> packages/services/service-knowledge/src/knowledge-service-plugin.ts -- packages/services/service-knowledge/src/testing.ts loaded by 1 test(s), e.g. packages/plugins/knowledge-pgvector/src/__tests__/contract.live-postgres.test.ts -> packages/services/service-knowledge/src/testing.ts exit 1 $ (restored with git checkout HEAD --) node scripts/check-temporal-live-filter.mjs ✓ check-temporal-live-filter: every workspace file the 164 live test(s) load (1858 file(s)) is on a `temporal_live` row of .github/workflows/ci.yml (49 row(s)). exit 0 ``` ## What changes - `.github/workflows/ci.yml`, in three places: - The `temporal_live` filter gains the rows above, the subsumed rows go, and the comment above the list says what the list must cover and which gate holds it. - Build Core gains one step before the build: `node scripts/check-temporal-live-filter.mjs --self-test && node scripts/check-temporal-live-filter.mjs`. - A `core` row for the gate starts Build Core on a change to the gate itself, which is what `check:ci-filter-parity` requires of a script Build Core runs. No other job, step or `if:` changes. - `scripts/check-temporal-live-filter.mjs` (new): the guard. It walks each live test's run-time import closure the way vitest resolves it. It goes red on any closure file that no `temporal_live` row matches, and names the import chain. `--list` prints each closure and the row that covers each file. `--match PATH...` answers whether a path schedules the job. `--self-test` runs 7 named batteries with pinned floors and the verdict handshake (AGENTS.md "Writing a `--self-test`"); battery 7 pins the Build Core step and the `core` row. The gate refuses, never passes clean, when its subject was not read. Its header has the full list of refusals and the bounds. Why Build Core and not a `Lint · *` lane: the claim's file surface was narrowed to `ci.yml` and the guard. The house pattern (a root `check:*` alias plus a `lint.yml` step, like `check:ci-filter-parity`) needs two files outside that surface, so it is not used here. Build Core is in the required set. It starts on every diff that can move a closure or the list (`packages/**`, `ci.yml`, the gate itself). It installs the workspace the gate needs to load vitest configs. Moving the step to a lint lane later is a two-file follow-up; Acceptance notes has the details. ## Why `Temporal Conformance (live PG + MySQL)` never runs on `pull_request`. On a `merge_group` entry it runs only when the diff matches `temporal_live`. The list named the live test files but not the sources they load from other packages. An entry that changed only `packages/core/src/capability-composition.ts` skipped the job in the queue, landed, and turned `main` red. ## Tests All readings at head `ac3dc229a4` unless stated otherwise. - `node scripts/check-temporal-live-filter.mjs --self-test`: exit 0, `✓ check-temporal-live-filter self-test: 59 case(s) across 7 batteries hold.` The batteries cover the matcher (including refused syntax), reading `ci.yml` (rows, live steps, 10 refusals), edges (parser rather than regex: `import type` erased, strings and comments ignored, dynamic import and `require`), resolution (alias first-match, prefix and RegExp, `dist/` to `src/`, refusal on an unresolved target), the verdict over a fixture tree, the real tree, and the wiring. - `node scripts/check-temporal-live-filter.mjs`: exit 0, `✓ ... every workspace file the 164 live test(s) load (1858 file(s)) is on a temporal_live row ... (49 row(s)).` - The same judge run against the base list (the 29 `temporal_live` rows of `0af813f301`, read in memory over this tree): 1,623 of 1,858 closure files are on no row, over the same 164 live tests. `packages/core/src/capability-composition.ts` is among them, by the chain `knowledge-pgvector/src/__tests__/capability-mount.live-postgres.test.ts -> core/src/index.ts -> core/src/capability-composition.ts`. That is the main-red skip. - Ablation (above): deleting `packages/core/src/**` reds the gate on 137 files including `capability-composition.ts`. Deleting `packages/services/service-knowledge/src/**` reds it on 20 files including `knowledge-service-plugin.ts` and `testing.ts`. Restored: green. - Self-test ablation, at `fc5b37fd97`: with `packages/core/src/**` deleted, the self-test also goes red on `✗ a change to packages/core/src/capability-composition.ts alone matches a temporal_live row`. - Matcher cross-check against picomatch 4.0.7: 0 disagreements over 28,936 tracked files (above). ## Acceptance notes - **Queue cost (advisory, not a gate).** Over the last 300 first-parent commits of `main` ending at `0af813f301` (2026-11-27 to 2026-11-29), picomatch 4.0.7: the old list matched 18 (6.0%), the new list matches 109 (36.3%). The job's duration does not change: one sample is 467 s on queue run 46233875645 and another is 684 s on main push run 46233316717. The job runs in parallel with the rest of the queue build. The queue baseline in `scripts/ci/queue-budget.json` is p50 21.7 min. The queue's before/after median is NOT MEASURED: it needs a week of queue runs after the merge, which `queue-duration-budget.yml` reads weekly. - **Ruling it widens.** Ruling record 7146156389 accepted the queue leg on path hits for the knowledge-pgvector package, `packages/drivers/driver-sql`, the job's own test files and the workflow, and 7238262118 read that other PRs skip it. This head adds source rows for 16 more packages, so the maintainer's word on the reach is asked at hand-off. Contract review 7254558729 ③ 3 measured 298 `merge_group` runs. Temporal Conformance is required and was never the last-finishing required check. In the 16 runs where it ran, it finished 389–1,336 s before the slowest other required job. Of the 116 entries the new list matches (38.9%), the 99 with a successful run had their slowest other required job finish at 1,086 s or later, against its observed maximum of 826 s. The cost is runner time (about 100 more runs of about 10 min per 298 entries) and exposure (a red in this job now ejects about 39% of entries, not 5%). - **Build Core cost (advisory).** One step is added: the self-test, then the gate. It took 58 s wall locally on a shared 4-vCPU box at load average about 2; the closure walk runs twice, once in the self-test's real-tree battery and once in the gate. It needs no `dist/`. - **Wiring placement, and the follow-up.** The house pattern for a repository gate is a root `check:*` alias plus a step in a `Lint · *` lane of `lint.yml`, as `check:ci-filter-parity` is wired. Both files are outside this PR's file surface. Without CI wiring, `check:self-test-wired` (part of `Lint & Repo Gates`) goes red on this script (`[self-test-not-run] scripts/check-temporal-live-filter.mjs`, measured on this branch). The step therefore lives in Build Core, which `ci.yml` owns. Moving it to a lint lane is a two-file follow-up (`package.json` alias, `lint.yml` step), with battery 7 re-pointed in the same edit. - **Over-scheduling, the accepted direction.** A `src/**` row also matches that package's own test files, so a test-only edit in `core/src` now starts the live job in the queue. The `spec` namespace rows keep `src/migrations/` and `src/studio/` out. If a live test starts importing either, the gate goes red and names the file. - **Guard bounds** (header of the script): it reads module loads only, so a file a test reads with `readFileSync` is not counted (that axis is `check:cross-package-test-inputs`'). A non-literal `import()` is not followed. Third-party code is not followed. It never reports a row as too wide. - **Not in this PR.** `packages/metadata-protocol/src/migrations/activation-ledger-packageless-index.live-dialects.test.ts` reads both live URLs, but its name carries neither `live-mysql` nor `live-postgres`. So the metadata-protocol live step (`vitest run live-mysql live-postgres`) never selects it, and its live cells are named skips everywhere in CI. Not changed here. Carrier: #38561 (filed by the area at the seat's request, on `pm:queue`, not claimed). - **Carried, contract review nits N1 and N3** (build inputs of closure packages on no row; a live step that selects no test is dropped silently): #38570, on `pm:queue`, not claimed. - **The #38514 pin** (PR #38523) has landed on `main` and is merged into this branch. This PR does not touch it. ## Verification Read first, by risk: 1. `.github/workflows/ci.yml`, the `temporal_live` block: the hunk that changes what the merge queue runs. 2. `scripts/check-temporal-live-filter.mjs`, `liveStepsOf` / `candidatesOf`: the population is derived from the job's steps. A misread there narrows what the guard judges. 3. `scripts/check-temporal-live-filter.mjs`, `closureOf` / `workspaceSource`: the resolution rules. Two-minute check: `node scripts/check-temporal-live-filter.mjs --match packages/core/src/capability-composition.ts` prints `MATCH`, names the row `packages/core/src/**`, and exits 0. Then delete that row and run `node scripts/check-temporal-live-filter.mjs`: it exits 1 and names `capability-composition.ts` with its import chain. Gates, local subset at head `ac3dc229a4`: - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 66 families from this tree. - All 66 ran in one hold of the verify lock: `VERDICT command-exit 0 · held the lock 1801s`. Each exit code was captured before any pipe. - `--ran`: `Run reconciliation — 66 derived, 66 run, 0 NOT-MEASURED, 0 UNRUN.` - `check:nul-bytes`: OK. - An earlier round on `2092fb3793` went red on three families: `check:parse-guard` (a raw `ts.createSourceFile`), `check:pnpm-filter-targets` (fixture `--filter` names that are not workspace packages) and `bare-root-worklist --self-test` (an undeclared bare population root). All three were fixed in `e0de164758` and are green above. - The repo-wide `pnpm lint`, Test Core and the rest of the CI battery belong to CI; their check-runs were not available when this body was written (NOT MEASURED). <details><summary>The 66 commands and their exit codes</summary> ```text node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs --self-test :: exit 0 node scripts/check-dts-emitted.mjs --self-test :: exit 0 node scripts/check-self-test-wired.mjs :: exit 0 node scripts/check-self-test-wired.mjs --self-test :: exit 0 node scripts/check-self-test-workflow-commands.mjs :: exit 0 node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0 node scripts/check-step-collectors.mjs :: exit 0 node scripts/check-step-collectors.mjs --self-test :: exit 0 node scripts/check-temporal-live-filter.mjs :: exit 0 node scripts/check-temporal-live-filter.mjs --self-test :: exit 0 node scripts/check-whole-set-label-write.mjs :: exit 0 node scripts/check-whole-set-label-write.mjs --self-test :: exit 0 node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0 node scripts/ci/scheduled-full-run.mjs --self-test :: exit 0 node scripts/docs-audit/check-drift-comment.mjs :: exit 0 node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:aggregator-roster :: exit 0 pnpm check:bash32-floor :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cli-command-ids :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:declared-population-live :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:dts-closure :: exit 0 pnpm check:dual-build-cjs-loads :: exit 0 pnpm check:entry-guard :: exit 0 pnpm check:fetch-history :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:lean-entry-closure :: exit 0 pnpm check:node-version :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:parse-guard :: exit 0 pnpm check:pm-close-cards :: exit 0 pnpm check:pm-expected-skips :: exit 0 pnpm check:pm-fleet-write-dispatch :: exit 0 pnpm check:pm-fleet-write-execute :: exit 0 pnpm check:pm-fleet-write-validate :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-issue-transfer :: exit 0 pnpm check:pm-post-stamped :: exit 0 pnpm check:pm-record-recognisers :: exit 0 pnpm check:pnpm-acquisition :: exit 0 pnpm check:pnpm-filter-targets :: exit 0 pnpm check:pnpm-flag-spellings :: exit 0 pnpm check:ratchet-remedy-authority :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:required-contexts :: exit 0 pnpm check:scripts-symbol-anchors :: exit 0 pnpm check:shard-attestation :: exit 0 pnpm check:sourcemap-no-sources-content :: exit 0 pnpm check:stall-guard-budget :: exit 0 pnpm check:stall-guard-headroom :: exit 0 pnpm check:type-check-coverage :: exit 0 pnpm check:type-check-debt :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm check:workflow-status-functions :: exit 0 pnpm check:workflow-step-name-quoting :: exit 0 pnpm check:pm-dispatch-gates :: exit 0 ``` </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No spec change.) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (CI-owned run.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (Publishes nothing: `skip-changeset`.) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn)_ <!-- signed: repo:objectstack#5 · os-project-manager · session_01FEkQ5oPfjnm2yWHEwkiYrn --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a133c8a commit 1a9d149

2 files changed

Lines changed: 1157 additions & 34 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 113 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,10 @@ jobs:
612612
- 'scripts/ci/assert-turbo-remote-cache.mjs'
613613
- 'scripts/ci/prune-turbo-cache.mjs'
614614
- 'scripts/population-floor.mjs'
615+
# [#38528] The temporal_live coverage gate Build Core runs before
616+
# the build (its step says why there): a change to the gate runs
617+
# the gate.
618+
- 'scripts/check-temporal-live-filter.mjs'
615619
# Test inputs that live OUTSIDE every package (#9829, #10015). Packages
616620
# whose suites read across their own boundary declare that radius in
617621
# scripts/check-cross-package-test-inputs.mjs, and turbo.json mirrors each
@@ -837,44 +841,107 @@ jobs:
837841
# [#37095] What makes the merge queue run `temporal-conformance`
838842
# (ruling record 7146156389): the pgvector store, the driver whose
839843
# whole suite that job runs against the live servers, the
840-
# live-server files its filtered steps select (the two
841-
# metadata-protocol globs spell that step's `live-mysql
842-
# live-postgres` substrings), the service-analytics files whose
843-
# live-PostgreSQL cells key on OS_TEST_POSTGRES_URL (#21564; no glob
844-
# selects exactly these, so they are listed: a NEW such file must
845-
# be added here by hand), and this file.
844+
# live-server files its filtered steps select, the service-analytics
845+
# files whose live-PostgreSQL cells key on OS_TEST_POSTGRES_URL
846+
# (#21564), and this file.
847+
#
848+
# [#38528] AND every workspace source those tests LOAD. A live test
849+
# reaches other packages' source through its vitest alias, and their
850+
# `dist/` (built from `src/` by the job's build steps) through the
851+
# package link; a row for the test alone left the source under test
852+
# unscheduled, so a queue entry changing only that source skipped
853+
# this job, landed, and went red first on `main`.
854+
# `node scripts/check-temporal-live-filter.mjs` (`--self-test` beside it)
855+
# walks each live test's run-time import closure the way vitest
856+
# resolves it and reds on a closure file no row below matches;
857+
# `--list` prints each closure and the row covering each file. A row
858+
# is a package's `src/**` where the closure enters through the
859+
# package's barrel (it then reaches nearly every module, and a
860+
# file-by-file list would red on the next re-export), a narrower
861+
# directory where it reaches one corner of a package, and a literal
862+
# path for a single file. The service-analytics `src/**` row and the
863+
# metadata-protocol `src/**` row replace the per-file and per-glob
864+
# rows those packages carried, which they cover.
846865
temporal_live:
847866
- 'packages/plugins/knowledge-pgvector/**'
848-
# [#37100] The adapter contract suite the pgvector store runs
849-
# against the live PostgreSQL: a change to it is a change to that
850-
# step's verdict.
851-
- 'packages/services/service-knowledge/src/testing.ts'
852867
- 'packages/drivers/driver-sql/**'
853-
- 'packages/metadata-protocol/src/**/*live-mysql*'
854-
- 'packages/metadata-protocol/src/**/*live-postgres*'
855868
- 'packages/runtime/src/**/cascade-delete-multivalue-lookup-real-driver*'
856-
- 'packages/services/service-analytics/src/__tests__/analytics-faces-one-lowering.test.ts'
857-
- 'packages/services/service-analytics/src/__tests__/cube-measure-field-type-door.test.ts'
858-
- 'packages/services/service-analytics/src/__tests__/cube-measure-relationship-path-type.test.ts'
859-
- 'packages/services/service-analytics/src/__tests__/dataset-duration-measure.test.ts'
860-
- 'packages/services/service-analytics/src/__tests__/dataset-tools.test.ts'
861-
- 'packages/services/service-analytics/src/__tests__/home-amount-consolidated-measure.test.ts'
862-
- 'packages/services/service-analytics/src/__tests__/json-stored-door-live-drivers.test.ts'
863-
- 'packages/services/service-analytics/src/__tests__/json-stored-door-undeclared-join.test.ts'
864-
- 'packages/services/service-analytics/src/__tests__/list-at-scalar-operator-both-faces.test.ts'
865-
- 'packages/services/service-analytics/src/__tests__/native-sql-aggregate-policies.test.ts'
866-
- 'packages/services/service-analytics/src/__tests__/native-sql-base-column-qualify.test.ts'
867-
- 'packages/services/service-analytics/src/__tests__/native-sql-boolean-comparand-door.test.ts'
868-
- 'packages/services/service-analytics/src/__tests__/native-sql-empty-sum-order-window.test.ts'
869-
- 'packages/services/service-analytics/src/__tests__/native-sql-measure-number-presentation.test.ts'
870-
- 'packages/services/service-analytics/src/__tests__/native-sql-number-comparand-door.test.ts'
871-
- 'packages/services/service-analytics/src/__tests__/native-sql-offset-only-window.test.ts'
872-
- 'packages/services/service-analytics/src/__tests__/objectql-echo-bucket-enumeration.test.ts'
873-
- 'packages/services/service-analytics/src/__tests__/objectql-echo-date-bucket.test.ts'
874-
- 'packages/services/service-analytics/src/__tests__/objectql-echo-offset-only-window.test.ts'
875-
- 'packages/services/service-analytics/src/__tests__/objectql-face-order-limit.test.ts'
876-
- 'packages/services/service-analytics/src/__tests__/order-key-selected.test.ts'
877-
- 'packages/services/service-analytics/src/__tests__/read-scope-temporal-coercion.test.ts'
869+
# [#37100] The adapter contract suite the pgvector store runs
870+
# against the live PostgreSQL (`src/testing.ts`), and [#38528]
871+
# the service it is a store of: every knowledge-pgvector live
872+
# file loads `KnowledgeServicePlugin` through the alias.
873+
- 'packages/services/service-knowledge/src/**'
874+
# [#38528] The migration statements the metadata-protocol live
875+
# files execute (they import the migration beside them, and the
876+
# package barrel through objectql), and the manifest
877+
# `discovery-version.ts` imports.
878+
- 'packages/metadata-protocol/src/**'
879+
- 'packages/metadata-protocol/package.json'
880+
# [#21564] The live-PostgreSQL cells of service-analytics, and
881+
# [#38528] the service they test.
882+
- 'packages/services/service-analytics/src/**'
883+
# [#38528] The packages every live test loads through the alias
884+
# or the package link, each reached through its barrel:
885+
# `@objectstack/core` (capability-mount.live-postgres loads
886+
# `capability-composition.ts`; driver-sql's `sql-driver.ts`
887+
# imports the barrel), objectql (the knowledge-pgvector and
888+
# analytics files run ObjectQL over SqlDriver), and what those
889+
# barrels import in turn.
890+
- 'packages/core/src/**'
891+
- 'packages/objectql/src/**'
892+
- 'packages/types/src/**'
893+
- 'packages/formula/src/**'
894+
- 'packages/metadata/src/**'
895+
- 'packages/metadata-core/src/**'
896+
- 'packages/metadata-fs/src/**'
897+
- 'packages/lint/src/**'
898+
- 'packages/sdui-parser/src/**'
899+
- 'packages/observability/src/**'
900+
- 'packages/services/service-settings/src/**'
901+
# [#38528] KnowledgeServicePlugin's default embedder and the
902+
# `@objectstack/platform-objects/system` objects it registers.
903+
- 'packages/plugins/embedder-openai/src/**'
904+
- 'packages/platform-objects/src/system/**'
905+
# [#38528] The analytics bucket-enumeration live file runs the
906+
# wasm SQLite driver beside PostgreSQL.
907+
- 'packages/drivers/driver-sqlite-wasm/src/**'
908+
# [#38528] `@objectstack/spec`, loaded through the alias by its
909+
# barrel: every namespace it re-exports and the root modules.
910+
# Not `src/**`: `src/migrations/` (two thirds of the tree, the
911+
# conversion kits) and `src/studio/` are outside every closure.
912+
- 'packages/spec/src/*.ts'
913+
- 'packages/spec/src/ai/**'
914+
- 'packages/spec/src/api/**'
915+
- 'packages/spec/src/automation/**'
916+
- 'packages/spec/src/contracts/**'
917+
- 'packages/spec/src/conversions/**'
918+
- 'packages/spec/src/data/**'
919+
- 'packages/spec/src/identity/**'
920+
- 'packages/spec/src/integration/**'
921+
- 'packages/spec/src/kernel/**'
922+
- 'packages/spec/src/marketplace/**'
923+
- 'packages/spec/src/meta-spelling/**'
924+
- 'packages/spec/src/qa/**'
925+
- 'packages/spec/src/security/**'
926+
- 'packages/spec/src/shared/**'
927+
- 'packages/spec/src/system/**'
928+
- 'packages/spec/src/ui/**'
929+
# The manifest `metadata-core`'s artifact conversion reads.
930+
- 'packages/spec/package.json'
931+
# [#38528] What the live tests' vitest configs load before any
932+
# test: the configs outside a row above, the preflight runtime's
933+
# config runs, the memory-tmp env helper, and the comment mask
934+
# driver-sql's isolation test imports.
935+
- 'packages/metadata-protocol/vitest.config.ts'
936+
- 'packages/runtime/vitest.config.ts'
937+
- 'packages/services/service-analytics/vitest.config.ts'
938+
- 'packages/qa/vitest-filter-preflight/src/**'
939+
- 'packages/runtime/src/expected-read-refusal-noise.ts'
940+
- 'scripts/vitest-memory-tmp.mjs'
941+
- 'scripts/js-comment-mask.mjs'
942+
- 'scripts/invoked-as.mjs'
943+
# [#38528] The guard that holds this list to the closures.
944+
- 'scripts/check-temporal-live-filter.mjs'
878945
- '.github/workflows/ci.yml'
879946
880947
# ── WHICH TEST CORE SHARDS START (#26084) ─────────────────────────────
@@ -3419,6 +3486,18 @@ jobs:
34193486
- name: prune-turbo-cache self-test
34203487
run: node scripts/ci/prune-turbo-cache.mjs --self-test
34213488

3489+
# [#38528] The `temporal_live` filter above must hold every workspace
3490+
# source the live-server tests of `temporal-conformance` load, or a queue
3491+
# entry changing only that source skips the live job and goes red first on
3492+
# `main`. This gate walks those tests' import closures and reds on a file
3493+
# no row matches (its header is the authority). Here because Build Core
3494+
# starts on every diff that can move a closure or the list (`packages/**`,
3495+
# this file, the gate itself are `core` rows) and installs the workspace
3496+
# the gate reads vitest configs with; it reads no `dist/`, so it runs
3497+
# before the build, like the self-tests above.
3498+
- name: temporal_live covers every source a live test loads
3499+
run: node scripts/check-temporal-live-filter.mjs --self-test && node scripts/check-temporal-live-filter.mjs
3500+
34223501
# ── Turbo remote cache (#21186) ─────────────────────────────────────
34233502
# Vercel's managed Turborepo remote cache. objectstack-ai/cloud's
34243503
# test.yml builds this repo at its pinned SHA with the same command and

0 commit comments

Comments
 (0)