Skip to content

Commit cbd8eb1

Browse files
committed
ci: strip trailing whitespace + configure CodeRabbit for the Devvit app
- fix pre-commit trailing-whitespace failure in a generated research doc - .coderabbit.yaml: add review instructions for devvit/src + devvit/test (enforce the migration invariants, validate Devvit API usage) and exclude generated/vendored paths (devvit/dist, node_modules, package-lock)
1 parent d6504ce commit cbd8eb1

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

.coderabbit.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,33 @@ reviews:
66
poem: false
77
review_status: true
88
collapse_walkthrough: false
9+
path_filters:
10+
- "!devvit/dist/**"
11+
- "!devvit/node_modules/**"
12+
- "!**/package-lock.json"
913
path_instructions:
1014
- path: "*.py"
1115
instructions: |
1216
Review for security issues — validate all user inputs.
1317
Check for proper error handling and logging.
18+
- path: "devvit/src/**/*.ts"
19+
instructions: |
20+
Devvit (Reddit Developer Platform) app. Enforce the migration invariants:
21+
moderator names must always be anonymized (INV-1, never a real name);
22+
only post/comment permalinks may be linked, never user profiles (INV-2);
23+
removal-reason text must be email-censored and pipe-escaped (INV-4);
24+
wiki content must stay under the 512KB cap (INV-3); the content hash used
25+
for skip-if-unchanged must exclude volatile data like the Last Updated
26+
timestamp (INV-6); ingest must be idempotent/deduped since there is no
27+
daemon (INV-5). Verify Devvit API usage (reddit.getModerationLog,
28+
get/updateWikiPage, context.redis, scheduler) and flag any unvalidated
29+
// TODO(devvit-api) call. Prefer type-safe, injected clients over globals.
30+
- path: "devvit/test/**/*.ts"
31+
instructions: |
32+
Offline mock-Reddit test harness. Check that the security invariants
33+
(anonymize, no profile links, PII strip, dedup, retention, hash-skip)
34+
are actually asserted, and that mocks faithfully match the real Devvit
35+
API shapes they stand in for.
1436
- path: ".github/workflows/**"
1537
instructions: |
1638
Check for command injection via untrusted GitHub context variables.

devvit-migration/docs/02-research-api-shapes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface ModAction {
5555
id: string; // "ModAction_1b1af634-..." — the modlog entry id
5656
type: ModActionType;
5757
moderatorName: string;
58-
moderatorId: T2; // "t2_..."
58+
moderatorId: T2; // "t2_..."
5959
createdAt: Date; // native Date (Python had to parse epoch)
6060
subredditName: string;
6161
subredditId: T5; // "t5_..."

0 commit comments

Comments
 (0)