Skip to content

fix(monitor): プロファイル保存時の未起動配信を補償する - #6139

Merged
akiojin merged 3 commits into
developfrom
work/issue-5876
Oct 23, 2026
Merged

akiojin merged 3 commits into
developfrom
work/issue-5876

Conversation

@akiojin

@akiojin akiojin commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

起動プロファイルを一括保存して選択 provider が unattended 非対応になったとき、未所有の起動配信と予約枠を同じ保存内で補償します。保存後の receipt 再読込でも古い予約を復活させません。

Changes

  • issue_monitor.rs: switch 専用だった permission 補償を pool setter と共用。新しい保存状態の exact ReleaseClaim を根拠に、未所有・未稼働の古い予約を rebase 前に解消します。後継 claim、materializer 所有、稼働 pane/process は保護します。

  • cli/issue.rs: daemon 不在の profiles.set も同じ State 遷移を使い、設定と補償を一緒に保存します。

  • issue_monitor_worker.rs / cli/daemon/server.rs: 既存 fixture で pool 保存、通常の ResumeIfSafe delivery、parent sync 失敗後の receipt replay、exact mismatch / 所有済み保護を確認します。CLI fallback の再現を追加しました。

  • issue_monitor.rs の既存 cache retention test: CIで観測したprocess共通cacheの並行evictionとthread-local parse counterの不一致を解消するため、同じreaderへのcache参照を引数化し、このtestだけ独立mapを使用。既存assertとproduction cache挙動は維持します。

  • Cargo.lock: PM裁定に従い cargo update -p ctutils --precise 0.4.4 でctutilsのversion/checksumだけを更新。Cargo Denyの新規advisoryを解消し、deny.toml/他依存は変更しません。単独commit e3a60f529。

Testing

  • production 未変更で State / daemon / CLI fallback の RED を確認。最小修正後に残った receipt replay の RED も確認して根因を修正しました。

  • permission / profile / provider hold / auto-tier 関連 nextest: 28 PASS(既存cache testを含む)。

  • push 後の canonical pre-pr vrr-85fa7787d0af48758b5773f97a14a177 / HEAD e3a60f529afc25b1bd69ad5e62b6a6433c34af8f: 10 commands / 78 tests PASS(関連28、hygiene36、env/home12、headed2。保守 helper 1 ignored)。workspace strict Clippy / format / Cargo Deny / checkout binary build も PASS。

  • headed Chromium: checkout + fresh HOME の既存 candidate-pool live fixture で保存・再読込、dark/light 各1 PASS、console/page error ゼロを確認。未所有配信の補償そのものは Rust durable fixture で検証します。

  • 旧headのFlake detection失敗は既存cache retention testの並行evictionが根因で、rerunで隠さず単独test commitで修正しました。旧headのCargo Deny失敗も、新規advisoryの修正版へlockを上げて解消しました。修正版は RustCrypto/utils#1569 で確認しました。

PR Readiness

  • State: Ready for review
  • Releaseable slice: この保存経路の修正を単独で配信可能。既存の権限・CI・receipt・attempt/tier 契約を維持します。
  • Known blockers: None
  • Remaining acceptance: コード受入の残件なし。必須 CI/配信はこの PR で確認。親 AC-1 全体、他 AC と7日実測は未証明です。
  • User Verification Result: n/a (autonomous)
  • Agent Visual Check: pass

Closing Issues

None

Related Issues / Links

Refs #5876 (T-2w-a/b/c / AC-1 の限定 slice)

Checklist

  • 要求に対応した回帰を更新
  • format / strict Clippy / 関連検証を確認
  • ドキュメント: 新しい利用者操作・表示文言がない既存動作の修正。SPEC plan/tasks を更新
  • Migration: schema 変更なし
  • Conventional Commit の fix として影響を確認

Context

直前の T-2v は launch_agent switch だけを補償していました。一括保存と CLI fallback には補償がなく、保存後に GUI へ古い delivery が渡り得ました。また、delivery を置換し active 予約を union する rebase が、保存済み receipt との一致を拒否していました。

Risk / Impact

PM default ruling (override available): 保存トランザクション内で既存 exact 補償を共有し、不明・後継・所有済み・実稼働の証拠がある work を維持する最小の変更です。新しい台帳・epoch 更新・receipt 再適用は加えていません。

Rollback: 機能修正とcache test補正は個別commitでrevert可能です。ctutils更新は独立commitで、元の脆弱版へ戻すとCargo Denyが再び失敗します。永続 schema 変更はありません。Agent Settings wizard の直接 Prefs 保存、外部 definition 変更、materializer 所有後の前提変更は今回の対象外で、親 SPEC に残ります。

CI cache test補正とctutils更新は、観測した必須CI失敗を同じ配信で解消する最小範囲としてPlan/tasksへ追補し、読み戻し済みです。

Coverage: ローカル未測定(required coverage / Rust Coverage へ委任)。最終配信報告で同 HEAD の CI gate 90% / 80% を確認します。

Agent: ミサ-2 (Codex)

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between ed296d6 and e3a60f5.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 10
  • .gwt/work/events/14/14770af0eb6d10911712f97a488ceebc9c9af5aeb9fbc43cb8816d428b2dc343.jsonl
  • .gwt/work/events/19/1965bca0bbe2d9225122ec9c8119022bb2e1d23c1dc8a5e192be5ac2b8d1b167.jsonl
  • .gwt/work/events/1a/1a7f6e27cd6b6c95b08717bcd5070d95054162137d0d93022ca5f2fc14f32743.jsonl
  • .gwt/work/events/4d/4d4630af6334b4c9917c9c68e33037b917f1182f78da6c3ee0b2707883e2bd52.jsonl
  • .gwt/work/events/71/71f42392484f9d0ec437c6ccec71422d85131a9c812bc84b23d2712eb73b5230.jsonl
  • .gwt/work/events/df/dfa4c6c7de30f6efcbacf4ba911d069d8f28bab16eba836be2f227fbc3577076.jsonl
  • crates/gwt/src/cli/daemon/server.rs
  • crates/gwt/src/cli/issue.rs
  • crates/gwt/src/issue_monitor.rs
  • crates/gwt/src/issue_monitor_worker.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@akiojin
akiojin enabled auto-merge October 23, 2026 05:25
@akiojin
akiojin merged commit 0426192 into develop Oct 23, 2026
47 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