Repository navigation
ci: 公開APIの差分を報告するジョブを追加 - #93
Merged
Merged
Conversation
CHANGELOG で宣言した影響度と実際のAPI差分の食い違いは、これまでリリース後に しか分からなかった。dart_apitool で公開済みバージョンとの公開API差分を取り、 ジョブサマリへ出力する。 このジョブは助言であり必須チェックではない。gate の needs に入れていないため マージをブロックしない。--no-set-exit-on-version-check-failure により バージョン検査の不一致でもステップは失敗しない。破壊的変更の有無から バージョンを機械的に決めるのは誤検知の余地があり、判断は人間に残す。 比較対象は pub.dev API の latest.version。pub.dev は未知のパッケージに 404 と XML 本文を返すため、本文を読む前に HTTP ステータスで分岐し、未公開 (404)と通信障害(それ以外)と不正な応答を区別して、いずれもサマリに理由を 残して正常終了する。 バージョン判定は標準出力側にしか出ず、ツールが途中で失敗すると節ごと存在 しない。抽出できなくてもステップを失敗させない。 --ignore-prerelease は既定で有効で、x.y.z-beta.n を x.y.z とみなして検査する。 ただし新バージョンが比較元のプレリリース部分を除いた値以上の場合、バージョン 検査自体がスキップされる。公開済み最新がベータのリポジトリでは、当面は判定 ではなく変更一覧が得られる。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
LibraryLibrarian
force-pushed
the
feature/api-diff-report
branch
from
September 18, 2026 09:35
3739a86 to
2b176a4
Compare
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.
CHANGELOG で宣言した影響度と、実際の公開API差分の食い違いを PR 時点で可視化します。
背景
これまでこの食い違いはリリース後にしか分かりませんでした。実際
misskey_authのv0.1.4-beta..v0.2.0-beta.1では、破壊的変更(Android 保存データの互換性喪失)がdocs:/build:として記録され、!/BREAKING CHANGEマーカーは0件でした。変更
dart_apitool 0.23.2で公開済みバージョンとの公開API差分を取り、ジョブサマリへ出力するAPI diffジョブを追加します。gateのneedsに入れていないためマージをブロックしません--no-set-exit-on-version-check-failureを付けているため、バージョン検査の不一致でも CI は落ちませんlatest.version。未公開のパッケージではスキップしますプレリリース中の制約
--ignore-prereleaseは既定で有効で、x.y.z-beta.nをx.y.zとみなして検査します。ただし比較元が prerelease の場合はバージョン検査自体がスキップされます。そのためベータ期間中に得られるのは判定ではなく変更一覧です。安定版を公開済みのパッケージでは実際の判定が出ることを、
misskey_mfm_parserに人為的な破壊的変更(公開エントリポイントからのexport削除)を入れて確認しています。検証
misskey_client#86 で先に実地検証し、CI 上で成功することを確認済みです。所要 37秒。その検証で、
misskey_clientの develop にも公開済み1.0.0-beta.8に対する破壊的変更が含まれていることが実際に検出されました。検討して採らなかった案
dart-lang/ecosystem/.github/workflows/health.yaml(Dart チーム公式、breakingチェックを含む)を検討しましたが、次の2点で見送りました。workflow_runトリガの別ワークフローが必要で、1リポジトリあたり2本になる。workflow_runは特権トリガ(上流も# zizmor: ignore[dangerous-triggers]を付与)dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/が走る。health.yaml@<SHA>をピンしても firehose 本体は main の HEAD から取得され、版を固定できない