Skip to content

feat: add Task.runtimeMetadata for host-resolved worker secrets#132

Open
NicholasDCole wants to merge 1 commit into
conductor-oss:mainfrom
NicholasDCole:feat/task-runtime-metadata
Open

feat: add Task.runtimeMetadata for host-resolved worker secrets#132
NicholasDCole wants to merge 1 commit into
conductor-oss:mainfrom
NicholasDCole:feat/task-runtime-metadata

Conversation

@NicholasDCole

Copy link
Copy Markdown

Summary

Adds runtimeMetadata to the Task schema so the generated client type carries it.

The server can resolve a worker's declared TaskDef.runtimeMetadata secret names at poll time and deliver the resolved values on the wire-only Task.runtimeMetadata (never persisted to task input). The runtime client already keeps unknown JSON keys; this makes the field first-class and type-checked.

Changes

  • src/open-api/spec/spec.json: Task.runtimeMetadata (object, additionalProperties: { type: string }).
  • src/open-api/generated/types.gen.ts: regenerated via npm run generate-openapi-layerruntimeMetadata?: { [key: string]: string }.
  • src/open-api/__tests__/TaskRuntimeMetadata.test.ts: compile-time type guard + JSON round-trip + omit-when-empty.

Test

npx jest --testMatch='**/src/open-api/__tests__/**/*.test.ts' passes; the type guard was validated fail-first with tsc (removing the field yields TS2339).

🤖 Generated with Claude Code

…types

The server can resolve a worker's declared TaskDef.runtimeMetadata secret names
at poll time and deliver the values on the wire-only Task.runtimeMetadata
(conductor-oss PR #1255) — never persisted to task input. Declare the field on
the Task schema so the generated client type carries it (string->string map,
optional). The runtime client already keeps unknown JSON keys; this makes the
field first-class and type-checked.

- spec.json: Task.runtimeMetadata (object, additionalProperties string).
- types.gen.ts: regenerated via `npm run generate-openapi-layer`.
- __tests__/TaskRuntimeMetadata.test.ts: compile-time type guard (tsc) + JSON
  round-trip + omit-when-empty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
integration-v4-sm 37.14% <ø> (-27.08%) ⬇️
integration-v5-sdkdev 37.14% <ø> (-31.67%) ⬇️
unit 50.96% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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