Skip to content

feat(ui): preview the home amount a record-mode amount will store, and say so when the rate cannot be read - #31724

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

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-b809vx

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #27196

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 改了什么: 编辑多币种金额(record 模式且声明了 homeAmount)时,输入框下方实时显示保存后会写入的本位币金额,例如「≈ CN¥71,994.24 at 0.1389 on Mar 15, 2026」。汇率取自 sys_exchange_rate 中单据日期当天或之前最近的一条,同一币种和日期只读一次。换算函数直接引用 @objectstack/formula(feat(formula): publish the home-amount conversion arithmetic #31631 从引擎提出来的同一份),所以预览数字与保存后的数字逐位一致。同币种显示「≈ 金额 (home currency)」,没有汇率时提示保存会被拒绝,没有单据日期时提示先填日期。无权读取汇率的成员(403)看到「保存时折算为本位币」,不会看到「没有汇率」,也不会看到估算金额。
  • 为什么改: 卡片 Task 2:录入外币单据时,用户应在保存前看到折算结果,而不是保存后才发现汇率缺失被拒。
  • 风险与回滚: 只影响声明了 homeAmount 的金额字段的编辑态:其他币种字段不读取任何数据、不渲染新行(有对照测试)。新增五个翻译键(widening)。@object-ui/fields 新增依赖 @objectstack/formula(@object-ui/core 早已依赖,依赖图不变);fields 包体积 +3.6 KB(gzip +1.0 KB)。回滚即 revert 本 PR。
  • 先看: ui/packages/fields/src/widgets/homeAmountPreview.tsx(readRateOn 与 useHomeAmountPreview),以及 CurrencyField.tsx 中挂载它的一行。
  • 两分钟验证: cd ui && pnpm exec vitest run packages/fields/src/__tests__/homeAmountPreview-27196.test.tsx,预期 8 例全绿。其中一致性一例逐个比对引擎测试里的 JPY / CNY / KWD 和 71994.24 用例。
  • 需要你做的: 无,席位落地(落地前席位欠一次 Clause-② 声明复审)。

What changes

The ui half of multi-currency M3-2, slice 2 of 2 (Task 2 of the card). Slice 1 was #31638. The arithmetic moved into @objectstack/formula in #31631, which this PR imports. Nothing is copied.

  • ui/packages/fields/src/widgets/homeAmountPreview.tsx (new, internal to the package, not exported).
    • readRateOn(source, currency, date) issues the engine's own rateOn query: find('sys_exchange_rate', { $filter: { currency, effective_date: { $lte: date } }, $orderby: [{ field: 'effective_date', order: 'desc' }], $top: 1, $select: ['rate', 'effective_date'] }). Results are cached per adapter (a WeakMap), then by currency and date. A 403 (classifyLoadError(...) === 'forbidden') is cached as refused. Any other failure is dropped from the cache so the next render asks again.
    • useHomeAmountPreview replays projectHomeAmounts over the live form record: a blank amount or code gives no line; a code or home currency outside ISO 4217 gives no line. The same currency as home converts at 1 with no read, through divideToPlaces. A foreign currency with a blank date asks for the date. documentDateOf(value, localization.timezone) gives the day, and a YYYY-MM-DD value is its own day. No row, or a rate that is not positive, is awaiting-rate. Otherwise the line shows divideToPlaces(amount, rate, CURRENCY_FRACTION_DIGITS[home]).
    • The adapter is the widget's dataSource prop when a host passes one, else the SchemaRendererContext adapter, the LookupField order. The form renderer's strip is unchanged: form.tsx hands registered widgets the context adapter anyway, so forwarding it again would add a line no test could tell apart. This differs from step-1 item 2, which listed the strip as surface.
  • CurrencyField: mounts HomeAmountPreview under the edit box. The read face, and therefore the record page, is unchanged.
  • Five locale keys in all eleven packs (zh-Hant generated with gen:zh-hant) and in FIELD_DEFAULTS: fields.currencyHome.preview, previewSame, awaitingRate, awaitingDate and rateUnreadable. awaitingDate reads "Set the document date to see the home amount" instead of the step-1 "Pick FIELD …", because the amount widget does not hold its sibling field's label (step-0 6727854849).
  • ui/packages/fields/package.json gains "@objectstack/formula": "workspace:^", approved in the claim amendment. pnpm-lock.yaml moves by one importer entry.

Tests

  • ui/packages/fields/src/__tests__/homeAmountPreview-27196.test.tsx (new, 8 cases):
    • Parity with the engine. The engine's own cases go through the ui hook and must equal the number it stores. From home-amount-projection.test.ts: EUR 100 into JPY 15385, CNY 775.8, KWD 33.219. From engine-home-amount-projection.test.ts: USD 10,000 at 0.1389 into CNY 71994.24, and USD 150 on 2026-04-02 into 1000.
    • A foreign amount reads once per currency and date across a re-render and a remount, with exactly the engine's query, and the line follows a typed amount.
    • The same currency converts at 1 with zero reads: 1.005 gives 1.01, as the engine's decimal rounding does.
    • No rate in force shows awaiting-rate, naming the currency and date. A blank date asks for one and reads nothing.
    • A 403 shows "Converted to the home currency when you save" (data-state="refused").
    • A non-refusal failure draws nothing and is asked again.
    • CONTROL: no homeAmount, a blank amount or a blank code previews nothing and reads nothing, and the input stays.
  • ui/packages/plugin-form/src/__tests__/sectionFormHomeAmount-27196.test.tsx, new describe: an ObjectForm in edit mode under a SchemaRendererProvider shows the line under the amount. This proves the adapter reaches the widget through the form.
  • form-field-channel-census-12130 passes unchanged. The census records no new key on the channel, so the approved reader extension was not needed.

Acceptance notes

  • Measured live on pnpm dev:crm with the built Console at /_console. The fixture is a scratch package with a record-mode amount declaring homeAmount, home currency CNY, and USD rates 0.1389 (2026-01-01) and 0.15 (2026-04-01). The engine stored the invoice (USD 10,000, 2026-03-15) as amount_home 71994.24 and amount_rate 0.1389.
    • Admin: the edit form's line reads "≈ CN¥71,994.24 at 0.1389 on Mar 15, 2026", the stored number. One sys_exchange_rate read answered 200 and picked the 2026-01-01 row, not the later one. Typing 20000 moved the line to "≈ CN¥143,988.48 …" with no second read.
    • Member (a permission set grants the invoice object only): the same read answered 403 PERMISSION_DENIED. The adapter threw httpStatus: 403, code: 'PERMISSION_DENIED', which classifyLoadError classes as forbidden. The line reads "Converted to the home currency when you save". Typing did not read again.
    • Scripts, readings and screenshots: /mnt/project-files/issue-27196/live-pr2/ (setup.mjs, measure.mjs, shot.cjs, live-report.json, shots/).
  • Bundle delta: @object-ui/fields dist/index.js grows 349,245 → 352,872 bytes (+3,627), gzip 90,342 → 91,356 (+1,014). This was measured by building with and without the mount. @objectstack/formula is external to the fields build and already in the Console's graph through @object-ui/core.
  • Display width: the previewed NUMBER is rounded with the spec's CURRENCY_FRACTION_DIGITS, the engine's table. It is drawn with formatCurrency, the same call that draws the stored home field, so the preview and the saved field read the same.
  • Document date: the engine passes the timezone only for a datetime document date. The preview passes localization.timezone always. A date value in the form is YYYY-MM-DD, which documentDateOf returns as-is whatever zone it is given, so both agree for both types.

Verification

Head 57993ba65a6d74dadc132374899bf4d3356da389. It merges origin/main (10 commits); none of them touches a file on this PR. The suites and gates below ran on 78863476, the pre-merge head with the same PR files. 19 files, +447 / −2.

  • Gates: node scripts/pm/dispatch-gates.mjs --ran reports 59 derived, 59 run, 0 NOT-MEASURED, 0 UNRUN, and every exit code is 0.
    • check:query-options-erasure timed out at 300 s in the loop. It was re-run alone: exit 0 in 5m22s.
    • check:dual-build-cjs-loads answered exit 3 (unbuilt) until the platform packages were built. It was re-run: exit 0.
  • Also run: turbo run type-check for fields, i18n and plugin-form, 55 tasks, green. eslint on the touched files: 0 errors. check-i18n-en-drift (from ui/): 0. The form-field census: 34/34.
  • Package suites (all exit 0, under the verify lock):
    • @object-ui/i18n + ui/examples/schema-catalog: 144 files, 4241 passed, 13 skipped.
    • @object-ui/fields: 301 files passed, 1 skipped; 4556 tests passed, 7 skipped.
    • @object-ui/plugin-form: 226 files; 2466 passed, 1 skipped.
    • pnpm --dir ui exec vitest run scripts/: 170 files passed, 2 skipped; 5027 tests passed, 2 skipped.
  • Examples census grep (git grep -l PATH -- 'ui/examples/**/test/**' 'ui/e2e/**' for every touched path): only catalog-gallery-render.test.tsx names useFieldTranslation.ts. It is inside the schema-catalog run above, green.
  • Ablations (ablation-replace.mjs; each restored to a blob equal to HEAD with an empty git diff HEAD):
    1. The rate cache removed (if (held) return held;): 1 of 8 red, the once-per-currency-and-date pin.
    2. The 403 branch removed: 1 of 8 red, the refused pin.
    3. The home digits taken as 2 instead of CURRENCY_FRACTION_DIGITS[home]: 1 of 8 red, the engine parity pin (JPY and KWD).
    4. The HomeAmountPreview mount removed from CurrencyField: 7 of 14 red across the two files, the form pin included. The 7 that stay green are PR 1's five home-field pins, the parity case (it calls the hook directly) and the CONTROL.
Gate list (59, exit codes as recorded)
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-console-intercept-disarm.mjs :: exit 0
node scripts/check-console-intercept-disarm.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-osv-exemptions.mjs :: exit 0
node scripts/check-osv-exemptions.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/osv-base-relative.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm --filter @objectstack/spec run check:llms-txt :: exit 0
pnpm check:changeset-fixed :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:manifest-repository-directory :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:override-consistency :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:turbo-task-graph :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:vendor-export-contract-resolve :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm check:workspace-manifest-cycles :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jQyTLkpKcX2UF8X3Ss

@github-actions github-actions Bot added size/m dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 8, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 57993ba65a6d74dadc132374899bf4d3356da389
Local-runs: none

This is the lane seat's own review of record. It is owed by the Clause-②: yes declaration alone (face declaration). No path of the diff is a published schema or a governed path: packages/spec/**, packages/formula/** and the server are untouched.

① Derived judgments

  • @object-ui/i18n is published (no private) and only widens.
    • Five new keys, fields.currencyHome.preview, previewSame, awaitingRate, awaitingDate and rateUnreadable, are in every locale pack: en, zh-Hans, the generated zh-Hant, ja, ko, de, fr, es, pt-BR, ru and ar.
    • Each built leaf is a readonly literal, so the published TranslationKeys widens.
    • No key or export is removed, renamed or reworded; the only en.ts edit is a comment line. Clause-②: yes (widening) is RIGHT.
  • @object-ui/fields is published.
    • homeAmountPreview.tsx is module-internal: CurrencyField imports it, and no index.ts in the diff re-exports it.
    • FIELD_DEFAULTS gains the five English defaults. CurrencyField now names dataSource from its existing props rather than spreading it on, and adds the line. The line renders only for a record-mode amount that declares homeAmount, so every other amount renders as before.
    • The new dependency @objectstack/formula (workspace:^) adds no package to the graph, because @object-ui/core, already a dependency, carries the same specifier. sideEffects: false. The PR states the bundle delta: +3,627 B, +1,014 B gzip.
  • Engine parity, read against origin/main.
  • Metadata-protocol: none is RIGHT. The preview reads currencyConfig.homeAmount, which HomeAmountSchema already declares, and writes nothing.
  • Accept sets: none change.

② Semver level

  • @object-ui/i18n and @object-ui/fields are both patch in .changeset/27196-home-amount-preview.md, and both declaration lines appear on the PR body and the changeset alike. That is RIGHT: a widening ships as patch.

③ Boundary flags

  • A 403 on the rate read is refused and reads "converted when you save". It is never "no rate" and never an amount, because classifyLoadError maps it to forbidden. Any other failure draws nothing and is asked again.
  • The amount is formatted through Number, so the displayed digits are exact up to 15 significant digits. That covers any realistic invoice amount; past that, only the display rounds, never the stored number.
  • open_questions: none.

Implemented-by: claude/project-thread-b809vx
Reviewed-by: session_01QsR2jVEjiYrK7onirxUGyo

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

席位核对 · ACCEPT · 2026-11-09T00:15Z · head 57993ba65a6d74dadc132374899bf4d3356da389

Seat domain:ui#3 reviewed the diff of its own dispatch: PR 2 of #27196 (Task 2, the preview). The claim is 6723943475, with amendments 6724151062 and the PR-2 amendment posted after the step-0 call 6727854849. The card thread is session_01QsR2jQyTLkpKcX2UF8X3Ss, and the report is 6728986126. This was checked against GitHub, not against the report.

  1. Shape: 19 files, +447 / -2, draft on main, Fixes #27196.
    • homeAmountPreview.tsx (module-internal) adds the "≈ home amount" line under a record-mode amount that declares homeAmount, while it is edited.
    • States:
      • converted ("≈ AMOUNT at RATE on DATE");
      • the same currency, converted at 1 with no read;
      • awaiting a document date, with no read;
      • awaiting a rate, naming the currency and the date;
      • refused: a 403 reads "converted when you save", never "no rate".
      • Any other failure draws nothing and is asked again.
    • CurrencyField renders the line. The adapter is the widget's dataSource, falling back to the SchemaRendererContext one, so form.tsx is untouched.
    • Locale keys: five fields.currencyHome.* keys are in every pack and in FIELD_DEFAULTS; zh-Hant is generated.
    • Dependency: @object-ui/fields gains @objectstack/formula, which @object-ui/core already carries. Bundle +3,627 B (+1,014 B gzip).
  2. Premise: on origin/main an edited amount said nothing about its home amount until saved. formula: export the home-amount conversion arithmetic (scaled-decimal divide, rounding, document date) so the ui preview reuses the engine rule (blocks #27196 PR 2) #31609 (PR feat(formula): publish the home-amount conversion arithmetic #31631, fe88ecda) made the engine's arithmetic importable.
  3. Gates / check-runs: 58 runs on this head: 48 success, 10 skipped, 0 red. All 16 Test UI shards and the aggregate pass. mergeable_state clean.
    • Dev: 59/59 derived gates exit 0. Body gates are green. The i18n (with schema-catalog), fields, plugin-form and ui/scripts suites pass.
    • Ablations (four) each send their pins red.
    • Examples census: no new read on the form-field channel, so the census file is untouched.
    • Declaration review: PASS on this head (posted before this ACCEPT).
  4. Tests read:
    • Engine parity: the previewed number is the number the engine stores, digit for digit.
    • One read per currency and date, with the engine's query.
    • The same currency converts at 1 with no read.
    • No rate in force gives awaiting-rate; no document date asks for one and reads nothing.
    • A 403 gives refused. A non-refusal failure is asked again.
    • CONTROL: no homeAmount, a blank amount or a blank code previews and reads nothing.
    • Through ObjectForm, the line reads through the host adapter.
    • Live on dev:crm with the built Console (/mnt/project-files/issue-27196/live-pr2/):
      • The engine stored 71994.24 at 0.1389, and the admin's line reads "≈ CN¥71,994.24 at 0.1389 on Mar 15, 2026" from one 200 read. Retyping the amount moves the line with no second read.
      • A member's read answers 403 PERMISSION_DENIED, and the line reads "Converted to the home currency when you save".
  5. Accepted deviations:
    • 449 changed lines against the ~350 estimate.
    • form.tsx is untouched: the context adapter already reaches registered widgets.
    • The awaitingDate wording changed from the claim's draft, as step 0 records.
    • The displayed amount is exact up to 15 significant digits (through Number), the same width as the stored number.
  6. Out of scope / Skills-docs: Metadata-protocol: none; Skills-docs: not owed. The changeset sentences were read against the diff, and each describes behaviour the diff ships. This closes ui: home field read-only with "converted at RATE on DATE"; live preview when a rate exists; Studio editor for homeAmount (multi-currency M3-2, epic #8345; the read-only display is released with M2) #27196 (PR 1 feat(ui): show the rate and date a home amount was converted at, and a Studio homeAmount editor #31638 landed Tasks 1 and 3).
  7. Landing: check-governed-merges --pr 31724: NOT governed, 449 changed lines, so no human approval is owed. Clause-②: yes (widening), with its TIER_DEFAULT review PASS on this head, and no path under packages/spec/src. Serial: no other in-flight PR of this seat touches the locale packs or fields. Landing on the maintainer's standing rule that the pm-dispatch skill reviews and lands fleet PRs (2026-11-03T04:52Z), in this project. Relay pr_ready, then automerge_enable.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 9, 2026 00:16
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 9, 2026 00:16
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 2a32bd4 Nov 9, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-b809vx branch November 9, 2026 00:58
rajeev-kumar-se pushed a commit to rajeev-kumar-se/objectstack that referenced this pull request Nov 10, 2026
… and record-mode currency since 18.3.0 (objectstack-ai#32259)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBNP69gnL1YUb368kmLct4Bn)_

Fixes objectstack-ai#32020

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:给 18.4.0 发布测试台账补上 18.3.0 之后落地的三块能力的测试项:回收站(删除后撤销、恢复、清空、Setup
页面)、多币种记录模式金额(本币预览、Studio 本币字段编辑器、改指向货币字段时的 409 拒绝),以及 Redis
多副本部署的启动拒绝和运行期行为。共新增 16 条,并修正一条发票多币种条目。
- 为什么改:发布前的 `since:v18.4` 测试轮只能测台账里有的东西;这三块能力此前没有任何条目,测试员会漏测。
- 风险与回滚:只改 `docs/qa/platform-checklist/` 下的台账文件,没有产品代码、权限或数据语义变化,可直接
revert。
- 先看:`FOLLOW-UPS.md` 的 §17(范围、哪些条目被阻塞及原因),然后是 `areas/api-backend.json`
末尾两条回收站条目。
- 两分钟验证:`node scripts/check-platform-checklist.mjs`(exit 0);`node
scripts/checklist-select.mjs since:v18.4` 应列出 34 条,其中 10 条来自本 PR(9 条新增、1
条修订),另有 6 条多副本条目因缺少多节点授权门而标为 blocked,加 `--include-blocked` 后为 40 条。
- 需要你做的:无,席位落地。

## Premise

The card's premise command at the base (`43a51b55`, history deepened to
the 18.3.0 subject):

```
$ git -C . log --oneline 83d7e4a..origin/main | wc -l
1159
$ git -C . log --oneline 83d7e4a..origin/main | grep -iE 'replica|recycle|home amount|currency' | wc -l
51
```

Before this PR, the 24 items carrying `since: "v18.4"` were all M1's
(themes 1 and 3), so none covered themes 2, 4 or 5. FOLLOW-UPS §17
accounts for all 51 commits: 23 are covered by an item here, 10 are
docs, ADR, skills or test commits with no surface, 17 are outside the
card's named list, and one (objectstack-ai#31848) is a false match ("concurrency"
contains "currency").

## Theme 4: the recycle bin (4 items, all active)

- `api-backend.recycle-bin-delete-entry-restore` (P1): the delete
answer's `recycleBinEntryId`, the listing (cascade snapshot, deletedBy,
30-day retention, purgeAfter), the restore receipt under the original
ids, the second restore's 404, and a `sys_` delete that keeps no entry.
- `api-backend.recycle-bin-refusals-purge-empty` (P1):
`RESTORE_PARENT_IN_RECYCLE_BIN` (naming the parent's entry, then
restoring once it is restored), `RESTORE_PARENT_PURGED`, purge, empty,
the declared paging and parameter refusals, and the non-manager 403s
(via `search:qa-contributor-bound-member`) and the anonymous 401.
- `records-forms.delete-toast-undo-restore` (P1): the confirm question
without a permanence promise, the toast's Undo restoring through the
bin, the list-row Undo, the bulk toast with no Undo, and a
platform-object delete that still says it cannot be undone.
- `records-forms.setup-recycle-bin-page` (P2): Setup → Recycle bin's
object list, entries table, Restore and Empty with its confirm.
- Not driven live, recorded in knownGaps and FOLLOW-UPS §17b/§17c:
`RESTORE_UNIQUE_VALUE_TAKEN` (no showcase business object declares a
unique field), `RESTORE_PACKAGE_UNINSTALLED` (destructive to the boot),
and the own-entry half of the restore rule (no stock persona holds
`allowRestoreOwnDeleted` without `manageRecycleBin`). All three are
pinned by tests.

## Theme 5: record-mode currency (3 active, 1 planned, 1 revision)

- `records-forms.home-amount-preview-states` (P2): the preview's
converted, home-currency, awaiting-date and awaiting-rate states, and
the unreadable-rate message for a member who may not read
`sys_exchange_rate`.
- `studio-authoring.currency-home-amount-editor` (P2): which fields each
picker offers, the three saved pointers, a record stored through them,
and clearing them.
- `studio-authoring.currency-field-repointed-refusal` (P2): the 409
`DESTRUCTIVE_CHANGE` with the `currency_field_repointed` issue, its
remedies, `?force=true`, and an identical pointer raising nothing.
- Planned: `records-forms.master-detail-child-follows-parent-currency`
(`since: null`). The spec admits the `PARENT_FIELD.CODE_FIELD` path
(objectstack-ai#31956), but at the base the engine reads `currencyField` as a field of
the same row, so a path reads no code. The engine half is objectstack-ai#31911 (open).
FOLLOW-UPS §17a.
- Revision: `records-forms.multi-currency-invoice` rev 2. `since` goes
from `v18` to `v18.4`: the showcase invoice became the multi-currency
example in objectstack-ai#31757, and the hint and preview that `acceptance[5]` reads
landed in objectstack-ai#31638 and objectstack-ai#31724, all after 18.3.0. Its knownGaps[0] no
longer says a child amount cannot take its parent's currency. No clause
changed.

## Theme 2: multi-replica on Redis (8 items, all active, 6 blocked)

- Runnable now (both refuse before any gate or Redis is needed):
- `cli.serve-multi-replica-local-database-refusal` (P1): `os serve`
refuses a SQLite or file database under declared replicas on redis, exit
1, naming a shared Postgres, before anything connects.
- `cli.start-multi-replica-auth-secret-refusal` (P1): `os start` refuses
without `OS_AUTH_SECRET` and writes no `auth-secret` file; a memory
driver is not the declaration.
- `blocked: { by: "fixture" }`, each stating its two-replica fixture:
  - `attachments-storage.multi-replica-local-root-refusal`;
- `platform-core.multi-replica-package-change-refusal` (the seven
`/packages` doors, install-local both ways, and the clone that would
create a customization package);
  - `platform-core.ready-cluster-driver-health`;
  - `platform-core.cluster-membership-heartbeat`;
  - `platform-core.settings-change-reaches-every-replica`;
  - `platform-core.shared-redis-cache-across-replicas`.
- Why they are blocked: the open tree registers no multi-node gate.
`checkMultiNodeAllowed` fails closed with none registered, `os serve`
falls back to the in-process driver, and the split-brain guard refuses
the declared topology, so no declared multi-replica boot on Redis
reaches `kernel:ready` on a stock tree. The open-tree route the CLI pin
uses (an app whose own `@objectstack/service-cluster` calls
`registerMultiNodeGate`, `writeApp` in
`serve-multi-node-gate-declaration.integration.test.ts`) is unproven
with the real redis driver. The first run that proves it should become
an area recipe and lift `blocked` on all six. FOLLOW-UPS §17c.

## What changes

- 16 new items across `api-backend`, `records-forms`,
`studio-authoring`, `cli`, `attachments-storage` and `platform-core`,
each with `source[]` anchors that resolve and a history row citing
objectstack-ai#32020. One revision (`records-forms.multi-currency-invoice` rev 2).
- `coverage.json`: the recycle-bin items are mapped to `crud_endpoints`
(and the refusals item to `permission`); the currency items to `field`,
and the re-point refusal to `object` and `metadata_endpoints`; the
invoice item, never mapped before, to `field`. The six blocked theme-2
items are mapped nowhere: an item no run can drive does not carry a
kind.
- `FOLLOW-UPS.md` §17: scope and angles, the item list, 17a (planned,
carded), 17b (notes for owners), 17c (fixtures worth adding), 17d
(security note).

## Why

The 18.4.0 release run selects `since:v18.4`. Before this PR it held
nothing for the recycle bin, record-mode currency or multi-replica
deployments, which landed after 18.3.0 (epic objectstack-ai#32022, M2).

## Tests

No test code changed. Every clause is read from source at `43a51b55`
(the merge of `origin/main` at `036a9fbf` was re-checked by the gates
below), and each item's `automated.ref` names the pins that hold it
today. No live checklist run was made; that is the QA seat's
`since:v18.4` run on the release candidate.

## Acceptance notes

- **Read from source, not from titles.** Each assertion was read in the
code it cites (routes, refusal sentences, codes, constants). Two first
drafts were corrected against the code before commit: a storage settings
change to the local adapter under declared replicas is not refused at
the settings door but logged and not applied by the subscriber (§17b
records this as an owner note), and `/me/permissions` is served at
`/api/v1/auth/me/permissions`.
- **Blocked, not faked.** The order allows a multi-replica item without
a fixture only as `blocked` with its reason. The six items state the
fixture they need and the premise check (`[cluster] multi-node not
authorized (` absent from both boot logs) that proves it was met.
- **The doc-formula gate's first run exited 3** (nothing measured:
`@objectstack/formula` and `@objectstack/lint` were not built in this
fresh container). After `pnpm exec turbo run build
--filter=@objectstack/formula --filter=@objectstack/lint` it exited 0,
and that is the exit recorded below.
- **Shared files with objectstack-ai#32233** (open): `api-backend.json`,
`platform-core.json` and `records-forms.json`. This PR only appends
items at the end of each items array and revises the last item of
`records-forms.json`. The seat was told before the push; whichever lands
second merges main.
- No changeset: `docs/qa/` only, labelled `skip-changeset`.

## Verification

On head `a4eaf691` (this branch with `origin/main` at `036a9fbf` merged
in):

- `node scripts/check-platform-checklist.mjs` → exit 0 (16 areas, 402
items; coverage 40 kinds mapped, 4 waived; 10/10 recipes referenced, 17
item references resolved; symbol anchors 1397/1407 resolved, the other
10 on the named objectstack-ai#16898 residual).
- `node scripts/checklist-select.mjs since:v18.4 --json` → exit 0, 34
runnable items, 10 of them from this PR (9 new, plus the revised invoice
item): theme 4 × 4, theme 5 × 4 (3 new and the invoice revision), theme
2 × 2. With `--include-blocked`: 40 (the 6 blocked theme-2 items).
- `node scripts/pm/dispatch-gates.mjs --commands` → 16 commands, each
run with its exit recorded: 16 × exit 0 (see the doc-formula note
above). `--ran` on that record: `16 derived famil(ies) accounted for —
16 run, 0 NOT-MEASURED` (exit 0).
- Diff: 8 files, +1335 / -8 (1,343 changed lines, under 3,000).

## Human Minimum

Each item is one rule from
[CONTRIBUTING.md › Human
Minimum](https://github.com/objectstack-ai/objectstack/blob/main/CONTRIBUTING.md#human-minimum),
which links the AGENTS.md text that states it.

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(`packages/**` is untouched.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (No lintable source
changed: JSON and Markdown under `docs/qa/` only.)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (Nothing
publishes; labelled `skip-changeset`.)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [ ] 8. Title, body and comments are in English. (All but the `##
维护者速读` block, which the order asks for in Chinese.)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

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

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant