Question
How is a user supposed to get a custom secret to a BYOA agent invoked through reusable dispatch with CEL expression triggering? The workflow doesn't know to explicitly "mount" their secret to an env var.
Current State
Looking at the workflow chain:
-
reusable-dispatch.yml defines a fixed set of secrets:
FULLSEND_GCP_WIF_PROVIDER
FULLSEND_GCP_PROJECT_ID
OTEL_EXPORTER_OTLP_TRACES_HEADERS
OTEL_EXPORTER_OTLP_HEADERS
-
reusable-harness-run.yml declares the same secrets and passes them to the agent run step
-
The agent execution environment has a hardcoded env: block
Per workflow-contracts.md, GHA reusable workflows don't inherit secrets - they must be explicitly forwarded at every hop. There's no escape hatch here.
Current Workarounds
Option 1: Custom poller workflow
Skip reusable-dispatch entirely and write a custom workflow that directly calls reusable-harness-run.yml. But reusable-harness-run.yml only accepts the predefined secrets, so this doesn't work either.
Option 2: Fork the workflow
Fork reusable-harness-run.yml into your repo and add your secret. Not scalable, breaks upgrades.
Option 3: Use secrets: inherit (untested)
The repo uses secrets: inherit in e2e-ok-to-test.yml, though workflow-contracts.md discourages it as a blanket pattern. If reusable-harness-run.yml used secrets: inherit, users could pass any secret. But this would break the explicit contract model the codebase currently enforces.
Potential Solutions
A. Add secrets: inherit to reusable-harness-run.yml
Would need to flow through reusable-dispatch.yml too. Goes against the explicit-forwarding principle in the docs.
B. Support a passthrough secret map
Add an input like:
inputs:
custom_env:
type: string # JSON map
Callers pass '{"MY_KEY": "value"}', the workflow deserializes and injects into the agent env. Secrets would need to be stringified client-side (awkward).
C. Document the api_servers pattern
The harness api_servers: feature already lets users run a host-side proxy with custom env. The proxy script can access repository secrets, and the sandbox talks to it over localhost. This is the current "blessed" path for custom credentials, but it's not obvious from the BYOA guide.
D. Reserve a custom secret namespace
Define CUSTOM_AGENT_ENV_* secrets that the workflow auto-injects. Users set CUSTOM_AGENT_ENV_MY_KEY=... as a repo secret, workflow strips the prefix and passes MY_KEY to the agent.
Notes
Option C (api_servers) is the only one that currently works without workflow changes, but it's not well-documented for this use case.
Question
How is a user supposed to get a custom secret to a BYOA agent invoked through reusable dispatch with CEL expression triggering? The workflow doesn't know to explicitly "mount" their secret to an env var.
Current State
Looking at the workflow chain:
reusable-dispatch.ymldefines a fixed set of secrets:FULLSEND_GCP_WIF_PROVIDERFULLSEND_GCP_PROJECT_IDOTEL_EXPORTER_OTLP_TRACES_HEADERSOTEL_EXPORTER_OTLP_HEADERSreusable-harness-run.ymldeclares the same secrets and passes them to the agent run stepThe agent execution environment has a hardcoded
env:blockPer
workflow-contracts.md, GHA reusable workflows don't inherit secrets - they must be explicitly forwarded at every hop. There's no escape hatch here.Current Workarounds
Option 1: Custom poller workflow
Skip
reusable-dispatchentirely and write a custom workflow that directly callsreusable-harness-run.yml. Butreusable-harness-run.ymlonly accepts the predefined secrets, so this doesn't work either.Option 2: Fork the workflow
Fork
reusable-harness-run.ymlinto your repo and add your secret. Not scalable, breaks upgrades.Option 3: Use
secrets: inherit(untested)The repo uses
secrets: inheritine2e-ok-to-test.yml, thoughworkflow-contracts.mddiscourages it as a blanket pattern. Ifreusable-harness-run.ymlusedsecrets: inherit, users could pass any secret. But this would break the explicit contract model the codebase currently enforces.Potential Solutions
A. Add
secrets: inherittoreusable-harness-run.ymlWould need to flow through
reusable-dispatch.ymltoo. Goes against the explicit-forwarding principle in the docs.B. Support a passthrough secret map
Add an input like:
Callers pass
'{"MY_KEY": "value"}', the workflow deserializes and injects into the agent env. Secrets would need to be stringified client-side (awkward).C. Document the
api_serverspatternThe harness
api_servers:feature already lets users run a host-side proxy with custom env. The proxy script can access repository secrets, and the sandbox talks to it over localhost. This is the current "blessed" path for custom credentials, but it's not obvious from the BYOA guide.D. Reserve a custom secret namespace
Define
CUSTOM_AGENT_ENV_*secrets that the workflow auto-injects. Users setCUSTOM_AGENT_ENV_MY_KEY=...as a repo secret, workflow strips the prefix and passesMY_KEYto the agent.Notes
Option C (api_servers) is the only one that currently works without workflow changes, but it's not well-documented for this use case.