Skip to content

fix(core): an import upsert finds its match through the organization unique index instead of scanning the table per row - #31846

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-e9zmhq
Nov 9, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-e9zmhq

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #31812

Clause-②: yes (widening) — @objectstack/core gains resolveTenantFieldName, DEFAULT_TENANT_FIELD and isFederatedObject (moved from @objectstack/objectql, which re-exports the same bindings)
Metadata-protocol: none

维护者速读

  • 改了什么:导入和外部同步做 upsert / update 时,按 key 找已有记录的那条查询,现在会带上调用方所在组织(organization_id = ? AND key = ?),能用上 (organization_id, key) 唯一索引。
  • 为什么改:默认的 single 形态下引擎读数据不加组织条件,这条查询只带 key,每一行都扫全表。实测 5 万行的表上 upsert 只有每秒 128 行,而且表越大越慢。
  • 风险与回滚:只会把匹配范围收窄到本组织,不会放宽。旧库里组织为 NULL 的残留行不再被匹配(按 ADR-0131 D1)。group 形态下只匹配当前组织的记录。回滚就是 revert 本 PR。
  • 先看:packages/core/src/utils/import-runner.ts 的 matchScopeOf 和 findExisting;packages/core/src/security/tenant-field.ts(从 objectql 原样下移的规则)。
  • 两分钟验证:pnpm --filter @objectstack/rest exec vitest run src/import-upsert-match-organization.test.ts,3 条全过,第一条断言 SQLite 的执行计划是按唯一索引 SEARCH。
  • 需要你做的:无,席位落地。

What changes

  • runImport's match lookup (findExisting, used by update and upsert, dry run included) now adds the target's tenant column, set to the context's tenantId, beside the key fields. The organization is the one a created row is stamped with (the engine's write target in every posture), so the lookup finds exactly the record an insert of that key would collide with.
  • The tenant column is read once per import from the target's declaration (p.getMetaItem), by the engine's own rule: a federated (external) object has none, then resolveTenantFieldName decides (tenancy.enabled: false → none; a declared tenancy.tenantField the object has; else organization_id).
  • The lookup stays the key alone, exactly as before, when the context has no organization, the protocol has no getMetaItem, the declaration read fails, the object is federated, or it has no tenant column. A key set that already names the tenant column keeps the row's own value.
  • resolveTenantFieldName, DEFAULT_TENANT_FIELD and isFederatedObject move from @objectstack/objectql down to @objectstack/core (security/tenant-field.ts), following ADR-0138 D4's move of resolveSystemWriteOrganization. objectql's tenancy/system-write-organization.ts and federated-object.ts re-export the same bindings; no behaviour change there. The platform-object tenancy census now loads the predicate, and reads its header, from the new file.

Why

Step 0, measured on origin/main 6be71abc through the real runImport → protocol findData → SqlDriver (better-sqlite3):

  • single posture (the default when multi-org is off): the lookup reached SQLite as select * from T where external_id = ? order by id asc limit ?, plan SCAN. The engine's read scope (engine-driver-options.ts driverReadScope → computeTenantLayer0Verdict) is none under single by design (ADR-0131 D11).
  • isolated posture: the same call reached SQLite as organization_id = ? and external_id = ?, plan SEARCH … USING INDEX uniq_T_organization_id_external_id. The index is the plain-column form, so the cause is (a): no organization predicate reaches the driver under single.

Shape, by seat ruling: organization_id = ? AND KEY only. An OR organization_id IS NULL leg was measured and rejected (readings below): on SQLite it forfeits the index on every table created since ADR-0131 D1 (tenant column NOT NULL).

Tests

  • packages/core/src/utils/import-runner-match-organization.test.ts (new, 18 cases): the where is tenant column + key for a job context and a session context, upsert and update, dry run, ordered key sets, a declared tenancy.tenantField; the declaration is read once per import. CONTROL (the lookup is the key alone and the stored row still matches): no tenant column, tenancy.enabled: false, an external object, a declared tenantField the object lacks, no / blank / absent organization, no getMetaItem, a failing declaration read, and a key set that names the tenant column. RED on main: 8 failed, 10 passed.
  • packages/rest/src/import-upsert-match-organization.test.ts (new, 3 cases, real SqlDriver, single posture): the lookup SQL is where organization_id = ? and external_id = ? with bindings [org, key], and its EXPLAIN QUERY PLAN is SEARCH … USING INDEX uniq_…_organization_id_external_id. CONTROL: a key with no index (code) still matches and updates; an object with no tenant column (systemFields: false) matches on the key alone. RED on main: 2 failed, 1 passed.
  • Identity pins in packages/objectql/src/system-write-organization.test.ts: objectql's module and barrel exports of the three moved names are the @objectstack/core bindings.

Forced test edits:

  • packages/objectql/src/audit-stamp-skip-automations.test.ts: its stub driver stored rows without the tenant column, which every real driver stamps from DriverOptions.tenantId (injectTenantOnInsert). Case (c) imports a row and then updates it by code; with the lookup now scoped by organization_id, the stub's row (no column) no longer matched (NO_MATCH). The stub now stamps organization_id from options.tenantId on create; audit columns stay the hook's alone.
  • packages/objectql/src/federated-injected-column-readers.test.ts: two READERS rows named the definitions that moved out of objectql (the module-level row of tenancy/system-write-organization.ts and its resolveTenantFieldName row), so the census reported them stale. Rows removed; the header says the definitions live in core.

Acceptance notes

Verification

Head: 003b09d5 (the changeset declaration line only, on top of e9f6ba17, which merged origin/main at 0a4d8b18). Each reading below names the commit it was taken on; on 003b09d5 the changeset gates check-changeset-no-major (with this body as the event payload), check-adr-0087-registration (and --self-test), check-empty-changeset, check-declaration-mirrors and check:changeset-gate-self-tests exit 0.

Timing: rows/s at 10,000 and 50,000 rows, before and after

Real ObjectQL + SqlDriver (better-sqlite3 :memory:), single posture, context { isSystem: true, tenantId }. The table is pre-seeded to N rows; then one upsert of 1,000 rows (500 update existing keys spread over the table, 500 create new keys). Shared-box readings under the verify lock.

table rows before (6be71abc) after (a5aeb1a1)
10,000 1,000 rows in 2,781 ms = 360 rows/s 1,000 rows in 1,440 ms = 694 rows/s
50,000 1,000 rows in 7,794 ms = 128 rows/s 1,000 rows in 1,166 ms = 857 rows/s

Before, throughput falls with table size (each lookup scans). After, it is flat.

Query plans: SQLite and Postgres

SQLite (better-sqlite3), unique index (organization_id, external_id), 20,000 rows:

shape tenant column NOT NULL (since D1) tenant column nullable (pre-D1)
organization_id = ? and external_id = ? (this PR) SEARCH USING INDEX (organization_id=? AND external_id=?) SEARCH USING INDEX
(organization_id = ? or organization_id is null) and external_id = ? SCAN MULTI-INDEX OR, two SEARCH
organization_id is null and external_id = ? SCAN SEARCH
external_id = ? (main) SCAN SCAN

Postgres 16, 100,000 rows, ANALYZE:

  • organization_id = 'org_a' and external_id = 'E7' (this PR): Index Scan using u_nn … Index Cond: ((organization_id = 'org_a') AND (external_id = 'E7')).
  • the OR-NULL form: BitmapOr of two Bitmap Index Scans (both NOT NULL and nullable).
  • external_id = 'E7' (main): Seq Scan … Filter: (external_id = 'E7').
Ablation

On a5aeb1a1. Mutation (committed fix first, scripts/ablation-replace.mjs): the line that adds the tenant column to the lookup's where replaced by a marker statement (ABLATED_31812). pnpm --filter @objectstack/core build; ablation-dist-preflight.mjs @objectstack/core ABLATED_31812 → marker in dist/index.js and dist/index.cjs.

  • rest real-driver test: 2 failed, 1 passed (the CONTROL for the object with no tenant column stays green).
  • core unit test: 7 failed, 11 passed (the "declaration read once" case stays green: the read still happens).

Restore: blob == HEAD, git diff HEAD empty; rebuilt; --absent preflight: dist reading passed (marker in 0 of 14 built files); its tree reading exited 3 only because two untracked probe files were still in packages/rest/src (removed right after, never committed). rest test after restore: 3 passed.

Suites and gates

Package suites, before the merge (head 88c2e6a2, then the stub fix fdd5c8d8), all green:

  • @objectstack/core test: Test Files 140 passed, Tests 3212 passed.
  • @objectstack/objectql test: Tests 11817 passed (the first run had 1 failure, the audit stub case named under Forced test edits; green after it).
  • @objectstack/rest test: Test Files 397 passed, Tests 7636 passed, 332 skipped.
  • Downstream runImport consumers: service-automation connector-pull 27 passed; plugin-auth admin-import-users / account-invitation-marker / durability-swallow-repair 120 passed; service-messaging notification-template integration 38 passed.
  • Typecheck @objectstack/core, @objectstack/objectql, @objectstack/rest: exit 0.

