Skip to content

A failed setup-runtime step skips the claude action's Report failure, so the outage goes unrecorded #1663

Done

Description

@cargo-affected-bot

Problem

When max-sixty/tend/setup-runtime fails, the run goes red with no tend-outage row. Since #1608 the generated workflows run it as its own step ahead of max-sixty/tend/claude. A failed step skips the steps after it, so the whole claude composite is skipped, and that includes its Report failure step. Before #1608, uv was installed inside the claude action, so a failure there reached Report failure. #857 guaranteed that a failure ahead of the agent is reported, and the guarantee no longer covers this step. When #906–#912 were closed, that guarantee was given as the reason a transient installer failure needs no retry, so a transient here now goes unrecorded.

Evidence

On 2026-11-08 and 2026-11-09, the GitHub release download in install-uv.sh returned curl: (22) The requested URL returned error: 504 and failed 14 runs in max-sixty/cargo-affected (tend 0.3.23). The step list for each is setup-runtime=failure, claude=skipped. None of them filed a tend-outage issue there:

Tend's own review-reviewers run 42468316184 shows both outcomes from the same 504 in one run:

Possible directions

tend runtime report-failure needs the runtime that setup-runtime installs, so moving the report into a workflow-level if: failure() step does not work on its own. Some options:

  • Have the generator emit a final if: failure() step that does not depend on the runtime: a small gh-only path that appends a row, or one that installs the runtime itself before reporting.
  • Accept that setup-runtime failures go unreported, and make review-runs treat a red run with setup-runtime=failure as a drainable outage row. It already lists red runs in the census.
  • Give the one curl in install-uv.sh the --retry knob that the closing comment on fix(install): ride out a CDN blip instead of losing the run to it #906 pointed to ("the knob is the attempt count in the existing loop"). That loop no longer exists on this path.

Activity

  1. tend-agent commented on Nov 10, 2026

    @tend-agent
    Collaborator

    I reproduced the gap from the code. setup-runtime runs install-uv.sh as a separate step ahead of the harness action, and that script fetched the uv archive with a single curl -fsSL and no retry. One 504 failed the step, which skipped claude and its Report failure.

    #1666 applies the third direction: --retry 5 on that curl, the attempt-count knob named when #906 was closed. Against a local server that returns 504 twice and then 200, plain curl -fsSL exits 22 with the same error as these runs, and --retry 5 recovers on the third request. CI is green on the PR, and it is waiting for a maintainer to merge it. The same script also installs the sandbox's agent uv fallback, so that download gets the retry as well.

    That PR uses Refs, not Closes, because a setup-runtime failure that outlasts the retries still goes unreported. The other two directions close that gap differently: a runtime-independent if: failure() step emitted by the generator, or review-runs treating setup-runtime=failure runs as outage rows. Choosing between them is a maintainer decision, so I haven't started either.

  2. max-sixty commented on Nov 27, 2026

    @max-sixty
    Owner

    @tend-agent the maintainer picked the generator fix: please have the generated workflows emit an if: failure() outage-report step after the harness action, independent of the harness runtime, so a failure in setup-runtime (or any step ahead of the agent) still files a tend-outage row naming the step that failed. That restores #857's guarantee, which #1608 lost when setup-runtime moved out of the claude action; the curl --retry 5 from #1666 covers transient 504s but not a failure that outlasts it. The PR closes this issue.

    This was written by Claude Code on behalf of max-sixty

  3. tend-agent commented on Nov 27, 2026

    @tend-agent
    Collaborator

    #1749 makes that change. Each generated agent job now runs a new max-sixty/tend/report-failure step right after the harness, gated on failure() && steps.harness.outcome == 'skipped'. The step runs the existing outage reporter from the action's own source under /usr/bin/python3 -I, so it still works when setup-runtime is what failed. It names the failed step, which it reads from the jobs API, below the row. A harness that ran and failed still reports through its own step, so the security-preflight exclusion holds. CI is green on 67ff3d4, and the PR closes this issue.

    Jobs with no harness step, such as mention verify and triage select, are still not covered. The PR description says so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions