Skip to content

test(linear): add orchestration integration test against real createTaskCore (unit mocks hid 3 dev bugs) #304

@isadeks

Description

@isadeks

Component

API or orchestration, Tests / CI

Describe the gap

The #247 Mode A orchestration unit tests all mock createTaskCore, so none exercise the real task-creation persistence + validation path. The first dev smoke surfaced three bugs that every unit test missed precisely because of this:

  1. Idempotency key rejectedreleaseChild built ${orchestration_id}#${sub_issue_id}, but createTaskCore validates against /^[a-zA-Z0-9_-]{1,128}$/; the # 400'd and children silently never started. Mocked createTaskCore never ran the validator.
  2. Reconciler read orchestration_id top-level — but createTaskCore persists channel metadata as a nested channel_metadata MAP. The mocked tests used an unrealistic top-level stream image and passed.
  3. Reconciler OOM at 256MB — only observable at runtime.

Proposed solution

Add an integration test that runs the orchestration release/reconcile path against the real createTaskCore and a real DynamoDB (DynamoDB Local or aws-sdk-client-mock with realistic persisted shapes), asserting:

  • a released child produces a TaskRecord whose channel_metadata.orchestration_id round-trips,
  • the idempotency key is accepted by the real validator,
  • the reconciler's stream parser reads the id from the persisted record shape (not a hand-built top-level image).

Acceptance criteria

  • An integration test exercises releaseChild → real createTaskCore → real persisted record → reconciler stream parse, end to end.
  • The test would fail against any of the three bugs above (regression coverage).
  • Runs in CI without AWS credentials (DynamoDB Local or equivalent).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    adaptersThird-party integrations: Linear, Slack, GitHub App, notification/deploy providersenhancementNew feature or requestorchestrationTask lifecycle, REST API handlers, orchestrator Lambdas, durable execution

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions