Repository navigation
fix(mention): use comment.updated_at so edit events report accurate queue delay - #595
Merged
Merged
Conversation
…ueue delay For `issue_comment.edited` events, `comment.created_at` is the original post time, not the edit time — so the queue-delta prompt reports elapsed-since-creation rather than elapsed-since-event-dispatch. `updated_at` equals `created_at` for `created` events and reflects the edit time for `edited` events, so a single fallback ordering works for both. The misleading large delta could nudge the agent toward unnecessary conversation-drift caution; replacing it with the accurate delta removes that noise without changing any decision path.
Merged
max-sixty
added a commit
that referenced
this pull request
May 27, 2026
## Why Cut the 0.1.2 release so consumer repos (and tend's own nightly regen) pick up the new `claude-interactive` harness and per-workflow `harness`/`model` overrides. ## What's new since 0.1.1 **New `claude-interactive` harness** (`max-sixty/tend/[email protected]`) — opt-in alternative to the released `claude` harness. PTY-supervised interactive `claude` via `script(1)`, end-of-turn detected through Stop/StopFailure hooks. Built as the trial path ahead of Anthropic's June 15 billing split between Agent-SDK metering and the flat Claude Code subscription. Smoke tested end-to-end on tend itself. PRs: #609, #611, #613, #614, #615, #616. **Per-workflow `harness` / `model` override** — adopters can flip a single workflow to a different harness or model without changing `.config/tend.yaml` defaults. #612. **Skill refinements** — nightly upstream-bot rebases (#605), running-in-ci PR bar (#604) and recheck (#573), env-filter loophole fix (#599), authorAssociation warning (#600), review-gates Gate 1 (#602). **Bug fix** — mention queue-delay now uses `comment.updated_at` so edit events report accurately (#595). ## Compatibility Released `claude` harness path is byte-identical; `claude-interactive` is strictly additive and opt-in. Consumer repos that don't touch `harness:` see no change beyond the new skill text and the mention-edit fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For
issue_comment.editedevents, thetend-mentionworkflow's queue-delay computation inmention.yaml.j2:201readsgithub.event.comment.created_at— the original post time, not the edit time. The "X seconds queued" prompt then reports elapsed-since-creation, which can be days or weeks when the trigger is an edit to a long-lived comment.updated_atequalscreated_atforissue_comment.createdevents and reflects the edit time forissue_comment.edited, so one fallback ordering covers both cases. Samesubmitted_at/issue.updated_atfallbacks remain forpull_request_reviewandissuesevents. No behavior change for the bot's decision path — only the displayed delta becomes accurate.Evidence
Observed this hour on
max-sixty/worktrunk(run 26356819978):tend-review-runs(run 26356566271) PATCHed its existing review-runs tracking comment (#2522 issuecomment-4496442260, created 2026-05-20, edited 2026-05-24T08:51:35Z).issue_comment.editedevent 2 seconds later, triggeringtend-mention26356819978.The agent still made the correct decision (silent exit via self-loop guard), so this is not a behavioral failure. It's a misleading number in the prompt that future agents could weight as "stale conversation" context.
Per review-reviewers evidence gist and last month's,
issue_comment.editedevents firing additionaltend-mentionruns is a documented-recurring shape (bot-self-PATCHes of tracking comments, conflict-resolution replies, daily review-runs appends, plus human-edit retriggers). Every one of those edit-triggered runs hits this same calculation.Classification
comment.created_atdeterministically returns the original post time foreditedevents, so every such event misreports its queue delay.Scope (not changed)
This PR does not filter
editedevents, change concurrency keys, or add sender/commenter-based guards — those structural shapes were rejected in #154, #203, #212. The change is purely a prompt-accuracy fix.Test plan
uv run pytestpasses (3 regtest fixtures updated under--regtest-reset).comment.updated_atfallback chain is correct for the three event surfaces (issue_comment,pull_request_review,issues).