Skip to content

SEO guide /guides/ai-agent-events/ documents two event types that no code emits (integration.event, task.assigned) #1391

Description

@lilyshen0722

/guides/ai-agent-events/ shipped in #1388 (merged 90b93d6c) documents a five-row event-type table, and two of the rows name events that no code in this repository emits. The page is static, crawlable, and now live on main at frontend/src/content/guides.json:2689.

I filed this as a blocking review finding on #1388 before it merged; recording it as an issue so it survives the merge rather than sitting on a closed PR.

Measured against origin/main:

row status
chat.mention real — 3 literal producers plus MENTION_EVENT_TYPES
thread.mention real — backend/services/agentMentionService.ts:144
heartbeat real — routes/registry/admin.ts:435, routes/registry/pod-agents.ts:150, services/agentStateService.ts:151
task.assigned not an event type
integration.event no producer anywhere

integration.event does not exist

It appears only under docs-site/ — agents/events.mdx:89 (with a full JSON example), agents/runtime-protocol.mdx:62, integrations/webhooks.mdx:26. Zero hits in backend/.

The real type for that slot is integration.summary: produced in the backend and a member of TYPING_EVENT_TYPES at backend/services/agentEventService.ts:351.

The guide is faithful to our own docs here. The docs are wrong, which is why this needs fixing in two places or it will be re-seeded by the next writer.

task.assigned is a category error

It exists, but as an AgentRun.trigger value, not an AgentEvent.type:

  • backend/models/AgentRun.ts:116 — enum: ['mention','heartbeat','task.assigned','chat.message','pod.join','first_contact','manual']
  • backend/services/nativeRuntimeService.ts:609 — if (raw === 'task.assigned') return 'task.assigned';

Nothing constructs an AgentEvent with that type. The guide's prose commits to the stronger reading — "The task.assigned event carries the task and its current status" — so an agent author who follows it will poll for an event that never arrives.

The table also omits the highest-volume real event

message.posted has 6 literal producers and is the entire wake-on-message path. A reader gets a five-row taxonomy that leaves it out while including two types that do not exist.

Why CI is green on this

The guard added in #1388 is:

for (const eventType of ['chat\\.mention','thread\\.mention','task\\.assigned','heartbeat','integration\\.event']) {
  assert.match(eventsHtml, new RegExp(eventType));
}

It pins the string, never the referent, so it stays green whether or not the kernel emits any of them. This is the failure mode TASK-074 was filed against — a doc asserting a kernel mechanism that no test guards — now on a page with crawl reach.

Suggested fix

  1. frontend/src/content/guides.json — integration.event → integration.summary; drop the task.assigned row or relabel it explicitly as a run trigger, not a polled event; consider adding message.posted.
  2. docs-site/agents/events.mdx, docs-site/agents/runtime-protocol.mdx, docs-site/integrations/webhooks.mdx — same correction upstream, or the error regenerates.
  3. If the event vocabulary is worth guarding, the assertion has to resolve against the producer set rather than the rendered string.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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