You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four dispatch paths in pkg/hub/httpdispatcher.go call resolveAgentSecrets (or formerly resolveSecrets) and continue silently when resolution returns an error. The failure is
logged at Warn level, gated behind d.debug (off by default). No consequence is stated.
The four sites
Path
Line (approx)
Variable
Shape
buildCreateRequest
654
err
if d.debug { d.log.Warn(...) } then continue
DispatchAgentStart
1878
err
if d.debug { d.log.Warn(...) } then continue
DispatchAgentRestart
2149
secretErr
if d.debug { d.log.Warn(...) } then continue
DispatchAgentResetAuth
2313
resolveErr
Fixed in PR #1333 — Error level, unconditional, consequence stated
After PR #1333, ResetAuth is the only site that logs at Error level with a stated consequence.
The other three remain debug-gated Warn.
What happens on failure
When resolution fails, the agent starts/restarts/is created without injected secrets and
without entitled keys recorded on the credential (NULL — fail-closed on future fetch via
the secrets endpoint).
Open question — unverified, worth checking
It is not established that an agent can generally function without secrets. If the harness
configuration requires an API key and secret resolution silently failed, the agent starts
and then exits — the operator sees an agent that died with no reason connected to the
resolution failure. The resolution error was logged only at debug level (off by default),
leaving no operator-visible trail between the cause (resolution failure at dispatch time)
and the symptom (agent exit, minutes later).
This is unverified. It is named here as a candidate cause for agents that exit without
a diagnostic, not as a confirmed link. Investigation would need to correlate agent-exit
events with secret-resolution failures on the same dispatch.
Notes
The benign-error question matters before changing log levels on the three hot paths:
if secretBackend.Resolve returns a non-nil error for "no secrets configured" (a normal
condition), raising to Error on these paths would emit false alarms on every project
without secrets. This must be checked first.
Observation
Four dispatch paths in
pkg/hub/httpdispatcher.gocallresolveAgentSecrets(or formerlyresolveSecrets) and continue silently when resolution returns an error. The failure islogged at Warn level, gated behind
d.debug(off by default). No consequence is stated.The four sites
buildCreateRequesterrif d.debug { d.log.Warn(...) }then continueDispatchAgentStarterrif d.debug { d.log.Warn(...) }then continueDispatchAgentRestartsecretErrif d.debug { d.log.Warn(...) }then continueDispatchAgentResetAuthresolveErrAfter PR #1333, ResetAuth is the only site that logs at Error level with a stated consequence.
The other three remain debug-gated Warn.
What happens on failure
When resolution fails, the agent starts/restarts/is created without injected secrets and
without entitled keys recorded on the credential (NULL — fail-closed on future fetch via
the secrets endpoint).
Open question — unverified, worth checking
It is not established that an agent can generally function without secrets. If the harness
configuration requires an API key and secret resolution silently failed, the agent starts
and then exits — the operator sees an agent that died with no reason connected to the
resolution failure. The resolution error was logged only at debug level (off by default),
leaving no operator-visible trail between the cause (resolution failure at dispatch time)
and the symptom (agent exit, minutes later).
This is unverified. It is named here as a candidate cause for agents that exit without
a diagnostic, not as a confirmed link. Investigation would need to correlate agent-exit
events with secret-resolution failures on the same dispatch.
Notes
if
secretBackend.Resolvereturns a non-nil error for "no secrets configured" (a normalcondition), raising to Error on these paths would emit false alarms on every project
without secrets. This must be checked first.
security refactor and the benign-error question applies to all three.