Skip to content

Add reset, interactive init reset, multi-stage pipelines, Pi support; release 0.13.0#6

Merged
ulmentflam merged 1 commit into
mainfrom
feat/reset-init-pipelines-pi
Jun 4, 2026
Merged

Add reset, interactive init reset, multi-stage pipelines, Pi support; release 0.13.0#6
ulmentflam merged 1 commit into
mainfrom
feat/reset-init-pipelines-pi

Conversation

@ulmentflam

Copy link
Copy Markdown
Owner

Summary

Four user-visible additions, one release.

  • autosentry reset — clears the unverified-restart counter without losing audit history. SIGTERMs the running pid (if any), zeros state.restarts (keeps restarts_total + restart_history), appends a ResetRecord to a new reset_history list in state.json, mirrors a line to .autosentry/logs/reset.log for tail -F-friendly auditing, then relaunches the supervisor (or --no-restart to clear-and-exit). --full --force also drops restart_history.
  • process.stages — multi-step pipelines. Declare two or more sequential commands (e.g. ML pipeline: pretrain → SFT → GRPO). Each stage runs under its own Monitor; restart budgets reset between stages (logged as source=pipeline in the audit trail). Mid-pipeline failure aborts and marks remaining stages skipped in .autosentry/pipeline.json. process.stages and process.command are mutually exclusive.
  • Interactive autosentry init over an existing config now prompts (reset / upgrade / cancel) instead of hard-exiting. Non-interactive paths still fail cleanly with the original message.
  • Pi (pi.dev) joins the supported AI-editor skill list — .pi/prompts/ local, ~/.pi/agent/prompts/ global. ClaudeHealer recognizes the marker so interactive recovery mode activates.

State migration: MonitorState gains reset_history (capped at 200). Existing state.json files load unchanged — pydantic defaults the new field to [].

autosentry status now shows per-stage pipeline progress when stages are configured, plus a recent resets table next to recent restarts.

Test plan

  • 22 new tests across test_reset.py (9), test_pipeline.py (9), test_init_interactive_reset.py (4)
  • Full local suite green: 325 passing (was 303)
  • ruff check + ruff format clean
  • pyrefly check clean
  • autosentry reset --help renders correctly
  • autosentry skills install --tool pi --skill all drops the three expected files
  • CI passes
  • Verify multi-stage runs end-to-end in a real repo (post-merge spot-check)

🤖 Generated with Claude Code

… release 0.13.0

Four user-visible additions:

1. `autosentry reset` — clear the unverified-restart counter without
   losing audit history. Stops the supervised pid if alive, zeroes
   state.restarts (keeps restarts_total + restart_history), appends a
   ResetRecord to state.json's new reset_history list, and mirrors a
   line to .autosentry/logs/reset.log for tail -F. Default relaunches
   the supervisor; --no-restart clears and exits. --full --force also
   drops restart_history.

2. `process.stages` — multi-step pipelines. A new StageSpec model
   lets users declare two or more sequential commands (e.g. an ML
   pipeline: pretrain → SFT → GRPO). PipelineRunner orchestrates a
   fresh Monitor per stage with a stage-scoped cfg view, advances on
   exit 0, and aborts on stage failure (remaining stages marked
   skipped in .autosentry/pipeline.json). Restart budgets reset
   between stages via the same record_reset() helper that powers
   `autosentry reset`, tagged source="pipeline" in the audit trail.
   `process.stages` and `process.command` are mutually exclusive
   (validator enforces).

3. Interactive `autosentry init` over an existing config now prompts
   (reset / upgrade / cancel) instead of hard-exiting. Non-interactive
   invocations still fail cleanly with the original message.

4. Pi (pi.dev) joins the supported AI-editor skill list. Drops
   prompt templates at .pi/prompts/ (local) or ~/.pi/agent/prompts/
   (global); ClaudeHealer recognizes the marker for interactive
   recovery mode.

State migration: MonitorState gains reset_history (capped at 200).
Existing state.json files load unchanged — pydantic defaults the new
field to [].

`autosentry status` surfaces a pipeline progress table when stages
are configured, plus a `recent resets` table next to `recent restarts`.

22 new tests across test_reset.py, test_pipeline.py, and
test_init_interactive_reset.py. Full suite: 325 passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ulmentflam, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 48 minutes and 23 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e5f47979-2dcc-443e-99af-5a8707928289

📥 Commits

Reviewing files that changed from the base of the PR and between 9f1157b and 026b0b4.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (22)
  • CHANGELOG.md
  • README.md
  • pyproject.toml
  • src/autosentry/cli/__init__.py
  • src/autosentry/cli/commands/init.py
  • src/autosentry/cli/commands/reset.py
  • src/autosentry/cli/commands/run.py
  • src/autosentry/cli/commands/skills.py
  • src/autosentry/cli/commands/status.py
  • src/autosentry/config.py
  • src/autosentry/healers/claude.py
  • src/autosentry/pipeline.py
  • src/autosentry/skills.py
  • src/autosentry/state.py
  • src/autosentry/templates/autosentry.yaml.tmpl
  • src/autosentry/templates/skills/pi.md
  • src/autosentry/templates/skills/pi_init.md
  • src/autosentry/templates/skills/pi_update.md
  • tests/test_init_interactive_reset.py
  • tests/test_pipeline.py
  • tests/test_reset.py
  • tests/test_skills.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/reset-init-pipelines-pi

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.

@ulmentflam ulmentflam merged commit f0e39fb into main Jun 4, 2026
12 checks passed
@ulmentflam ulmentflam deleted the feat/reset-init-pipelines-pi branch June 4, 2026 21:12
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