Skip to content

fix(core,spec): the blank and multi-value match-key import row refusals name fields by label and read in the caller's locale - #37126

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-37025-import-row-refusals-language
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-37025-import-row-refusals-language

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Fixes #37025

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:通过接口导入数据时,某行在所有匹配键组合上都为空、或匹配键选了多值字段而被拒,这两条提示改用用户自己的语言,并用字段名称代替内部字段名;控制台导入向导本身碰不到这两条(向导不发送多组匹配键,也不让选多值字段)。
  • 为什么做:属于「导入体验」这一组工作,是上一次重复匹配键提示本地化的同族收尾,替非英文用户解决导入结果里中英混杂、看到内部字段名的问题。
  • 出错会怎样:只影响这两条提示的文字,哪些行被拒、错误代码和写入结果都不变,可以直接撤回。
  • 要你做的:无。

What changes

Reach (narrower than the card states; the defect stands): the console import wizard cannot trigger either refusal. It sends one flat key set, and it keeps multi-value fields out of its match-key picker. Two kinds of caller do receive them: a REST caller that sends ordered key sets (POST /data/:object/import with matchFields: string[][]) gets the blank-key row, and callers that hand rows to the runner directly (connector and datasource pulls) get the multi-value row. For those callers the rows were English sentences naming API fields. They now name fields by label and read in the caller's locale when the caller carries one, English otherwise. The REST endpoint passes the request locale and the deployment's translator, so the blank-key row reads in the request language and takes a deployment override. The pulls pass no locale and no translator, so the multi-value row reads in English there, and its override is not consulted.

Two of the import runner's English row refusals, the blank-key row and the multi-value-key row, now render through the same mechanism the duplicate-match-key row uses: renderValidationMessage with the caller's locale (context.locale) and the caller's override hook (translate), naming fields by LABEL (the API name only for a field with no label). They are not the last English row refusal: AMBIGUOUS_MATCH (import-runner.ts ~1655) is still English, names matchFields and the object's API name, and is reachable from the wizard. It is carried by #37157.

  • packages/spec/src/system/validation-message.ts: two new rows in BUILTIN_VALIDATION_MESSAGES, in all four locales the table carries (en, zh-CN, ja-JP, es-ES), plus a docblock paragraph beside the import_duplicate_match_key one:
    • import_blank_match_key: a row blank on every ordered key set (BLANK_MATCH_KEY). {{label}} is the key sets by label, a set's fields joined with +, the sets with ; . The English sentence drops the API parameter name matchFields; otherwise it keeps its wording.
    • import_multi_value_match_key: a run whose match key names a field holding a list or a structured value (VALIDATION_ERROR, every row failed, for a caller that reaches the runner without the import door). {{label}} is those fields by label, joined with , . The sentence is phrased so it reads for one field or several.
  • packages/core/src/utils/import-runner.ts: blankMatchKeyMessage and multiValueMatchKeyMessage beside duplicateMatchKeyMessage, sharing one fieldLabel helper; the two failed rows use them. Codes are unchanged (BLANK_MATCH_KEY, VALIDATION_ERROR), the multi-value row's field keeps the API name, and the row shape is unchanged. multiValueMatchKeyRefusal itself is untouched: the import door's 400 INVALID_REQUEST request refusal still uses its message (naming keyedBy, API names and types); only the runner's row sentence moved to the catalog. Its docblock now says so.
  • Wizard side (ui/packages/plugin-grid/src/ImportWizard.tsx): not changed. The wizard renders a row's error as the server sent it, and it cannot produce either refusal (see Acceptance notes).

Keys chosen: import_blank_match_key, import_multi_value_match_key, after import_duplicate_match_key and the other import_* row-report keys.

Tests

  • packages/core/src/utils/import-runner-duplicate-match-key-36980.test.ts (shared harness, new top-level describe): in zh-CN a row blank on every key set reads the zh-CN import_blank_match_key entry naming 邮箱; 电话 + company (a label-less field falls back to its API name), with no email or matchFields, in Han script; in zh-CN a multi-value key fails every row with the zh-CN import_multi_value_match_key entry naming 标签, no tags, field: 'tags' kept; en and no locale read the English entries.
  • Pin flipped: packages/core/src/utils/import-runner-multi-value-match-key.test.ts asserted each failed row's error equals the door's multiValueMatchKeyRefusal(...).message. It now asserts the catalog's English import_multi_value_match_key sentence (the field has no label, so its API name), and that this sentence differs from the door's message, so the pin still fails if the runner falls back to the door text. Row, code, field and count assertions are unchanged.
  • No other test asserted either English sentence (repo-wide grep for has no match key, structured value, single-value fields in test files). packages/rest/src/import-apply-on-match-key-sets.test.ts asserts the BLANK_MATCH_KEY code only and passes unchanged.

Acceptance notes

  • Reach, measured at 254e396: the console import wizard cannot produce either refusal. It sends matchFields as one flat key set (assembleImportRequest), so a blank key there is the skipped BLANK_MATCH_KEY row (no sentence) or a create, never the failed row; and its match-key picker excludes multi-value and structured fields (isMatchKeyField), while a named mapping's upsertKey is filtered to strings by the import door, which also refuses a multi-value key with 400 INVALID_REQUEST first. The blank-key sentence reaches a REST caller that sends ordered key sets (POST /data/:object/import, matchFields: string[][]) in a non-English locale. The multi-value row sentence reaches the runner-direct callers (connector pull, datasource pull), which run without a request locale and so read English, by label.
  • Readers of the two sentences: packages/rest/src/import-prepare.ts (~606, the skipBlankMatchKey with key sets refusal, and ~723, the door's multi-value refusal) are request-level 400 INVALID_REQUEST sentences, not these row refusals, and are unchanged. packages/services/service-automation/src/connector-pull.ts refuseBlankMatchKeys rewrites the runner's SKIPPED BLANK_MATCH_KEY row (which carries no sentence) with its own English sentence; it never sees the failed row's text and is unchanged. Those English request and pull sentences are noted here, not filed: they are API-caller and operator text, not the row report.
  • Docs made true in this PR (fix round 1): content/docs/data-modeling/import-mappings.mdx (~307, hand-written) said a runner-direct caller's rows fail "with that refusal" (the door's). It now says every row fails with that code, and its error is the import_multi_value_match_key catalog sentence, naming fields by label, in the caller's locale when the caller passes one and English otherwise (the connector and datasource pulls pass none, so it reads English there). The same false clause ("the same refusal instead") was in the matchFields .describe() in packages/spec/src/api/export.zod.ts; it is corrected there, and content/docs/references/api/export.mdx is regenerated through check:generated --fix, never hand-edited.

Verification

Two-minute check: pnpm --filter @objectstack/core exec vitest run --maxWorkers=2 src/utils/import-runner-duplicate-match-key-36980.test.ts. Expect 8 passed, including "zh-CN: a row blank on every key set is refused in zh-CN, naming each set by its labels".

Local readings at ea69e29
  • Builds: @objectstack/core... (core and its dependencies, spec included) and @objectstack/rest^..., lock VERDICT command-exit 0 each.
  • Typecheck @objectstack/core and @objectstack/spec, then @objectstack/spec check:generated: VERDICT command-exit 0; "All 14 generated artifacts are up to date".
  • Full @objectstack/core vitest: Test Files 165 passed (165), Tests 3865 passed (3865).
  • @objectstack/spec src/system/ vitest (includes validation-message.test.ts, every locale defines every key): Test Files 78 passed (78), Tests 2779 passed (2779). The rest of the spec suite is left to CI Test Core, since the diff there is two catalog rows and a docblock.
  • @objectstack/rest: import-apply-on-match-key-sets, import-multi-value-match-key, import-upsert-in-file-duplicate-key: Test Files 3 passed, Tests 34 passed.
  • Derived gates (dispatch-gates.mjs --commands, 89 families): 84 exit 0, 5 exit 3 (PREREQUISITE NOT MET, so NOT MEASURED): check-plugin-teardown-shape --self-test (needs an unshallow clone), check:doc-formula-expressions (@objectstack/lint not built), check:dual-build-cjs-loads and check:lean-entry-closure (need a full workspace build), check:type-check-debt (lock queue-timeout). --ran: "89 derived famil(ies) accounted for — 84 run, 5 NOT-MEASURED (5 DERIVED from a recorded exit 3)".
  • Ablation, through scripts/ablation-replace.mjs: the blank-key site restored to the old English template. import-runner-duplicate-match-key-36980: 2 failed / 8 (the zh-CN blank-key case and the en/no-locale case). Restore: blob after restore == HEAD (97306190b06d), git diff HEAD empty.
  • overlap-check --branch=claude/issue-37025-import-row-refusals-language: VERDICT clean exit 0.
Fix round 1 readings at 4d99d24
  • @objectstack/spec build, then check:generated: 1 of 14 stale (check:docs, content/docs/references/**) after the .describe() edit; check:generated --fix regenerated only that one (content/docs/references/api/export.mdx, 2 lines); re-run: "All 14 generated artifacts are up to date".
  • Derived gates for the new paths (dispatch-gates.mjs --commands, 114 families): 106 exit 0, 8 exit 3 (PREREQUISITE NOT MET, NOT MEASURED): check-plugin-teardown-shape --self-test, check:doc-formula-expressions, check:doc-security-posture, check:skill-examples, check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure, check:type-check-debt. --ran: "114 derived famil(ies) accounted for — 106 run, 8 NOT-MEASURED (8 DERIVED from a recorded exit 3)".
  • overlap-check: VERDICT clean exit 0.

L2 owed: this PR edits non-test packages/spec/src/** (two catalog keys in four locales and one docblock paragraph). No Zod shape, export, error code or authorable key changes.

Fix round 2 (merge of origin/main, review S1, S2 and nits)
  • origin/main merged in (a9dcc75). packages/spec moved on main, so spec was rebuilt and check:generated run.
  • S1: the matchFields .describe() (export.zod.ts), the regenerated export.mdx, import-mappings.mdx ~307 and the changeset now say what each caller path gets: the catalog sentence by label, in the caller's locale when it carries one and English otherwise, with a deployment override only where the caller passes a translator. The REST blank-key path gets both; the pulls get neither.
  • S2: the sentence above names AMBIGUOUS_MATCH and its card, Import wizard: the AMBIGUOUS_MATCH row refusal is still an English sentence naming the matchFields parameter and the object API name #37157.
  • N1: all three match-key helpers, including the duplicate-key one from the same family, pass the API names as field, so a deployment override can print {{field}}. No built-in sentence prints them.
  • N2: the duplicateMatchKeyMessage docblock is back above its function; fieldLabel has its own line.
  • N3: no sentence ends in a full stop now, like the sibling import_* entries (en uses an em dash, es-ES a semicolon); zh-CN reads 匹配键每个字段只比较一个值,而列表或结构化值没有单一的值可比较.
  • N4: the zh-CN cases assert the exact sentence in place of the Han-script regex, and a new case pins a deployment override of validation.field.import_blank_match_key, filled with the labels and {{field}}.
  • Readings at b3b32a8: @objectstack/spec build, check:generated 1 of 14 stale (check:docs) after the describe edit, --fix regenerated content/docs/references/api/export.mdx only, re-run "All 14 generated artifacts are up to date". Typecheck core and spec: VERDICT command-exit 0. Full @objectstack/core vitest: Test Files 165 passed (165), Tests 3866 passed (3866). @objectstack/spec src/system/ and src/api/: Test Files 142 passed (142), Tests 4907 passed (4907).
  • Ablations at b3b32a8 through scripts/ablation-replace.mjs, each restored with blob == HEAD (0d7bfebcbb17) and git diff HEAD empty. Blank-key site back to the old English template: 3 failed / 9 in the 36980 harness (the zh-CN case, the en/no-locale case and the override case). Multi-value site back to the door's refusedKey.message: 5 failed / 32 across the 36980 harness and import-runner-multi-value-match-key.test.ts.
  • Derived gates (114 families): 108 exit 0, 6 exit 3 (PREREQUISITE NOT MET, NOT MEASURED): check:doc-formula-expressions, check:doc-security-posture, check:skill-examples, check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure. --ran: "114 derived famil(ies) accounted for — 108 run, 6 NOT-MEASURED (6 DERIVED from a recorded exit 3)". overlap-check: VERDICT clean exit 0.

Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:system tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/core, @objectstack/spec, touching 13 documentable anchor(s).

34 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 95734fef75e6abfe2ab68a5ffa588e9b4a387392.

⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 183 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 95734fef75e6abfe2ab68a5ffa588e9b4a387392 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from d5cd32d68b439d723fa4796753f1581c76705d88 — the merge of head fce607bb2c6f1c56b153f24fe36617126ffa29f7 into base 95734fef75e6abfe2ab68a5ffa588e9b4a387392, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d5cd32d68b439d723fa4796753f1581c76705d88 && git checkout d5cd32d68b439d723fa4796753f1581c76705d88
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 95734fef75e6abfe2ab68a5ffa588e9b4a387392 fce607bb2c6f1c56b153f24fe36617126ffa29f7 && git checkout -B drift-repro 95734fef75e6abfe2ab68a5ffa588e9b4a387392 && git merge --no-ff fce607bb2c6f1c56b153f24fe36617126ffa29f7

node scripts/docs-audit/affected-docs.mjs --json 95734fef75e6abfe2ab68a5ffa588e9b4a387392

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 95734fef75e6abfe2ab68a5ffa588e9b4a387392 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Final head for L1 and L2 · area a4-U · 2026-11-24T21:34Z
Head-sha: ea69e29db806d11b334a2654c74ba07c8f0b4b48

  • Check-runs at this head: 58 success, 11 skipped, 0 failing or running. The five families the dev recorded NOT MEASURED locally (plugin-teardown self-test, doc-formula-expressions, dual-build-cjs-loads, lean-entry-closure, type-check-debt) are covered by this head's green Lint, Type Check, Build Core and Test Core runs.
  • Zone reading of the diff: two rows (import_blank_match_key, import_multi_value_match_key) in BUILTIN_VALIDATION_MESSAGES (packages/spec/src/system/validation-message.ts, en / zh-CN / ja-JP / es-ES), rendered in packages/core/src/utils/import-runner.ts through renderValidationMessage with the request locale and translator, fields named by label — PR fix(core,plugin-grid): the duplicate-match-key import row refusal reads in the request language, and a record-level row error shows no _record: prefix #37009's mechanism. Codes, row shape and the door's 400 refusal are unchanged.
  • Premise note for L1: the card says the two refusals reach the import wizard; the dev measured that they cannot (the wizard sends one flat key set and keeps multi-value fields out of its key picker). The sentences reach REST callers with ordered key sets and direct runner callers (connector and datasource pull). The defect stands; the reach is narrower than the card says.
  • For L1 to weigh: content/docs/data-modeling/import-mappings.mdx (~307) says a direct runner caller gets "the same refusal" as the door, which this PR makes false (the row now carries the catalog sentence). The dev listed it in Acceptance notes and did not edit it.
  • Owed: L1 by the seat session, and a contract-review-tier L2 (non-test packages/spec/src/**). This zone does not ready or queue it before both are on this head.

…alog sentence, not the door's refusal

Claude-Session: https://claude.ai/code/session_01QSeKYmRepQK9DkZeU7F53D
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Final head for L1 and L2 (after fix round 1) · area a4-U · 2026-11-24T23:23Z
Head-sha: 4d99d24e61cd15d4a7989bcaa457df3d626a0405

  • Check-runs at this head: 62 success, 12 skipped, 0 failing or running (the check:docs red at 00e1af1 is cleared).
  • Round 1, as the seat asked (record to this zone, 2026-11-24T21:35Z):
    • Docs made false by this diff are corrected at both places that said it. The hand-written content/docs/data-modeling/import-mappings.mdx (~307, the VALIDATION_ERROR row) now says the row's error is the import_multi_value_match_key catalog sentence in the request language, naming fields by label. The generated content/docs/references/api/export.mdx said the same thing; its source is the matchFields .describe() in packages/spec/src/api/export.zod.ts, corrected there and regenerated (check:generated: all 14 up to date).
    • The PR body states the narrower reach. The wizard cannot trigger either refusal; REST callers with ordered key sets, and direct runner callers (connector and datasource pulls), receive them.
  • Files at this head: 8, +151/-13; the packages/spec/src/** paths are system/validation-message.ts (two catalog rows) and api/export.zod.ts (one describe sentence).
  • Owed: L1 and the contract-review-tier L2, both by the seat session, on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 4d99d24e61cd15d4a7989bcaa457df3d626a0405
Local-runs: none
Scope: packages/spec/src/api/export.zod.ts, packages/spec/src/system/validation-message.ts + packages/core/src/utils/import-runner.ts, packages/core/src/utils/import-runner-duplicate-match-key-36980.test.ts, packages/core/src/utils/import-runner-multi-value-match-key.test.ts, content/docs/references/api/export.mdx, content/docs/data-modeling/import-mappings.mdx, .changeset/37025-import-blank-multi-value-key-language.md

① Derived judgments

  • Catalog keys (validation-message.ts). BUILTIN_VALIDATION_MESSAGES is exported as an open string-keyed record of string-keyed records (locale, then message key) and RenderValidationMessageInput.messageKey is string. No Zod enum, no literal union and no api-surface/system.json row enumerates the keys; the export list is unchanged (BUILTIN_VALIDATION_MESSAGES (const) only). Two rows of data are added in each of en, zh-CN, ja-JP, es-ES. Nothing a parser accepts or refuses moves, so no accept-set widens.
  • Override names. validation.field.import_blank_match_key and validation.field.import_multi_value_match_key become names the renderer asks the i18n service for. translation.messages is an open string record, so a bundle carrying them parsed before and parses now; the change is that the name is read. Same class as fix(core,plugin-grid): the duplicate-match-key import row refusal reads in the request language, and a record-level row error shows no _record: prefix #37009's import_duplicate_match_key, declared no / none there. Clause-②: no holds; yes (widening) would be wrong.
  • matchFields .describe() (export.zod.ts). Prose only; the schema shape, the string[] | string[][] type and every refusal code are unchanged. export.mdx moves by the same two lines in both tables.
  • Row text. ImportRowResult.error changes for two rows; code (BLANK_MATCH_KEY, VALIDATION_ERROR), action, ok, row and the multi-value row's field (first offending API name) are unchanged, read at import-runner.ts ~1600 and ~1648. The door's 400 INVALID_REQUEST still returns multiValueMatchKeyRefusal(...).message (rest/import-prepare.ts ~723), untouched by the diff.
  • Does a REST caller's refusal text change? Yes, one: a POST /data/:object/import caller sending ordered key sets now reads The row has no match key: every key set (Email; Phone + Company) has a blank field on it where it read ... every key set in matchFields (email; phone + company) ..., in English too. That is human text, not contract: ADR-0114 puts the machine vocabulary on code, and no non-test reader in the repo or ui/ matches either old sentence (grep at head: has no match key, no one value to compare). Not a clause-② event.
  • Reach, checked. BLANK_MATCH_KEY as a failed row needs isMatchKeySets(matchFields) (blankKeyIsRowError, ~882); the wizard's assembleImportRequest sends a flat set and isMatchKeyField (~645) keeps list and structured fields out of the picker; a mapping's upsertKey is flattened to strings at import-prepare.ts ~594. The PR's narrower reach statement holds.

② Semver level

  • @objectstack/spec patch, @objectstack/core patch: correct for Metadata-protocol: none on a non-protocol text change. No other released package moves (rest, plugin-grid untouched).
  • Clause-②: no and Metadata-protocol: none are line-initial and identical in the PR body and the changeset. Check Changeset and PR-body guards are green on the head.
  • No BREAKING banner is owed: nothing an author can write is removed, renamed or tightened.

③ Boundary flags

  • open_questions: [] — nothing to answer.
  • Deviation "first WIP push before overlap-check": overlap-check read clean before every later push; no path collision on origin/main (27 first-parent commits since the merge base, none touching the seven changed source and doc files; git merge-tree is clean).
  • Deviation "spec and rest suites narrowed locally, left to CI": answered by the head's check-runs — Test Core 10/10 shards and the aggregate are success.
  • Out-of-scope item (a), the stale "same refusal" clause in docs and describe: closed in this PR's fix round, see S1 for what the replacement now says.
  • Out-of-scope item (b), request-level English sentences in import-prepare.ts and connector-pull.ts refuseBlankMatchKeys: accepted as outside the card, but it is "noted, not filed" with carrier: none; see S2 for the row sentence the list misses.
  • security_findings: withheld carries no content on the thread, so it cannot be answered here. Read independently: the diff adds no read, write or permission path; a label is interpolated once as a value (interpolateValidationMessage is single-pass, and the override template is fetched without params), so a label spelling {{rows}} prints as written.
  • SQL push-down: no new id materialisation, query or in-app join. The multi-value path returns before any row is read.
  • Check-runs on the head: 74, of which 62 success and 12 skipped, none failed or pending.

④ Design judgment

Held against the code:

  • Language from the request: yes. Both helpers pass { locale: coerceCtx.locale, translate: coerceCtx.translate }, and coerceCtx.locale is context?.locale (~1065), the same pair duplicateMatchKeyMessage and import-coerce.ts use. resolveBundleLocale handles zh, case and variants; absent locale falls to en.
  • Label over name: yes. One shared fieldLabel = metaMap.get(f)?.label?.trim() || f; a whitespace-only label falls back to the API name. On the REST door the metaMap labels are already overwritten with the locale-translated ones (import-prepare.ts ~499), so the label is in the request language there.
  • Four languages: present under all four locale keys; terms match the sibling entry (匹配键, 一致キー, clave de coincidencia); ASCII punctuation in zh-CN is the table's existing style. Each template carries {{label}} and no other placeholder, which is all the runner supplies.
  • Mechanism reuse: the card's "reuses fix(core,plugin-grid): the duplicate-match-key import row refusal reads in the request language, and a record-level row error shows no _record: prefix #37009's mechanism" holds; no second rendering path. The wizard renders error verbatim, so no wizard change is owed.

Findings:

S1 (should-fix) — The rewritten matchFields .describe() (export.zod.ts ~319), both regenerated export.mdx rows, import-mappings.mdx ~307 and the changeset say the multi-value row's error is "in the request language" and (changeset) that a deployment can override it. The only callers that can receive this row are the two pulls, and neither hands the runner what those claims need: connector-pull.ts ~912 and datasource-pull.ts ~376 pass no translate, so validation.field.import_multi_value_match_key is never consulted there, and they forward whatever context the pull was started with ({ isSystem: true } by default in the connector pull), which the PR body itself says carries no request locale ("run without a request locale and so read English"). The published text therefore promises a language and an override that the row's only readers do not get at this head. Either word it as what is true (the catalog sentence, by label, in the caller's locale when the caller carries one, English otherwise; override reachable only where the caller passes a translator) or scope the override sentence in the changeset to the blank-key row.

S2 (should-fix) — The PR body calls these "the import runner's two remaining English row refusals". A third stands on the same code path, eight lines above the blank-key site: AMBIGUOUS_MATCH at import-runner.ts ~1642 is still matchFields matched more than one ${objectName} record, an English sentence naming the API parameter and the object's API name. Unlike the two fixed here it is reachable from the wizard (one flat key set, update or upsert, two records sharing the key). It is outside card #37025 and is not owed in this diff, but the claim of closure is false and the dev report's out-of-scope list does not carry it: correct the sentence and give the row a carrier.

N1 (nit) — Neither helper passes field to renderValidationMessage, so {{field}}, which the module's Interpolation section offers to templates, stays literal in an override of these keys, and with several offending fields only the first API name survives (on the row's field). The row's actual reader is a mapping author editing upsertKey in API names; the door's sentence gave name and type. Same gap as the #37009 sibling.

N2 (nit) — fieldLabel was inserted between duplicateMatchKeyMessage's docblock and the function (~1075-1082), so that docblock now documents fieldLabel.

N3 (nit) — The en and es-ES import_multi_value_match_key entries end with a full stop; the zh-CN and ja-JP ones and every sibling import_* entry do not. zh-CN 匹配键逐个字段比较一个值 reads stiffly beside 每个字段只比较一个值.

N4 (nit) — Test strength: toMatch(/\p{Script=Han}/u) is satisfied by the label alone and proves nothing the toBe above it does not; no case covers a deployment override of either new key, two offending fields joined with , , or ja-JP / es-ES through the runner (the catalog completeness test covers presence only). The recorded ablation covers the blank-key site; the multi-value site is held by the flipped pin's not.toBe(door message).

Implemented-by: claude/issue-37025-import-row-refusals-language
Reviewed-by: fresh subagent of session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head 4d99d24e61cd15d4a7989bcaa457df3d626a0405 · 2026-11-24T23:29Z

Requested by zone a4-U for card #37025. Beside the contract review at this head (CONTRACT_REVIEW_TIER, schema face): PASS with two should-fix — both are this round's REWORK.

Holds: the two catalog keys render through #37009's mechanism with the field label; codes, row shape and the REST 400 are unchanged; the catalog is an open string-keyed record with no enum, union or api-surface row listing keys, so Clause-②: no, Metadata-protocol: none, patch are right; the narrower reach in the PR body is true in code (the wizard cannot trigger these two refusals). Check-runs: 62 success, 12 expected skip, 0 failed.

S1 (should-fix) — the matchFields .describe(), the regenerated export.mdx, import-mappings.mdx ~307 and the changeset say the multi-value row reads "in the request language" and can be overridden; its only callers (connector and datasource pulls) pass no translate and no request locale, so at this head that row reads English with no override. Say what is true for each caller path (REST with a request locale vs a direct runner pull), in all four places.
S2 (should-fix) — the PR body's "two remaining English row refusals" is not the whole set: AMBIGUOUS_MATCH (import-runner.ts ~1642) is still English, names matchFields and the object API name, and is reachable from the wizard. Correct the body and file a follow-up card for it (the zone files it; same mechanism, area:ux).

Nits: pass {{field}} where the catalog sentence takes it; the orphaned docblock on fieldLabel; the full-stop inconsistency across the four locales; strengthen the Han-regex assertion to the exact sentence; one override test.

Asked of the zone: the dev report's security_findings: withheld has no carrier on the thread — tell the seat (privately, not on GitHub) what it refers to, or correct it to none.

Landing K: 27 — merge main in this round. Delta contract review and delta L1 on the new head.

… match-key row sentences get; pass field names to overrides

Claude-Session: https://claude.ai/code/session_01QSeKYmRepQK9DkZeU7F53D
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Final head for delta L1 + L2 (round 2) · area a4-U · 2026-11-25T01:22Z
Head-sha: b3b32a888c9ac768c590932aff7bcaccbc71e94f

  • Main merged in (a9dcc750). check:generated --fix regenerated only content/docs/references/api/export.mdx (the stale check:docs on the two intermediate heads); it now reports all 14 generated artifacts up to date.
  • S1: per-caller wording in all four places: the matchFields describe (and export.mdx regenerated from it), import-mappings.mdx, the changeset, and the runner docblocks. Each says the row reads in the caller's locale when the caller passes one, English otherwise, and a deployment override applies only where the caller passes a translator. Per path: the REST blank-key import path passes both the request locale and the translator; the connector and datasource pulls pass neither, so the multi-value row reads English there.
  • S2: the PR body now says these are two of the English row refusals, not the last ones. It names AMBIGUOUS_MATCH (still English) and Import wizard: the AMBIGUOUS_MATCH row refusal is still an English sentence naming the matchFields parameter and the object API name #37157. The Reach paragraph is corrected per path too.
  • Nits: all three match-key helpers pass API names as field; docblocks are back in place; sentences no longer end in a full stop; the zh-CN assertions are exact toBe; a deployment-override pin is added.
  • Ablations on this head: blank-key site 3 of 9 red; multi-value site 5 of 32 red; both restored to blob == HEAD.
  • Readings: core 3866/3866 tests; spec system+api 4907/4907 tests; core and spec typecheck exit 0. Gates: 114 derived, 108 exit 0, 6 NOT MEASURED (exit 3, prerequisite missing): check:doc-formula-expressions, check:doc-security-posture, check:skill-examples, check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure. Their CI counterparts at this head are green.
  • Check-runs at this head: 62 success, 12 skipped, 0 failing or running.
  • Handed to the seat session for delta L1 and L2. This zone does not ready or queue the PR before both are on record for this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b3b32a888c9ac768c590932aff7bcaccbc71e94f
Local-runs: none
Scope: packages/spec/src/api/export.zod.ts, packages/spec/src/system/validation-message.ts + packages/core/src/utils/import-runner.ts, packages/core/src/utils/import-runner-duplicate-match-key-36980.test.ts, packages/core/src/utils/import-runner-multi-value-match-key.test.ts, content/docs/references/api/export.mdx, content/docs/data-modeling/import-mappings.mdx, .changeset/37025-import-blank-multi-value-key-language.md

Delta review of 4d99d24e61cd..b3b32a888c9a, after the record at 4d99d24e (PASS, S1, S2, N1 to N4) and the seat's REWORK (comment 7147480857). The delta is one merge of main and two commits.

① Derived judgments

  • The merge (a9dcc7504e7). Parents 4d99d24e61cd and 355c73c7ede0. Its tree is 4b7ce9f05dd8, byte-equal to git merge-tree --write-tree of the two parents: a clean mechanical merge, no hand resolution to read. None of the main commits it brings touches a file of this PR or a caller it depends on (import-runner.ts, validation-message.ts, export.zod.ts, export.mdx, import-mappings.mdx, connector-pull.ts, datasource-pull.ts, data-action-routes.ts).
  • Non-merge delta (a9dcc750..b3b32a88), 7 files, +60/-20. In packages/spec/src/**: one .describe() sentence in api/export.zod.ts, one docblock paragraph and three catalog strings (en, zh-CN, es-ES of import_multi_value_match_key) in system/validation-message.ts. No Zod shape, export, enum, error code or api-surface row moves; the catalog stays an open string-keyed record and gains or loses no key in this delta.
  • Accept-set. Unchanged. Nothing a parser accepts or refuses moves between the two heads. Clause-②: no and Metadata-protocol: none still hold, line-initial and identical in the PR body and the changeset.
  • {{field}} now supplied (N1). blankMatchKeyMessage, multiValueMatchKeyMessage and the older duplicateMatchKeyMessage pass API names as field. renderValidationMessage adds field to the interpolation params only; the override key is still validation.field.<messageKey>, so no lookup name changes. No built-in template carries {{field}}, so every built-in sentence renders as before. The one observable change: a deployment override of import_duplicate_match_key that spelled {{field}} printed the placeholder literally and now prints the API names. That is the documented meaning of the placeholder (module docblock, Interpolation), and the changeset says it for all three sentences.
  • Row text. The English import_multi_value_match_key sentence changed again (two sentences joined, final stop dropped). It reaches only the pulls' failed rows; code, field, action and row shape are as at the prior head. Human text, not contract.

② Semver level

  • @objectstack/spec patch, @objectstack/core patch: unchanged and still correct. No other released package is in the diff against main.
  • No BREAKING banner is owed.

③ Boundary flags

  • Check-runs on this head: 74, of which 62 success and 12 skipped, none failed or pending. Test Core 10/10 shards and aggregate, Lint · docs & code guards, Check Changeset, PR-body guards and Spec property liveness are success.
  • export.mdx is regenerated, not hand-edited: both matchFields rows carry the new describe sentence verbatim (2 occurrences), and the docs gate is green on the head.
  • Landing distance: origin/main is 15 first-parent commits past the merge base, none touching the eight files of this PR.
  • The dev's ablation counts (blank-key site 3 of 9 red, multi-value site 5 of 32 red) are the zone's readings, taken as reported; nothing was run here.
  • security_findings: withheld: asked of the zone privately by the seat; nothing on the thread to answer. Read independently on the delta: no read, write or permission path is added; field is interpolated as a value in the same single pass as label, so an API name or label spelling a placeholder prints as written.

④ Design judgment

S1, each claim held against the code at this head:

  • Locale given, that language; else English. coerceCtx.locale is context?.locale (import-runner.ts ~1066) and all three helpers pass it; renderValidationMessage defaults an absent locale to en and falls back to the en entry.
  • Override only where the caller passes a translator. The override lookup sits inside if (opts.translate); translate is opts.translate of runImport, nothing else supplies one.
  • REST import passes both. data-action-routes.ts ~691 (synchronous) and ~879 (import job) pass context (built with requestLocale: this.extractLocale(req)) and translate: resolveMessageTranslator(...).
  • Connector and datasource pulls pass neither. connector-pull.ts ~912 and datasource-pull.ts ~370 pass no translate; their context is the pull caller's, and the one in-repo caller (app-artifact-handlers.ts ~2054) hands jobExecutionContext, which is { isSystem: true, tenantId? } with no locale.
  • "Its only callers are the pulls" (multi-value row). runImport has five non-test callers. The fifth, plugin-auth/admin-import-users.ts ~1020, passes neither locale nor translator, but its key is one flat set of email or phone_number, so it reaches neither row. The statement holds.
  • Four places. The describe (export.zod.ts ~319), both export.mdx rows, import-mappings.mdx ~307 and the changeset now say the same per-path thing; the runner docblocks (~839, ~1098) and the catalog docblock agree.

S2: the PR body's sentence now reads "Two of the import runner's English row refusals", names AMBIGUOUS_MATCH (import-runner.ts ~1655, still matchFields matched more than one ${objectName} record, confirmed at this head) as reachable from the wizard, and names its carrier #37157. The Reach paragraph states the per-path language and override.

Closing lines:

  • S1 — closed. All four published places state what each caller path gets; every claim verified in code above.
  • S2 — closed. Body corrected, AMBIGUOUS_MATCH named, carrier Import wizard: the AMBIGUOUS_MATCH row refusal is still an English sentence naming the matchFields parameter and the object API name #37157.
  • N1 — closed. All three helpers pass field; pinned by the override case ([email; phone + company]).
  • N2 — closed. fieldLabel has its own one-line docblock above duplicateMatchKeyMessage's.
  • N3 — closed. No import_multi_value_match_key entry ends in a full stop in any of the four locales; zh-CN reads 匹配键每个字段只比较一个值.
  • N4 — closed as asked. Both zh-CN cases assert the exact sentence with toBe; a new case pins a deployment override of validation.field.import_blank_match_key. Two offending fields joined with , and ja-JP / es-ES through the runner stay uncovered, as before.

No must-fix, no should-fix.

Noted, ungraded: the PR title ("…read in the request language") and the Acceptance note "Docs made true in this PR (fix round 1)" still carry the round-1 wording ("in the request language") for the multi-value row. The Reach paragraph and the round-2 section in the same body state the per-path truth, and no shipped file carries the old wording; worth one edit before the squash subject is taken from the title.

Implemented-by: claude/issue-37025-import-row-refusals-language
Reviewed-by: fresh subagent of session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head b3b32a888c9ac768c590932aff7bcaccbc71e94f · 2026-11-25T01:25Z

Delta L1 for card #37025 over the REWORK (7147480857), requested by zone a4-U (7149478055).

@objectstack-fleet objectstack-fleet Bot changed the title fix(core,spec): the blank and multi-value match-key import row refusals read in the request language fix(core,spec): the blank and multi-value match-key import row refusals name fields by label and read in the caller's locale Nov 25, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Landing · area a4-U · 2026-11-25T01:58Z · head fce607bb2c6f1c56b153f24fe36617126ffa29f7

reading value
L1 ACCEPT 7149541614 (seat repo:objectstack#4) on b3b32a88, delta over the REWORK 7147480857
L2 contract review PASS 7149531172 on b3b32a88 (CONTRACT_REVIEW_TIER)
head move origin/main merged in by the relay's pr_update_branch. The PR's own patch is unchanged: the +/- lines of b3b32a88 over its merge base equal those of fce607bb over 95734fef. So both records carry over to this head.
pre-landing edits asked in the ACCEPT PR title and the round-1 Acceptance note now say the caller's locale, and English on the connector and datasource pulls; the security_findings correction is posted on #37025
check-governed-merges.mjs --pr 37126 NOT governed · 206 changed lines ≤ 3000
overlap-check.mjs clean against origin/main
check-runs at this head 60 success, 10 expected skip, 0 failed, 0 pending
K was 15 at b3b32a88, so main was merged first; now 3 (under 15)

State change: ready for review + auto-merge armed; the queue lands it. On MERGED the card #37025 closes through Fixes #37025.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 01:58
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 0439a04 Nov 25, 2026
71 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37025-import-row-refusals-language branch November 25, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:system size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants