Skip to content

fix/issues/02 no casts core - #259

Merged
xiduzo merged 7 commits into
fix/issues/01-typed-batchesfrom
fix/issues/02-no-casts-core
Dec 2, 2026
Merged

xiduzo merged 7 commits into
fix/issues/01-typed-batchesfrom
fix/issues/02-no-casts-core

Conversation

@xiduzo

@xiduzo xiduzo commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Summary

Changes

Test plan

  • [ ]

Related

xiduzo and others added 7 commits December 1, 2026 21:10
…th no cast

Red: removing the double cast made every definitionOf(node).method(node)
call fail with TS2345 (parameter of type 'never'), 10 errors.
Green: definitionOf<T> returns NodeDefinition of the node of type T over a
registry typed per node type; check-types and 1232 flows tests pass.

Closes #251

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
Red: without the cast, valueDeciderNameSchema.options[0] is
ValueDeciderName | undefined (zod types options as an array); annotating it
fails with TS2322, and the optional decider field hid the undefined.
Green: FIRST_VALUE_DECIDER comes from the as-const tuple that builds the
enum; check-types and flows tests pass.

Refs #252

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
…ng needs no cast

Red: without the cast, apply(suggestion, selection) failed with TS2345
(parameter of type 'never').
Green: applierOf<K> reads the table by kind and returns the applier for
that kind; check-types and assistant tests pass.

Closes #250

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
Red: without the cast, withoutRun failed with TS2322 (Omit<T, "run"> is not
T); returning Omit<T, "run"> collapsed the session input union (TS2345).
Green: each case destructures run from its own input, so TypeScript drops
the key from every member of the union; the helper is gone. check-types and
162 work and placement tests pass.

Closes #237

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
…h no cast

Red: without the cast to a record, indexing the router client by a contract
name failed with TS7053 (implicit any).
Green: the network drop and the copies run as an oRPC interceptor, and the
client is a plain HostClient listed per procedure, so a test replaces one
procedure by a typed spread. Three casts are gone. check-types and 315
devices tests (testing, host, secrets, exchange) pass.

Closes #236

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
Red: without the casts, kindOf/kindOfType failed with TS2322 (a union of
KindOf<T> is not NodeKind), and the goto Command failed with TS2322 (the
compiled graph knew only the node name __start__).
Green: kindOf<T> returns KindOf<T> from the registry typed per node type;
the StateGraph names its nodes as strings, so a goto to any node id and the
START edges type-check (two more casts gone). check-types and 4918 engine
tests pass.

Refs #241

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
…st have the real types

Red: without the casts, archive.tail failed with TS2322 (event was a record,
not a StepEvent) and devices.call failed with TS2322 (the request's call was
a loose object, not a WorkCall).
Green: the step event schema moves from api to the devices contract, and
transcriptEntrySchema is exact<TranscriptEntry>; workRequestSchema is
exact over a run work request built from the call schemas, so the casts in
host-router.ts and the Device's work serve go, and WORK_KINDS goes with the
loose schema. The contract shape changed, so the peer protocol is version 6.
check-types (all workspaces), 1082 devices, 118 api, 8 refusal and 556 client
tests pass.

Refs #234

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: sander boer <mail@sanderboer.nl>
@xiduzo
xiduzo added this pull request to stack #270 December 2, 2026 09:17
@xiduzo
xiduzo marked this pull request as ready for review December 2, 2026 10:21
@xiduzo
xiduzo merged commit 1942cb8 into main Dec 2, 2026
24 checks passed
@xiduzo
xiduzo deleted the fix/issues/02-no-casts-core branch December 2, 2026 10:23
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.

1 participant