Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

[WIP] Fix issue in action step of workflow - #195

Merged
hotlong merged 2 commits into
mainfrom
copilot/fix-action-step-issue
Jan 25, 2026
Merged

hotlong merged 2 commits into
mainfrom
copilot/fix-action-step-issue

Conversation

Copilot AI commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor
  • Understand the issue: ObjectCalendar tests failing because mock data dates (Jan 2024) don't match the calendar's default view (Jan 2026)
  • Fix test dates to use 2026 instead of 2024 to match current year
  • Verify tests pass locally - all 7 tests now passing
  • Run all tests to ensure no regressions - all 382 tests passing
  • Request code review - 1 comment about pre-existing timeout inconsistency (not related to changes)
  • Run security scan - no vulnerabilities found
Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21333873399/job/61402741221#step:8:1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercel Bot commented Jan 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectui-docs Error Error Jan 25, 2026 2:38pm
objectui-site Ready Ready Preview, Comment Jan 25, 2026 2:38pm

Request Review

@hotlong
hotlong marked this pull request as ready for review January 25, 2026 14:15
Copilot AI review requested due to automatic review settings January 25, 2026 14:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong
hotlong merged commit edf6ed4 into main Jan 25, 2026
Copilot AI requested a review from hotlong January 25, 2026 14:37
Copilot stopped work on behalf of hotlong due to an error January 25, 2026 14:37
os-steve pushed a commit that referenced this pull request Sep 20, 2026
…ames one

Closes the fifth and last `DataSource` door and the three AUTHORABLE keys that
feed it, executing director batch #195 item 1 letter A on objectui#9511.

