fix(cron): preflight implicit announce targets#78644
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source-reproducible. Current main resolves the delivery target during preparation and preview can already report the fail-closed Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow runtime preflight after maintainer approval and required CI, leaving add/update rejection and auto-disable policy to separate follow-up decisions. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible. Current main resolves the delivery target during preparation and preview can already report the fail-closed Is this the best way to solve the issue? Yes. The PR takes the narrowest maintainable path by failing only unresolved implicit announce delivery before model execution while preserving explicit bad targets on the existing execution and dispatch path. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 372e270871a2. |
Signed-off-by: sallyom <somalley@redhat.com>
Signed-off-by: sallyom <somalley@redhat.com>
Signed-off-by: sallyom <somalley@redhat.com>
Summary
agentTurnjobs can default to announce delivery with implicitdelivery.channel=lasteven when there is no previous route.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
lastdelivery has no route #78608Root Cause
runCronIsolatedAgentTurnstill calledexecuteCronRuneven when implicit announce delivery had already resolved to a permanentlastroute failure.errorKind: "delivery-target", but only after the expensive agent turn.Regression Test Plan
src/cron/isolated-agent/run.message-tool-policy.test.tsannouncedelivery withchannel: "last"and no resolved route returns a delivery-target error without starting the agent executor, dispatching delivery, or firingonExecutionStarted.User-visible / Behavior Changes
Recurring isolated cron announce jobs that have no implicit previous delivery route now fail before model execution instead of spending tokens and failing after delivery dispatch.
Diagram
Security Impact
Repro + Verification
Environment
Steps
Expected
Actual
check:changedpassed before rebase.test:changedhit unrelated workspace package-resolution failures in broader cron direct-delivery tests (openclaw/workspace package resolution), not assertions from this patch.Evidence
Commands run:
Latest post-rebase focused proof:
Human Verification
delivery.mode="none"behavior remains covered by existing tests.Review Conversations
Compatibility / Migration
Risks and Mitigations
lastfootgun; explicit-target validation policy can be handled separately.