Skip to content

Defer contract health until after impact assessment - #24

Merged
piaro merged 9 commits into
mainfrom
fix/defer-contract-health-for-impact-assessment
Aug 28, 2026
Merged

piaro merged 9 commits into
mainfrom
fix/defer-contract-health-for-impact-assessment

Conversation

@piaro

@piaro piaro commented Aug 28, 2026

Copy link
Copy Markdown
Owner

変更結果

影響評価待ちのChangeでは、adf nextとadf explainがリポジトリ全体のContract検証状態を計算せず、影響評価を次の作業として返すようにしました。

POLLSの実データでは、修正前に27秒以上完了しなかった処理が次の時間で完了しました。

  • adf next: 2.86秒
  • adf explain: 2.63秒

背景

Contract検証状態の生成は、全ChangeのResultとEvidenceを読み込み、スキーマ検証、ハッシュ計算、条項ごとの履歴走査を行います。影響評価が未提出の場合、Kernelはこの情報を使わずに次の作業を決定できますが、従来は先に全件計算していました。

主な変更

  • 影響評価待ちの判定をKernel側へ集約
  • nextとexplainでContract検証状態の生成を必要になるまで延期
  • 無関係な履歴を読み込まないことを回帰テストで固定
  • READMEと日本語解説へ処理の境界を追記

確認結果

  • cargo fmt --check
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo test --locked
  • sh scripts/tests/test-rust.sh
  • POLLSでnextとexplainを実測

後続作業

Result内の重複参照の共通化、用途別の索引、ハッシュの再利用、既存データ移行は本PRに含めません。

@piaro
piaro merged commit d0fd319 into main Aug 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant