Skip to content

Read releases, their history and stats, active runs, and wait for a run (0.3.19) - #31

Open
MainSequenceDev wants to merge 2 commits into
mainfrom
claude/releases
Open

MainSequenceDev wants to merge 2 commits into
mainfrom
claude/releases

Conversation

@MainSequenceDev

Copy link
Copy Markdown
Contributor

Adds read-only release reads for the Claude and Codex Releases screens and their model tools (0.3.19).

New createDeployments() actions:

  • deployment-releases reads one page of the environment's releases (APIs, agents, static sites), then all their runs of the window (default 30 days) in one more request. Per release it returns the last ten run states, the last run, the deploying run and stats.
  • deployment-release returns one release's serving and wanted revisions (commit and configuration revision), its runs of the window, and stats.
  • deployment-active returns only the runs still queued or running. Hosts use it as the cheap check while something deploys.
  • deployment-wait re-reads one run every 10 s until it ends or timeoutSeconds (at most 120) runs out. The request's signal cancels it.

releaseStats() computes:

  • success rate: succeeded out of succeeded, failed or blocked
  • median and 90th-percentile time of the runs that succeeded
  • the slowest stage
  • the most common failure

The backend has no statistics endpoint. Two adjustments came from real data:

  • A run can wait about 4–8 minutes for its workflow's image build before its first stage starts. That wait counts as the stage "Waiting to start".
  • Blocked runs often have no error code (workflow_prerequisite_failed is only in their outcome). They fall back to the outcome.

Also:

  • docs/deployments.md documents the actions and the polling rules hosts follow.
  • Deployment runs gain the additive fields errorCode and releaseUid.

Verification:

  • npm test: 197 tests pass, including 7 new ones in tests/deployment-releases.test.cjs.
  • Ran read-only (GETs only) against a real backend: development has 11 releases and 223 runs in 30 days, Production 37 releases and 294 runs. The release history matched the serving and wanted revisions, and the active check worked.

🤖 Generated with Claude Code

MainSequenceDev and others added 2 commits November 18, 2026 20:44
… a run

Four read-only deployment actions for the Claude and Codex panes and model tools:
deployment-releases (a page of releases plus their runs of the window in one request),
deployment-release (serving and wanted revisions, runs and stats), deployment-active
(only queued and running runs) and deployment-wait (one run every ten seconds, at most
two minutes). releaseStats() computes success rate, durations, the slowest stage
(including the wait before the first stage) and the most common failure, since the
backend has no statistics endpoint. docs/deployments.md gives hosts the polling rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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