epimetheus: fix 2 nits from Ganymede final review
1. _merge_pr marked as CURRENTLY UNUSED (local ff-push is primary path) 2. Conversation window messages skip cold rate limit check (window counter IS the limit) Pentagon-Agent: Epimetheus <3D35839A-7722-4740-B93D-51157F7D5E70>
This commit is contained in:
parent
d79ff60689
commit
d97f68714a
2 changed files with 8 additions and 7 deletions
|
|
@ -331,7 +331,11 @@ async def _resubmit_approvals(pr_number: int):
|
|||
|
||||
|
||||
async def _merge_pr(pr_number: int) -> tuple[bool, str]:
|
||||
"""Merge PR via Forgejo API. Preserves PR metadata and reviewer attribution."""
|
||||
"""Merge PR via Forgejo API. CURRENTLY UNUSED — local ff-push is the primary merge path.
|
||||
|
||||
Kept as fallback: re-enable if Forgejo fixes the 405 bug (Ganymede's API-first design).
|
||||
The local ff-push in _merge_domain_queue replaced this due to persistent 405 errors.
|
||||
"""
|
||||
# Check if already merged/closed on Forgejo (prevents 405 on re-merge attempts)
|
||||
pr_info = await forgejo_api("GET", repo_path(f"pulls/{pr_number}"))
|
||||
if pr_info:
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
|||
return
|
||||
|
||||
# Check if user is in an active conversation window (Rhea: unanswered counter model)
|
||||
# Window counter IS the rate limit — don't check cold rate limit (Ganymede: separate budget)
|
||||
user = msg.from_user
|
||||
if user:
|
||||
key = (msg.chat_id, user.id)
|
||||
|
|
@ -257,12 +258,8 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
|||
unanswered_count[key] += 1
|
||||
logger.info("Conversation window: @%s msg %d/%d",
|
||||
user.username or "?", unanswered_count[key], CONVERSATION_WINDOW)
|
||||
# Don't count against cold rate limit (Ganymede: separate budget)
|
||||
if not is_rate_limited(user.id):
|
||||
await handle_tagged(update, context)
|
||||
return
|
||||
else:
|
||||
logger.info("Conversation window: @%s rate limited, buffering", user.username or "?")
|
||||
await handle_tagged(update, context)
|
||||
return
|
||||
|
||||
# Buffer for batch triage
|
||||
message_buffer.append({
|
||||
|
|
|
|||
Loading…
Reference in a new issue