You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plans/logger-refactor-plan.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,18 @@ This is a live document. You should update it with any unintutive cases you find
8
8
- Set `cwd: "backend"` to limit search scope
9
9
- Exclude websocket-action.ts files
10
10
11
-
### Step 2: For each file (except websocket-action.ts)
11
+
### Step 2: For each file (except websocket-action.ts and library-integrated functions)
12
+
13
+
**Exception**: Do NOT refactor functions that are directly integrated with external libraries and must maintain a specific signature required by that library. Examples include:
14
+
15
+
- Express route handlers passed directly as middleware (e.g., `usageHandler`, `isRepoCoveredHandler`) - must maintain `(req, res, next?)` signature
16
+
- WebSocket handlers that conform to a specific library interface
17
+
- Event handlers or callbacks that match a library's expected signature
18
+
- Any function where changing the signature would break the integration with an external library
19
+
20
+
These functions should continue to import and use the logger directly, as they cannot accept custom parameter objects without breaking their integration.
21
+
22
+
For all other files:
12
23
13
24
- Remove the `import { logger }` line
14
25
- Refactor function signature to use single `params` object containing all arguments including `logger: Logger`
@@ -28,7 +39,7 @@ This is a live document. You should update it with any unintutive cases you find
28
39
### Step 4: Commit changes
29
40
30
41
-**Do NOT use git-committer agent** - it's too slow
0 commit comments