After merging origin/main (head e9f6ba17), rebuilt (turbo run build --filter=./packages/** --filter=./examples/**, 82 tasks successful), then:

  • core import-runner-match-organization.test.ts 18 passed; rest import-upsert-match-organization.test.ts 3 passed; objectql system-write-organization, federated-object, federated-injected-column-readers, audit-stamp-skip-automations 53 passed; the three typechecks exit 0.
  • eslint --no-inline-config packages/core packages/objectql packages/rest: exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 88 derived families, each run on e9f6ba17, all exit 0. check-plugin-teardown-shape.mjs --self-test first exited 3 (its fixture commit was not in the shallow clone); after git fetch --depth=1 origin 621a4876… it exited 0. --ran reconciliation: 88 derived, 88 run, 0 NOT-MEASURED, 0 UNRUN.
  • The edited census script: check-platform-object-tenancy-census.mjs --self-test passed and the gate reads 99 platform-namespace objects, 51 in reach, 48 outside, matching the tree.

Dogfood battery: not run locally (no ! in the title, no (narrowing) arm); CI's queue run carries it.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: not touched.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmQPtCxVmh3N9qvbqxE


Generated by Claude Code

The update/upsert match lookup queried the key fields alone. Under the
single posture the engine adds no tenant scope to a read, so the lookup
could not use the (organization_id, key) unique index and scanned the
table once per row. It now carries the target's tenant column set to the
context's organization, read off the target's declaration once per
import; with no organization, no declaration, a federated target or no
tenant column the lookup stays the key alone.

The tenancy-scope predicate (resolveTenantFieldName, DEFAULT_TENANT_FIELD)
and isFederatedObject move down to @objectstack/core so the runner asks
the engine's own rule; objectql re-exports the same bindings.

Claude-Session: https://claude.ai/code/session_01ADHkmQPtCxVmh3N9qvbqxE
Co-authored-by: Claude <noreply@anthropic.com>
…ancy census

The engine's tenancy-scope predicate now lives in @objectstack/core:
the objectql suite pins that its re-exports are the same bindings, the
injected-column readers census drops the two definition rows that moved
out of its scan, and the platform-object tenancy census loads the
predicate (and reads its header) from the new file.

Adds the patch changeset for @objectstack/core and @objectstack/objectql.

Claude-Session: https://claude.ai/code/session_01ADHkmQPtCxVmh3N9qvbqxE
Co-authored-by: Claude <noreply@anthropic.com>
… real driver

The import door case updated a row the stub had stored without the
tenant column every real driver stamps from DriverOptions.tenantId; the
import runner's match lookup now reads by that column, so the stub
carries it. Audit columns stay the hook's alone.

Claude-Session: https://claude.ai/code/session_01ADHkmQPtCxVmh3N9qvbqxE
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/core, @objectstack/objectql, touching 10 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/core/src/security/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/api/wire-format.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/data-modeling/currency.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/data-modeling/fields.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/data-modeling/import-mappings.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/permissions/system-context.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/protocol/objectql/state-machine.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v12.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/releases/v17/17-6.mdx (via runImport (symbol, a top-level function), /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/releases/v18/18-1.mdx (via resolveTenantFieldName (symbol, a top-level function), /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/releases/v18/18-2.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/core/src/security/index.ts) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: organization_id (literal, 39 pages)
  • the SDK route bridge reached 65 of 231 client-bound route-ledger rows — the other 166 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 166: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 107 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 48 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 785d432bb0fb3e13f4679f2ee0f94f276cac7561 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 356da5fabe6f8e9a971117aca2876b7c5cd317b1 — the merge of head 003b09d533231ce10d2fc131c79ec679c28ef395 into base 785d432bb0fb3e13f4679f2ee0f94f276cac7561, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 356da5fabe6f8e9a971117aca2876b7c5cd317b1 && git checkout 356da5fabe6f8e9a971117aca2876b7c5cd317b1
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 785d432bb0fb3e13f4679f2ee0f94f276cac7561 003b09d533231ce10d2fc131c79ec679c28ef395 && git checkout -B drift-repro 785d432bb0fb3e13f4679f2ee0f94f276cac7561 && git merge --no-ff 003b09d533231ce10d2fc131c79ec679c28ef395

node scripts/docs-audit/affected-docs.mjs --json 785d432bb0fb3e13f4679f2ee0f94f276cac7561

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 785d432bb0fb3e13f4679f2ee0f94f276cac7561 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack/core now exports resolveTenantFieldName, DEFAULT_TENANT_FIELD
and isFederatedObject, moved from @objectstack/objectql, which re-exports the
same bindings.

Claude-Session: https://claude.ai/code/session_01ADHkmQPtCxVmh3N9qvbqxE
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#2 · os-steve · session_01ADHkmQKZzp4DLtqiCkZZRM

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 003b09d533231ce10d2fc131c79ec679c28ef395
Local-runs: none

Inputs: card #31812 (body, the seat's delta and the shape-A amendment), PR #31846 body and file list, and the net diff of 003b09d5 against main (12 files, +546/−102). 003b09d5 differs from e9f6ba17 only in the changeset's Clause-②: line.

① Derived judgments

  1. @objectstack/core gains three exports: resolveTenantFieldName, DEFAULT_TENANT_FIELD and isFederatedObject (security/tenant-field.ts, re-exported from security/index.ts). Their bodies are the objectql ones moved verbatim: same precedence (tenancy.enabled: false → declared tenancy.tenantField the object has → organization_id), same presence test for external. Right: a move under ADR-0138 D4's relocation precedent, the same move resolveSystemWriteOrganization made.
  2. @objectstack/objectql keeps every name: tenancy/system-write-organization.ts and federated-object.ts re-export the core bindings, and the PR pins identity (toBe), so an existing importer resolves the same function object. Right: nothing is removed or renamed, so no narrowing arm is owed.
  3. runImport's match lookup: an update or upsert row's findData filter gains <tenant column> = context.tenantId when the context carries a non-empty string organization, the target's declaration reads, the target is not federated and resolveTenantFieldName names a column; otherwise it is the key alone, as before. A key set that names the tenant column keeps the row's value. Right: it only narrows the lookup to the organization a create from the same context stamps, which is the row the (organization_id, key) unique index can hold once per organization. Under group the match no longer reaches another member organization's row; that row was never the caller's write target, so this closes a cross-organization update rather than taking an ability away.
  4. No spec, schema, protocol or stored-row change; Metadata-protocol: none is right.

② Semver level

Clause-②: yes (widening), naming the three exports, on the changeset and the PR body; Metadata-protocol: none; patch on @objectstack/core and @objectstack/objectql. Right: a non-protocol widening ships patch (AGENTS.md Post-Task Checklist step 3), and #31464 declared one new export the same way. No BREAKING banner is owed.

③ Boundary flags

Implemented-by: claude/project-thread-e9zmhq
Reviewed-by: session_01ADHkmQKZzp4DLtqiCkZZRM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#2 · os-steve · session_01ADHkmQKZzp4DLtqiCkZZRM

维护者速读

  • 改了什么: 按外部 id 做"更新/更新或新建"导入时,查找已有记录的条件里加上当前组织(organization_id = 本组织),这样数据库能直接用 (组织, 外部 id) 唯一索引,不再每行全表扫描。
  • 为什么改: 实测往 5 万行的 SQLite 表 upsert 1000 行只有 128 行/秒,且表越大越慢;改后 857 行/秒,不再随表变大而变慢。Postgres 也从全表扫描变成索引扫描。
  • 风险与回滚: 只会缩小查找范围;没有组织上下文、对象没有租户列、联邦对象时与原来完全一样。group 模式下不再匹配到其他成员组织的记录(原来可能误更新别的组织的数据)。回滚即还原本 PR。
  • 先看: packages/core/src/utils/import-runner.ts 的 matchScopeOf。
  • 需要你做的: 无,由席位落地。
  • 席位意见: ACCEPT。

席位核对 — ACCEPT · domain:server#2 · Head-sha 003b09d533231ce10d2fc131c79ec679c28ef395 · 2026-11-09T07:29Z

  1. Shape: draft to main, Fixes #31812. The declaration is Clause-②: yes (widening), naming the three new @objectstack/core exports, with Metadata-protocol: none. Patch changesets for @objectstack/core and @objectstack/objectql. 12 files, +546/−102.
  2. Contract review: TIER_DEFAULT, declaration face, PASS, on this head.
  3. Delta and amendment, checked against the diff:
    • Shape A: the lookup is tenant column = context tenantId AND key, with no NULL leg.
    • The column comes from the engine's own resolveTenantFieldName, read once per import. Federated objects and missing declarations fall back to the key alone.
    • resolveTenantFieldName, DEFAULT_TENANT_FIELD and isFederatedObject moved to core verbatim, and objectql re-exports the same bindings, with identity pins.
  4. Measurements: a 1k-row upsert into a 10k-row table went from 360 to 694 rows/s; into a 50k-row table, from 128 to 857 rows/s. SQLite plans the lookup as SEARCH on the organization/external-id unique index. Postgres 16 does an Index Scan where it used to do a Seq Scan.
  5. Forced edits: the tenancy census script now reads core. Two stale rows were dropped from federated-injected-column-readers. The audit stub now stamps organization_id like a real driver. All three are accepted.
  6. Gates:
    • Dev: the core unit test went from 8 red on main to 18/18; the rest real-SqlDriver test from 2 red to 3/3. Both ablations went red. 88 dispatch gates, 0 UNRUN.
    • Check-runs on this head: 55 success, 13 skipped, 0 failed. The one cancelled run is a PR-body guard superseded by its re-run.
    • Governed surfaces: 0 of 12 paths on the register.
  7. Carried:
  8. Landing: pr_ready + automerge_enable.

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

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant