Skip to content

feat(devvit): scaffold Reddit Devvit migration (WIP)#34

Draft
bakerboy448 wants to merge 3 commits into
mainfrom
feat/devvit-migration
Draft

feat(devvit): scaffold Reddit Devvit migration (WIP)#34
bakerboy448 wants to merge 3 commits into
mainfrom
feat/devvit-migration

Conversation

@bakerboy448

Copy link
Copy Markdown
Collaborator

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 + onModAction trigger, 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).
  • README migration callout. Invariants preserved by design: anonymize-moderators (hardcoded), no user-profile links, 512KB wiki cap, dedup idempotency (no daemon).

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. See devvit-migration/docs/STATUS.md.

🤖 Generated with Claude Code

…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.
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 67b12dd8-f2bb-4a49-9ee3-c38a49c037ff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/devvit-migration

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant