Repository navigation
skills: check the default branch for a landed fix before opening a PR - #1070
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
One narrowing in the ci-fix edit: step 3's old line said "Re-check for existing fix PRs", which a session naturally satisfies by re-running step 1's gh pr list --state all --limit 30 — author-agnostic, and step 1 explicitly names "a maintainer's in-flight fix under any branch name" as a thing it catches. The section it now delegates to queries --author "$BOT_LOGIN" plus an issue-number search (and ci-fix has no triggering issue), so a maintainer's fix PR opened mid-session is no longer covered by either half of the recheck: not by the PR query (wrong author) and not by the new default-branch check (not landed yet). That's the same duplicate-PR-against-a-competing-fix outcome the change is closing, just via the author filter instead of the PR-vs-commit gap. #1068's proposed wording kept the step 1 re-run explicit ("re-run the step 1 query"); the inline suggestion restores it.
The recipe itself checks out: actions/checkout leaves remote.origin.fetch as +refs/heads/*:refs/remotes/origin/*, so git fetch origin "$DEFAULT_BRANCH" does advance the remote-tracking ref and HEAD..origin/<default> is accurate after the fix branch is committed.
Automated nightly regeneration of tend's workflow files. **tend version:** 0.1.20 → 0.1.22 ## Notable changes - **Notifications now run off a recovery queue** (max-sixty/tend#1074). The pre-check drops the old layered inbox sweep (shadowed-run and closed-bot-PR marking) in favour of a single paginated snapshot taken before a 10-minute cutoff, passes that cutoff through to the agent, and keeps repository watching enabled with an idempotent `PUT .../subscription` on every cycle. The job also gains a serial `tend-notifications` concurrency group. - **`tend-review` re-targets instead of skipping** (max-sixty/tend#1082). The "skip when the live HEAD is already examined" gate step and its `if:` guards are gone; a live session now re-targets when HEAD moves. The concurrency group adds `queue: max` so a push can't evict a pending `ready_for_review` run. - **Skills check the default branch for a landed fix before opening a PR** (max-sixty/tend#1070), and `review-runs` gains the run census as a second stranded-trigger drain input (max-sixty/tend#1073). - **Poll/rerun script fixes** (max-sixty/tend#1053, max-sixty/tend#1055): `tend-review` no longer gates the CI poll, and an unresolvable commit fails fast rather than passing silently. - **Generator fixes**: `watched_workflows` and `branches` are validated as string lists (max-sixty/tend#1076), and block prompts no longer get padded blank lines (max-sixty/tend#1090). Full upstream diff: max-sixty/tend@0.1.20...0.1.22 Co-authored-by: worktrunk-bot <[email protected]>
Automated nightly regeneration of tend's workflow files. **tend version:** 0.1.20 → 0.1.22 **Notable changes** - Notifications recover work missed while the unread queue was stale, and the job now runs under its own `tend-notifications` concurrency group so overlapping schedules serialize instead of racing (max-sixty/tend#1074). - Skills check the default branch for a landed fix before opening a PR, cutting duplicate PRs for work that already merged (max-sixty/tend#1070). - `review-runs` gains the run census as a second stranded-trigger drain input (max-sixty/tend#1073), and reviews re-target when HEAD moves rather than being discarded (max-sixty/tend#1082). - The CI poll no longer lets `tend-review` gate it, and the commit-resolution script fails fast instead of proceeding on an unresolved SHA (max-sixty/tend#1053, max-sixty/tend#1055). - The generator validates `watched_workflows` and `branches` as string lists, and stops padding blank lines inside block prompts (max-sixty/tend#1076, max-sixty/tend#1090). max-sixty/tend@0.1.20...0.1.22 **Beyond the regeneration:** 0.1.22's `tend-review.yaml` sets `concurrency.queue: max`, which GitHub accepts but the pinned `actionlint` hook rejects, so this PR also adds a scoped `-ignore` for that one schema message to `.pre-commit-config.yaml` — otherwise `lint` is red and the PR can't merge on its own CI. Tracked upstream as max-sixty/tend#1094. --------- Co-authored-by: leaf-agent <[email protected]>
A fix can land on the default branch while an agent is preparing a PR. The existing PR-only dedup check cannot see a direct commit, so the agent may publish a PR for a problem that is already fixed.
The final pre-publish check now fetches the default branch and inspects the commits that arrived since the checkout.
ci-fixpoints to that canonical rule while retaining its author-agnostic PR query. If the failure no longer reproduces on the fetched branch, the agent does not open the PR.Verification: pre-commit on both changed skill files, plus the three duplicate PRs documented in #1068.
Closes #1068