test: 合流(多重経路)と探索境界のケースを追加する - #18
Merged
Merged
Conversation
MultiPath へ合流点の種別(中間 sealed・companion 末端)と経路の非対称性 (基底直下併存・sealed class 中間との混成)・合流の入れ子を合成し、 entries スナップショットで初出 1 回掲載を固定する。 RootVia へ非注釈 sealed 祖先とその直下の非所属メンバー、Zoo へ非 sealed 末端配下の sealed 部分階層を置き、探索境界の上下両方向を固定する。 いずれも既存フィクスチャ階層と既存テスト関数への追加であり、 テストクラス・フィクスチャ階層は増やさない。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
K5 の「多重経路」を合流点の種別 × 経路の非対称性 × 入れ子の軸へ展開し、 非 sealed 末端配下の sealed 部分階層(下方向)と非注釈 sealed 祖先(K2・上方向)を 探索境界として値に加える。網羅基準 C2 の分岐典拠へ末端列挙の 4 分岐を追加する。 ケース03 §1 は初出位置の決定規則(深さ優先の到達順・基底直下と中間経由の競合)まで 書き下し、ケース01 API-13/API-30/API-57 とフィクスチャ構成へ対応を反映する。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
設計00 §6.2・設計02 §2 の記述は同じ末端への複数経路のみを対象としていたため、 合流点が中間 sealed である場合(配下のサブツリーごと 1 回・2 度目の到達では非展開)と 初出位置の決定規則を含む一般形へ改める。 設計02 §3 のコレクション規則は蓄積そのものが LinkedHashSet である実装と 読み違えるため、文言を実装へ合わせる。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
背景
class Impl : Foo, Bar(兄弟中間 sealed の同時実装)で entries が重複した欠陥は修正済みだが、次元モデルの K5 は「多重経路(兄弟中間の同時実装)」という 1 値しか持たず、
合流点の種別や経路の非対称性を軸として展開していなかった。
同型の未検出が残るため、言語仕様から合流の形を洗い出して被覆する。
なお diag-ok の
NmDiaは既に「基底直下 + 中間経由」の構成を持っていたが、観測面が O2(診断の非発火)だけであり entries を見ていなかった。
構成ではなく観測面が欠けていたのが今回の穴の構造である。
変更
フィクスチャとテスト(新規テストクラス・新規フィクスチャ階層は無し。既存階層と既存テスト関数への追加のみ)
MpClassMid(sealed class) / 合流点MpShared/MpHost.Companion・MpDirect・MpMixed・MpNested・MpDeepViaAncestor+ 直下の非所属ViaOutsideIfaceLeaf配下の sealed 部分階層Brood/Chickentries スナップショットは 1 本のまま 8 要素へ拡張し、全末端 FQN 一括整列とは一致しないこと(初出位置による break)も同じメソッドで固定する。
[MpMixed, MpDirect, MpBoth, Companion, MpNested, MpOnlyLeft, MpDeep, MpOnlyRight]資料
実装変更の有無
無し。追加した全構成は現行実装で成立する(形の被覆と規則の明文化が目的)。
検証
:producer-jvm:test/:consumer-plugin-jvm:test/:consumer-pure-jvm:test/:downstream-subtype-jvm:test/ktfmtCheckが green。残件
中間 sealed の expect/actual(K2 は基底・K4 は末端のみを持ち中間は次元モデルに無い)は、
expect sealed interfaceの言語可否自体が未確定のため本 PR に含めない。確認は diag-mpp の ok モジュールへ expect/actual 中間を 1 組置いて 1 ビルド回すのが最小手順。
🤖 Generated with Claude Code