Skip to content

fix(agent-server): correct WebhookSpec base_url and flush_delay descriptions - #5943

Merged
enyst merged 2 commits into
mainfrom
claude/umbrella-bug-fixes-tgz9ai-webhook-spec-docs
Oct 22, 2026
Merged

enyst merged 2 commits into
mainfrom
claude/umbrella-bug-fixes-tgz9ai-webhook-spec-docs

Conversation

@enyst

@enyst enyst commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

HUMAN:
This PR proposes a fix for a bug uncovered during the first full agentic run of verify-agent-server.


AGENT:

Summary

 WebhookSpec OpenAPI descriptions
- events go to {base_url}/events
+ event batches go to {base_url}/events/{conversation_id.hex}

- flush timer resets on each new event
+ first queued event starts the timer; later events do not reset it

Conversation metadata still goes to {base_url}/conversations. Runtime behavior does not change.

Why

Published webhook descriptions should match the receiver path and timer behavior already implemented.

Issue Number

Fixes #5936

How to Test

Previously recorded verification:

Reproduction commands, results, and limits
  • uv run pytest -q tests/agent_server/test_config.py tests/agent_server/test_webhook_subscriber.py: 59 passed. The new test fails on main (old descriptions) and passes here.
  • uv run pre-commit run --files <changed files>: all hooks pass.
  • Map proof (verify-agent-server):
    • main (6e7a853): control-agent-server map run --file F32 --only F32.webhook-spec-docs --fresh --repeat 2 --checkout <main checkout> -> xfail in both attempts.
    • this branch, before dropping the marker: same command launching this worktree -> xpass in both attempts.
    • after dropping the marker: control-agent-server map check ok (no problems); map run --file F32 --only F32.webhook-spec-docs --fresh -> pass.

Video/Screenshots

No UI change; reproduction evidence is above.

Type

  • Bug fix

Notes

Generated TypeScript descriptions remain pinned to the released Agent Server schema and update with the next server version bump.

Visual explanation by Codex using HumanLayer show-me.


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 python-node-runtime Link
python-minimal amd64, arm64 python-node-runtime Link
python amd64, arm64 python-node-runtime Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:124bf91-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-124bf91-python \
  ghcr.io/openhands/agent-server:124bf91-python

All tags pushed for this build

ghcr.io/openhands/agent-server:124bf91-golang-amd64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-golang-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-golang-amd64
ghcr.io/openhands/agent-server:124bf91-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:124bf91-golang-arm64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-golang-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-golang-arm64
ghcr.io/openhands/agent-server:124bf91-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:124bf91-java-amd64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-java-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-java-amd64
ghcr.io/openhands/agent-server:124bf91-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:124bf91-java-arm64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-java-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-java-arm64
ghcr.io/openhands/agent-server:124bf91-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:124bf91-python-amd64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-amd64
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-amd64
ghcr.io/openhands/agent-server:124bf91-python-arm64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-arm64
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-arm64
ghcr.io/openhands/agent-server:124bf91-python-minimal-amd64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-minimal-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-minimal-amd64
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-minimal-amd64
ghcr.io/openhands/agent-server:124bf91-python-minimal-arm64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-minimal-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-minimal-arm64
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-minimal-arm64
ghcr.io/openhands/agent-server:124bf91-python-slim-amd64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-slim-amd64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-slim-amd64
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-slim-amd64
ghcr.io/openhands/agent-server:124bf91-python-slim-arm64
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-slim-arm64
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-slim-arm64
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-slim-arm64
ghcr.io/openhands/agent-server:124bf91-golang
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-golang
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-golang
ghcr.io/openhands/agent-server:124bf91-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:124bf91-java
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-java
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-java
ghcr.io/openhands/agent-server:124bf91-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:124bf91-python-minimal
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-minimal
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-minimal
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-minimal
ghcr.io/openhands/agent-server:124bf91-python-slim
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python-slim
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python-slim
ghcr.io/openhands/agent-server:124bf91-python-node-runtime-slim
ghcr.io/openhands/agent-server:124bf91-python
ghcr.io/openhands/agent-server:124bf915011af803c78796c4c8eec8c623aa1773-python
ghcr.io/openhands/agent-server:claude-umbrella-bug-fixes-tgz9ai-webhook-spec-docs-python
ghcr.io/openhands/agent-server:124bf91-python-node-runtime

About Multi-Architecture Support

  • Each variant tag (e.g., 124bf91-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 124bf91-python-amd64) are also available if needed

Jev-Fast-Audit

⚡ Jev fast audit · estimates · 0.30s · commit ec3744b
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 6/6 hunks, 3/3 files.

All estimates and evidence
Estimate Likelihood / value Direct evidence
SQL injection 3.0% No direct hunk selected
Command injection 4.0% No direct hunk selected
Weakened authentication 3.0% No direct hunk selected
Weakened authorization 3.0% No direct hunk selected
Contract regression 10.0% No direct hunk selected
Data loss 3.0% No direct hunk selected
Sensitive data disclosure 3.0% No direct hunk selected
Unexpected data transfer 4.0% No direct hunk selected
Credential misuse 4.0% No direct hunk selected
Untrusted instruction authority 2.0% No direct hunk selected
Package source redirection 4.0% No direct hunk selected
Unverified remote execution 3.0% No direct hunk selected
Privileged environment access 2.0% No direct hunk selected
Security assessment bypass 3.0% No direct hunk selected
Prohibited workload 2.0% No direct hunk selected
Primary concern None selected; confidence 91.0% No primary concern to locate

…iptions

The published descriptions said events go to {base_url}/events and that
the flush timer resets on each new event. Event batches are posted to
{base_url}/events/{conversation_id.hex}, and the timer starts at the first
queued event and is not reset (test_flush_delay_not_reset_on_new_event).
Docs only; drop the F32.webhook-spec-docs known-bug marker.

Fixes #5936

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014MKndVj7XWvRQmvW9w2bDg
@enyst enyst self-assigned this Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-agent-server/openhands/agent_server
   config.py171199%600
TOTAL514042039560% 

@enyst
enyst marked this pull request as ready for review October 14, 2026 02:44
@enyst
enyst requested a review from all-hands-bot October 14, 2026 02:50

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This review was posted by an AI agent (OpenHands).

Scope: in-repo and correctly owned. This is an agent-server change to the OpenAPI contract (openhands-agent-server/openhands/agent_server/config.py), which this repository owns. No product/architecture decision is required.

What the change does: rewrites two WebhookSpec Field(description=...) strings and one verify-agent-server map entry, plus a metadata-only regression test. No behaviour change.

Verification against the workspace:

  • base_url now says event batches go to {base_url}/events/{conversation_id.hex} (id without dashes) and conversation info to {base_url}/conversations. WebhookSubscriber builds exactly f"{self.spec.base_url.rstrip('/')}/events/{self.conversation_id.hex}" (conversation_service.py:2636) and .../conversations (:2800). Accurate.
  • flush_delay now says the timer starts with the first queued event and is not reset by later events. _start_flush_timer only creates a timer when _flush_timer is falsy (:2751), and test_flush_delay_not_reset_on_new_event asserts this. Accurate.
  • Grepped the tree: no other in-repo source embeds the old strings; the only remaining copies are the two not-contains assertions in the F32 map (intended) and the generated TypeScript schema.
  • The generated clients/typescript/src/generated/agent-server-schema.ts still contains the old text. Leaving it untouched is correct: scripts/check-agent-server-api.mjs regenerates from config.agentServerImage (pinned 1.54.0-python) and fails if the file differs, so editing it here would break that check. It is unsupported release state until the next agent-server bump.
  • Metadata-only Field description edits are explicitly treated as non-breaking under the AGENTS.md API compatibility pointers; no deprecation/migration is needed.
  • Local focused run: tests/agent_server/test_config.py (16 passed) and tests/agent_server/test_webhook_subscriber.py (43 passed). Current-head check runs for ec3744b0 are green, including agent-server-tests and the OpenAPI REST API breakage check.

No material correctness, security, compatibility, or acceptance-criterion defect found on the current head.

✅ APPROVED

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst
enyst merged commit 3dd47fa into main Oct 22, 2026
51 checks passed
@enyst
enyst deleted the claude/umbrella-bug-fixes-tgz9ai-webhook-spec-docs branch October 22, 2026 13:15
@github-actions github-actions Bot mentioned this pull request Oct 22, 2026
1 of 7 tasks
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.

[Bug]: WebhookSpec descriptions give the wrong events path and say the flush timer resets on each event

3 participants