Skip to content

[#943][feat] Add standalone lol rebase command and fix FSM rebase-to-review transition#961

Open
ayazhankadessova wants to merge 4 commits intomainfrom
issue-943
Open

[#943][feat] Add standalone lol rebase command and fix FSM rebase-to-review transition#961
ayazhankadessova wants to merge 4 commits intomainfrom
issue-943

Conversation

@ayazhankadessova
Copy link
Contributor

Summary

  • Fix FSM transition: (STAGE_REBASE, EVENT_REBASE_OK) now routes to STAGE_REVIEW instead of STAGE_IMPL, ensuring code is re-reviewed after rebase
  • Add review counter reset (review_fail_streak, review_attempts, last_review_score) in rebase_stage_kernel() on successful rebase
  • Add standalone lol rebase [--target-branch <branch>] CLI command with auto-detect main/master, fetch, rebase, and conflict abort
  • Shell integration: command, parser, dispatch, completion for both bash and zsh
  • 3 new tests (39/39 FSM tests pass, 407/407 full suite pass)

Test plan

  • PYTHONPATH=python python -m pytest python/tests/test_impl_fsm.py — 39/39 pass
  • TEST_SHELLS="bash zsh" make test-fast — 407/407 pass
  • PYTHONPATH=python python -m agentize.cli rebase --help — outputs correct help
  • Shell completion verified: _lol_complete commands includes rebase, _lol_complete rebase-flags returns --target-branch
  • Code quality review passed (shell word-splitting fix applied)

Closes #943

…issue #943.

- python/agentize/workflow/impl/impl.md: Update Mermaid diagram to show rebase→review instead of rebase→impl.
- python/agentize/workflow/impl/transition.md: Update transition coverage from rebase→impl/fatal to rebase→review/fatal.
- python/agentize/workflow/impl/kernels.md: Document review counter reset behavior in rebase_stage_kernel on EVENT_REBASE_OK.
- src/cli/lol/commands/README.md: Add rebase.sh / _lol_cmd_rebase to file map table.
.

- python/agentize/workflow/impl/transition.py: Change (STAGE_REBASE, EVENT_REBASE_OK) target from STAGE_IMPL to STAGE_REVIEW.
- python/agentize/workflow/impl/kernels.py: Reset review_fail_streak, review_attempts, and last_review_score on EVENT_REBASE_OK in rebase_stage_kernel.
- python/tests/test_impl_fsm.py: Add rebase→review transition assertion, review counter reset test, and rebase→review→simp→pr→finish orchestrator test.

All 39 tests pass.
…sue #943.

- python/agentize/cli.py: Add `handle_rebase()` with auto-detect main/master,
  fetch, rebase, and conflict abort. Add `rebase` subparser with `--target-branch`.
- src/cli/lol/commands/rebase.sh: New `_lol_cmd_rebase` delegating to Python CLI.
- src/cli/lol/parsers.sh: Add `_lol_parse_rebase` with `--target-branch` flag.
- src/cli/lol/dispatch.sh: Add `rebase)` case and help text entry.
- src/cli/lol/commands.sh: Source `commands/rebase.sh`.
- src/cli/lol/completion.sh: Add `rebase` command and `rebase-flags` completion.

All 39 tests pass.
… for issue #943.

- src/cli/lol/commands/rebase.sh: Use conditional branching instead of string
  concatenation to avoid word-splitting/zsh incompatibility.
- python/agentize/cli.py: Replace getattr() with direct args.target_branch
  access for consistency with other handlers.
- python/agentize/cli.md: Add `rebase` and `plan` commands to Commands table.

All 39 FSM tests pass.
@ayazhankadessova ayazhankadessova added the agentize:pr PR created by agentize label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentize:pr PR created by agentize

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan][feat]: Implement lol rebase command and fix FSM rebase-to-review transition

1 participant

Comments