feat(telegram): /rebase + /rebase confirm pentru re-anchor canary baseline
/rebase capturează + propune phash nou (screenshot adnotat cu red rect pe canary.roi, old/new hash, distance, TTL 180s). /rebase confirm rescrie baseline_phash în TOML-ul activ (regex line-match, păstrează comentariile), mirror în cfg live via object.__setattr__ (CanaryRegion e frozen), clear user_paused + drift_paused într-un singur shot — similar /resume. Fix adiacent: _dispatch_ctx / _mock_config_class setează cfg.window_title=None explicit; 5 teste _dispatch_command pre-existente eșuau pe MagicMock auto- truthy care propaga în _focus_window_by_title. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,20 @@ def test_parse_resume_force():
|
||||
assert cmd.value == 1
|
||||
|
||||
|
||||
def test_parse_rebase_plain():
|
||||
p = _make_poller()
|
||||
assert p._parse_command("rebase") == Command(action="rebase")
|
||||
assert p._parse_command("/rebase") == Command(action="rebase")
|
||||
|
||||
|
||||
def test_parse_rebase_confirm():
|
||||
p = _make_poller()
|
||||
cmd = p._parse_command("rebase confirm")
|
||||
assert cmd is not None
|
||||
assert cmd.action == "rebase"
|
||||
assert cmd.value == 1
|
||||
|
||||
|
||||
def test_parse_help():
|
||||
p = _make_poller()
|
||||
assert p._parse_command("h") == Command(action="help")
|
||||
|
||||
Reference in New Issue
Block a user