Skip to content

Commit 5611b01

Browse files
committed
update refactor plan file
1 parent aadf715 commit 5611b01

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

plans/logger-refactor-plan.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ This is a live document. You should update it with any unintutive cases you find
88
- Set `cwd: "backend"` to limit search scope
99
- Exclude websocket-action.ts files
1010

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:
1223

1324
- Remove the `import { logger }` line
1425
- 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
2839
### Step 4: Commit changes
2940

3041
- **Do NOT use git-committer agent** - it's too slow
31-
- Instead, manually run: `git add <files>` then `git commit -m "<message>"`
42+
- Instead, manually run: `git add <files> && git commit -m "<message>" && git push`
43+
- This will push to a branch, where I can manually review the changes.
3244
- Keep commit message concise but descriptive
3345
- Include Codebuff footer in commit message
34-
- Afterward, run `git push`. This will push to a branch, where I can manually review the changes.

0 commit comments

Comments
 (0)