Skip to content

Ai/issue 2 devloop#10

Merged
SmileJune merged 4 commits into
mainfrom
ai/issue-2-devloop
May 24, 2026
Merged

Ai/issue 2 devloop#10
SmileJune merged 4 commits into
mainfrom
ai/issue-2-devloop

Conversation

@SmileJune

@SmileJune SmileJune commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added /ai revise command support for applying feedback to existing PRs.
    • DevLoop runner can now run continuously via systemd timer (executes every minute).
    • GitHub token is now optional for read-only operations.
    • Improved state tracking prevents redundant command reprocessing.
  • Documentation

    • Updated documentation covering new commands, systemd integration, and environment variables.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd41f972-47a9-4f60-8f29-b5f5657e9cf8

📥 Commits

Reviewing files that changed from the base of the PR and between 9706d5f and d659e19.

📒 Files selected for processing (4)
  • docs/devloop-runner.md
  • scripts/devloop/home-1.service
  • scripts/devloop/home-1.timer
  • scripts/devloop/runner.py

📝 Walkthrough

Walkthrough

The DevLoop runner is extended to accept /ai revise feedback commands in addition to /ai implement and /ai approve. A persistent state model tracks processed comment IDs to avoid reprocessing. GitHub client token is now optional for read-only operations. New systemd service/timer enable continuous local execution.

Changes

DevLoop Runner Revise and State Management

Layer / File(s) Summary
Documentation Updates
docs/devloop-runner.md
Flow, environment variables, revise examples, mark-existing flag usage, systemd setup walkthrough, and rewritten safety notes reflecting new /ai revise, /ai approve, /ai implement capabilities and persistent state behavior.
Systemd Service and Timer Configuration
scripts/devloop/home-1.service, scripts/devloop/home-1.timer
Systemd unit files for continuous execution: service runs runner once with network/environment setup; timer schedules every minute with persistence for missed runs.
Persistent State Model and Environment I/O
scripts/devloop/runner.py
RunnerState dataclass with processed comment IDs set. State file path resolution and JSON load/save helpers. load_env_file() reads local environment from configurable file.
GitHub Client Enhancement and Command Selection
scripts/devloop/runner.py
GitHubClient accepts optional token for read-only operations. Refactored request headers. list_devloop_issues() replaces older method. Default command constants and helpers for detecting implement vs revise based on comment content and approver eligibility.
Candidate Discovery with State Filtering
scripts/devloop/runner.py
find_candidates() evaluates issue and PR comment threads, selects latest valid command per thread, and filters by already-processed IDs or existing runner markers after the triggering command.
Revise Command Execution
scripts/devloop/runner.py
revise_feedback() extracts user feedback from revise comments. build_codex_prompt(), run_codex(), and commit_and_push() accept command kind and comment to tailor prompts and commit messages for implement vs revise.
Main Loop Orchestration and State Persistence
scripts/devloop/runner.py
Loads environment file and persisted state on startup. --mark-existing flag marks candidate comment IDs without executing. mark_processed() persists comment IDs to state file when --execute-codex is enabled.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • SmileJune/techcase#7: Introduced the initial DevLoop runner for /ai implement command handling; this PR refactors command detection and execution to support /ai revise and /ai approve with persistent state tracking.

Poem

🐇 A runner that revises with care,
Remembers what comments were there,
With state files so keen,
And systemd so clean,
The DevLoop bounces through air!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ai/issue-2-devloop

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.

@SmileJune SmileJune merged commit b162298 into main May 24, 2026
1 of 2 checks passed
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