Skip to content

Endpoint outages: one log line per outage, run wait markers, and outerloop status - #448

Merged
renmengye merged 4 commits into
mainfrom
feat/endpoint-ensure
Oct 1, 2026
Merged

renmengye merged 4 commits into
mainfrom
feat/endpoint-ensure

Conversation

@renmengye

Copy link
Copy Markdown
Member

When an on-prem endpoint is down, runs that need it park and wait. Today the only trace is a warning repeated on every tick. This makes outages visible to the operator, and only to the operator: the GitHub board stays about agents and results.

  • Each waiting run records stage.endpoint_wait (the endpoint and when it started waiting). A successful session probe clears it.
  • The fleet logs one line when an endpoint goes down (with the waiting run) and one when it recovers (with the duration and every run that waited), shared across processes through a small locked journal, endpoint-waits/<profile>.json. No notifications, no extra probes.
  • outerloop status [--root] [--json] is read-only: active runs with their author route, override flag, phase, GPU-hours used and budget, and endpoint waits; plus current outages. No GitHub, scheduler, probes, locks or writes.
  • A JSON address record may name its model and an expires_at (Unix seconds). A model mismatch or an expired record counts as unavailable, so a run never talks to the wrong model after a server swap. Records are read with a 64 KiB bound.
  • The board and status strip are unchanged; endpoint waits never trigger a research-log commit (tests assert both).
  • Intake and self-initiated claims treat an unavailable endpoint as a quiet deferral instead of logging "author misconfigured" every tick.
  • Codex bridge sessions (Codex on chat-completions endpoints: LiteLLM bridge and stream shim #445) report recovery through the same path.

Compatibility: state read across versions gains two additive pieces, stage.endpoint_wait in run records and the endpoint-waits/ journal. Records and roots without them mean no recorded wait; no backfill is needed. Ended runs are never touched. The legacy author-route fixture covers repeated reads and a retry after an interrupted write; unknown stage and journal keys are preserved. Rolling back to the previous kernel ignores both: wait visibility is lost, run and PR lifecycle are unchanged. The Upgrading: line is in the CHANGELOG.

Gate: pytest (2789 passed), ruff check, ruff format --check, mypy.

… and a read-only outerloop status

A run whose on-prem server is unavailable now records when it started
waiting, the fleet logs one line when an endpoint goes down and one when
it recovers, and outerloop status (text or --json) lists active runs and
outages without touching state. A server record may name its model and an
expiry; a mismatch or an expired record counts as unavailable.
# Conflicts:
#	CHANGELOG.md
#	docs/endpoints.md
#	src/outerloop/harness.py

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head 1b695d7a — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: nothing blocking — 1 advisory note.

1 finding attached to the lines below.

Merged verdict: one non-blocking concurrency finding in endpoint outage recovery. Rejected findings: none.

Comment thread src/outerloop/endpoint_wait.py Outdated
@renmengye renmengye added the autoresearch:review Request a fresh advisory review of this PR's current state label Oct 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head 3e683847 — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: no defects found.

@renmengye
renmengye merged commit 0ff0cc8 into main Oct 1, 2026
5 checks passed
@renmengye
renmengye deleted the feat/endpoint-ensure branch October 1, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoresearch:review Request a fresh advisory review of this PR's current state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant