Skip to content

Commit f518f1c

Browse files
committed
docs: describe the unregistered worker failure exactly
Review feedback on #66. The guide said that a message for an unregistered actor class waits with no error. That was wrong. Rerun against solid-objects 0.17.1 with an instrumentation callback, the worker reported solid_objects.activation.failed six times in four seconds with errorName UnknownActorType, and returned the message to the queue each time without a counted attempt. Nothing printed without the callback, which is why the first run looked silent. The guide and the changelog now describe that failure. The step 7 note also points to the direct ref() call above instead of the step 6 class definition, which registers nothing.
1 parent fc6cf9a commit f518f1c

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
- Correct `docs/agents.md`: `reject` takes a code and an options object,
66
`this.reject(code, { message })`, not `this.reject(code, message)`.
77
- `docs/agents.md` now says that a worker process runs only the actor classes
8-
that it knows. A message for an unregistered class stays in SQL with no
9-
attempt and no error, so register each class before `runtime.run(signal)`.
8+
that it knows. For an unregistered class, actor setup fails with
9+
`UnknownActorType`, the worker reports `solid_objects.activation.failed`,
10+
and the message returns to the queue without a counted attempt. Nothing
11+
prints without an `instrumentation` callback. Register each class before
12+
`runtime.run(signal)`.
1013
It also tells agents to install the current release, puts the
1114
deny-by-default reminder beside the install step, and lists the API
1215
mistakes found in agent-written code.

‎docs/agents.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,12 @@ runs in the caller. These features need a process that calls
222222
- Messages to other actors.
223223
- Realtime broadcasts.
224224

225-
The worker process runs only the actor classes that it knows. Register each
226-
class before `run()`. A message for an unregistered class stays in SQL with no
227-
attempt and no error:
225+
The worker process runs only the actor classes that it knows. For a message
226+
whose class is not registered, actor setup fails with `UnknownActorType`. The
227+
worker reports `solid_objects.activation.failed` through instrumentation,
228+
returns the message to the queue without counting an attempt, and tries again.
229+
Nothing prints unless the application sets an `instrumentation` callback, so
230+
the message seems to wait with no error. Register each class before `run()`:
228231

229232
```typescript
230233
runtime.register(TicketSale)
@@ -236,7 +239,7 @@ await runtime.close()
236239
```
237240

238241
`TicketSale.ref(...)` also registers the class, so a script that calls `ref()`
239-
before `run()`, like the example in step 6, already works.
242+
before `run()`, like the direct call above, already works.
240243

241244
The packaged `solid-objects start` command does the same for a runtime that
242245
`solid-objects.config.js` exports. When no process runs, committed work waits

0 commit comments

Comments
 (0)