Skip to content

feat(import): ext: associationType の文字種を公式パターンで検証 (C12)#7

Merged
kentalow merged 2 commits into
mainfrom
feat/ext-assoctype-validation
Jun 20, 2026
Merged

feat(import): ext: associationType の文字種を公式パターンで検証 (C12)#7
kentalow merged 2 commits into
mainfrom
feat/ext-assoctype-validation

Conversation

@kentalow

Copy link
Copy Markdown
Member

概要

conformance backlog C12 を実装します。CFPackage import の associationType 受理を、従来の startswith("ext:")(文字種ノーチェック)から公式パターンによる正規表現検証に変えます。

実装

  • _EXT_ASSOCIATION_RE = ^ext:[a-zA-Z0-9.\-_]+$ を追加し、_validate_association で使用。
  • 文字種に合わない ext: 値(ext:日本語 / ext:(token なし)/ 空白入り 等)は invalid associationType として skip + warning(既存の不正値と同じ扱い)。
  • 標準の associationType と正当な ext:token(英数 . - _)は従来どおり受理。

テスト

tests/unit/test_case_import.py に追加: 許可文字種 ext:custom.Type-1_2 → 有効、ext:日本語 / ext: / ext:has space → invalid。

全 661 テスト pass / ruff clean。

ドキュメント

  • case-v1p1-conformance-backlog.md: C12 を「すでに対応済み」へ。

残りは C8 を別 PR で実装予定です。

🤖 Generated with Claude Code

kentalow and others added 2 commits June 20, 2026 14:12
CFPackage import の associationType 受理を、従来の startswith("ext:") から
公式パターン ^ext:[a-zA-Z0-9.\-_]+$ の正規表現検証に変更。文字種に合わない
ext:(ext:日本語 / ext: / 空白入り 等)は invalid associationType として
skip + warning する。標準型と正当な ext:token は従来どおり受理。

- _EXT_ASSOCIATION_RE を追加、_validate_association で使用
- tests/unit/test_case_import.py に文字種ケースを追加
- backlog C12 を「対応済み」へ

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXFogp18twGiPFBAZcqJw2
…lidation

# Conflicts:
#	docs/dev/case-v1p1-conformance-backlog.md
@kentalow kentalow merged commit 0e242d7 into main Jun 20, 2026
2 checks passed
@kentalow kentalow deleted the feat/ext-assoctype-validation branch June 20, 2026 05:34
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.

1 participant