Skip to content

Upgrade duly to @objectstack 18.6.0 - #191

Merged
os-warren merged 2 commits into
mainfrom
claude/project-thread-5rmle1
Nov 22, 2026
Merged

os-warren merged 2 commits into
mainfrom
claude/project-thread-5rmle1

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Fixes #190

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:16 个 @objectstack 包从 ^18.3.0 升到 ^18.6.0,重建锁文件;任务、职责、工作记录三个对象把平台自动加的 owner_id 列声明为隐藏,并改名为“记录所有者”;测试夹具补上组织成员身份,并按 18.4/18.5 的新校验调整三处测试的写法;18.6 新增可翻译的 mapping 标签,i18n 测试的平台集合随之更新并加了一条守卫。
  • 为什么改:维护者要求升级到 18.5;18.5 的两个平台回归(dev/demo 下定时派发失败、中文浏览器显示英文界面)在 18.6 已修好并实测通过,维护者裁定等上游修好再合,故改升到 18.6。升级后四道关卡有三类失败:18.5 新增“同一对象两个字段同名”的作者期报错(Duly 的“负责人”和平台的 owner_id 都叫 Owner/负责人);18.4 起没有组织成员身份的人读写不到组织数据;18.4/18.5 起 user 字段只能填调用者读得到的、未被封禁的用户。
  • 风险与回滚:owner_id 只改了标签、说明和可见性,类型、引用、新建时的自动赋值和 own 读取范围都沿用平台定义;演示数据的 13 个账号都有成员身份(实测)。回滚就是还原本 PR。
  • 先看:src/objects/task.object.ts(owner_id 声明,同样的改动在 duty、log-entry)、test/support/users.ts(夹具成员身份)、test/assignment-fanout.test.ts(封禁改为保存派活之后再生效)。
  • 两分钟验证:pnpm install && pnpm validate && pnpm test,预期 validate 通过(hierarchy-security 既有警告外加 28 条数据集词表提示),47 个测试文件 1329 个用例全部通过。
  • 需要你做的:无,席位落地

What changes

  • Dependencies. All 16 @objectstack/* ranges in package.json move from ^18.3.0 to ^18.6.0; pnpm-lock.yaml is regenerated and resolves every @objectstack/* package at 18.6.0 (commit a13ebae went to 18.5.0, a4f9e58 to 18.6.0).
  • field-label-duplicate (18.5, objectstack 3cbf1f2). duly_task, duly_duty and duly_log_entry showed Duly's owner and the platform's injected owner_id under one label ("Owner", and 负责人 for a zh-CN reader). On 18.3 the task record page drew both, naming two different people (Duly's owner in the header, the creating admin under History and in the footer). Each object now declares owner_id from the platform's own exported OWNER_FIELD_DEF, with hidden: true, label "Record owner" (记录所有者), a Duly help text, and a group so the field-grouping invariant holds. Type, reference, the insert stamp and own read scope stay the platform's; test/task-provenance.test.ts still reads owner_id stamped to the writer.
  • Membership required for data access (18.4, objectstack e542831, ADR-0093 D8.1). test/support/users.ts ensureUsers now also makes each fixture user a member of the default organization, as the auto membership policy does for a real account. Without it a context from buildContextForUser carried an empty accessible_org_ids and every member/manager/admin write in four suites answered 403 PERMISSION_DENIED.
  • User references the caller can read, and banned users (18.4/18.5, objectstack eb96480). test/seed-history.test.ts named Alice by the seed loader's natural key ('seed_user_alice') in a data write, which the platform now answers reference_not_found before the completion rule under test; it reads Alice's id after the seed. test/assignment-fanout.test.ts saved an assignment naming a banned assignee, which the assignment write now refuses (reference_user_banned); the ban now lands after the save, the only order in which a ban can reach the fan-out. The fan-out's own assertions are unchanged.
  • mapping is translatable (18.6). test/i18n-coverage.test.ts pins mapping in the platform's translatable-type set; COLLECTION_HANDLING.mappings in src/translations/authored-text.ts now rests on the collection being empty, held by a new assertion that fails on the first declared mapping until the walk reads its label.

No workaround is changed in this PR: duly_member_open, duly_task_duty_readable, the sys_business_unit read and the dispatch handler are as on main.

Tests

All four gates on head a4f9e58 (the committed tree is the tree measured):

  • pnpm validate: exit 0, Validation passed, 29 warnings (the existing hierarchy-security one and 28 new 18.6 dataset-member-no-vocabulary hints).
  • pnpm typecheck: exit 0.
  • pnpm test: exit 0, Test Files 47 passed (47), Tests 1329 passed (1329).
  • pnpm build: exit 0, Artifact: dist/objectstack.json (272.0 KB).

On the bare 18.6 bump from a13ebae: test exit 1 (1 failed, the translatable-types pin), the other three exit 0. Earlier, on the bare 18.5 bump: validate exit 1 (6 field-label-duplicate findings), typecheck exit 0, test exit 1 (Tests 75 failed | 1236 passed | 18 skipped, 6 files), build exit 1 (same 6 findings).

Acceptance notes

Verification

Full browser check (en-US and zh-CN, 18.3 ce6fc4b baseline): project files duly-18.6-browser-check/REPORT.md (18.6, final) and duly-18.5-browser-check/REPORT.md (18.5 round). Verdict tables and re-measures are in the two os-dev-report comments on #190.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbYdNXLejPwk9NRtzyG

Every @objectstack range moves from ^18.3.0 to ^18.5.0 and the lockfile is
regenerated. Three platform changes reached the gates; each is fixed at its
cause:

- field-label-duplicate (18.5, objectstack 3cbf1f2): duly_task, duly_duty and
  duly_log_entry showed Duly's `owner` and the platform's injected `owner_id`
  under one label ("Owner", 负责人). The objects now declare `owner_id` from
  the platform's own OWNER_FIELD_DEF, hidden and labelled "Record owner"
  (记录所有者); type, reference, insert stamp and `own` scope are unchanged.
- A person's data access requires a current organization membership under
  every tenancy posture (18.4, objectstack e542831, ADR-0093 D8.1). The test
  fixtures' users are now members of the default organization, as the auto
  membership policy makes a real user.
- A non-system write may name in a user field only a row the caller can read,
  and a banned user is refused at the write (18.4/18.5, objectstack eb96480).
  seed-history now names Alice by id rather than by the seed loader's natural
  key; the fan-out suites ban an assignee after the assignment is saved, the
  only order in which a ban can now reach the fan-out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbYdNXLejPwk9NRtzyG
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:duly#1 · os-warren · session_01JQwxbYdNXLejPwk9NRtzyG

席位核对

Verdict: ACCEPT (diff) · landing HELD for the maintainer's call · head a13ebae · 2026-11-15T23:47Z

Move all 16 @objectstack ranges to ^18.6.0 and regenerate the lockfile.

18.6 makes a named import mapping's label translatable
(`mappings.NAME.label`). Re-derived against the pinned set: duly declares
no mapping, so no string moves, but the `mappings` skip no longer rests on
"machine names". It now rests on the collection being empty, and the pin
test holds it there until the walk reads mapping labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbYdNXLejPwk9NRtzyG
@os-warren os-warren changed the title Upgrade duly to @objectstack 18.5.0 Upgrade duly to @objectstack 18.6.0 Nov 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:duly#1 · os-warren · session_01JQwxbYdNXLejPwk9NRtzyG

席位核对

Verdict: ACCEPT · round 2 (18.6.0) · head a4f9e58 · 2026-11-22T23:29Z

@os-warren
os-warren marked this pull request as ready for review November 22, 2026 23:30
@os-warren
os-warren merged commit 6125c0b into main Nov 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade duly to @objectstack 18.5.0, with the full browser check and the workaround re-measures

2 participants