Skip to content

fix(service-settings): company.country adopts the iso_3166_alpha2 value domain (#6579) - #6594

Merged
os-project-manager merged 1 commit into
mainfrom
claude/issue-6579-company-country-valuedomain
Aug 8, 2026
Merged

os-project-manager merged 1 commit into
mainfrom
claude/issue-6579-company-country-valuedomain

Conversation

@os-project-manager

Copy link
Copy Markdown
Collaborator

Closes #6579

变更内容

#5712 同一洞的第四例:company.country 的 description 一直承诺 ISO 3166-1,而 pattern: '^[A-Za-z]{2}$' 只约束形状——ZZ(未分配)与 UK(CLDR 别名,非 ISO 3166-1 码)均能通过写入门。#6581 合入后 iso_3166_alpha2 的执行(显式 249 码表,两扇门共判)已在库,本 PR 即该单裁定的「一行 + 测试」:

  1. company.manifest.ts:country specifier 增加 valueDomain: 'iso_3166_alpha2'。pattern 保留——形状裁决仍先说话(ZZZ → invalid_format),形状与域各自独立收窄。
  2. 测试(沿用 fix(service-settings): localization 的标准域是执行边界 —— valueDomain 两扇门落地 (#5712) #6581 建立的写法,localization 的 manifest + service 测试为模板):

反向验证(先定方向再跑)

预测:删掉 valueDomain 一行后,声明测试、写入门 ZZ/UK、小写收紧钉、env 门测试变红;ZZZ 形状测试保持绿(pattern 仍在)。实测完全一致:4 红 1 绿,复原后 16 文件 / 323 测试全绿。

验证

  • pnpm --filter @objectstack/service-settings test:16 文件 / 323 测试全过(本 PR 新增 5 条);
  • 触碰文件 eslint 干净(exit 0);
  • 包内 tsc --noEmit 错误数 13,与 DEBT 账本持平(未新增);
  • node scripts/check-nul-bytes.mjs OK;
  • changeset:@objectstack/service-settings patch(用户可见的校验收紧)。

🤖 Generated with Claude Code

https://claude.ai/code/session_01USNUyHEr7uaU6MoEWXitei


Generated by Claude Code

…ue domain (#6579)

The fourth case of the hole #5712 closed on localization: the description
promised ISO 3166-1 while pattern '^[A-Za-z]{2}$' constrained shape only, so
ZZ (assigned to nobody) and UK (a CLDR alias, not an ISO 3166-1 code) passed
the write door. One manifest line adopts the domain; both doors now judge
membership (invalid_value + constraint: { valueDomain } on save, loud ignore
on OS_COMPANY_COUNTRY). Pattern stays: a shape breach still speaks first as
invalid_format. Deliberate tightening pinned: lowercase 'us' moves from
pattern-accept to domain-reject.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USNUyHEr7uaU6MoEWXitei
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 8, 2026 6:17am

Request Review

@github-actions github-actions Bot added the size/m label Aug 8, 2026
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-settings.

7 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/kernel/runtime-services/audit-service.mdx (via packages/services/service-settings)
  • content/docs/kernel/runtime-services/index.mdx (via packages/services/service-settings)
  • content/docs/kernel/runtime-services/settings-service.mdx (via packages/services/service-settings)
  • content/docs/plugins/packages.mdx (via @objectstack/service-settings)
  • content/docs/protocol/kernel/config-resolution.mdx (via @objectstack/service-settings)
  • content/docs/releases/implementation-status.mdx (via @objectstack/service-settings)
  • content/docs/releases/v9.mdx (via @objectstack/service-settings)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

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 size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

company.country 仍是 #5712 同一洞的第四例:^[A-Za-z]{2}$ 收下 ZZ,而 iso_3166_alpha2 域执行已在库

2 participants