Skip to content

feat: add Task.RuntimeMetadata for host-resolved worker secrets - #154

Merged
NicholasDCole merged 5 commits into
conductor-oss:mainfrom
NicholasDCole:feat/task-runtime-metadata
Jul 29, 2026
Merged

feat: add Task.RuntimeMetadata for host-resolved worker secrets#154
NicholasDCole merged 5 commits into
conductor-oss:mainfrom
NicholasDCole:feat/task-runtime-metadata

Conversation

@NicholasDCole

@NicholasDCole NicholasDCole commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Task.RuntimeMetadata (Dictionary<string, string>) so the C# SDK preserves host-resolved worker secrets delivered on the wire-only runtimeMetadata field when a worker polls a SIMPLE task.

Why

The server resolves names declared in TaskDef.runtimeMetadata at poll time. Before this change, the C# client silently dropped those values during task deserialization.

Validation

Local smoke against http://localhost:8080/api using the same check_secret SIMPLE task:

SDK Result
main RuntimeMetadata is absent.
This PR Received DEMO_SECRET=demovalue12345 through Task.RuntimeMetadata.

Both workers completed successfully. The targeted serialization tests are included in this PR.

UI evidence

Main — runtime metadata unavailable

csharp-runtime-metadata-main-ui

This PR — runtime metadata delivered

csharp-runtime-metadata-feature-ui

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. Add the field to the
client Task model so it is not dropped on deserialization.

- Dictionary<string,string> RuntimeMetadata with [DataMember(Name="runtimeMetadata",
  EmitDefaultValue=false)] (empty omitted; [DataContract] makes Newtonsoft honor it).
- Wired into the constructor, ToString, Equals, and GetHashCode like OutputData.
- Tests/Client/TaskRuntimeMetadataTests.cs: round-trips and omit-when-empty.

Note: not built/tested locally (no dotnet in the authoring environment); relies
on CI for the build + test run.

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 Δ
unittests 3.70% <ø> (+0.38%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NicholasDCole
NicholasDCole merged commit 76b393f into conductor-oss:main Jul 29, 2026
6 of 7 checks passed
@NicholasDCole
NicholasDCole deleted the feat/task-runtime-metadata branch July 29, 2026 22:51
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.

2 participants