Repository navigation
fix(plugin-sdk): keep restart recovery state private - #107450
zhangguiping-xydt wants to merge 7 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 3:21 PM ET / 19:21 UTC. Summary PR surface: Source +11, Tests +451, Generated 0. Total +462 across 16 files. Reproducibility: yes. at source level: seed an internal session with Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the single canonical projection/reconciliation boundary once the exact-head validation completes, retaining ACP class identity while enforcing the published Do we have a high-confidence way to reproduce the issue? Yes, at source level: seed an internal session with Is this the best way to solve the issue? Yes. A shared projection/reconciliation facade is a narrower and more maintainable solution than independently filtering each Plugin SDK, ACP, channel, transcript, and legacy-store entrypoint. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 1d999b817fac. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +11, Tests +451, Generated 0. Total +462 across 16 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (8 earlier review cycles)
|
|
@clawsweeper automerge |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
@clawsweeper approve |
|
@clawsweeper automerge |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Regarding the Stored data model note: this is a false positive from the added test, not a persistent-model change.
The production request frame remains: JSON.stringify({ type: "req", id, method, params })The new |
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
Since this PR has diverged significantly from the original, I've decided to close it and continue this work from a fresh branch. |
What Problem This Solves
Fixes an issue where plugins could observe or overwrite core-owned
mainRestartRecoverystate through ACP, injected agent/channel runtimes, or combined transcript helpers even though the publicSessionEntrytype does not expose that field. The deprecated whole-store API could also silently lose the state when a plugin moved an unchanged session identity to a new store key.Follow-up to #96230 after its session recovery implementation landed on
main.Why This Change Was Made
All plugin-facing session paths now share one projection and reconciliation facade. It removes only
mainRestartRecovery, preserves the existing publicrestartRecovery*contract, rejects attempted private-field injection, preserves recovery for stable session identities and unique key moves, and clears recovery triggers when the session ID rotates or a key move has ambiguous destinations.ACP continues to return the real, stable
AcpSessionManagerinstance, soinstanceof, prototype, and constructor identity remain compatible. Its dependency and metadata-write seams are ECMAScript-private instead of being runtime-accessible TypeScript-private properties.User Impact
Plugin authors receive runtime values that match the published
SessionEntrytype and cannot accidentally corrupt core restart coordination. Existing ACP class identity and the rest of the recovery-related public fields remain unchanged.Evidence
check:test-types/build lanes were not run because the daily-fix resource guard could not attest memory/CPU/PID limits in this cgroup-v1 environment; remote CI remains the authoritative lane for those checks.