feat(rivetkit): phase 1c — agentOs() native ladder + engine driver branch + driver-suite e2e green#5192
Conversation
…anch + driver-suite e2e green
Code Review — Phase 1c: agentOs() native ladder + engine driver branchOverviewThis PR migrates the Issues
handler.actorStartPromise?.resolve();Per CLAUDE.md's Fail-By-Default Runtime section, optional chaining is only acceptable for best-effort diagnostics and cleanup paths. Actor start is a required lifecycle step. If
const NATIVE_NAPI_ACTOR_STUB = {
onStop: async (_reason: string) => {},
debugForceCrash: async () => {},
} as unknown as AnyActorInstance;The double cast through
const factory = this.#bindings.NapiActorFactory.fromAgentOs(
options,
toolCallbacks ?? undefined,
);
export type AgentOsToolCallbacks = Record<string, unknown> | undefined | null;The tri-valued type signals uncertainty. Since this is explicitly "always Phase/task references in source comments Several comments reference phased implementation context that belongs in the PR description, not in the code. Per CLAUDE.md: "Don't reference the current task, fix, or callers". Examples:
These rot immediately once future phases land and the comments aren't updated. Multi-line comment blocks CLAUDE.md says "Never write multi-paragraph docstrings or multi-line comment blocks — one short line max." Several additions are multi-line JSDoc blocks (the
function buildConfigJson<TConnParams>(
_parsed: AgentOsActorConfig<TConnParams>,
): string {
return "{}";
}The Positive Notes
Questions
|
No description provided.