can1357/oh-my-pi · error · RuntimeError
release state missing for {release_key}
Error message
release state missing for {release_key} What it means
run_task raises RuntimeError('release state missing for {release_key}') when inputs.release is set (a release-CI/repair task) but db.get_release() finds no row for the key '{repo_full_name}#{tag}'. The release lifecycle rows (awaiting_ci/fixing/green/failed/superseded) in the releases table are the source of truth; without one the worker cannot build the ReleaseToolContext (expected_sha etc.) needed by release host tools.
Source
Thrown at python/robomp/src/worker.py:812
*,
task_kind: str,
inputs: TaskInputs,
comment: CommentInfo | None = None,
pr_number: int | None = None,
review_payload: dict[str, Any] | None = None,
pr: PullRequestInfo | None = None,
directive: DirectiveInfo | None = None,
thread: tuple[ThreadMessage, ...] = (),
) -> str | None:
"""Async wrapper that runs the synchronous RPC driver on a worker thread."""
review_mode = task_kind == "review_pr" or inputs.workspace.branch.startswith("review/pr-")
loop = asyncio.get_running_loop()
release_binding: ReleaseToolContext | None = None
if inputs.release is not None:
release_key = f"{inputs.repo.full_name}#{inputs.release.tag}"
release_row = inputs.db.get_release(release_key)
if release_row is None:
raise RuntimeError(f"release state missing for {release_key}")
release_binding = ReleaseToolContext(
repo=inputs.repo.full_name,
tag=inputs.release.tag,
version=inputs.release.version,
key=release_key,
expected_sha=release_row.current_sha,
default_branch=inputs.release.default_branch,
)
bindings = ToolBindings(
db=inputs.db,
github=inputs.github,
git_transport=inputs.git_transport,
repo=inputs.repo,
issue=inputs.issue,
workspace=inputs.workspace,
loop=loop,
settings=inputs.settings,
author_name=inputs.settings.resolved_author_name,View on GitHub (pinned to 9690622007)
Solutions
- Check the releases table (GET /releases or sqlite /data/robomp.sqlite 'select * from releases') for the '{repo}#{tag}' key.
- Re-trigger the release flow so the row is created: push/re-tag or re-run the release workflow so the webhook records the release before CI handling.
- Verify the webhook that creates the release row was received (check server logs / events for the push event); fix webhook connectivity if it was dropped.
- If testing, seed the release row via the normal flow rather than calling run_task with a bare inputs.release.
- Ensure the tag string matches exactly (including 'v' prefix) between the workflow payload and the recorded release.
Defensive patterns
Strategy: validation
Validate before calling
key = f"{repo.full_name}#{release.tag}"
row = db.get_release(key)
if row is None:
raise RuntimeError(f"release state missing for {key}; re-run the release flow to create it") Try / catch
try:
result = await run_task(task_kind='handle_release_ci', inputs=inputs)
except RuntimeError as e:
if 'release state missing' in str(e):
log.error('release row absent; re-trigger the release push/workflow to recreate it')
else:
raise Prevention
- Ensure the release row is created by the tag-push webhook before any CI verdict task runs.
- Check webhook delivery logs; a missed push event leaves releases untracked.
- Do not clear/rotate the releases table while release CI tasks are in flight.
- Keep the exact tag string (including 'v' prefix) consistent between push, workflow payload, and DB key.
- Seed release rows through the normal flow rather than constructing TaskInputs by hand in tests.
When it happens
Trigger: handle_release_ci dispatches a task for a workflow_run whose release row was never created (webhook for the tag push missed or processed out of order), the row was deleted/rotated, the DB volume was reset, or the tag/key format changed between versions.
Common situations: Release rows superseded/removed while a CI verdict was still in flight; testing against an empty sqlite file; replaying an old release delivery after the releases table was cleared; mismatch between the tag in the workflow_run payload and the tag recorded at push time (e.g. annotated vs lightweight tag strings).
Related errors
- blob broker worker requires ${BLOB_BROKER_SOCKET_ENV} and ${
- GitHub release ${expectedTag} is a draft, not a published re
- JS eval worker smoke fell back from the isolated subprocess
- LSP mux environment is incomplete
- RPC message pagination ended before the advertised total
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/6f02f1077eb1e9af.
Report an issue: GitHub.