Repository navigation
Start ci-fix only on failed runs, not cancelled ones - #1535
Merged
Merged
Conversation
On a busy default branch nearly every cancelled run is one a newer commit superseded. tend-ci-fix keeps one pending trigger per watched workflow and branch, so each of those cancellations replaced whatever was waiting, including a failure's trigger. On max-sixty/leaf on 2026-10-10, main recorded 96 cancelled `ci` runs and 3 failed ones; a failed run whose trigger waited behind a busy session was replaced 30 minutes later by a cancellation's, and the session that finally ran started on a cancellation and exited in seconds. The failure was never worked. The job's `if:` now admits only `failure`, and ci-fix drops its cancellation branch and the prompt's now-constant `Conclusion:` line. A job that hits its timeout also ends cancelled and now starts no session; TODO.md records that gap with the design that would close it, issues as the bus from failing runs to fixes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tend-agent
reviewed
Oct 11, 2026
tend-agent
left a comment
Collaborator
There was a problem hiding this comment.
The generated workflow comment carries Tend-specific rationale and a reference to Tend’s own TODO into every consumer. The inline suggestion keeps the shipped comment scoped to the default; the existing TODO entry retains the project rationale.
The rationale and the TODO reference belong to tend, not to every consumer's workflow. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tend-agent
approved these changes
Oct 11, 2026
Merged
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
max-sixty
pushed a commit
to max-sixty/worktrunk
that referenced
this pull request
Oct 13, 2026
Regenerates the Tend workflows with tend 0.3.13 (from 0.3.11). The one behavior change in the generated files is that `tend-ci-fix` now starts only when a watched workflow on `main` **fails**; a cancelled run no longer starts a session, and the prompt drops its `Conclusion:` line since it is always a failure ([max-sixty/tend#1535](max-sixty/tend#1535)). Every other workflow changes only its action pin. Other changes riding in with the new action version: - The bundled Claude Code CLI moves to 2.1.296 (max-sixty/tend#1536). - The CI skills weigh whether rerunning an unrelated CI failure is worth it before triggering the rerun (max-sixty/tend#1541). - A new opt-in `workflows.review.await_ci` setting lets a review finish without waiting for CI (max-sixty/tend#1538). This repo doesn't set it, so reviews behave as before. The PR also updates the nightly overlay (`.claude/skills/running-tend/references/nightly-cleaner.md`), which said `tend-ci-fix` fires on cancelled runs and reads a `Conclusion:` line. Neither holds after this upgrade. Full upstream diff: max-sixty/tend@0.3.11...0.3.13 Co-authored-by: worktrunk-bot <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 14, 2026
`tend-ci-fix` starts only on a watched run's `failure` (#1535), and GitHub ends a job that exceeds its time limit as `cancelled`, so a CI job that hangs until its limit never gets a ci-fix session. A step that exceeds its own `timeout-minutes` fails instead, so a consumer that bounds the hang there gets it diagnosed. A probe workflow on tend-agent/tend-integration confirmed all three conclusions: a foreground step timeout and a `background: true` step timeout both fail, and a job timeout is cancelled. This isn't hypothetical. max-sixty/leaf's push suite hit the 6-hour job limit four times between 2026-10-04 and 2026-10-14, and none of those runs started a ci-fix session. - `docs/tend.example.yaml` (and its install-tend mirror) tells consumers this in the ci-fix section. - `TODO.md`'s "Issues as the bus" entry now records the step-timeout workaround, the per-event pending slot from #1547, and the concurrent push and scheduled sessions #1547 allows. > _This was written by Claude Code on behalf of max-sixty_ 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.
On a busy default branch, nearly every cancelled run is one that a newer commit superseded.
tend-ci-fixkeeps one pending trigger per watched workflow and branch, so each of those cancellations replaced whatever trigger was waiting, including a failure's. In max-sixty/leaf on 2026-10-10, main recorded 96 cancelledciruns and 3 failed ones. Twice, a failed run's trigger waited behind a busy session and was replaced by a cancellation's trigger, 30 and 10 minutes later. The session that eventually ran started on a cancellation and exited in seconds, so neither failure was worked by the bot.The job's
if:now admits onlyfailure, andci-fixdrops its cancellation branch. The prompt drops itsConclusion:line, which would now always readfailure. The README and the example config say "fails" rather than "fails or is cancelled".A job that hits its timeout also ends
cancelled, so it no longer starts a session.TODO.mdrecords that gap alongside the design that would close it: issues as the bus from failing runs to fixes, filed by a deterministic step, with deduplication and granularity left open.This changes when the agent runs, not how it behaves once running, so no eval case covers it. The
generator/tests/test_generate.pyassertions and the regtest snapshots cover the new condition.