Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(skill): honor since-issue-id on bootstrap

cyhaa994fcda2c0
diff --git a/skills/background-watch-hook/scripts/wait_issue.py b/skills/background-watch-hook/scripts/wait_issue.py
index c6e106e21..3e43cbf21 100644
--- a/skills/background-watch-hook/scripts/wait_issue.py
+++ b/skills/background-watch-hook/scripts/wait_issue.py
@@ -235,6 +235,8 @@ def main() -> int:
initial_raw_issue_max_pages = None
if args.since_raw_issue_id is not None and not args.catch_up:
initial_raw_issue_stop_after_id = args.since_raw_issue_id
+ elif args.since_issue_id is not None and not args.catch_up:
+ initial_raw_issue_stop_after_id = args.since_issue_id
elif not args.catch_up:
initial_raw_issue_max_pages = 1
state, requests_per_poll_count = _fetch_new_issue_state(
diff --git a/tests/test_wait_for_github_issue_activity.py b/tests/test_wait_for_github_issue_activity.py
index 729ff8833..d9ef4c7a2 100644
--- a/tests/test_wait_for_github_issue_activity.py
+++ b/tests/test_wait_for_github_issue_activity.py
@@ -280,6 +280,54 @@ def test_main_uses_since_raw_issue_cursor_for_initial_new_issue_fetch() -> None:
assert "issue #41" in stdout.getvalue()
+def test_main_uses_since_issue_cursor_for_initial_new_issue_fetch_without_raw_cursor() -> None:
+ module = _load_module()
+ calls: list[tuple[int | None, int | None]] = []
+
+ def _fake_fetch_new_issue_state(repo, token, *, stop_after_id=None, max_pages=None):
+ calls.append((stop_after_id, max_pages))
+ return (
+ {
+ "issues": [
+ {
+ "id": 405,
+ "number": 41,
+ "title": "New issue",
+ "state": "open",
+ "html_url": "https://github.com/example/repo/issues/41",
+ "user": {"login": "someone"},
+ }
+ ],
+ "raw_issue_cursor": 906,
+ },
+ 3,
+ )
+
+ stdout = io.StringIO()
+ with (
+ patch.object(module, "_fetch_new_issue_state", side_effect=_fake_fetch_new_issue_state),
+ patch.object(module, "get_token", return_value="token"),
+ patch.object(module, "get_authenticated_login", return_value=None),
+ patch(
+ "sys.argv",
+ [
+ "wait_issue.py",
+ "--repo",
+ "cyhhao/vibe-remote",
+ "--new-issues",
+ "--since-issue-id",
+ "400",
+ ],
+ ),
+ redirect_stdout(stdout),
+ ):
+ rc = module.main()
+
+ assert rc == 0
+ assert calls == [(400, None)]
+ assert "issue #41" in stdout.getvalue()
+
+
def test_main_bootstraps_new_issue_watch_from_first_page_only() -> None:
module = _load_module()
calls: list[tuple[int | None, int | None]] = []