fix(gateway): clear reset skills snapshots#78873
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. at source level: current main explicitly preserves Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Add a concise Unreleased changelog fix bullet, then keep the runtime fix scoped to clearing reset-time skills snapshot caches. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main explicitly preserves Is this the best way to solve the issue? Yes for the runtime behavior: dropping the cache during reset is the narrowest maintainable fix because the next run already rebuilds snapshots through Full review comments:
Overall correctness: patch is correct Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against c8f3fecad6fe. |
07756c1 to
c0e1c99
Compare
c0e1c99 to
6d4059f
Compare
6d4059f to
5191732
Compare
Summary
/new/sessions.resetpreserved the cachedskillsSnapshotfrom the previous session entry.<available_skills>content after skills changed or after a Gateway restart reset the runtime-local skills snapshot version.skillsSnapshot, forcing the next agent run to rebuild the visible skills catalog; added regression coverage for the session reset RPC path.AI-assisted: yes. I used an AI coding agent to prepare the branch/PR and I reviewed the diff and validation output.
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
pnpm test src/gateway/server.sessions.reset-models.test.tsTest Files 1 passed (1)andTests 6 passed (6).sessions.resetreturns a new session entry withoutskillsSnapshotand the persisted store no longer containsskillsSnapshotfor the reset session key./newroundtrip with an installed/removed skill; no screenshot/recording captured.currentEntry?.skillsSnapshotinto the reset entry.Root Cause (if applicable)
performGatewaySessionResetcopiedcurrentEntry?.skillsSnapshotinto the new reset session entry along with durable session metadata./new.Regression Test Plan (if applicable)
src/gateway/server.sessions.reset-models.test.tsskillsSnapshotand assert the returned/persisted reset entry drops it.User-visible / Behavior Changes
/new/session reset rebuilds visible skills instead of preserving a stale cached skills list.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
openai/gpt-test-aSteps
skillsSnapshot.sessions.resetfor the session key.Expected
skillsSnapshot.Actual
skillsSnapshot.Evidence
Attach at least one:
Validation run:
Also run:
pnpm check:changedcompleted the selected core/coreTests/docs lanes without errors.Human Verification (required)
What you personally verified (not just CI), and how:
skillsSnapshot; existing reset model override tests still pass./newbehavior in Signal/Telegram/Discord with real skill install/removal.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations