Repository navigation
feat(devvit): scaffold Reddit Devvit migration groundwork - #34
Merged
Merged
Conversation
…itecture + compiling TS app) Re-platform groundwork for moving RedditModLog from a self-hosted PRAW daemon to a Reddit-hosted Devvit app. Feasibility confirmed: getModerationLog, get/updateWikiPage, Redis (replaces SQLite), scheduler cron + onModAction trigger, and app settings cover every primitive the bot uses. - devvit-migration/docs/: requirements + feature-parity matrix, two research reports (exact Devvit API shapes; Redis model + scheduler + settings + UI), architecture (module layout, Redis key schema, execution model, gap list), STATUS, and stored Reddit API reference - devvit/: TypeScript app scaffold (storage, modlog, render, wiki, settings, menu, main + types) — type-checks clean (tsc --noEmit, 0 errors) - README: migration callout; anonymize-moderators invariant + 512KB cap + no-user-profile-links preserved by design Produced by a multi-agent scrum (requirements -> research -> architecture -> per-component implementation -> scaffold). Generated TS is a reviewed starting point; every Devvit API call must be validated in devvit playtest before publish. Existing Python app is untouched and remains the supported version.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: baker-scripts/RedditModLog/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (25)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A self-contained vitest harness (in-memory Redis + mock Reddit client + fixtures) runs the real compiled pipeline offline — no Devvit auth needed — covering ingest/filter, anonymize (INV-1), no-profile-links (INV-2), PII strip (INV-4), retention, and hash-skip (INV-6). It surfaced two real bugs, now fixed: - modlog.ts: ignored-moderator match was case-sensitive, so a lowercased ignore list (or mixed-case mod name) silently leaked ignored mods (e.g. AutoModerator) into the public wiki. Now case-insensitive (INV-8). - render.ts: contentHash hashed the volatile 'Last Updated' timestamp, so the INV-6 skip never triggered and the wiki would be rewritten every cron run. Hash now excludes that line (mirrors the Python prod hotfix).
- 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)
This was referenced Sep 21, 2026
STATUS.md marked essentially everything DONE, but FR-7 (combined removal+reason rows) and FR-8 (conditional approval rows) are not implemented anywhere in the pipeline, verified by executing the compiled render/modlog modules. Also documents 3 other unresolved gaps found in review: the classic-vs-Devvit-Web platform contradiction, the onModAction trigger re-fetching the full moderation log instead of the cheap dirty-flag path architecture §3 specifies, and an undisclosed hash-skip behavior change vs the legacy Python implementation. Filed #60, #61, #62 for the 3 HIGH items. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013tWLY4bQsLys38ekHnK8LS
bakerboy448
marked this pull request as ready for review
September 21, 2026 19:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Re-platform groundwork for moving RedditModLog from a self-hosted PRAW daemon to a Reddit-hosted Devvit app — no self-hosting, no bot password, no SQLite. Produced by a multi-agent scrum (requirements → research → architecture → per-component implementation → scaffold).
Feasibility: confirmed. Devvit provides every primitive the bot uses:
getModerationLog,get/updateWikiPage, Redis (replaces SQLite), scheduler cron +onModActiontrigger, app/install settings.Contents
devvit-migration/docs/— requirements + feature-parity matrix (MoSCoW), two research reports (exact Devvit API shapes + Python→Devvit field mapping; Redis model, scheduler, settings, UI, publishing/limits), architecture (module layout, Redis key schema, execution model, gap list), STATUS, stored API reference.devvit/— TypeScript Devvit app scaffold (storage, modlog, render, wiki, settings, menu, main + types). Type-checks clean (tsc --noEmit, 0 errors).Status — WIP / not shippable yet
Scaffold + design only. Not yet
devvit playtest-validated against a live test subreddit. Every Devvit API call is a reviewed best-effort and must be verified in playtest before publishing. The existing Python app is untouched and remains supported. Seedevvit-migration/docs/STATUS.md.🤖 Generated with Claude Code