Remember Fix Result
remember_fix_resultRecord a fix result after attempting a fix and running a verification command, storing the pass/fail outcome with analysis details.
Instructions
Record verified project-local fix memory only after a fix/change was actually attempted, the verification command was actually run, and the result is clearly passed or failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analysis_id | Yes | ||
| fingerprint | Yes | ||
| stack | Yes | ||
| fix_attempted | Yes | ||
| verification_command | Yes | ||
| verification_result | Yes | ||
| notes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recorded | Yes | ||
| memory_path | Yes | ||
| timestamp | Yes |
Implementation Reference
- src/tools/remember-fix-result.ts:13-30 (handler)The main handler function for 'remember_fix_result'. Parses input with zod schema, redacts secrets, creates a FixMemoryRecord, resolves the project path (from in-memory store, registry, or cwd), appends the record to the memory file, and returns the output.
export async function rememberFixResult(input: RememberFixResultInput): Promise<RememberFixResultOutput> { const parsed = rememberFixResultInputSchema.parse(input); const redactedInput = redactUnknown(parsed); const timestamp = new Date().toISOString(); const record = fixMemoryRecordSchema.parse({ timestamp, ...redactedInput, worked: redactedInput.verification_result === "passed" }); const projectPath = await resolveMemoryProjectPath(redactedInput.analysis_id); const memoryPath = await appendMemory(projectPath, record); return rememberFixResultOutputSchema.parse(redactUnknown({ recorded: true, memory_path: memoryPath, timestamp })); } - src/tools/remember-fix-result.ts:32-48 (handler)Helper function that resolves the project path for a given analysis_id: first checks the in-memory analysis-store, then the persisted analysis-registry, and finally falls back to resolving the project root from cwd.
async function resolveMemoryProjectPath(analysisId: string): Promise<string> { const inProcessProjectPath = getAnalysisProjectPath(analysisId); if (inProcessProjectPath) { return inProcessProjectPath; } try { const registeredProjectPath = await findRegisteredProjectPath(analysisId); if (registeredProjectPath) { return registeredProjectPath; } } catch { // Fall back safely if the restart registry is unreadable. } return resolveProjectCwd(process.cwd()); } - Input schema for remember_fix_result: requires analysis_id, fingerprint, stack, fix_attempted, verification_command (must be concrete), verification_result ('passed'|'failed'), and optional notes.
export const rememberFixResultInputSchema = z.object({ analysis_id: requiredTrimmedString("analysis_id"), fingerprint: requiredTrimmedString("fingerprint"), stack: requiredTrimmedString("stack"), fix_attempted: requiredTrimmedString("fix_attempted"), verification_command: requiredTrimmedString("verification_command").refine( (command) => !vagueVerificationCommands.has(command.toLowerCase()), "verification_command must be the concrete command that was actually run" ), verification_result: z.enum(["passed", "failed"]), notes: z.string().trim().optional() }).strict(); - Output schema for remember_fix_result: returns recorded (literal true), memory_path, and timestamp.
export const rememberFixResultOutputSchema = z.object({ recorded: z.literal(true), memory_path: z.string(), timestamp: z.string() }); - src/server.ts:38-54 (registration)Registration of the 'remember_fix_result' tool in the MCP server. It imports schemas and handler from their respective files and binds them together in registerTool().
server.registerTool( "remember_fix_result", { title: "Remember Fix Result", description: "Record verified project-local fix memory only after a fix/change was actually attempted, the verification command was actually run, and the result is clearly passed or failed.", inputSchema: rememberFixResultInputSchema.shape, outputSchema: rememberFixResultOutputSchema.shape }, async (args) => { const output = await rememberFixResult(args); return { content: [{ type: "text", text: JSON.stringify(output, null, 2) }], structuredContent: output }; } );