Repository navigation
Use native gh, GraphQL, and git features instead of hand-rolled ones; read every page of the repo's notifications - #1457
Merged
Merged
Conversation
…s' logs and reviews mark_notification_read read one unpaginated page of the bot's whole inbox (50 threads across every repo), so a busy bot never marked a thread past the first page. It now reads the repository's notifications, every page, with GitHub applying the run-start cutoff through before=. review-reviewers fetched the verify job log with gh api, which gh 2.101 refuses for a log carrying terminal escapes, and read PR reviews unpaginated, dropping the newest past 30. It now uses gh run view --log and gh pr/issue view --json. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…cel handler - codex plugin add --json's installedPath replaces scraping its text output. - security_preflight reads the CODEOWNERS entry modes and blob text in one GraphQL query, instead of up to three Contents probes told apart by 'HTTP 404' in stderr plus a separate mode query. - Cancelled/raise_on_cancel live once in _common; gist_memory uses require_env; mark_notification_read uses subject_number. - Drop the proxy pid file nothing reads; correct ensure_label's docstring. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…listing each - --slurp replaces four hand-written decoders of concatenated pages (github_cli, the mention and notifications checks), and gh's GraphQL --paginate replaces fetch_rollup's cursor loop. - nightly_workflow_update asks git diff -I whether only the version stamp changed, instead of regexing a diff. - checks.py reads each environment from the listing it already fetched, and keeps one rulesets listing and one login lookup. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… preconditions
- gh api fills {owner}/{repo}; drop the gh repo view round-trips.
- The yolo merge PUT carries sha, and GitHub refuses a moved head (409) or a
closed/unmergeable PR (405) itself, so the pre-read of state and head goes.
- run-tend states the real hazard of gh run watch / gh pr checks --watch.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tend-agent
reviewed
Sep 29, 2026
tend-agent
left a comment
Collaborator
There was a problem hiding this comment.
test-codex-surface is red because of this PR. The installed path is in the output, but json.loads fails on the line in front of it. Details are inline, along with a question about whether the notification guard still needs its client-side cutoff.
…off client-side - The surface probe merged stderr into stdout, so codex's PATH-alias warning (printed when CODEX_HOME sits under /tmp) landed in front of the JSON. The plugin probe now leaves stderr to the log, as the runner does; the fake codex now warns the same way. - The notifications API's before= filter has returned threads bumped after its cutoff, so it can't be the guard against marking mid-run activity read. The comparison is made on each thread's updated_at again, strictly before the run's start, and the read drops before=. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tend-agent
approved these changes
Sep 29, 2026
max-sixty
pushed a commit
to max-sixty/worktrunk
that referenced
this pull request
Sep 30, 2026
Upgrades the generated Tend workflows from 0.3.4 to 0.3.5 ([compare](max-sixty/tend@0.3.4...0.3.5)). The regenerated YAML changes little on its own: the action pin moves to `max-sixty/tend/[email protected]`, and most of the behavior change arrives through the new action's bundled skills and scripts. What maintainers will notice: - **Bot PRs get their review findings applied.** The review workflow now decides whether to apply its own findings by who authored the PR, so a review on a bot-authored PR follows through with a fix instead of stopping at the comment (max-sixty/tend#1433). - **Relayed PR-review mentions are named after the PR.** `tend-mention` runs triggered through `tend-mention-relay` now get the PR title as their run name rather than the event type, and the notifications poll uses that name to tell which PR a live run is handling (max-sixty/tend#1450). The relay job also skips when `TEND_ENABLED` is `false`, instead of dispatching a run that does nothing (max-sixty/tend#1452). - **CI waits run to completion instead of a fixed cap.** CI polling and integration-test waits now wait for checks to settle instead of timing out at about 9 minutes, so a slow matrix reports its real result rather than "unverified" (max-sixty/tend#1448, max-sixty/tend#1451). - **Fewer truncated listings.** Pagination now reads every page of notifications, failed-run jobs, and workflow listings (max-sixty/tend#1435, max-sixty/tend#1442, max-sixty/tend#1457). The inline pagination helpers in `tend-mention` and `tend-notifications` now use `gh api --paginate --slurp`. - **Weekly dependency review matches Dependabot and Renovate PRs again.** It now matches on the `app/…` author login that `gh` reports (max-sixty/tend#1441). - **Nightly and review behavior.** Repo overlays can now skip advisory checks, review findings are ranked by severity, and the nightly issue sweep rotates across issues (max-sixty/tend#1450). `ci-fix` recurrence comments now lead with what changed (max-sixty/tend#1446). Also bumps the pinned `uv` from 0.12.17 to 0.12.19 in the pre-check steps. `.config/tend.yaml` has no model pin, so there was no model to update. Co-authored-by: worktrunk-bot <[email protected]>
max-sixty
added a commit
to max-sixty/leaf
that referenced
this pull request
Oct 1, 2026
#1162) Update the generated Tend workflows from 0.3.2 to 0.3.5. The 0.3.3 refresh workflow moves credential rotation into a dedicated `tend-codex-refresh` environment, separate from agent jobs. The 0.3.4 action update makes feature-request triage replies more useful and marks notifications read after answered relayed PR reviews. It also improves repository-specific refresh PAT setup and handles shells that force colored `gh` output. The obsolete `control_plane_owner` generator setting is removed; the existing CODEOWNERS rule still requires a fresh owner approval. 0.3.5's CI poll waits for checks to settle rather than giving up after 9 minutes, which [#1441](#1441) depends on; it also names relayed mention runs for their PR and stops the relay while Tend is paused. The refresh credentials are already provisioned: `tend-codex-refresh` admits only `main` and holds `CODEX_REFRESH_AUTH_JSON` and `CODEX_REFRESH_PAT`, and `tend` no longer holds copies. Fresh control-plane owner approval is required. [Upstream changes](max-sixty/tend@0.3.2...0.3.5), including [max-sixty/tend#1418](max-sixty/tend#1418), [max-sixty/tend#1448](max-sixty/tend#1448), [max-sixty/tend#1450](max-sixty/tend#1450), and [max-sixty/tend#1457](max-sixty/tend#1457). --------- Co-authored-by: leaf-agent <[email protected]> Co-authored-by: Maximilian Roos <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Replaces hand-rolled mechanisms with features the tools and APIs tend already uses provide natively, and fixes two bugs the sweep found. Net −204 lines across 55 files.
Bugs
mark_notification_readonly saw the first 50 threads of the bot's whole inbox. It readgh api notificationsunpaginated — every repo's threads, first page only — so a bot with more than 50 unread threads never marked this repo's thread. It now readsrepos/{repo}/notificationsacross every page and marks this event's thread only when itsupdated_atis strictly before the run's start. The comparison stays client-side because the API'sbefore=filter has returned threads bumped after its cutoff.gh api .../jobs/<id>/logsexits 1 on gh 2.101 when the log carries terminal escapes, andpulls/<n>/reviewsunpaginated drops the newest past 30. Nowgh run view --logandgh pr view/gh issue view --json.Simplifications
gh api --paginate --slurpreplaces four hand-written decoders of concatenated pages (github_cli, the inlined mention and notifications checks); gh's GraphQL--paginatewith$endCursorreplacespoll_pr_checks.fetch_rollup's cursor loop.HTTP 404in stderr), a base64 decode, and a separate mode query. Precedence (.github/, root,docs/) and the refusals — symlink, submodule, binary, truncated — are kept.codex plugin add --json'sinstalledPathreplaces scrapingInstalled plugin root:from its text output. Codex's warnings go to stderr, which both the runner and the surface probe keep out of the parsed JSON.git diff --cached --quiet -I '<stamp line>'decides whether only the version stamp changed, instead of regexing a diff.checks.py: environments are read from the listing already fetched (it carriesprotection_rulesanddeployment_branch_policy); one rulesets listing and one login lookup instead of three and two.Cancelled/raise_on_cancellive once in_common;gist_memoryusesrequire_env;mark_notification_readusessubject_number. The proxy pid file nothing read is gone.gh api's{owner}/{repo}placeholders replace sevenREPO=$(gh repo view …)round trips. The yolo merge gate is thePUTwithshaalone — GitHub refuses a moved head (409) and a closed or unmergeable PR (405) itself. run-tend states the real hazard ofgh run watch/gh pr checks --watch.Left as is
A search-based count in
rate_limit_preflight(the search index lags creation by seconds, weakening the burst guard);gh run watchanywhere (it treats one failed read as a finished run);token_report/list_recent_runs(#1397 edits them).#1171 will conflict in
mark_notification_read.pyon rebase: its early return sat after the event-parsing line this removes. Read the event name fromenvand the action from_common.event_payload()instead.🤖 Generated with Claude Code