Skip to content

Commit 75fb7f0

Browse files
author
baton-admin[bot]
committed
chore: update baton-admin doc files
1 parent 347ecde commit 75fb7f0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.claude/skills/connector/review-connector.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,20 @@ Return a JSON array. Empty array if no issues. Only findings with confidence >=
120120
- B7: New required OAuth scopes = breaking
121121
- B8: SAFE: display name changes, adding new types, adding trait options, adding pagination
122122
- B9: New API endpoint added to an existing resource's sync path = breaking (requires scope change or different permissions)
123+
- If breaking changes found: must be gated behind config flag (opt-in, never default-on), require lead approval, documented in PR description, docs/connector.mdx updated, DOCS ticket filed
123124
124125
## TOP BUG DETECTION PATTERNS
125-
1. Pagination: `return resources, "", nil, nil` without conditional = stops after page 1
126-
2. Pagination: `return resources, "next", nil, nil` hardcoded = infinite loop
127-
3. HTTP: defer resp.Body.Close() BEFORE if err != nil = panic
128-
4. HTTP: resp.StatusCode in error path without resp != nil check = panic
129-
5. Type assertion: .(Type) without , ok := = panic
130-
6. Error: log.Print(err) without return = silent data loss
131-
7. Error: fmt.Errorf("...%v", err) should be %w
132-
8. IDs: .Email as 3rd arg to NewUserResource = unstable ID
133-
9. ParentResourceId.Resource without nil check = panic
126+
1. Client-side pagination loop: for loop inside List()/Entitlements()/Grants() or inside the HTTP client that fetches all pages internally = CRITICAL (breaks checkpointing, OOM, bypasses rate limiting, detached contexts). The SDK drives the pagination loop — each SDK method must handle exactly one page per call. HTTP client methods must accept a cursor/token param and return a single page.
127+
2. Pagination: `return resources, "", nil, nil` without conditional = stops after page 1
128+
3. Pagination: `return resources, "next", nil, nil` hardcoded = infinite loop
129+
4. HTTP: defer resp.Body.Close() BEFORE if err != nil = panic
130+
5. HTTP: resp.StatusCode in error path without resp != nil check = panic
131+
6. Type assertion: .(Type) without , ok := = panic
132+
7. Error: log.Print(err) without return = silent data loss
133+
8. Error: fmt.Errorf("...%v", err) should be %w
134+
9. IDs: .Email as 3rd arg to NewUserResource = unstable ID
135+
10. ParentResourceId.Resource without nil check = panic
136+
11. New API endpoint in existing sync path without checking scope requirements = breaking change
134137
135138
Read the FULL file content (using Read tool) ONLY when the diff suggests a potential issue that requires full-file context (e.g., pagination flow, resource builder structure). For simple pattern issues visible in the diff, the diff alone is sufficient.
136139

0 commit comments

Comments
 (0)