Skip to content

ci(temporal-conformance): give the non-SQL step the job's live PostgreSQL URL - #21577

Draft
objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/issue-21564-temporal-pg-url
Draft

objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/issue-21564-temporal-pg-url

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #21564
Clause-②: no

What this changes

The Temporal Conformance (live PG + MySQL) job's step "Run the non-SQL temporal backends under the skewed process zone" now sets OS_TEST_POSTGRES_URL in its env:, with the same literal the job's three SQL steps use (postgres://postgres:postgres@127.0.0.1:5432/postgres), for the postgres service the job already provisions. Until now that step set only TZ, so every service-analytics live-PostgreSQL cell (describe.skipIf(!config)) was a named skip there while the job read green.

The header clause "no CI step provisions that variable for this package" in 14 service-analytics test files becomes false with this wiring. It is corrected, comment-only, to name the step that now sets it. No other line of those files changes (every changed line in them is a * comment line).

No other job, no other step, and no timeout changes. No cell is re-skipped.

What the step needed, measured (A2)

Only the one env: line:

  • Build closure. turbo run build --filter=@objectstack/service-analytics... --dry=json selects 16 packages, including @objectstack/driver-sql, @objectstack/objectql and @objectstack/driver-sqlite-wasm (dev dependencies of service-analytics). The step's existing build already builds what the cells import.
  • PostgreSQL client. pg is an optional peer of driver-sql, resolved by pnpm into driver-sql's knex instance (knex@3.3.0_..._pg@8.22.0); require.resolve('pg') from that knex answers pg@8.22.0. The cells reach pg through SqlDriver, so nothing is added to service-analytics.
  • Database and tables. Every cell connects to the default postgres database and creates and drops its own tables. The table names are distinct across the 16 files (os21316_deal, os21505_coercion, ...), so parallel vitest workers do not collide.
  • Server zone. The job's existing step "Point both servers at a non-UTC timezone" sets the server to Asia/Shanghai before any test step.

Readings

  • A3. No service-analytics file reads OS_EXPECT_LIVE_DIALECT_MATRIX (git grep exit 1), and no code in the step's other four packages reads it (the only hit, in driver-mongodb/src/test-mongod.ts, is a comment). So the flag is not added to the step, and no code reading it is added.
  • A4. No service-analytics file reads OS_TEST_MYSQL_URL or any other server variable the job provides. Its only process.env reads are OS_TEST_POSTGRES_URL (32), NODE_ENV and TZ. Nothing is listed for MySQL.
  • A5. core, formula, driver-memory and driver-mongodb have zero OS_TEST_POSTGRES_URL hits (git grep exit 1 for each). Adding the variable to the step starts no test in them.

Local run against a non-UTC PostgreSQL 16

PostgreSQL 16.14 started privately on a random port with timezone=Asia/Shanghai, process TZ=America/New_York (the job's two zones), service-analytics full suite, tree 3f9dcd91c4. Counts are passed / failed / skipped per file, from vitest's JSON reporter.

file without the URL with the URL
analytics-faces-one-lowering 69 / 0 / 20 88 / 0 / 1
cube-measure-field-type-door 12 / 0 / 11 23 / 0 / 0
cube-measure-relationship-path-type 7 / 0 / 6 13 / 0 / 0
json-stored-door-live-drivers 5 / 0 / 5 10 / 0 / 0
json-stored-door-undeclared-join 5 / 0 / 5 10 / 0 / 0
list-at-scalar-operator-both-faces 43 / 0 / 43 86 / 0 / 0
native-sql-aggregate-policies 25 / 0 / 24 49 / 0 / 0
native-sql-base-column-qualify 6 / 0 / 6 12 / 0 / 0
native-sql-boolean-comparand-door 34 / 0 / 34 68 / 0 / 0
native-sql-measure-number-presentation 5 / 0 / 5 10 / 0 / 0
native-sql-number-comparand-door 58 / 0 / 58 116 / 0 / 0
native-sql-offset-only-window 8 / 0 / 6 14 / 0 / 0
objectql-echo-offset-only-window 3 / 0 / 3 6 / 0 / 0
objectql-face-order-limit 13 / 0 / 13 22 / 4 / 0
order-key-selected 8 / 0 / 8 16 / 0 / 0
read-scope-temporal-coercion 10 / 0 / 6 15 / 0 / 1
16 files 311 / 0 / 253 558 / 4 / 2

Whole package: 4152 passed, 253 skipped without the URL; 4399 passed, 4 failed, 2 skipped with it. The two skips left are cell-scoped by design: the SQLite cell's "the server is not on UTC" check in read-scope-temporal-coercion, and the PostgreSQL cell's SQLite-only "a host with no typed reader" case in analytics-faces-one-lowering.

One live cell is red once wired

objectql-face-order-limit.test.ts, the live postgres cell, 4 tests:

test assertion expected received
the card's row: ordered desc and limited to 1 :244 (native face) [['2026-06', 1]] [['2026-05', 2]]
ordered desc with offset 1 and limit 2 :257 [['2026-05', 20], ['2026-04', 1]] [['2026-03', 6], ['2026-02', 10]]
CONTROL with no order, offset or limit, bucketed time dimension :334 4 buckets 3
the dataset door, month-bucketed, desc, offset 1, limit 2 :363 (native face) [['2026-05', 20], ['2026-04', 1]] [['2026-03', 6], ['2026-02', 10]]

Every closed_on (a date field) lands one day early: 03-01 becomes Feb, 06-01 joins May.

  • The axis is the server zone, not the process zone. The same file with the session pinned to UTC (options=-c TimeZone=UTC on the URL) and TZ=America/New_York: 26 passed. With the server on Asia/Shanghai and TZ=UTC: the same 4 failed.
  • Where it comes from (a reading, not a fix). driver-sql's buildDateBucketExpr PostgreSQL branch (sql-driver.ts:6134-6138) buckets with to_char((col)::timestamptz AT TIME ZONE 'UTC', 'YYYY-MM'). On a date column, ::timestamptz resolves midnight in the session zone. In psql on the same server, to_char(('2026-06-01'::date)::timestamptz AT TIME ZONE 'UTC', 'YYYY-MM-DD') answers 2026-05-31 under Asia/Shanghai and 2026-06-01 under UTC.

Per the triage ruling, this is a real red. It is ⛔ not fixed here and ⛔ not re-skipped. The PM cards it to the cell's lane. Until then this PR's Temporal Conformance check is expected to be red, and the PR stays a draft.

Acceptance is read from this PR's own Temporal Conformance (live PG + MySQL) job log (cells run, not skipped), not from green. That reading, against a recent main run of the same step, is recorded in the os-dev report on the card.

Acceptance notes

  • The ruling says each of these cells "asserts a non-UTC server". At this tree, 1 of the 16 files does (read-scope-temporal-coercion.test.ts:233-237, show timezone). The other 15 rely on the job's provisioning step for the server's zone. The red cell above is zone-sensitive and asserts no server zone. Noted, not changed.
  • Stall guard. check:stall-guard-budget reads this step's static budget as window 10m, cap 20m, job budget 30m, slack 10m (2 of 2 guarded steps share the clock). The step's measured time on this PR is in the card report.
  • Release. Nothing publishes: .github/workflows/ci.yml, and comments in test files outside service-analytics's files[] (dist, README.md, CHANGELOG.md). Measured after a build: os21316_deal, no CI step and the new step name have 0 hits in those files; positive control AnalyticsServicePlugin has 4. No changeset; skip-changeset.
  • Governed. check-governed-merges.mjs --branch: 0 of 15 paths hit the register, NOT governed; 110 changed lines.

Gates

Run on head a3fb6c0334 (the merge of origin/main a3873542ca). Each exit code was recorded before any pipe.

  • 85 of the 87 commands dispatch-gates.mjs --commands derives exited 0. This includes check:required-contexts, check-ci-filter-parity and its --self-test, check:workflow-step-name-quoting, check:workflow-status-functions, check:stall-guard-budget, check:stall-guard-headroom, check:pnpm-filter-targets, check:nul-bytes, check:changeset-gate-self-tests and check-changeset-no-major.
  • check:dual-build-cjs-loads: exit 3, PREREQUISITE NOT MET. It needs a full pnpm build, and this diff changes no package's built output. NOT MEASURED; CI runs it.
  • check:pm-dispatch-gates and check:type-check-debt: each ran past the local 420 s bound (exit 124) on the shared box, then were re-run without that bound. That result is in the card report.
  • service-analytics: typecheck passed; its full test suite is in the table above.

Generated by Claude Code

claude added 2 commits October 3, 2026 09:28
…eSQL URL

The step "Run the non-SQL temporal backends under the skewed process zone"
runs service-analytics, whose live-PostgreSQL cells are keyed on
OS_TEST_POSTGRES_URL (describe.skipIf(!config)). The step set only TZ, so
those cells were named skips while the job read green. It now receives the
same URL the job's SQL steps use, for the postgres service the job already
provisions.

The test files' header clause "no CI step provisions that variable for this
package" becomes false with this wiring; it is corrected, comment-only, to
name the step that now sets it.

Claude-Session: https://claude.ai/code/session_01YDt3PzwfrkuFzUBF89WPmM
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 6dd99b82c38cd68b51c86241d53c5b7dda670a08 → packageMentionDocs.

This was referenced Oct 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

2 participants