Repository navigation
ci(greptile): label a pull request two minutes after its last update - #28
Merged
nissa-seru merged 1 commit intoOct 20, 2026
Merged
Conversation
On Oct 19 a greptile label added seven seconds after a pull request opened started no review, on both pull requests where that happened: anima-research/context-manager#268, labelled by this workflow, and anima-research/eidoverse-worlds#266, labelled by hand. On Oct 18, labels added 35 to 105 seconds after opening each started one, on seven pull requests. The cause is inferred from those cases. The workflow now reads each pull request's updatedAt, and a run labels a pull request only once two minutes have passed since its last update. One updated less than two minutes before a run is left for a later run, usually the next, and the run's log names it if it's past 400 lines or has no line counts. The wait counts from any update rather than only from the openings Greptile names (opened, reopened, ready for review), because a label Greptile drops stays on the pull request, so no later run adds it again, while waiting delays the label by a run each time the pull request is updated in the two minutes before one. A pull request's updatedAt is its opening time or later, and comments, reviews, labels and marking it ready move it. Reopening and pushing are expected to move it too, though that hasn't been checked. A pull request without line counts waits the same way before it fails the step. One whose updatedAt doesn't parse gets no wait, as before this change, and a warning names it if it's past 400 lines or has no line counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nissa-seru
pushed a commit
to nissa-seru/chapterx
that referenced
this pull request
Oct 20, 2026
main now has antra-tess#28's Greptile label timing and antra-tess#29's streaming-off fix for the native tool path. Nothing conflicted. Of the files both sides changed, src/agent/loop.ts, antra-tess#29 decides in the activation's context build whether a request carries tools, a stretch this branch doesn't change; this branch's changes there are in the reply's mention handling and its sends.
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.
Problem
A
greptilelabel added seven seconds after a pull request opened has twice started no Greptile review. On Oct 19, anima-research/context-manager#268 was labelled by this workflow seven seconds after it opened, and anima-research/eidoverse-worlds#266 was labelled by hand seven seconds after it opened. Greptile reviewed neither from that label, and each was reviewed only after the label was added again later. On Oct 18, labels added 35 to 105 seconds after opening started a review on each of seven pull requests: anima-research/context-manager#228, anima-research/context-manager#229, anima-research/context-manager#230 and anima-research/context-manager#231, labelled by hand, and anima-research/agent-framework#480, anima-research/agent-framework#506 and anima-research/agent-framework#529, labelled by this workflow. The cause is inferred from those cases; we haven't found it documented.This workflow's scheduled run lands in that window whenever a pull request opens just before it, as on anima-research/context-manager#268. Greptile's configuration reference also counts reopening and marking ready as openings, so the same can happen when a draft is marked ready just before a run. A label Greptile drops stays on the pull request, so no later run of this workflow adds it again, and the review is lost until someone notices.
Changes
updatedAt, and a run labels a pull request only once two minutes have passed since its last update. One past 400 lines that was updated less than two minutes before a run is left for a later run, usually the next, about half an hour later, and the run's log names it: "Left for a later run, updated less than two minutes ago: #N."updatedAtis its opening time or later, and comments, reviews, labels and marking it ready move it. On four of agent-framework's open pull requests on Oct 20, it matched, to the second, the last comment on two of them, the last label on the third and the last review on the fourth. On two public pull requests in another repository the same day, it was the second each was marked ready. A cross-reference doesn't move it, as a later one on one of the four shows.main.updatedAtdoesn't parse gets no wait, as onmain, so one bad time doesn't stop the run. A::warning::line names it if it's past 400 lines or has no line counts.Tests
The step's script was taken from anima-research/context-manager's workflow at
eb212dd2and itsmainatbf760112, and run with bash 5.2 on Linux. A stand-inghserved a fixture of open pull requests and recorded each label it was asked to add, failing the ones named for a run. A stand-in clock was pinned. Below, PR 1 to PR 13 are the fixture's entries, not real pull requests. Each run gave the same results with this host's jq 1.7 and with the release binaries of jq 1.7.1 and 1.8.1, the versions on GitHub's ubuntu-24.04 and ubuntu-26.04 images, both of whichubuntu-latestjobs run on. The fixture holds thirteen pull requests, and a second copy leaves out the two without line counts.updatedAtis unparseable or null, and the warning named PR 11 and PR 12 but not PR 13, a 300-line pull request with a null time. It left PR 1 (30 seconds), PR 6 (119 seconds) and PR 9 (30 seconds, no line counts) for a later run, and named all three. It failed on PR 10, which has no line counts and is ten minutes old, asmaindoes. It left alone two pull requests of 300 lines, a draft, one already labelledgreptileand one labelledNo-Greptile.main's workflow at 02:40:00Z labelled PR 1 and PR 6 at once and named PR 9 and PR 10.Not verified
updatedAtfor them. If reopening doesn't, a reopened pull request is labelled at once, as onmain. A push isn't one of the openings Greptile names.The same change as anima-research/context-manager#280, which we reviewed: this workflow file is byte-identical to that repository's before and after it.
Written by Ramona-2416 (Claude Opus 5.5), using the Rookery's tooling. Gordon-2414 (Claude Opus 5.5) read the change, pinned the test's clock and checked what moves
updatedAt.Description checked and posted by Lottie-2661 (Claude Opus 5.5).