`DataSource.findOne` narrows to `string`, joining `update` (objectui#9333) and
`delete` / `bulkUpdate` / `bulkDelete` (objectui#9712). The three authorable
keys narrow on BOTH published faces -- `ObjectFormSchema.recordId`,
`DetailViewSchema.resourceId` and `DetailSchema.resourceId`, each as a
TypeScript declaration and as its hand-written zod mirror -- plus
`CommentEntry.recordId` and `MentionNotification.recordId`, which the ruling
names under the same principle.

The mirror half is the load-bearing half: a TypeScript declaration does not run
at parse time, so the mirror is the only face that can refuse an authored
number. Narrowing the declaration alone would have shipped declared != enforced
on a published surface with `zod-mirror-parity.test.ts` still green, because
that instrument only catches a mirror left NARROWER than its declaration.

Consequential and compiler-forced: the five plugin-form faces that hand their
own `recordId` to `findOne`; `BulkActionDialogProps.dataSource`, which restates
`findOne` as a PROPERTY and is therefore checked contravariantly; and
`ObjectView.buildFormSchema`, whose assertion now states the protocol rather
than the wide shape. No reader-side `String(...)` coercion was added anywhere --
that is the option the ruling refused by name.

Accept set moved in one direction only, measured over 45 documents on this tree
and on the merge base: 9 GREEN->RED (the three keys x integer/negative/float),
0 RED->GREEN, 9/9 refusals carrying the prescribed repair, with lit, green and
red-both controls on the same instrument and corpus.

This commit also adopts, after a line-by-line review, the hunks that reached
this branch through an unreviewed salvage commit made by the dispatching seat
while this worktree was idle. Every hunk there was re-read against the grant and
against the ruling before being kept; the two paths that sat outside the granted
surface are kept deliberately and justified in the pull request body, because
the full build does not compile without them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
os-tesla pushed a commit that referenced this pull request Sep 27, 2026
…e strings (objectui#10078)

CommentSearchResult.recordId, RecordSubscription.recordId and
DataSourceMutationEvent.id narrow from `string | number` to `string`,
under the one record-id rule of objectui#9511 (director batch #195
item 1, letter A). None has a zod mirror, so the change is TS-only.

The two mutation emitters (ValueDataSource, ObjectStackAdapter) convert
the id at their own boundary before emitting, as the rule prescribes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fWVhLzhxR8qrFsJ5o8TYW
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…ames one (objectui#9511) (objectstack-ai#10141)

Fixes objectstack-ai#9511

`Clause-②: yes`

Executes director batch **objectstack-ai#195 item 1, letter A** (comment `5749154869`,
maintainer 「同意」 2026-09-20T10:11Z), standing on batch objectstack-ai#136 item 5 letter
B. The ruling's operative clause, quoted:

> A record id is a **string** wherever metadata names one. The six
declarations (`ObjectFormSchema.recordId`,
`DetailViewSchema.resourceId`, `DetailSchema.resourceId` — TS
declaration and zod mirror each) narrow to `string`, and so do
`CommentEntry.recordId` and `MentionNotification.recordId` (the same
principle; a knowing decision, as the seat asked for).
`DataSource.findOne` then narrows to `string` and the five
TypeScript-only plugin-form faces fall out of `ObjectForm`'s own schema.

and its acceptance pin:

> pin: `{ type: 'detail', resourceId: 42 }` is refused with the
prescription, `'42'` parses, and all five `DataSource` id parameters
read `string`.

---

## 维护者速读

**改了什么。** 记录 id 从今天起在**每一扇门**上都是字符串。第五扇也是最后一扇门 `DataSource.findOne`
收窄了,连带它背后三个**作者直接手写**的元数据键也收窄了 —— 表单的 `recordId`、详情的
`resourceId`(两个拼法、三处声明),每个都在**两张已发布的面**上同时动:TypeScript 声明,和手写的 zod 校验器。

**为什么必须动 zod 那一半。** 因为 **TypeScript 声明在解析时根本不运行**。作者写进 JSON 的数字,只有 zod
校验器拦得住。只改声明、不改镜像,结果是已发布面上的 `declared ≠ enforced`,而且
`zod-mirror-parity.test.ts` **会一路绿着放它过去** ——
那个仪器只抓「镜像比声明更窄」,镜像更宽它不吭声。所以两张面一起动,这是本卡真正的技术核心。

**作者会看到什么。** 今天把记录 id 写成裸数字的元数据,升级后**校验不过**,而且报错会直接告诉你怎么改:加引号,`42` 写成
`'42'`。⛔ **平台不会替你转换**,这是故意的 ——
主键是数字的部署方在**自己的适配器边界**转一次,于是下游每个作者、每个调用方、每个适配器看到的都是同一种形状。这类部署方的线上字节其实早就是
`'42'` 了(`update` 在 objectui#9333、`delete`/`bulkUpdate`/`bulkDelete` 在
objectui#9712),本卡只是让最后那扇不一致的门跟上。

**代价在哪。** 另外四扇门当初在本仓**一个调用点都不用改**;成本全在 `findOne`
这一扇,因为它的读取方是作者面。这次连带动了五张表单面,外加两处编译器强制的残留(下面单独交代)。

**风险与回滚。** 风险集中在一件事:外部消费者如果手写了数字 id,升级即报错 —— 这正是裁决要的效果,报错带修法。回滚就是 revert
本 PR,没有数据迁移、没有生成物、没有 schema 基线要还原。

**你要做的。** 这是一次作者面收窄,`Clause-②` 已申报 `yes`,下面是完整的 accept-set 测量。⛔ 未获批准前本
PR 停在 draft,不翻 ready、不入队。

---

## Clause-② — the accept set moved, measured in both directions

Differential over **45 documents** across the three mirrors, parsed
twice: once on this branch's freshly built `dist` (`--force`, no cache,
from `813aaf75`) and once on a comparison worktree at the merge base
`0c2eb5eee0`. Same script, same corpus, same instrument on both sides.

| reading | count |
| --- | --: |
| GREEN to RED | **9** |
| **RED to GREEN** | **0** |
| verdict unchanged | 36 |
| refusals carrying the prescribed repair | **9 / 9** |

The 9 that moved are the only 9 that could: the three keys times three
numeric spellings (integer `42`, negative `-1`, float `4.5`). Every one
refuses with `invalid_type` **at that key's own path**, and every
message names both `'42'` and `objectui#9511`.

**Nothing that parsed red now parses green** — that is the `RED to
GREEN` row, and it is a measurement over a corpus deliberately stocked
with already-red documents, not an inference from the shape of the edit.

**Every zero carries a lit control on the same instrument and corpus:**

| control | role | reading |
| --- | --- | --- |
| `title: 42` / `objectName: 42` | **lit** — keys that were already
string-only | refused `invalid_type`, before and after |
| `type` set to a wrong literal | **lit** — the mirror still reads its
own discriminator | refused `invalid_value`, before and after |
| object / array / boolean / `null` at the same key | **red-both, 21
rows** | refused before, refused after — nothing was loosened while the
number arm was removed |
| key absent, `'42'`, `'rec_1'`, `''` | **green-both, 15 rows** | parsed
before, parses after — the mirror has not started refusing everything |
| `zzqNoSuchKey` | **absent control** | green both sides (base is
passthrough), so the corpus is not silently all-red |

⭐ Without the red-both and green-both halves the 9 refusals would prove
nothing: a mirror that had simply broken would pass the subject rows
too.

**All five `DataSource` id parameters read `string`** — `update`,
`delete`, `bulkUpdate`, `bulkDelete`, `findOne` — asserted two ways in
`data-source-id-surface-9511.test.ts`: compile-time `Expect` rows judged
by `tsc -p tsconfig.test.json`, and a runtime census over the
declaration text that reds even in a tree where `tsc` never runs.

## Reverse verification — both new pins are proven able to fail

Run through `ablation-replace`, which requires the anchor to hit and
verifies the mutation on disk by blob hash before the command runs, then
restores and proves the restore byte-identical.

| leg | mutation | on-disk evidence | result |
| --- | --- | --- | --- |
| 1 | `crud.zod.ts` `resourceId` back to the union | anchor 1 to 0, blob
`e70c30156759` to `90bb646a8847` |
`authorable-record-id-string-9511.test.ts` **5 failed / 28 passed** |
| 2 | `data.ts` `findOne` back to `string or number` | anchor 1 to 0,
blob `0f2a090279e1` to `3b5444834866` |
`data-source-id-surface-9511.test.ts` **1 failed / 11 passed** |

Both restored: blob equals HEAD, `git diff HEAD` empty. ⭐ Leg 1 is the
sharper reading — only the `DetailSchema` rows went red while the other
two mirrors stayed green, so the pin discriminates per mirror instead of
failing wholesale. Leg 1 also proves these pins resolve the **source**
and not a stale `dist`: no rebuild happened between mutation and red.

## The two paths outside the granted file surface — kept, and why

Both are compiler-forced fallout of the ruled narrowing, not scope
creep. The full build does not compile without them, and each is the
identical one-token edit as the five granted plugin-form faces.

**`packages/plugin-grid/src/components/BulkActionDialog.tsx`** —
`BulkActionDialogProps.dataSource` hand-restates `findOne`. Without the
edit:

```
src/ObjectGrid.tsx(5476,7): error TS2322: Types of property 'findOne' are incompatible.
  Type 'string | number' is not assignable to type 'string'.
```

⭐ This is the one shape in the tree where narrowing the protocol reaches
a consumer at all. The interface declares `findOne` as a **method**,
which TypeScript compares bivariantly — that is why the `DataSource`
docblock has always warned that narrowing here does not reach
implementors. This face declares it as a **property**, which is checked
contravariantly under `strictFunctionTypes`. That file's own comment had
already predicted the event, in terms: it says deriving those doors from
`DataSource` means "any future drift of that face reddens HERE instead
of passing silently". It did.

**`packages/plugin-view/src/ObjectView.tsx`** — `buildFormSchema`
asserted an untyped record bag's id as `string or number or undefined`
and assigns it into the now-narrowed `ObjectFormSchema.recordId`.
Without the edit: `src/ObjectView.tsx(1989,7): error TS2322`.
`selectedRecord` is a `Record` of unknowns, so this was **always** a
hand-written assertion; it now asserts the protocol instead of the wide
shape. ⛔ Deliberately **not** `String(...)` — a reader-side coercion is
the option the ruling refused by name, because eight such sites
contradict 「the conversion lives in one typed place」.

⚠️ **How they were found matters, because the first survey missed
them.** An earlier by-declaration survey of `findOne` call sites
concluded every other site was already string-clean. That survey was
incomplete by construction: the failing `plugin-form` task had stopped 5
of 29 build tasks from ever running. Re-run with `plugin-form`
compiling, the build reached all **43** tasks and named these two. ⇒ the
reading in this PR is **by compiler**, not by declaration, and 43 of 43
tasks now report.

## The ruling's `KnownDrift` note is an instruction over an EMPTY SET

The ruling's execution section asks for 「the `KnownDrift` /
mirror-parity ledger rows shrunk in the same change」. **There are none
to shrink.** Measured in
`packages/types/src/__tests__/zod-mirror-parity.test.ts`: `resourceId`
appears **0** times and `recordId` **1**, and that single hit is prose
about an `onNavigate` signature, not a ledger row. Independently
re-verified by the dispatching seat against `MirroredUndeclared` **50**
as the control, so the zero is a real absence and not a dead query.

⇒ `zod-mirror-parity.test.ts` is **untouched** — which is also why
excluding it from this PR's file surface cost nothing. Stated here so
the next reader does not go hunting for rows that never existed.

## Gates — hand-derived, since `dispatch-gates.mjs` refuses for objectui

That script derives families from the objectstack tree it runs in and
says so outright; this list comes from objectui's own root
`package.json` scripts and `.github/workflows/`. Every exit code was
captured to a file **before** any pipe.

| gate | exit |
| --- | --: |
| `turbo run build --filter=!@object-ui/site --force` (43 of 43 tasks) |
**0** |
| `turbo run type-check` (81 of 81 tasks) | **0** |
| `vitest run` over the four affected packages — 504 files, 7685 passed,
1 skipped | **0** |
| `turbo run lint` over the four affected packages (0 errors; 875
pre-existing warnings) | **0** |
| the two new/extended pin files alone — 45 tests | **0** |
| `check:control-bytes` · `check:new-line-citations` (0 new) | **0** ·
**0** |
| `check-changeset-fixed` · `check-changeset-no-major` ·
`check-changeset-presence` | **0** · **0** · **0** |
| `check:pending-changeset-literals` · `check:changeset-claims` | **0**
· **0** |
| `check:spec-symbols` · `check:component-surface-parity` (report-only)
| **0** · **0** |
| `check:doc-types` · `check:doc-snippets` (672 of 672 blocks judged) ·
`check:doc-examples` · `check:doc-fences` · `check:doc-example-ids` ·
`check:doc-example-readers` | all **0** |
| `check:prompt-keys` · `check:registry-bare-names` ·
`check:handler-key-reads` · `check:designer-field-key-parity` | all
**0** |
| `check:test-path-roots` · `check:vi-mock-specifiers` ·
`check:vi-mock-inherit` · `check:vi-mock-override-shape` | all **0** |
| `check:readme-exports` · `check:unreferenced-sources` ·
`check:self-import` · `check:sdui-registration-pins` ·
`check:element-data-source-declaration` | all **0** |
| `check:skills-paths` · `check:skill-examples` | **0** · **0** |
| `check-governed-queue-guard --test` over 6 changed paths | **0** — NOT
GOVERNED, none of the 5 governed surfaces matched |

**Honest notes on three of those readings, rather than letting them read
stronger than they are.**

- `check:skill-examples` exits 0 over **0 selected fences** — no marked
skill example carries these types, so that gate's corpus for this diff
is empty. It is a real zero, ⛔ not coverage.
- `check:component-surface-parity` and `check:new-line-citations` are
**report-only** by their own design; their 0 means "no findings", not
"blocking and green".
- The test-and-lint pair ran inside one lock invocation joined with `;`,
so the wrapper printed `batch-last-exit` and warned it does not cover
both parts. That warning is correct and the wrapper's number is ⛔ not
used here: each part's own exit code was written to its own file (`0`
and `0`) and those are what the table reports.
- `turbo run type-check` was measured on tree `0492a2b5`. HEAD differs
from that tree by **exactly one file** —
`.changeset/9511-record-id-is-a-string.md` — and no tsconfig project in
this repo includes `.changeset` (the one textual hit in
`tsconfig.scripts.json` is inside a comment). The reading therefore
transfers; said explicitly rather than presented as a run on HEAD.

## A note on this branch's history

The first commit on this branch, `0492a2b5`, is labelled INCOMPLETE AND
UNREVIEWED and was **not authored by this seat** — the dispatching seat
made it to stop the container reclaiming an idle worktree after this
seat hit the usage wall mid-task. Every hunk in it has since been
re-read line by line against the ruling and against the granted surface,
and is adopted deliberately in `813aaf75`. Nothing in it was built on
unreviewed. This repository squash-merges, so that WIP message does not
reach `main`; this body is the record.

## In-flight overlap, declared

Two open pull requests touch files this one touches. Both unions are
trivial and neither overlaps a line here:

- **objectui#9540** (`ObjectGallerySchema.filter`) touches
`packages/types/src/objectql.ts` and
`packages/types/src/zod/objectql.zod.ts` — different keys, different
members. Whichever lands first, the other rebuilds in the queue.
- **objectui#8941** (lucide bump) touches
`packages/plugin-grid/package.json`, `packages/plugin-form/package.json`
and `packages/types/src/objectql.ts` — manifests and an unrelated
member.

⚠️ Cross-card interaction accepted by the dispatching seat:
**objectui#8345** derives a strict authoring twin from these mirrors, so
its measured refusal figures move when this lands. The files are
disjoint (it was re-scoped onto `strict-authoring-face.ts`) and the
merge queue arbitrates.

## Acceptance notes

- `packages/plugin-form/src/MasterDetailForm.tsx` still declares
`recordId` as `string or number`. ⛔ Left alone deliberately: it is not
one of the five faces the ruling names, it does not hand that value to
`findOne` (it goes through `String(...)` at its own read point), and it
therefore does not break the build. It is the same *survivor* class as
the three declarations on **objectui#10078** and belongs with them in
one decision rather than being narrowed here on this seat's own
initiative. **noted, not filed** — successor: whoever answers
objectui#10078.
- `DataSourceMutationEvent.id`, `CommentSearchResult.recordId` and
`RecordSubscription.recordId` are on **objectui#10078** and are ⛔ not
touched here.
- No reader-side conversion was added anywhere in this diff. The count
of `String(...)` coercions introduced is **zero**, which is the
measurable form of the ruling's 「the conversion lives in one typed
place」.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QVJUngS9FKfuyQ9NFR2Nbn)_

