feat(import): caseVersion の import 検証(想定外値を警告) (C8)#8
Merged
Conversation
CFPackage import 時、caseVersion が想定外(1.0 / 1.1 以外)の場合に警告を 追加する。値そのものは保持する(emit を固定すると OpenCASE round-trip の 忠実度が崩れるため、検証=警告にとどめる)。1.0 は v1.0 取り込みのため許容。 - _validate_case_version ヘルパーを追加、_create_document / _update_document で使用 - tests/unit/test_case_import.py に検証ケースを追加 - backlog C8 を「対応済み」へ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXFogp18twGiPFBAZcqJw2
PR #8 で caseVersion の受理が「1.1 のみ」から「1.0/1.1 を受理し、 その他は警告のうえ値を保持」に変わったのに、ドキュメントが古いままだった。 - import-logic.md: 外部CASEインポートの caseVersion 説明(英 line 295 / 日 866) を新挙動に更新 - db-schema.md: case_version カラムコメント(英/日)を「import は 1.0 も受理・ その他は警告のうえ保持」に明確化 - web-ui.md: フィールド表の caseVersion を同様に明確化 import-logic.md の v1.0「検出」ロジック(caseVersion=="1.0" で v1.0 判定)は C8 と無関係なので変更なし。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XXFogp18twGiPFBAZcqJw2
…dation # 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 C8 を実装します。CFPackage import 時に
caseVersionを検証します。実装方針
「検証=警告」とし、値そのものは保持します。emit を
"1.1"に固定する案もありましたが、それだと OpenCASE との round-trip 忠実度(caseVersionの往復一致)が崩れるため、保守的に「想定外値を警告するだけ」にとどめました。_validate_case_versionヘルパーを追加し、_create_document/_update_documentで使用。caseVersionが1.0/1.1以外(例2.0/v1.1/ typo)のとき警告を追加。値は変更しない。1.0は v1.0 ソース取り込みのため許容(出力は v1.1 に正規化)。テスト
tests/unit/test_case_import.pyに追加:1.1/1.0/None→ 警告なし、2.0→ 警告あり・値保持。全 661 テスト pass(round-trip テスト含む)/ ruff clean。
ドキュメント
case-v1p1-conformance-backlog.md: C8 を「すでに対応済み」へ。これで今回着手分(C14 / C15 / C11 / C12 / C8)の実装はすべて完了です。
🤖 Generated with Claude Code