Skip to content

fix: lifecycle close matches rows by prompt path or issue (M3.6e) - #583

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/shift-notify-merge-cap
Nov 17, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/shift-notify-merge-cap

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Mind half of M3.6e (PyAutoBrain#661): scripts/lifecycle.py close found no active.md row when the heading did not match the task slug (two rows removed by hand after shift 2026-11-16-pm). It now matches by slug, then by a registry prompt: resolving to the prompt file, then by issue: (new --issue, or the prompt's Issue: header). The issue fallback is used only when nothing matched by slug or prompt in any registry, only when exactly one row matches, and never on a row whose prompt: names another file. It prunes by the heading it actually matched and prints it.

API Changes

CLI: lifecycle.py close gains --issue <url>.
See full details below.

Test Plan

  • tests/test_lifecycle_close.py new tests fail on origin/main and pass here: by prompt path, by issue URL, issue from the Issue: header, two rows ambiguous, sibling row sharing the issue never dropped, fallback skips a row naming another (or missing) prompt
  • Mind suite 1046 passed; lifecycle tests 179 passed after the last fix
  • Independent Fable 5.2 review CLEAN
Full API Changes (for automation & release notes)

Added

  • lifecycle.py close ... --issue <url>

Changed Behaviour

  • close_registries returns (registry, matched heading) pairs; cmd_close prunes by the matched heading

Refs PyAutoBrain#661.

Heart RED override (development only)

  • Authorization (live human, 2026-11-17, this session): asked "Do you authorize the AUTONOMY 'Human override for Heart RED (development only)' to push and open their PRs [M3.6a #659, M3.6d #660, M3.6e #661]? Merging stays with your /prm." — answered "Override all three".
  • Exact current RED reason (pyauto-heart readiness --dev --repos PyAutoBrain,PyAutoMind): PyAutoMind: Tenant Firewall Gate failure on main — pre-existing generated-hook drift from PyAutoMind#575 (run 43881901227, 2026-11-16); this branch does not touch those hooks and does not claim to fix Heart.
  • Branch gates passed: Mind suite 1046 passed, lifecycle tests 179 passed; independent Fable 5.2 review CLEAN.
  • Permitted: commit, push, open this PR. Merge needs a separate human /prm with every required check green. No release.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits November 17, 2026 13:41
close_registries now returns (registry, heading) pairs matched by slug,
then by a row whose prompt: resolves to the task's prompt, then by its
issue: (new --issue, else the prompt's Issue: header), each only when
exactly one row matches. cmd_close prints the matched heading and prunes
by it, so an active.md row whose heading is not the slug is dropped.

Seen after shift 2026-11-16-pm, where two rows were removed by hand.
Refs PyAutoLabs/PyAutoBrain#661.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The issue fallback in close_registries now runs only when the task's own
row matched by slug or prompt in no registry, and skips any row whose
prompt: resolves to another prompt file. Closing a task no longer removes
the next epic phase's row filed under the same issue.

Refs PyAutoLabs/PyAutoBrain#661 (review finding 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A row whose prompt: names a file other than the task's is never taken
by the issue fallback, whether that file still exists or not.

Refs PyAutoLabs/PyAutoBrain#661 (re-review nit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jammy2211 added a commit that referenced this pull request Nov 17, 2026
@Jammy2211
Jammy2211 merged commit f7b4986 into main Nov 17, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/shift-notify-merge-cap branch November 17, 2026 15:21
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