Skip to content

EventResult schema rejects cursor / hasMore fields returned by events_create #126

Description

@kalyanaramansanthanam

Environment

  • vercel==0.5.8
  • Python 3.12 (Vercel Lambda runtime)

The bug

The Vercel workflow service returns extra cursor and hasMore fields on events_create responses — observed on the very first RunStartedEvent create for every workflow run:

{
  "event": {...},
  "cursor": "eid:evnt_01KS1Y9HA5NR3TS7GER2VAKQK1",
  "hasMore": false
}

EventResult (src/vercel/_internal/workflow/world.py:590) inherits the SDK BaseModel's model_config = pydantic.ConfigDict(extra="forbid", ...), so validation fails:

pydantic_core._pydantic_core.ValidationError: 2 validation errors for EventResult
cursor
  Extra inputs are not permitted [type=extra_forbidden, input_value='eid:evnt_...']
hasMore
  Extra inputs are not permitted [type=extra_forbidden, input_value=False]

That 400s every workflow start, on the first SDK call after the workflow body is reached.

Suggested fix

Either:

  • (a) extra="ignore" (or extra="allow") on EventResult specifically — appropriate if these are response metadata that consumers don't need; or
  • (b) declare cursor: str | None = None and has_more: bool | None = Field(None, alias="hasMore") on EventResult — appropriate if they're part of the contract and worth exposing.

Context

This is the second EventResult schema-mismatch observed against the live server in vercel==0.5.8 — the first being #116 (RefDescriptor returned in event/run/step despite remoteRefBehavior=resolve). May be worth a broader audit of world.py's response schemas against the actual server contract, possibly by golden-recording a few representative responses in tests/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions