Commit 072ed4c
Terraphim CI
feat(orchestrator): cursor-based mention polling (Issue #186)
Replaces per-issue comment polling with single repo-wide API call using
Gitea's ?since= cursor parameter. Eliminates mention replay storm on restart.
Changes:
- MentionCursor: persistent cursor via terraphim_persistence (load_or_now)
- MentionTracker: simplified to per-issue dispatch counter (no HashSet)
- fetch_repo_comments: new GiteaTracker method for repo-wide comment API
- IssueComment: added issue_number field for repo-wide comment parsing
- MentionConfig: max_dispatches_per_tick (3), max_concurrent_mention_agents (5)
- poll_mentions(): rewritten to use cursor, bounded concurrency
- ManagedAgent: added spawned_by_mention flag for concurrency tracking
Startup guard: on first run (no cursor), sets cursor=now to skip backlog.
Backward compat: old watch_issues config still accepted but ignored.
12 tests pass (4 new cursor/tracker tests).
Refs #186, closes #2491 parent 393a953 commit 072ed4c
6 files changed
Lines changed: 1186 additions & 130 deletions
File tree
- .docs
- crates
- terraphim_orchestrator/src
- terraphim_tracker/src
0 commit comments