Skip to content

test(core): v0.2 M3 trial import with a simulated messy ledger - #17

Merged
marchtian merged 1 commit into
mainfrom
claude/project-thread-2wxink
Oct 23, 2026
Merged

marchtian merged 1 commit into
mainfrom
claude/project-thread-2wxink

Conversation

@marchtian

Copy link
Copy Markdown
Collaborator

Requested by 田騏 · project thread

Closes #10. Follow-up to #15: the last exit item ("用客户真实台账(脱敏)导入一次,问题记录在 PR 中"), done with a simulated ledger as the user asked instead of a customer sample.

改了什么

  • data/samples/legacy-trial/:模拟的「脏」台账(13 行供应商、12 位联系人、11 张证书,全部虚构),覆盖重复行、信用代码小写 / 带连字符 / 17 位、2011.07.01 / 20090615 / 2018-02-30 日期、「中国大陆」「CN」「物流」「ISO9001」等别名、缺信用代码 / 注册号、同表两位主联系人、邮箱大小写不同、一格两个邮箱、「长期」有效期、全称不一致、清单外资质。
  • test/import-trial.test.ts:逐行钉住平台给出的结果。
  • 导入说明新增 §6「试导结果与清洗清单」,导入步骤加「空值设置:长期 / 无 / /」;07 §6.1 / §6.3 登记 PF11、PF12;data/samples/README.md 说明试导样例。
  • 元数据没有改动。

试导发现(详见导入说明 §6.1)

# 问题 结果 处理
T1 同一家写两行 第二行 UNIQUE_VIOLATION 正确拦截
T2 2011.07.01、20090615 整行 invalid_date 平台限制 → objectstack#25493;先清洗
T4 选项别名、CN 大写 invalid_option 平台限制 → objectstack#25493;先清洗
T5 信用代码小写 校验报错;映射里的「转大写」被忽略 平台缺陷 → objectstack#25491;先清洗
T6 缺信用代码 / 注册号 两遍都被跳过,不报错 平台限制 → 已在 objectstack#25476 补充;导入后按清单核对数量
T7 一行多处错误只报第一处 需要多轮 平台限制 → objectstack#25493
T8 有效期「长期」 空值设置后导入为没有到期日 正确
T9 / T10 同表两位主联系人、邮箱大小写不同 都导入 「主联系人重复」视图兜底(#25477);邮箱先统一小写(#25491)
T11–T14 无效邮箱、全称不一致、清单外资质、日期颠倒、缺证书编号 逐行报错 正确拦截

没有发现导入把错误数据写进系统的情况:问题行要么被拒,要么被跳过。需要人工核对的只有三处:T6、T9、T10。

验证

pnpm validate、lint、typecheck、i18n:check、test(9 个文件全部通过)、build;文档相对链接与锚点检查 0 问题。


Generated by Claude Code

Close the last exit item of #10 with a simulated legacy ledger
(duplicates, bad credit codes, mixed date formats, option aliases,
missing keys, two primary contacts, "长期" expiry) under
data/samples/legacy-trial/. test/import-trial.test.ts pins the
per-row outcome; the import guide gains the trial findings (T1-T14)
and a cleaning checklist. New platform gaps filed and logged in 07 §6.3:
objectstack#25491 (mapping transforms ignored) and #25493 (date shapes,
option aliases/case, one error per row).

Closes #10

Claude-Session: https://claude.ai/code/session_01WD2qxFMbYUkbEnsSXW7PQj
Co-authored-by: Claude <noreply@anthropic.com>
@marchtian marchtian self-assigned this Oct 23, 2026
@marchtian
marchtian merged commit 6231bf4 into main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.2 M3:存量供应商导入(供应商、联系人、证书)

2 participants