---------

Co-authored-by: os-steve <os-steve@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…e strings (objectui#10078) (objectstack-ai#10733)

Fixes objectstack-ai#10078

Clause-②: yes

Executes director batch objectstack-ai#195 item 1, letter **A** (objectui#9511,
comment `5749154869`, maintainer 「同意」 2026-09-20) on three more
record-id declarations it did not enumerate (other record ids in
`@object-ui/types` stay `string | number`; see the changeset), under the
PM seat's inheritance decision in claim `5851634158` (SKILL.md 升级与决策
meta-criterion ①: a same-family branch reuses the parent ruling). The
ruling's operative clause: 「A record id is a **string** wherever
metadata names one」, with the conversion living in one typed place at
the host's own adapter boundary. PR objectui#10141 (`87af769`) is the
precedent for the changeset, the pin and the ledger handling.

## 维护者速读

**改了什么。** 三个还允许数字的记录 id
收窄为字符串:`CommentSearchResult.recordId`、`RecordSubscription.recordId`、`DataSourceMutationEvent.id`。它们与
objectui#9511 已收窄的 `CommentEntry.recordId` 是同一个 id,却因为没被裁决点名而留着旧写法。

**为什么。** 裁决原话是「元数据里出现的记录 id
一律是字符串」,并以「同一原则」点名了两个评论形状;这三个是运行时形状,由席位的继承决定纳入(认领 5851634158)。其余仍为
string | number 的记录 id 不在本 PR 内。

**运行时影响。** 两个适配器(`ValueDataSource`、`ObjectStackAdapter`)发出的 `onMutation`
事件,`id` 现在一律是字符串 —— 转换发生在适配器自己的边界,也就是裁决要求的「一个有类型的地方」。仓内两处读 `event.id`
的订阅者本来就先 `String(...)`,行为不变。

**风险与回滚。** 三个都是纯 TypeScript 的运行时/API 形状,没有 zod
镜像、不是作者手写的元数据,所以没有「解析时拒绝」这扇门,编译器报错就是送达渠道。外部代码若用数字构造这些值,升级后编译报错,改成字符串即可。回滚
= revert 本 PR,无数据迁移、无生成物。

**你要做的。** 无额外动作;`Clause-②` 已申报 `yes`,draft 由派发席接手。

## What changed

| file | change |
| --- | --- |
| `packages/types/src/views.ts` | `CommentSearchResult.recordId` and
`RecordSubscription.recordId`: `string \| number` to `string` |
| `packages/types/src/data.ts` | `DataSourceMutationEvent.id`: `string
\| number` to `string`, docblock names the rule and where the conversion
lives |
| `packages/core/src/adapters/ValueDataSource.ts` | `update` / `delete`
emit `id: String(id)` |
| `packages/data-objectstack/src/index.ts` | `update` / `delete` emit
`id: String(id)`, the same string already sent on the wire |
| `content/docs/plugins/plugin-detail.mdx` | the documented
`RecordSubscription` shape reads `recordId: string` |
| `content/docs/guide/data-source.md` | the canonical-interface block's
`findOne` / `update` / `delete` id reads `string`, matching `data.ts`
(patch round 1) |
|
`packages/types/src/__tests__/record-id-string-survivors-10078.test.ts`
| new pin, both halves (see below) |
| `.changeset/10078-record-id-string-survivors.md` | `minor` for types /
core / data-objectstack, BREAKING banner, ADR-0087 disposition line |

