Skip to content

Add self-healing populate cron runner#35

Draft
giaphutran12 wants to merge 1 commit into
codex/mastra-self-healing-wiringfrom
codex/mastra-self-healing-cron
Draft

Add self-healing populate cron runner#35
giaphutran12 wants to merge 1 commit into
codex/mastra-self-healing-wiringfrom
codex/mastra-self-healing-cron

Conversation

@giaphutran12
Copy link
Copy Markdown
Collaborator

Summary

  • add an operator/cron CLI for running one self-healing populate tick from dataset context JSON
  • default CLI mode is dry-run: isolated in-memory recipe store, no writer, no durable recipe mutations, no Convex admin key required
  • --commit mode uses the durable recipe store + atomic Convex row writer, with runtime key preflight before agent work
  • reject --recipe-store-dir unless --commit so dry-run cannot accidentally mutate recipe history
  • guard atomic replaceByDataset against stale/deleted dataset ids
  • update backend handoff docs for current self-healing /populate and CLI behavior

Verification

  • npm --prefix backend test: 37/37 pass
  • npm --prefix backend run build: pass
  • node --check benchmarks/dataset-agent/adapters/mastra-populate-adapter.mjs: pass
  • npm --silent --prefix backend run populate:self-heal -- --stdin: emits one JSON missing OpenRouter/TinyFish summary and exits 1
  • npm --silent --prefix backend run populate:self-heal -- --stdin --recipe-store-dir .bigset/test-recipes: fails before stdin/context read with one JSON summary and exits 1

Review

  • critic rejected first plan because dry-run would persist recipe state; fixed by forcing in-memory store for dry-run and durable store only in --commit
  • code reviewer found late recipe-store validation; fixed by moving validation into arg parsing before env/context I/O
  • direct frontend Convex typecheck remains blocked by missing generated convex files in this worktree; dataset existence guard is code-inspected

Notes

@giaphutran12 giaphutran12 self-assigned this May 22, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ebb90a0a-6e5c-4c58-8ba5-8458aa31a1b4

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 codex/mastra-self-healing-cron

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 and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant