fix(flow): scheduled agentflows never fired — invisible to the scheduler, and cron was dropped on save - #115
Merged
Conversation
…ler, and cron was dropped on save Two independent causes, one symptom: a flow that ran correctly when triggered and that nothing could trigger. 1. **OpenRegister's scheduler never asked hermiq.** It enumerated one hard-coded store rather than the resolver registry every other trigger family goes through, so a hermiq agentflow with `trigger: schedule` was invisible to it. Fixed on the OpenRegister side (openregister#2260); this is hermiq's answer to the enumeration it introduces. 2. **`agentflow` had no `cron` property.** OpenRegister drops undeclared properties on save, so the expression saying WHEN never persisted. A flow could say it ran on a schedule and could not say which one. Measured before: **zero** runs with `trigger='schedule'` out of 52,478. `hydra-sequencer`, `hydra-dispatch` and `hydra-lock-reaper` were all in that state; the sequencer is the hydra pipeline's heartbeat. ## What this adds - `HermiqFlowResolver` also implements `IScheduledFlowSource`, reporting agentflows whose trigger is `schedule` with their cron, `enabled` flag and owner (entity owner first, the flow's `owner` field as fallback — a scheduled run has no session, and a run with no owner cannot write, or#2158). - `agentflow` v0.1.3 gains the optional `cron` property; register descriptor v0.22.0. Optional, not required, no conditionals, so every existing AgentFlow stays valid. ## Disabled flows are REPORTED, not filtered The `enabled` flag is handed to OpenRegister rather than acted on here, so the "a disabled flow never runs" decision is made once for the whole fleet instead of once per app that owns flows. All ten hydra agentflows ship `enabled: false` deliberately and this change does not start any of them. Also fixes four pre-existing gate-28 findings in the same schema (AgentFlow name/enabled/description/notes had no description). ## Verified live - with the `cron` property imported, a probe agentflow saved a cron expression that previously vanished - OpenRegister's scheduler saw all five schedule-triggered agentflows on the instance and fired only the enabled one — the first `trigger='schedule'` run the instance has ever held — which the worker took through to `completed` - the three hydra flows (enabled false) were reported and correctly not fired - an A/B against the pre-change resolver: the same flow fired nothing Gates: phpcs clean, phpstan OK, 1,421 unit tests green.
Contributor
Quality Report — ConductionNL/hermiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 117/117 | |||
| npm | ✅ | ✅ 657/657 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Coverage: 85.3% (93/109 statements)
Quality workflow — 2026-08-02 09:43 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent causes, one symptom: a flow that ran correctly when triggered
and that nothing could trigger.
hard-coded store rather than the resolver registry every other trigger
family goes through, so a hermiq agentflow with
trigger: schedulewasinvisible to it. Fixed on the OpenRegister side (openregister#2260); this is
hermiq's answer to the enumeration it introduces.
agentflowhad nocronproperty. OpenRegister drops undeclaredproperties on save, so the expression saying WHEN never persisted. A flow
could say it ran on a schedule and could not say which one.
Measured before: zero runs with
trigger='schedule'out of 52,478.hydra-sequencer,hydra-dispatchandhydra-lock-reaperwere all in thatstate; the sequencer is the hydra pipeline's heartbeat.
What this adds
HermiqFlowResolveralso implementsIScheduledFlowSource, reportingagentflows whose trigger is
schedulewith their cron,enabledflag andowner (entity owner first, the flow's
ownerfield as fallback — a scheduledrun has no session, and a run with no owner cannot write, or#2158).
agentflowv0.1.3 gains the optionalcronproperty; register descriptorv0.22.0. Optional, not required, no conditionals, so every existing AgentFlow
stays valid.
Disabled flows are REPORTED, not filtered
The
enabledflag is handed to OpenRegister rather than acted on here, so the"a disabled flow never runs" decision is made once for the whole fleet instead
of once per app that owns flows. All ten hydra agentflows ship
enabled: falsedeliberately and this change does not start any of them.Also fixes four pre-existing gate-28 findings in the same schema (AgentFlow
name/enabled/description/notes had no description).
Verified live
cronproperty imported, a probe agentflow saved a cron expressionthat previously vanished
instance and fired only the enabled one — the first
trigger='schedule'runthe instance has ever held — which the worker took through to
completedGates: phpcs clean, phpstan OK, 1,421 unit tests green.
Pairs with openregister#2257 — the two halves of one defect. Merge OpenRegister first: this branch's resolver implements an interface that PR introduces.
🤖 Generated with Claude Code