Skip to content

release: 0.7.2#15

Merged
pbean merged 5 commits into
mainfrom
release/0.7.2
Jun 26, 2026
Merged

release: 0.7.2#15
pbean merged 5 commits into
mainfrom
release/0.7.2

Conversation

@pbean

@pbean pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

0.7.2 — bug-fix release

Fixed

  • Worktree isolation no longer false-stalls a story that actually finished. Under scm.isolation = worktree the bmad-dev-auto session runs with its cwd set to the worktree and leaves its terminal spec in the worktree's _bmad-output/implementation-artifacts, but the dev adapter searched the main checkout's dir (resolved once at startup). The completed status: done spec was never found, so the orchestrator misread the session as stalled, rolled the unit branch back to baseline, and re-ran the same story. The adapter now resolves the spec directory from the live session cwd; in-place runs and out-of-tree artifact dirs are unaffected.
  • An uncommitted policy.toml edit no longer vanishes on rollback. policy.toml is tracked but lives inside the kept .automator dir, so a rollback's git reset --hard to baseline silently reverted operator edits and a lone policy edit could register as attempt dirtiness, trapping the manual-recovery loop. Rollback now restores policy.toml from its on-disk content unconditionally — so an edit committed after the baseline on an otherwise-clean tree survives too, not only one that rode a non-empty git stash snapshot — and the dirty check always excludes it.
  • Fixed a decision-toast notification race in the TUI test suite on Python 3.14. Test-only.

Summary by CodeRabbit

  • Bug Fixes

    • Improved worktree-aware file discovery so specs are found correctly during isolated runs, avoiding false “stalled” detections.
    • Rollbacks now preserve configuration changes, preventing unexpected loss of policy.toml edits.
    • Dirtiness checks now ignore configuration-only changes, reducing false positives.
    • Fixed a test-suite notification race on Python 3.14.
  • Chores

    • Bumped the release version to 0.7.2.

pbean and others added 3 commits June 26, 2026 08:12
In worktree isolation the bmad-dev-auto skill runs with cwd set to the
worktree and writes its terminal spec under the worktree's rebased
implementation-artifacts dir, but GenericDevAdapter searched the main
checkout's dir (resolved once at construction). The fresh status:done spec
was never found, so a completed story was misread as a stalled session and
rolled back + retried.

Carry the full ProjectPaths and rebase onto spec.cwd at discovery time
(reusing ProjectPaths.rebased), searching the worktree dir first with the
configured dir as a defensive fallback. No-op in place and for artifact dirs
configured outside the project tree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
policy.toml is the operator's orchestration config, tracked but living inside
the kept .automator dir. A plain `git reset --hard` to baseline silently
reverted an uncommitted edit — e.g. a freshly enabled scm.rollback_on_failure
would vanish before it ever took effect — and a lone policy edit could read as
attempt dirtiness, so the manual-recovery loop could never terminate.

Always snapshot/restore policy.toml in safe_rollback and always exclude it in
attempt_dirty, regardless of the preserve set, mirroring worktree_clean.

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

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

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

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 53518763-e428-4154-9ea4-dcd922ae06d5

📥 Commits

Reviewing files that changed from the base of the PR and between 196b67c and aa39064.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/automator/verify.py
  • tests/test_verify.py

Walkthrough

The PR bumps version metadata to 0.7.2, adds the matching changelog entry, updates GenericDevAdapter to use project paths for worktree artifact lookup, and changes verification so policy.toml is excluded from dirtiness checks and restored during rollback.

Changes

Worktree-aware generic adapter

Layer / File(s) Summary
Worktree-aware artifact lookup
src/automator/adapters/generic.py, src/automator/cli.py, tests/test_generic_tmux.py
GenericDevAdapter now receives ProjectPaths, rebases implementation-artifacts lookup by cwd, and the tmux test covers finding a worktree spec versus returning None from the main checkout.

Policy.toml dirtiness and rollback

Layer / File(s) Summary
Policy.toml checks and restore
src/automator/verify.py, tests/test_verify.py
attempt_dirty excludes .automator/policy.toml, safe_rollback snapshots and restores it, and the new tests cover lone-policy dirtiness plus rollback preservation.

0.7.2 release metadata

Layer / File(s) Summary
Version bump and changelog
.claude-plugin/marketplace.json, CHANGELOG.md, module.yaml, pyproject.toml, src/automator/__init__.py, src/automator/data/skills/bmad-auto-setup/assets/module.yaml
All version markers are updated to 0.7.2, and the changelog adds the matching release note and reference.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • bmad-code-org/bmad-auto#3: Both PRs change the rollback and dirtiness logic in src/automator/verify.py, including safe_rollback behavior that preserves tracked state across resets.
  • bmad-code-org/bmad-auto#13: Both PRs modify the same verify.py exclude/preserve mechanisms, with the current PR applying that pattern specifically to policy.toml.

Poem

I hopped through worktrees with a twitchy nose,
and found the spec where the pathwind goes.
policy.toml stays snug in my burrow nook,
while 0.7.2 jingles in the changelog book. 🐇
Thump! The rollback carrots taste just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects that this pull request is a 0.7.2 release update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/0.7.2

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.

@augmentcode

augmentcode Bot commented Jun 26, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Releases 0.7.2 with fixes for worktree-isolated runs and safer rollback handling of operator configuration.

Changes:

  • Bumped version metadata from 0.7.1 to 0.7.2 (manifests, package version, and changelog entry/link).
  • Updated GenericDevAdapter to search for the terminal spec under the session’s cwd-rebased implementation_artifacts directory, fixing false “stalled” detection under scm.isolation=worktree.
  • Plumbed ProjectPaths into adapter construction so artifact paths can be rebased correctly, and added a worktree regression test for spec discovery.
  • Hardened rollback: safe_rollback() now preserves .automator/policy.toml across git reset --hard by capturing its on-disk contents pre-reset and restoring it post-reset (including clean-tree / committed-after-baseline cases).
  • Adjusted dirtiness detection (attempt_dirty) to always ignore policy.toml, preventing operator config-only edits from trapping the manual recovery loop.
  • Added targeted tests covering the policy preservation scenarios.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/automator/verify.py
snapshot = out.strip()
# policy.toml first: always preserved (see above); preserve dirs follow.
restore = (POLICY_FILE_REL, *preserve)
rc, out = _git(repo, "stash", "create")

@augmentcode augmentcode Bot Jun 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/automator/verify.py:222: safe_rollback() only restores policy.toml when git stash create yields a non-empty snapshot, but git stash create typically outputs nothing on a clean working tree. If a rollback to baseline would remove policy.toml (e.g., the file was added/committed after baseline) and the tree is clean at rollback time, this path may still lose the policy file despite the intent to always restore it.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in e2b6df2. You're right — git stash create emits an empty snapshot on a clean tree, so a policy.toml change living in a commit after the baseline (with no other working-tree dirt) skipped the gated restore and was reverted by git reset --hard. The existing test_safe_rollback_restores_policy_deleted_by_reset only passed because it left an unrelated dirty src.txt in the tree, which kept the snapshot non-empty and masked the gap.

Fix: safe_rollback() now captures policy.toml's on-disk bytes before the reset and writes them back after, independent of the stash snapshot (the stash path now handles only the preserve dirs). This covers both the uncommitted-edit and committed-after-baseline cases. Added test_safe_rollback_restores_committed_policy_on_clean_tree (clean tree, no other dirt) as a regression — it fails on the old code and passes now.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/automator/verify.py`:
- Around line 220-238: The rollback logic in verify.py does not reliably restore
POLICY_FILE_REL when git stash create returns an empty snapshot, so policy.toml
can be lost after git reset --hard. In the rollback flow around _git(...,
"stash", "create") and the restore loop, capture the current policy file content
before reset if it exists, then after the reset explicitly restore
POLICY_FILE_REL from that saved content regardless of whether snapshot is empty.
Keep the existing stash-based restore for preserve paths, but make policy.toml
restoration independent so committed or externally changed policy content is
always recovered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 075bf4ad-e850-4b8a-8c95-30e6a7645d6d

📥 Commits

Reviewing files that changed from the base of the PR and between b9dca02 and 196b67c.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • .claude-plugin/marketplace.json
  • CHANGELOG.md
  • module.yaml
  • pyproject.toml
  • src/automator/__init__.py
  • src/automator/adapters/generic.py
  • src/automator/cli.py
  • src/automator/data/skills/bmad-auto-setup/assets/module.yaml
  • src/automator/verify.py
  • tests/test_generic_tmux.py
  • tests/test_verify.py

Comment thread src/automator/verify.py Outdated
… tree

safe_rollback gated the policy.toml restore on a non-empty `git stash
create` snapshot. On a clean working tree that snapshot is empty, so a
policy.toml change living in a commit after the baseline (with no other
working-tree dirt) skipped the restore and was reverted by
`git reset --hard` — breaking the "always preserve policy.toml" guarantee.

Capture policy.toml's on-disk bytes before the reset and write them back
after, independent of the snapshot; the stash path now handles only the
preserve dirs. Adds a clean-tree regression test (the existing committed-
policy test only passed because an unrelated dirty file kept the snapshot
non-empty).

Addresses CodeRabbit + Augment review on PR #15.

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

pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread tests/test_verify.py Outdated

def test_safe_rollback_restores_policy_deleted_by_reset(project):
"""policy.toml added/committed *after* the baseline would be deleted by a
reset to that older baseline; it is still restored from the snapshot."""

@augmentcode augmentcode Bot Jun 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_safe_rollback_restores_policy_deleted_by_reset’s docstring says the file is “restored from the snapshot”, but safe_rollback() now restores policy.toml from the pre-reset on-disk capture (policy_content) regardless of the stash snapshot. Consider updating the docstring so it matches the mechanism being tested.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in aa39064. Updated the docstring to say policy.toml is restored from the pre-reset on-disk capture (not the stash snapshot), and noted that the dirty src.txt here keeps the snapshot non-empty while the clean-tree/empty-snapshot path is covered by test_safe_rollback_restores_committed_policy_on_clean_tree below.

safe_rollback now restores policy.toml from its pre-reset on-disk capture,
not the stash snapshot. Update test_safe_rollback_restores_policy_deleted_
by_reset's docstring to match. No behavior change.

Addresses Augment review on PR #15.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pbean pbean merged commit 722cc73 into main Jun 26, 2026
7 checks passed
@pbean pbean deleted the release/0.7.2 branch June 26, 2026 15:59
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