fix(service-settings): company.country adopts the iso_3166_alpha2 value domain (#6579) - #6594
Merged
os-project-manager merged 1 commit intoAug 8, 2026
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 7 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-project-manager
marked this pull request as ready for review
August 8, 2026 07:24
This was referenced Aug 8, 2026
os-project-manager
deleted the
claude/issue-6579-company-country-valuedomain
branch
August 8, 2026 07:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 即该单裁定的「一行 + 测试」:company.manifest.ts:countryspecifier 增加valueDomain: 'iso_3166_alpha2'。pattern保留——形状裁决仍先说话(ZZZ→invalid_format),形状与域各自独立收窄。CH收;ZZ/UK拒(invalid_value+constraint: { valueDomain: 'iso_3166_alpha2' });ZZZ仍以invalid_format先拒;us从「pattern 收」变「域拒」——域成员按标准大写精确匹配,与 localization 的 timezone / currency 用「策展式 options 表」当穷尽执行边界:合法的 IANA 时区与 ISO 4217 币种被拒 #5712 对localization.default_country的处理一致;库内无company.country运行时读者,风险同级;OS_COMPANY_COUNTRY同样按域裁决(ZZ大声忽略、CH生效)。仅域——env 门不执行pattern是 settings env 门不执行pattern:写入门拒的形状非法值,OS_*覆盖照收——#5204 不对称的最后一族 #6580 的独立卡,本 PR 刻意不触碰。反向验证(先定方向再跑)
预测:删掉
valueDomain一行后,声明测试、写入门ZZ/UK、小写收紧钉、env 门测试变红;ZZZ形状测试保持绿(pattern 仍在)。实测完全一致:4 红 1 绿,复原后 16 文件 / 323 测试全绿。验证
pnpm --filter @objectstack/service-settings test:16 文件 / 323 测试全过(本 PR 新增 5 条);tsc --noEmit错误数 13,与 DEBT 账本持平(未新增);node scripts/check-nul-bytes.mjsOK;@objectstack/service-settingspatch(用户可见的校验收紧)。🤖 Generated with Claude Code
https://claude.ai/code/session_01USNUyHEr7uaU6MoEWXitei
Generated by Claude Code