Skip to content

Page on hosted launches that are refused or never come up - #1986

Closed
niall-sandboxaq wants to merge 11 commits into
mainfrom
hosted-launch-refused-alert
Closed

niall-sandboxaq wants to merge 11 commits into
mainfrom
hosted-launch-refused-alert

Conversation

@niall-sandboxaq

Copy link
Copy Markdown
Collaborator

What's wrong today

When the hosted controller refuses a machine's first launch with its own checks (for example, an image that fails its validation), the machine reports needs_attention and Core records failed with reason needs_attention. "Hosted machine launches failing" doesn't count that reason, and no other alert covers it: "Cloud calls failing" counts only AWS errors, and a refused first launch is recorded once and then left in error, so no existing alert fired for it. A deployment with a bad worker image would fail every new machine without paging.

What this changes

  • When a machine reports needs_attention and has never been ready (first_ready_at is empty), the hosted metric and log line record the finer reason launch_refused, as a first launch that never connected is already told apart from a wake that didn't come back (wake_failed). Product telemetry keeps needs_attention.
  • A machine wanted stopped, retained or deleted still records stop_failed, and one that has been ready still records needs_attention.
  • "Hosted machine launches failing" counts launch_refused with the other launch reasons. Its message and the observability README name the new case.
  • "Hosted machine launches failing" needs 3 failures in 30 minutes, so it catches a bad image across the fleet, while a single refused machine shows on the dashboard without paging.
  • Fixed words only: no cloud error text, image ids or account ids in reasons, tags or log fields.

How it was tested

  • Route tests: a never-ready machine reporting needs_attention records launch_refused, also from an earlier revision's late report once it has been asked to run again (state stopped, wanted running); a machine that has been ready records needs_attention and isn't counted, also from a late report; a machine wanted down records stop_failed even if never ready, from a current or a late report.
  • A unit test of the rule, and the fixed-words and monitor artefact tests updated.
  • On main 9a63077d7 with this change: the hosted controller, cloud controller machines, hosted machines, observability and admin tests pass, 506 of 506, against a real Postgres; with the two late-report cases added, test_hosted_controller.py passes 109 of 109 with hosted agents v2 on and with it off. ruff, format and mypy clean.

Not covered

  • No change to the hosted controller or to Core's observation schema.

🤖 Generated with Claude Code

niall-sandboxaq and others added 11 commits November 13, 2026 14:56
A machine that reports it needs attention before it has ever been ready
now records the failure as launch_refused, and "Hosted machine launches
failing" counts it. A refused first launch used to be recorded once and
left in error, so no alert fired for it. Machines that have been ready are
unchanged, so restarts can't page this way. Reasons and tags stay fixed
words.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@niall-sandboxaq

Copy link
Copy Markdown
Collaborator Author

Closing: this is being folded into a single hosted agents v2 PR, built from current main. A link will be added here once it's up. The branch is kept for history.

@niall-sandboxaq

Copy link
Copy Markdown
Collaborator Author

Folded into #2216, which brings all of hosted agents v2 into one PR with one commit per area. Closing this one in its favour.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant