Repository navigation
fix: 既定の --install で、この実行が入れた版が --age を満たさなければ実行前へ戻す - #56
Merged
Merged
Conversation
既定の --install は install に失敗した単位だけを実行前へ戻し、age 監査の結果では ファイルを戻さなかった。差し戻せない若い版 (更新したマニフェストが要求する推移依存 など) が lock に残り、次のビルドで使われていた。 復元用の transaction を監査の後まで開いたままにし、この実行で入った版が age を 満たさない・確かめられないまま最終の lock に残った単位を、マニフェストと lock ごと 実行前へ戻す。Rust は差し戻した先の版を含む最終 lock の証拠を install 前の lock と 比べ、Node は install 前に読んだ lock の版と比べる。実行前からあった版、監査しない 取得元、監査に対応していない lock (yarn・bun・npm の形式 1) は戻す理由にしない。 戻すのはその lock を持つ単位だけで、同じディレクトリの独立した install は残す。 外部で変わったファイルは上書きせず、復元が終わらなかったことを表示と JSON の理由で 知らせる。既定の install の処理は lib の install::ordinary に移し、実物の cargo で 通しのテストをする。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
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 was referenced Oct 26, 2026
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.
概要
既定の
depup --installで、この実行が lock に持ち込んだ版が--ageを満たさない・確かめられないまま残ったら、その install 単位のマニフェストと lockfile を実行前の状態へ戻します。#54 の期待のうち、PR #55 で残した「経過日数を満たす lock にできないなら、更新前のマニフェストと lock へ戻す」に当たります。これまでの既定の
--installは、install に失敗した単位だけを戻し、age 監査の結果ではファイルを戻しませんでした。差し戻せない若い版 (更新したマニフェストが要求する推移依存など) は終了コード 2 の報告だけで lock に残り、次のビルドで使われていました。変更内容
install::ordinaryに移し、復元用の transaction を監査の後まで開いたままにします。順序は「install 前に Node の lock の版を読む → install → install に失敗した単位を除いて Rust と Node の監査 → 条件に当たった単位を戻す → 結果の表示」です。main.rsは refresh と同じ形で呼ぶだけになりました。LockAgeAuditResult::remaining。差し戻した先の版を含む) で判定し、調整の記録の元の版では判定しませんCargo.lockを読めない、install 後のCargo.lockが無い、npm/pnpm の lock を読めない・一覧できない)Cargo.lockが変わった (監査が証明した内容を採用できない)pnpm list --lockfile-onlyから実行前の版を読みます。manifest は更新済みなので照合せず、pnpm の警告も無視します。lock が無ければ空、読めなければ「既存の版と区別できない」扱いにし、その旨を理由に書きます。recovery incompleteを付けます。復元の報告を書けなかった場合は、最終出力の後に終了コード 1 にします。docs/usage.md・usage.ja.md・cli-reference.*・README.*・AGENTS.md を更新しました。設計判断
codex (gpt-6.1-sol) と設計を相談し、「修正して採用」の指摘をすべて反映しました。主なものは次の 4 点です。Rust は調整の記録ではなく最終 lock で判定すること。Node のエラーは意味で分けること。実行前の版を読めないときは空ではなく不明として扱うこと。戻した結果を完全と一部未復元に分けて示すこと。
--install --refresh-lockは従来どおり独自の検証を使い、変えていません。検証
make ci: pass (fmt・clippy・全テスト)Cargo.tomlとCargo.lockが実行前のバイト列に戻る (Rust age audit が cargo_toml の external change で中断し、条件外の lockfile が残る #54 の状況) / 監査で期間内に直せた lock は残す / 実行前から lock にあった若い版だけなら戻さない (終了コード 2) / 同じディレクトリの Gemfile の更新は戻さない / 監査の後に lock が外で変わったら manifest だけ戻し、lock は残して一部未復元と表示するpackage.jsonとpnpm-lock.yamlが戻り、実行前からの版の違反なら残るremainingが差し戻し先の版を判定すること、Tauri の組は一緒に戻り隣の独立した単位は残ること、npm の形式 1 を未対応として報告だけにすることCloses #54
🤖 Generated with Claude Code