Phase 14: B-002 pre-fix RPC repro — filter snapshots and readSettings fix

RPC E2E with debug shows registered present at session_compact but planned=[]
because kept still contains the skill block; registered=[] still drops skills
absent from kept. Sync file readSettings avoids RPC hook deadlock on
SettingsManager/isProjectTrusted.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 15:21:53 +07:00
parent 8f48040eac
commit ef9b7a8c30
6 changed files with 333 additions and 11 deletions
+5
View File
@@ -56,6 +56,7 @@ describe("notifyReinjectDiag", () => {
it("notifies with JSON snapshot when debug is on", () => {
const notify = vi.fn();
const stderrSpy = vi.spyOn(console, "error").mockImplementation(() => {});
const settings = { ...createDefaultSettings(), debug: true };
const snapshot = {
tracked: ["a"],
@@ -73,9 +74,13 @@ describe("notifyReinjectDiag", () => {
"before_agent_start",
snapshot,
);
expect(stderrSpy).toHaveBeenCalledWith(
`skill-reinject [before_agent_start]: ${JSON.stringify(snapshot)}`,
);
expect(notify).toHaveBeenCalledWith(
`skill-reinject [before_agent_start]: ${JSON.stringify(snapshot)}`,
"info",
);
stderrSpy.mockRestore();
});
});