Skip to content

Mechanical consistency sweep across the packages #27

Description

@btravers

From the 2026-08-13 repo audit. One sweep of small, mechanical consistency fixes across the packages — none changes behaviour, together they keep the "same patterns everywhere" promise honest.

  • test:types script + tsconfig.test-d.json exist only in packages/start and packages/start-amqp; start-http and start-temporal have neither, while turbo.json defines a test:types task two of the three runtimes never register. Align (add the harness to http/temporal, even if empty of files today).
  • Root CLAUDE.md still says "examples/ stays the only place the gate is pinned by a type test — start-http ships no *.test-d.ts", predating packages/start-amqp/src/amqp-runtime.test-d.ts. Update the sentence — this is the exact doc-drift the file warns about.
  • The runtime: literal in RuntimeStartFailed construction is hand-duplicated in all three runtimes rather than derived from Runtime.name; http constructs inline (http-runtime.ts:139) while temporal/amqp share an identical startFailed helper (temporal-runtime.ts:67-68, amqp-runtime.ts:62-63). Pick one shape.
  • traceId fallback idiom: http omits the key when the inbound header is blank (kernel default applies); amqp writes inbound ?? id explicitly (message-units.ts:82-89) — same semantics, two idioms. Pick one.
  • UnitMeta.kind naming: http uses the protocol ("http"), temporal/amqp use the work noun ("activity", "delivery"). Decide the convention and record it.
  • @temporalio/common is a peer dependency for a single type-only import (import type { Duration }, temporal-runtime.ts:8), while the same package declares ActivityMiddleware structurally precisely to avoid peering @temporal-contract/contract. Apply the structural rule to Duration too, or state why not.
  • knip.json's workspaces block is dead config — knip's default entry patterns already cover src/main.ts (verified: knip passes with the block removed; examples/order-amqp was never listed and nothing broke). Delete it.

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