Repository navigation
test(metadata-protocol): the live-MySQL sys_setting probe expects the plain organization_id column - #25152
Conversation
… plain organization_id column Since 7b-2 the sys_setting row-identity duplicate probe keys the plain organization_id (COALESCE(user_id, '') stays); the unit test already pins that statement. The live-MySQL cell, which runs only in the full battery, still expected the old organization_id_key alias. The preflight's key docblock named the same retired alias as its sentinel example. Claude-Session: https://claude.ai/code/session_018gewcgUaNUX9hMkxeP2HE2 Co-authored-by: Claude <noreply@anthropic.com>
…sql-fixtures-pre18-tenant-column
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 5b4c110469fce8dea2ccbfff7f9afcac45d73c7e && git checkout 5b4c110469fce8dea2ccbfff7f9afcac45d73c7e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 37ccd5f2cf1daf02d16772e10182698da0bbeb4d 0f372a1ffa220ac975c0e7b36ecda68d3df77de1 && git checkout -B drift-repro 37ccd5f2cf1daf02d16772e10182698da0bbeb4d && git merge --no-ff 0f372a1ffa220ac975c0e7b36ecda68d3df77de1
node scripts/docs-audit/affected-docs.mjs --json 37ccd5f2cf1daf02d16772e10182698da0bbeb4d |
Contract reviewServed-tier: Scope: the net diff against the merge base (2 files, +3/−3), round 2 of #25131 under re-declaration 6329308116:
Read with them:
① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 ·
|
| Item | Reading |
|---|---|
| Shape | Draft PR → main. The body opens Refs #25131 (no closing keyword: the card closes on the next green hourly run). 2 files, +3/−3. Not governed. |
| Scope | sys-setting-identity-index.live-mysql.test.ts expects the organization_id column #24893's duplicate probe now projects, not the retired organization_id_key; the rest of the row and the single group are unchanged. One docblock example in runtime-index-preflight.ts is updated for the same retirement. |
| Review | TIER_DEFAULT. Record 6330097886 is PASS on this head. |
| Declaration | No changeset (skip-changeset). Clause-②: no (test expectation only: …) and Metadata-protocol: none at line starts on the PR body. |
| Cross-lane | None. |
| Live proof | In local containers with CI's recipe: step 16 before 1 failed / 27 passed, after 28/28. The dev's addendum 6330110898 adds steps 17 and 18, never run since fccbd9d0d5: the runtime build exits 0, and the cascade-delete matrix passes 15/15, with 8 of them on the live PostgreSQL cell. Every step of Temporal Conformance that was red or skipped since fccbd9d0d5 (12, 16, 17, 18) is now measured green. |
| CI | At this read on 0f372a1ffa: ci-failure GREEN, all 41 check-runs completed, none failed. git merge-tree against today's origin/main is clean. |
Disposition:
open_questions: none.deviations: all accepted (see record 6330097886).out_of_scope_findings: none.
Landing: ordinary queue (pr_ready + automerge_enable through the relay). After the merge, the seat reads main's next push or hourly full run. Green closes #25131.
Generated by Claude Code
Refs #25131
Clause-②: no (test expectation only: no response, status, error, outcome or export moves)
Metadata-protocol: none
Round 2 of claim 6327765912, under the seat's re-declaration 6329308116. Round 1 (#25142, merged as
4c7dcb4519) greened step 12 ofTemporal Conformance (live PG + MySQL). That let step 16, "Run the metadata-protocol migration statements against live MySQL and PostgreSQL", run for the first time sincefccbd9d0d5, and it fails one test. This PR changes that test's expected row and one stale docblock example. No production statement moves, and nothing is skipped, narrowed or deleted.What is red
packages/metadata-protocol/src/migrations/sys-setting-identity-index.live-mysql.test.ts, test "the MySQL-spelled statement PARSES, and lists exactly the duplicate group".organization_id_key: 'org_jia'and receivedorganization_id: 'org_jia'. The rest of the row is identical: namespace, key, scope,user_id_key: ''andduplicate_rows: 2.d5d8146012, 7b-1 + 7b-2) re-keyed thesys_settingrow-identity duplicate probe to the plainorganization_idon purpose (WHERE organization_id IS NOT NULL … GROUP BY organization_id, …;COALESCE(user_id, '')stays). It updated the unit testsys-setting-identity-index.test.tsto pin that statement. This live-only file runs only in the full battery, so it was missed.Is the received shape what #24893 intended? Yes, measured
tenantrows for one(org_jia, lifecycle, retention_overrides)with a NULLuser_id, plus oneuserrow. It has no NULL-organization row.WHERE organization_id IS NOT NULLexcludes nothing here, and the live answer is still exactly the one duplicate group,duplicate_rows: 2. No group the probe should list is missed.The change
sys-setting-identity-index.live-mysql.test.ts: the expected row's keyorganization_id_keybecomesorganization_id. The test still asserts the whole row and the one group. No other line moves.runtime-index-preflight.ts, theRuntimeIndexDuplicateGroup.keydocblock (about line 152): its example,organization_id_key = '__global__', named the alias feat(driver-sql,driver-turso,driver-memory,objectql,cli,metadata-protocol): plain organization key part in new unique indexes; the differ reads COALESCE(tenant) as tenant on a certified database (18.x step 7b-1 + 7b-2) #24893 retired.sys_settingprojectsuser_id_key, and the two overlay indexes projectpackage_id_keyandbundle_member_key.user_id_key = ''("user_id IS NULL"). Comment only.Census
Step 16 runs four
live-*test files inpackages/metadata-protocol:sys-setting-identity-index.live-mysql.test.tsseed-tenancy-backfill.live-mysql.test.tsseed-tenancy-backfill.live-postgres.test.tslive-mysql-database.isolation.test.tsOnly the first pinned
organization_id_keyorCOALESCE(organization_id, …). Theseed-tenancy-backfillpair is about the__global__autonumber counter, 7b-3's ground, which #24893 left untouched. Both pass live.Verification
Live MySQL 8.0 (
mirror.gcr.io/library/mysql:8.0,SET GLOBAL time_zone = '+08:00') and PostgreSQL 16 (mirror.gcr.io/library/postgres:16, timezoneAsia/Shanghai), both in local containers. Step 16's own command and env:OS_TEST_MYSQL_URL,OS_TEST_POSTGRES_URLandOS_EXPECT_LIVE_DIALECT_MATRIX=1. The build was step 16'sturbo run build --filter=@objectstack/metadata-protocol...(13/13).pnpm --filter @objectstack/metadata-protocol exec vitest run live-mysql live-postgres, before the edit4c7dcb4519Test Files 1 failed / 3 passed (4),Tests 1 failed / 27 passed (28): the one test above, with the same diff as CId7144693bTest Files 4 passed (4),Tests 28 passed (28). The[#9434] live MySQL … sql_mode=…line is printed, so the cell ran.pnpm --filter @objectstack/metadata-protocol test, default (no live servers)d7144693bTest Files 252 passed / 3 skipped (255),Tests 20837 passed / 19 skipped, exit 0pnpm --filter @objectstack/metadata-protocol typecheckd7144693b, and again after mergingorigin/mainat0f372a1fftsc --listFileslists both edited files.Gates.
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives 54 families (2 paths, +3/−3). Ond7144693b, after a fullpnpm exec turbo run build --concurrency=2(77/77), all 54 exited 0.--ranreconciliation: "54 derived, 54 run, 0 NOT-MEASURED, 0 UNRUN", a DERIVED zero.origin/mainwas then merged (459afea1f,packages/lintonly, disjoint). The derivation at0f372a1ffis the identical 54, re-run there: all 54 exited 0, and--ranagain gives "54 derived, 54 run, 0 NOT-MEASURED, 0 UNRUN", a DERIVED zero.Changeset.
skip-changeset: a test expectation plus one comment line. The comment is a docblock on an exported interface, so it rides into the.d.ts, but no symbol, type or runtime byte moves.The hourly run. Step 16 runs only on push, schedule and dispatch, never on a PR or in the queue. The local live run above is its proof here, and the next push or hourly full run on
mainis the proof there.Acceptance notes
__global__autonumber counter (7b-3) is untouched.Generated by Claude Code