Skip to content

fix(sidecar): carry parkedAt through the v2 deployment record (CL-8184) - #771

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-8184-teardown-tests
Sep 17, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-8184-teardown-tests

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

apps/sidecar/test/workflow-teardown-flavor.test.ts had 2 failing cases since PR #764 introduced deployment-record schema v2 (tenantId/principalId required in workflow-deployment-record.ts).

Root cause: apps/sidecar/test/support/workflow-lifecycle-fixture.ts's makeWorkflowFrame cast an empty object into AgentDeployFrame["config"]. The deploy path persists tenantId/principalId straight from frame.config, so the fixture wrote a record missing both fields. readWorkflowDeploymentRecord validates on read and returns undefined for a record that fails the v2 schema -- so every post-deploy read in the suite silently came back undefined, and record?.parkedAt was undefined not because the hibernate path dropped the marker, but because the record itself never round-tripped.

Fix: give the fixture real tenantId/principalId values so a deployed record is v2-valid and round-trips through readWorkflowDeploymentRecord as production deploys do. No production code changed -- markWorkflowDeploymentRecordParked already threads parkedAt correctly.

Test plan

  • bun test apps/sidecar/test/workflow-teardown-flavor.test.ts -- 6 pass, 0 fail
  • bun --cwd apps/sidecar test -- 324 pass, 0 fail
  • bun run typecheck -- clean

The lifecycle test fixture cast an empty object into AgentDeployFrame's
config, so a deployed record was missing the v2-required tenantId/
principalId and every subsequent readWorkflowDeploymentRecord silently
failed schema validation (returning undefined). That made
workflow-teardown-flavor.test.ts's parkedAt assertions fail against an
undefined record, not a missing marker -- give the fixture real
tenantId/principalId so records round-trip.
@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8184

@TheGreatAxios
TheGreatAxios merged commit d6fe049 into main Sep 17, 2026
24 checks passed
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