feat(devvit): scaffold Reddit Devvit migration (WIP)#34
Draft
bakerboy448 wants to merge 3 commits into
Draft
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.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 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