Repository navigation
feat: Python の Protocol 引数変更を実装クラスの適合証拠で閉じる - #40
Merged
Merged
Conversation
呼び出し側を変更せずに実装クラスが新しい Protocol に適合しても、変更行だけを追う判定では API 変更が blocking に残っていた。 注釈付きローカル変数から一意な実装クラスを解決し、継承したメソッド契約の厳密一致を追加証拠として使う。未知の型や束縛は保守的に保持し、既存の TS 証拠と変更行の判定を維持する。 コメントを除く引数位置対応、引数ごとの契約、再束縛・削除・スタブの対照を回帰テストで固定する。解析中のファイル・関数・引数ごとの結果を再利用する。
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
概要
Python の
Poster | Noneから複合Port | Noneへの引数注釈変更で、Clientが新しい契約を満たしていても、無変更のrun(client)が blocking に残っていた。注釈付きローカル変数の実装クラスが全必須メソッドに適合する場合はapi.mod_closedと informational な impact に分類する。既に適合していたクラスも扱う。原因と変更内容
従来の判定は呼び出しの変更行を主な追随証拠にしていた。Python 専用の追加証拠を
ClosureArgEvidenceに統合し、既存の変更行と TypeScript の共有 const の判定を維持する。セカンドオピニオンの設計案から、契約の型照合、既存の適合クラスの許容、解析中の証拠再利用を採用した。レビューで指摘されたコメントの位置ずれ、反復走査、引数ごとのキャッシュ対照を修正し、再レビューは LGTM。
追加証拠はローカルの静的な宣言契約に限定する。動的・推移的な名前解決、相対 import、継承した実装、変更対象の既定引数を省略する呼び出しは対象外とし、証明できない場合の既存判定を維持する。README と Architecture に範囲を記載した。
検証
make ci通過。cargo test --locked protocol_、最終の呼び出し回帰テスト、cargo fmt --check、全ターゲット・全機能の Clippy(警告をエラー扱い)通過。astro-sight review/impactと公開内容の検査を実施。Closes #38