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:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user