Repository navigation
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
Conversation
…he request language, and a record-level row error shows no `_record:` prefix Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzh1FMUQYf1PcEunaaK
…ge and label, and the record-level row error's missing prefix Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzh1FMUQYf1PcEunaaK
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzh1FMUQYf1PcEunaaK
📓 Docs Drift CheckThis PR changes 2 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 183 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 28684fef123ca396c95bde8e231b43e4cf957824 && git checkout 28684fef123ca396c95bde8e231b43e4cf957824
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5727092e72f7c8f34964a98ca0aef01103305719 ef15e26f3fb777d0e3055cee7d507fd0e3583315 && git checkout -B drift-repro 5727092e72f7c8f34964a98ca0aef01103305719 && git merge --no-ff ef15e26f3fb777d0e3055cee7d507fd0e3583315
node scripts/docs-audit/affected-docs.mjs --json 5727092e72f7c8f34964a98ca0aef01103305719
|
…t a raw byte Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzh1FMUQYf1PcEunaaK
|
repo:objectstack#3 · os-support-ai · session_01WGufzhjqviExWpzQMm57Mt Contract-review-claim: session_01WGufzhjqviExWpzQMm57Mt · head ef15e26 · 2026-11-24T15:53Z |
|
repo:objectstack#3 · os-support-ai · session_01WGufzhjqviExWpzQMm57Mt Contract reviewServed-tier: Inputs read: card #36980 (body and all 4 comments: triage, claim, os-dev-report, claim amendment), PR #37009 (body, 7-file list, net diff against merge base 57445a6), and the check-runs on this head. The remainder of the diff ( ① Derived judgments
② Semver levelClause-②: no — right. Nothing an author can write or a client can send is accepted or refused differently, and no response member is added or removed; the change is the human-readable The changeset is ③ Boundary flags
SQL push-down: the diff adds no query, no id materialisation and no in-app join. The duplicate grouping ( ④ Design judgment
Findings:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzhjqviExWpzQMm57Mt 席位核对 — ACCEPT · repo:objectstack#3 · head ef15e26 · 2026-11-24T15:59ZL1: ACCEPT Read
Checklist
FindingsNo must-fix, no should-fix.
Landable on full green. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzh1FMUQYf1PcEunaaK Landing · 2026-11-24T16:01Z · ACCEPT 7136960885 (L1-b) at head ef15e26
State: ready + auto-merge (area ux-D, not governed, ≤3000 lines). |
Requested by Yibo Wang · project thread
Fixes #36980
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufzh1FMUQYf1PcEunaaK
维护者速读
What changes
1. The duplicate-match-key row refusal reads in the request language and names the key by label (
packages/core/src/utils/import-runner.ts,packages/spec/src/system/validation-message.ts).The
DUPLICATE_MATCH_KEYrow'serrorwas an English template naming the key set by API name (email). It is now rendered throughrenderValidationMessage, with the same request locale (context.locale) and the same override hook (messageTranslator) that the cell-coercion errors in the same row report already use. The sentence comes from a new catalog entry,import_duplicate_match_key, in all four platform locales (en,zh-CN,ja-JP,es-ES). It sits beside the importer's otherimport_*row sentences, and a deployment can override it undervalidation.field.import_duplicate_match_key.{{label}}is the key set by field label, joined with+, and falls back to the API name only for a field with no label.{{rows}}keeps the row numbers. The row keeps its shape (row,ok,action,code,error), soClause-②: no. The English sentence keeps its wording, with the label where the API name was.2. A record-level row error shows no
_record:prefix (ui/packages/plugin-grid/src/ImportWizard.tsx).When an object-level validation rule names no field, the rule validator reports it on the
_recordsentinel. The wizard prefixed every row error with the field's label and fell back to the API name, so such a row readRow 3: _record: RULE_MESSAGE. A newrowErrorFieldLabelgives no label for_record, as the record form's save bar (RECORD_LEVEL_FIELDin plugin-detail) already does. It serves all three readers: the dry-run findings and the result screen (throughformatDryRunError), and the failed-rows download. A field-level error keeps itsLabel: messageform.Bounded in-place fix, declared: the failed-rows download prefixed a field-level error with the field's API name (
title: …), where the two screens use the label. It now uses the same label helper. This is the same defect class (a row error naming an internal identifier), a mechanical change in the claimed file, and part of the same gate family. It is pinned in the download case below.Existing pin updated:
packages/rest/src/import-upsert-in-file-duplicate-key.test.tsasserted the old sentence with API names. Its expected key set now reads by label (Supplier + Type + No.,Supplier + Note), because the fixture's fields carry those labels. This is a respelling only; every row, code and count assertion is unchanged.ADRs read near the edited lines: ADR-0104 D1/D2 (value-shape refusal wording; nothing here touches a value-shape refusal), ADR-0002 §4, ADR-0031 §4/§6, ADR-0032 §1, ADR-0077 §3, ADR-0137 D2. None governs these two sentences.
L2 contract review owed: this PR edits non-test
packages/spec/src/**(validation-message.ts). It adds one key to the built-in validation message catalog in four locales and one docblock paragraph. No Zod shape, export, error code or authorable key changes.Tests
packages/core/src/utils/import-runner-duplicate-match-key-36980.test.ts(new): in zh-CN, the row'serroris the zh-CN catalog entry. It names邮箱, keeps1, 3, contains noemail, and carries Han script. In en, it names(Email). With no locale on the context, it reads English. A multi-field key is named by each label, and a field with no label falls back to its API name. A deployment override wins. The row result's keys are exactlyaction, code, error, ok, row.ui/packages/plugin-grid/src/ImportWizard.recordLevelRowError-36980.test.tsx(new): on the dry-run findings, the result screen and the failed-rows download, a_recordrow reads as its message alone, and a field-level row readsTitle: ….packages/rest/src/import-upsert-in-file-duplicate-key.test.ts: the expected key set is now spelled by label. It runs through the realPOST /data/:object/importroute over a real SQL engine.Acceptance notes
BLANK_MATCH_KEY(ordered key sets,The row has no match key: every key set in matchFields (…)), the multi-value match-key refusal and theAMBIGUOUS_MATCHtext are still English and name API names. The wizard already localizesAMBIGUOUS_MATCHfrom itscode. The other two were only read here, not reproduced through a public door, so they are noted rather than filed. They are the same family as this card._errorcell carries the server'serrortext, not the wizard's code-driven rewording that the two screens show for known cell codes. That was already the case and is unchanged here.Verification
Two-minute check:
pnpm --filter @objectstack/core exec vitest run --maxWorkers=2 src/utils/import-runner-duplicate-match-key-36980.test.ts. Expect 5 passed, including "zh-CN: the sentence is the zh-CN catalog entry, names the key by its label and keeps the row numbers".Local readings at 5ed720f
@objectstack/rest...(rest and its dependencies, spec and core included) and@object-ui/plugin-grid^.... Lock VERDICT command-exit 0 for both.@objectstack/core,@objectstack/rest(each includescheck:test-typecheck),@objectstack/specand@object-ui/plugin-gridtype-check(itstsconfig.test.jsonincludessrc/**): exit 0.@objectstack/corevitest: Test Files 165 passed (165), Tests 3854 passed (3854).@objectstack/specvitest: Test Files 982 passed (982), Tests 29733 passed, 1 todo. This includesvalidation-message.test.ts's "every locale defines every message key".@objectstack/rest:import-upsert-in-file-duplicate-key.test.tsandimport-row-cell-errors.test.ts, Test Files 2 passed, Tests 15 passed. The rest of the rest suite is left to CITest Core, since the diff there is that one test file.pnpm --dir ui exec vitest run packages/plugin-grid/: Test Files 311 passed (311), Tests 2763 passed (2763).pnpm check:new-line-citations(ui): 0 new, exit 0.dispatch-gates.mjs --commands, 93 commands): 92 exit 0, and 1 exit 3 (PREREQUISITE NOT MET, so NOT MEASURED):check:dual-build-cjs-loads, which needs a full workspace build.--ranwith exit codes: "93 derived famil(ies) accounted for — 92 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".scripts/ablation-replace.mjs, with the restore proven bygit diff HEADempty and the blob equal to HEAD:keySet.join(' + ')(API names):import-runner-duplicate-match-key-369805 failed / 5;if (!field) return undefined;):ImportWizard.recordLevelRowError-369803 failed / 3.overlap-check --branch=claude/issue-36980-import-row-errors-reader-language: VERDICT clean exit 0.Generated by Claude Code