Repository navigation
docs(skills): lookupAutofill copies a currency amount only between fields in the same currency - #37044
Conversation
… currency The objectstack-data field-types rule states the cross-currency rule the platform ships: a declared lookupAutofill pair and the grid's same-named autofill copy move a currency amount only between fields in the same currency; otherwise the target is left as it was, the form says why, and nothing is converted. Paid for in the same file by trimming restated type-name cells. Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Contract review brief — PR #37044 @
|
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Contract reviewServed-tier: Inputs: card #36349 (body and all five comments: triage 7076106190, unlock 7107462804, claim 7138250698, dev reports 7138910104 and 7139209343; the card holds no ruling and no earlier contract record), PR #37044 (body, three-file list, net diff), and the check-runs on the head. Read to judge, not reviewed, on ① Derived judgments
② Semver level
③ Boundary flagsDev flags, from reports 7138910104 and 7139209343:
SQL push-down: the diff holds no code, so no id materialisation and no in-app join. ④ Design judgmentNo must-fix, no should-fix.
Tried to break it: two amounts that both declare no currency are "in the same currency" under the sentence and copy in the code (
No cell loses a hint. No eval case reads these rows beyond case 10, covered under ③.
The security line. No changed line teaches permission, sharing, credential, token or authentication behaviour. Two near misses were checked: the first hunk shows the Nits, left as accepted deviations (the file has one token of headroom, and neither moves the contract):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Contract reviewServed-tier: This is a DELTA record over contract review 7139449788 (PASS at ① Derived judgments
② Semver levelUnchanged. The changeset ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Landing · head
State: L1 ACCEPT 7140195538 on this head; every check-run green or expected skip. Ready and auto-merge in this stroke. On MERGED, |
…tion keys (objectstack-ai#37072) repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Fixes objectstack-ai#36401 Fixes objectstack-ai#36575 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;读「多语言」和「数据建模」技能的 AI 助手现在知道,流程里每一步的名称、以及记录页上自定义的关联列表标签页标题,各自该写在哪个翻译位置。 - 为什么做:这两个翻译位置已经随平台发布,技能文字却没跟上,是「流程步骤名可翻译」和「关联列表标题可翻译」两项改动各自欠下的技能说明,这里一次补齐。 - 出错会怎样:只是技能里的几句说明和一条测评用例,不影响任何运行行为;写错的话 AI 助手会把翻译写到不生效的位置,可以直接撤回这一个合并。 - 要你做什么:批准合并。只改技能文字和一道评测题;因为一个 PR 同时关两张卡,工具无法判断走哪张卡的低风险通道,所以按需要人工批准处理。契约审核 PASS:记录 7141681211,Head-sha `7523971c565c850e5183385030f0007e4ff08fd0`。 ## What changes One commit per card, then one merge of `main` and one fix commit after the contract review. **`76538fe36f`, the flow step-name key (objectstack-ai#36401, the follow-up owed by the flows `nodes` group).** `skills/objectstack-i18n/SKILL.md`, the paragraph on keys that sit deeper than their group's `label`, now names a fourth key: > any other step's name at `flows.{flow}.nodes.{node_id}.label` (a screen is named by its heading, `flows.{flow}.screens.{node_id}.title`, and takes a `nodes` key only beside a `title` of its own; `os i18n check` asks for a flow's top-level steps, and for one of `FLOW_TECHNICAL_NODE_TYPES` — `script`, `http`, `connector_action`, `assignment`, `boundary_event`, the four `*_record` types — only where a decision's branch leads to it) "Three keys" and "all three keys included" become four. This is what the readers do: the walk in `packages/lint/src/i18n-walk.ts` asks `nodes.NODE_ID.label` for each top-level node, skips an `approval` (keyed `approvals.NODE_ID.label`) and a screen whose label `screens.NODE_ID.title` already covers, skips `isFlowTechnicalNodeType` nodes, and adds back a technical step a drawn decision's branch names (`decisionBranchTechnicalTargets`); `os i18n extract` reads the same walk. The nine types are the literal list of `FLOW_TECHNICAL_NODE_TYPES` in `packages/spec/src/automation/flow-altitude.ts`, whose source file does not ship in the package, so the skill lists them. **`cd690662c7`, the related-list title key (objectstack-ai#36575, the follow-up owed by the related-list title translation).** - `skills/objectstack-i18n/SKILL.md`, the object translation group table, gains the `_relatedLists.{list}` row beside `_tabs`: the `label` of an object-form `relatedLists` entry on the parent object, by the entry's literal `list` (`event.related_to` is one key); an entry with no `label` has no key and keeps the child field's `relatedListTitle`, else the child's plural label; "Spelled `relatedLists`, the group is refused, naming this one" (the alias table of `ObjectTranslationDataSchema` maps the unprefixed spelling to `_relatedLists` as a refusal, never an accepted second spelling). - `skills/objectstack-data/rules/relationships.md`, the `relatedLists` entry: "its `label` translates at `objects.{parent}._relatedLists.{list}.label` (none: nothing to translate)". - `skills/objectstack-i18n/evals/bundles-locales-coverage.json`: one case (id 16) covering both keys. Precedence is stated as the contract has it (`RelatedListEntryObjectSchema.label` in `packages/spec/src/data/object.zod.ts`: the entry `label`, then the child FK's `relatedListTitle`, then the child's plural label). **`40f4e27ee0`, merge of `origin/main` `159113f4fe`** (plain merge, no conflict; brings objectstack-ai#37044's edit to the same file). **`7523971c56`, the contract review's S1 and N1** (record 7141134189), `relationships.md` only: - S1: the `'primary'` bullet ends "its tab stays unless `relatedLists` omits it" again (the first round had cut the qualifier, leaving a sentence that was false for a declared list that omits the child). - N1: "override the derived title / columns (columns: the child's `highlightFields`); an entry's `label` / `columns` win." **Paid in the same files; no ceiling of the skills token ratchet moves.** Restatement cut from `skills/objectstack-i18n/SKILL.md`: three sentences repeating the heading above them; the "Use both gates" paragraph keeps its one new fact; the `relatedListTitle` cell says "likewise"; "Requires `--out`" loses its restating clause; the per-namespace row loses "assembled by your own imports" (said above the table for every layout); "Both shipped adapters" loses the parenthetical the Service Contract section spells in full; the `translation` item section loses its heading restated as a sentence; the Register step folds a repeat of the authoring section. Cut from `skills/objectstack-data/rules/relationships.md`, inside the related-list section: "absent, nothing changes" (the section opens by saying every child relationship shows by default, and objectstack-ui Record Page says it too); the section's opening sentence loses "You usually don't declare the related list on the parent's record detail page" (it restated "by default"); "a self-referential FK (a hierarchy)" loses the parenthetical. The "Catalog auto-fill" bullet and the Delete Behaviors section are untouched. Published-skill size against `main` `159113f4fe` (before) and `7523971c56` (after): | | lines | bytes | tokens (ceiling) | |:--|:--|:--|:--| | `skills/objectstack-i18n/SKILL.md` | 520 / 515 | 25215 / 25193 | 6299 / 6294 (6333) | | `skills/objectstack-data/rules/relationships.md` | 401 / 402 | 16805 / 16800 | 4202 / 4200 (4203) | | `skills/objectstack-i18n/evals/bundles-locales-coverage.json` | 155 / 165 | 14511 / 15724 | 3628 / 3931 (eval fixture, not ratcheted) | The two authored files are 27 bytes smaller together; the eval case is the tree's only growth. ## Tests Text only: no package source, test or behaviour changes, so there is no ablation. The pins the text was written from were read, not edited: `packages/cli/test/i18n-flow-node-coverage.test.ts` and `packages/lint/src/i18n-related-lists-label-36528.test.ts`. ## Acceptance notes - The body opens with the seat signature line; the closing lines follow it. - `check:dual-build-cjs-loads` and `check:lean-entry-closure` were NOT MEASURED locally (exit 3, prerequisite: a whole-workspace build); the diff touches no package and CI runs both. - The flows `nodes` key is accepted by `os validate` at any depth and for a titled screen; the skill teaches what `os i18n check` asks for and the one screen rule an author can get wrong, not the full acceptance set. - Contract review nit N2 (the nine-type list is a hand copy of `FLOW_TECHNICAL_NODE_TYPES` with no gate tying them) is accepted as is. ## Verification Read first, by risk: the "Four keys sit deeper" paragraph and the `_relatedLists.{list}` row of `skills/objectstack-i18n/SKILL.md`; the three related-list bullets of `skills/objectstack-data/rules/relationships.md`. Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints `60 authored bundle file(s) within their ceilings`, with `skills/objectstack-data/rules/relationships.md is 4200 tokens (ceiling 4203; headroom 3)`. `overlap-check` at `7523971c56`: `VERDICT clean exit 0` against `origin/main`, objectstack-ai#36158 and objectstack-ai#35129. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Fixes #36349
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
skills/objectstack-data/rules/field-types.md, thelookupAutofillparagraph. It ended at the sentence about the grid's same-namedautofillcopy and stated no currency condition. Two sentences are appended there, covering the declared pair and the same-named copy together:This is what the merged code does (
crossCurrencyRefusalandjudgePickWritesinui/packages/fields/src/widgets/lookupAutofill.ts, used by the record form and by the grid'splanLookupAutofill; the spec describe ofFieldSchema.lookupAutofillstates the same rule for both copies).skills/objectstack-data/rules/relationships.md, the "Catalog auto-fill" bullet (the grid's same-named copy), now ends "picking a record fills those cells (acurrencyamount only in the same currency: field-types.md →lookupAutofill)": a pointer to the sentence above instead of a second statement of the rule. It fits that file's headroom (4180 to 4202 of 4203 tokens); nothing was deleted there.field-types.mdsat at its token ceiling (3541 of 3541), so its sentences are paid for in the same file, by deletion and with no ceiling moved:unit_pricefrom a product'slist_price" (the heading already spells the pair shape), and "(single-valuelookup/master_detail)" becomes "(single-value only)" (the table rows directly above name the two types);date,time,datetime,number,file,markdown,html,richtext,boolean,signature,location,avatar,tags,sliderkeep a shorter cell with the same meaning (for example "Date only (no time component)" is now "Date only").Published-skill size, measured at
b01d8f97e9(before) anda141c91fb2(after):rules/field-types.mdlines 267 / 270;rules/field-types.mdtokens 3541 / 3540 (ceiling 3541);rules/relationships.mdtokens 4180 / 4202 (ceiling 4203); wholeskills/tree lines 22996 / 23000; whole bundle tokens 294236 / 294257.A
patchchangeset for@objectstack/skillsis included: the skill text ships in that package.Read first: the appended sentence (the risk is a promise the runtime does not keep); then the trimmed table cells (the risk is a lost hint).
Tests
No code or test changes. No case under
skills/objectstack-data/evals/mentionslookupAutofillor the gridautofillcopy, so no eval asserts the old promise and none was edited. The evals are model-graded fixtures and were not run live here: NOT MEASURED, reason: no local runner.Local gates at a141c91
The gate list was derived with
node scripts/pm/dispatch-gates.mjs --commands(48 families). 43 ran and exited 0, among them:node scripts/check-skills-token-ratchet.mjs: exit 0, "60 authored bundle file(s) within their ceilings"; the rows readfield-types.md 3540 / 3541 (-1)andrelationships.md 4202 / 4203 (-1)pnpm --filter @objectstack/spec run check:skill-served-sections,pnpm check:skill-links,pnpm check:skill-identifier-liveness,pnpm check:skill-compatibility,pnpm check:skill-frame-sync,pnpm check:doc-authoring,pnpm check:nul-bytes,pnpm check:pm-skill-id-lint,pnpm check:role-word: exit 0node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-adr-0087-registration.mjs --base origin/main,pnpm check:published-files: exit 0Five exited 3 (PREREQUISITE NOT MET, they read built output and nothing was built for a text-only diff) and are NOT MEASURED locally, left to CI:
check:doc-formula-expressions,check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content.node scripts/pm/overlap-check.mjsat a141c91: "VERDICT clean exit 0" againstorigin/mainand against the other open pull that edits both files.Acceptance notes
overwrite: truepair. The sentence says "left as it was" so that it promises only what the runtime does.planLookupAutofill'swithheldlist, drawn byGridFieldWidget).Verification
node scripts/check-skills-token-ratchet.mjsprintsfield-types.md 3540 / 3541 (-1)andrelationships.md 4202 / 4203 (-1)and ends with a line starting with a check mark.Generated by Claude Code