feat(import): ext: associationType の文字種を公式パターンで検証 (C12)#7
Merged
Conversation
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
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.
概要
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(既存の不正値と同じ扱い)。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