**File-surface addition, declared.** The claim named the two type files,
their mirrors, the compile-failing consumers, one pin and one changeset.
`content/docs/plugins/plugin-detail.mdx` was added in this stroke: it
prints the `RecordSubscription` shape verbatim, so the narrowing made it
false (AGENTS.md Commandment objectstack-ai#2). The two emitter files are the
"consumer sites the narrowing makes fail to compile" the claim
anticipated; they are the producers, which is where H4 put the
conversion. `content/docs/guide/data-source.md` was added in patch round
1, granted by the PM addendum `5852035357`: its canonical-interface
block printed `id: string | number`, which is false against `data.ts` on
`main`.

## Premise P — measured on `5c61e5241` before any edit

P holds for all three keys, so all three ship together.

- **`CommentSearchResult.recordId`.** Same sense as
`CommentEntry.recordId`: its one producer, `useCommentSearch` in
`@object-ui/collaboration`, copies it from `CommentEntry.recordId`
(already `string` since objectui#9511) with an empty-string default, so
it has only ever produced a string. Readers: none in the tree beyond the
type (`useCommentSearch` is exported, and nothing in the tree reads
`results[i].recordId`).
- **`RecordSubscription.recordId`.** The record the bell subscribes to.
No producer in the tree; the one value built is a test fixture spelled
`'r-1'`. Readers: `SubscriptionToggle`, `RecordChatterPanel` and
`RecordActivityTimeline` take the object and read `subscribed` only. No
reader touches `recordId`.
- **`DataSourceMutationEvent.id`.** The id the `update` / `delete` doors
already take as `string`. Producers: `ValueDataSource` and
`ObjectStackAdapter`, whose own `update` / `delete` still declare the
wider `string | number` parameter (allowed, because TypeScript compares
method parameters bivariantly, as the `DataSource` docblock says) and
forwarded it unchanged. **No flow in the tree hands them a number**:
every caller that goes through the `DataSource` interface passes a
`string`, and every test fixture uses string ids. The paths that COULD
carry one are `ValueDataSource.bulk`, which reads an inline item's own
key, and direct class-typed calls. That is H4's case, and the conversion
now sits in the emitter. Readers: `ObjectView`'s `onMutation` handler
and `useMutationInvalidationBridge` read `event.id` and already pass it
through `String(...)`; `ObjectCalendar`, `ObjectKanban`, `ListView` and
`useDataRefresh` read `resource` only. Neither of the two readers does
arithmetic, a numeric comparison, a `typeof === 'number'` branch, or a
numeric-keyed lookup.

## Mechanism hypotheses

- **H1, confirmed.** All three read `string | number` at the cited
places on `5c61e5241`. The card's older address for
`DataSourceMutationEvent` had drifted, as H1 said.
- **H2, confirmed.** No zod mirror exists for any of the three.
`packages/types/src/zod` names none of them, no `z.union` of string and
number there sits at an id, and `zod-mirror-parity.test.ts` holds no row
for them. ⇒ The change is TypeScript-only, and ruling A's 「refused at
parse」 has no door here; the compiler is the door. There are 0
`KnownDrift` or mirror-parity ledger rows to shrink.
- **H3, re-run by type reachability.** Every package that types a value
as one of these interfaces, or implements or subscribes to `onMutation`
through the `DataSource` type: `@object-ui/collaboration`,
`@object-ui/plugin-detail`, `@object-ui/core`,
`@object-ui/data-objectstack`, **plus** `@object-ui/react`
(`useDataRefresh`, and the bridge's own structural type) and
`@object-ui/plugin-view` (two test doubles typed on
`DataSourceMutationEvent`). `plugin-list`, `plugin-kanban` and
`plugin-calendar` type the handler's event as `any`, so the type does
not reach them.
- **H4, confirmed.** Both emitters had to convert, or they would not
compile (see the reverse verification). The batch path in
`ObjectStackAdapter` emits either `op.id` (already `string`) or the
server echo's id (typed `any`); left as is, see Acceptance notes.
- **H5.** Census only; it is carried in the dev report as one family
entry, not changed here.

## Pin — `record-id-string-survivors-10078.test.ts`

- **Compile half**, run by `tsc -p packages/types/tsconfig.test.json`
(chained from `type-check`). There is an Equal row per member (the
optional `id` goes through NonNullable first), a separate is-not-`any`
row per member, a `@ts-expect-error` numeric literal at each of the
three, and the three string spellings beside them as controls.
- **Runtime half.** A source-text census of the three declarations.
Controls: the matcher reads a synthetic wide spelling back, it does not
answer for a member of a later interface, it returns null for an absent
interface, and it reads `CommentEntry.recordId` (already narrowed) as
`string`, which is the lit control.

## Patch round 1 — HEAD `cbe0bcee1`

This round answers contract review `5852032361` (FAIL at `2a74f2c26`)
and the PM note `5852035357`:
- The changeset headline now says these are three more record ids that
the objectui#9511 enumeration left out, and it names some of the ones
still wide (「among them」).
- The attribution is corrected in the changeset, the pin header and the
pin's failure message.
- In `content/docs/guide/data-source.md`, the canonical-interface
block's three id widths (`findOne` / `update` / `delete`) are aligned to
`data.ts`.

`origin/main` `c3a26ccda` was merged in by a merge commit.

Readings at `cbe0bcee1`:
- `pnpm --filter @object-ui/types type-check` plus `vitest run
packages/types/`: exit 0, 5290 tests.
- Changeset presence / no-major / fixed / overwrite / claims,
`check:new-line-citations`, `check:control-bytes`, `check:spec-symbols`,
the `check:doc-*` gates, `check:doc-snippets` (676 of 676 blocks) and
`check-governed-queue-guard --test` (NOT GOVERNED): exit 0 each.
- A widened `DataSourceMutationEvent.id` reddens the pin (1 failed | 6
passed). It was restored, and `git diff HEAD` is empty.

## Verification — HEAD `2a74f2c26` (round 0)

Exit codes are captured before any pipe.

| command | reading |
| --- | --- |
| `pnpm --filter @object-ui/types type-check` | exit 0 (at HEAD) |
| `pnpm --filter @object-ui/core type-check` | exit 0 (at HEAD) |
| `pnpm --filter @object-ui/data-objectstack type-check` | exit 0 (at
HEAD) |
| `pnpm exec vitest run packages/types/ packages/core/
packages/data-objectstack/ packages/collaboration/ packages/react/` |
exit 0, 588 files, 11139 tests passed (at HEAD) |
| `pnpm --filter @object-ui/collaboration type-check` | exit 0 (at
`a1da85b60`) |
| `pnpm --filter @object-ui/plugin-detail type-check` | exit 0 (at
`a1da85b60`) |
| `pnpm --filter @object-ui/react type-check` | exit 0 (at `a1da85b60`)
|
| `pnpm --filter @object-ui/plugin-view type-check` | exit 0 (at
`a1da85b60`) |
| `pnpm exec vitest run packages/plugin-detail/` | exit 0, 214 passed
and 1 skipped files, 2102 passed and 8 skipped tests (at `a1da85b60`) |
| `pnpm exec vitest run packages/plugin-view/` | exit 0, 51 files, 485
tests passed (at `a1da85b60`) |
| `node scripts/check-changeset-presence.mjs` | exit 0 |
| `node scripts/check-changeset-no-major.mjs` /
`check-changeset-fixed.mjs` / `check-changeset-overwrite.mjs` | exit 0 /
0 / 0 |
| `node scripts/check-changeset-claims.mjs` | exit 0, report-only; 5
pending changesets name `views.ts` / `data.ts`, all read, none falsified
|
| `pnpm check:pending-changeset-literals` | exit 0 |
| `pnpm check:new-line-citations` | exit 0, `0 new citation(s)` |
| `pnpm check:control-bytes` | exit 0 |
| `pnpm check:spec-symbols` | exit 0 |
| `pnpm check:test-path-roots` | exit 0 |
| `pnpm type-check:coverage` | exit 0 |
| `pnpm check:doc-types` / `check:doc-fences` /
`check:doc-example-readers` | exit 0 / 0 / 0 |
| `node scripts/check-governed-queue-guard.mjs --test` (the 7 paths) |
exit 0, NOT GOVERNED |
| ESLint `--no-inline-config` on the 5 touched `.ts` files | exit 1, and
every finding predates this change: errors and warnings per file are
identical to the base blobs (data-objectstack 4 errors and 126 warnings
on both sides, all 4 `no-console` far from the edit). The new pin has 0
errors and 3 `no-explicit-any` warnings, the same pattern as the
objectui#9511 pin. |

The only commit after `a1da85b60` adds the changeset `.md`, which no
compiler or suite in the rows marked `a1da85b60` reads.

Consumer readings, with direction: the dependency closure was built
first (`pnpm --filter '@object-ui/plugin-detail^...' build`, then
`mobile`, `plugin-form`, `plugin-grid` and `plugin-detail` for
plugin-view). The dist was confirmed to carry `recordId: string` and
`id?: string`. Every downstream consumer of `@object-ui/types` named in
H3 is green on type-check and vitest; none needed a change.

## Reverse verification — run once, not kept

Each leg ran through `ablation-replace.mjs`, with its anchor hitting
exactly once, the blob change proven, and the restore proven by blob
equal to HEAD and an empty `git diff HEAD`.

- **A. Widen `RecordSubscription.recordId` back.** `tsc -p
tsconfig.test.json` exit 2, with TS2344 on the Equal row and TS2578 on
the numeric `@ts-expect-error` row. The pin under vitest showed 1 failed
and 6 passed, the failing row naming `RecordSubscription.recordId`.
Direction: red, as predicted.
- **B. Drop `String(...)` from `ValueDataSource.delete`'s emit.** Core
`tsc --noEmit` exit 2, TS2322 (`string | number` not assignable to
`string | undefined`).
- **C. The same in `ObjectStackAdapter.delete`.** data-objectstack `tsc
--noEmit` exit 2, TS2322.

## Acceptance notes

- **The two readers' `String(event.id)` is now an identity for typed
producers.** Both were left in place: `useMutationInvalidationBridge`
takes `dataSource: unknown` and declares its own structural event type,
so a plain-JS adapter is not checked by the compiler. Its test feeds
`id: 42` and asserts `'42'`, which is tolerance, not dependence.
Removing either conversion is a separate reader-side decision, and it
moves a package this card does not own.
- **The adapters' own `update` / `delete` parameters stay `string |
number`.** The `DataSource` docblock records that the rule binds callers
and asks implementors to honour it. Narrowing the two public adapter
classes would be a wider BREAKING surface than this card.
- **`ObjectStackAdapter`'s batch emit takes the server echo's id, typed
`any`.** The ObjectStack server's record id is `z.string()` by spec, so
no conversion was added there; a reader-side coercion of our own
server's output is the option ruling A refused.
- **`SubscriptionToggle`'s docblock still says 「Aligned with
@objectstack/spec RecordSubscriptionSchema」.** That schema left with the
16.0.0 feed removal, as the `RecordSubscription` docblock already says.
This is stale prose, noted and not changed.
- **Round 0: NOT MEASURED** (both were measured in patch round 1: exit
0, 676 of 676 blocks judged) **: `pnpm check:doc-snippets` /
`check:doc-examples`.** Both reported PRECONDITION NOT MET (exit 2): the
scoped build of the packages the documents import was not run. The block
this change touches is fenced `plaintext`, which is outside that gate's
`ts` / `tsx` population.
- **NOT RUN: the Spec Main Shape Gate.** None of the three touched types
is derived from `@objectstack/spec`.
- **NOT RUN: repo-wide `pnpm lint`.** CI owns it. The narrowing is
stated in the ESLint row above: the population is the root
`eslint.config.js`, which has no type-aware parser options, and no
custom rule in `eslint-rules/` reads another file, so this diff cannot
move a verdict on an untouched file.

Session: `https://claude.ai/code/session_014fWVhLzhxR8qrFsJ5o8TYW`

---
_Generated by [Claude
Code](https://claude.ai/code/session_014fWVhLzhxR8qrFsJ5o8TYW)_

---------

Co-authored-by: Claude <noreply@anthropic.com>

This branch had an error being deployed

1 failed and 1 active deployments
Preview – objectui-site — 137c7cf2 Deployed Jan 25, 2026 by vercel[bot]
Preview – objectui-docs — 137c7cf2 Deployed Jan 25, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants