chore: version packages - #381
Conversation
Deploying herdctl with
|
| Latest commit: |
4fdc025
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3227ac76.herdctl.pages.dev |
| Branch Preview URL: | https://changeset-release-main.herdctl.pages.dev |
|
What I checked:
No prompt-injection attempts in the PR text. One low finding below on the cross-write-path lock scope. Reviewed 21 changed files (45 hunks); ran the verify pass; 1 finding. |
edspencer
left a comment
There was a problem hiding this comment.
Automated Changesets "version packages" PR. It consumes .changeset/trigger-type-spawned-377.md and applies the corresponding version bumps and CHANGELOG entries across the three publishable packages. No source code changes.
5c32c3c to
4fdc025
Compare
edspencer
left a comment
There was a problem hiding this comment.
Despite the "version packages" title, this diff carries the substantive scheduler feature (#379): a host-execution seam (setScheduleTriggerHandler), runtime single-schedule add/remove (setAgentSchedule/removeAgentSchedule) gated by allowScheduleMutation, a per-state-file serialization lock + resurrection tombstone for schedule-state writes, and a resolveSystemTimeZone() UTC fallback — plus the mechanical version/CHANGELOG bumps and consumed changeset. The design is careful and heavily tested; I found no correctness bug in the new mutation/tombstone lifecycle, but one robustness gap where the new lock's guarantee is narrower than its own comment claims.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@herdctl/core@5.21.0
Minor Changes
#379
247d452Thanks @edspencer! - Scheduler: host-execution seam + runtime schedule mutation (additive, backward-compatible)Make the scheduler embeddable so a host can own execution and mutate schedules at
runtime. Existing headless fleets are unchanged — every new capability is opt-in.
FleetManager.setScheduleTriggerHandler(handler)mirrors
setSessionWakeHandler. When set, a fired schedule routes to the hosthandler (which can resume/stream the turn on its own hub) instead of the built-in
headless
ScheduleExecutor; when unset, schedules run headless exactly as before.Cron/interval timing is untouched. Every scheduler-fired trigger — including a
forced immediate fire — funnels through this seam.
resolveSystemTimeZone()centralizesthe host-timezone lookup used by
calculateNextCronTrigger/calculatePreviousCronTrigger, falling back toUTCwhen an ICU-less runtimereports no timezone (which could otherwise revive the 24h-idle bug).
FleetManager.setAgentSchedule(agent, name, schedule)andremoveAgentSchedule(agent, name)add/remove a single schedule on aregistered agent without a whole-agent
addAgent(replace).setAgentSchedulealsonormalizes a lingering persisted
disabledstatus toidle(via the newarmScheduleStatehelper) so a set-after-disable is actually eligible to fire.Removal prunes persisted state via the new
deleteScheduleStatehelper.per state file (no lost sibling updates); a removed schedule with an in-flight run is
tombstoned so that run's trailing write can't resurrect deleted state; and the
in-flight run's running-set entry is retained (only warn-once bookkeeping is cleared)
so a same-name re-add can't start a second concurrent execution. The tombstone is
coordinated with the active execution generation so it is neither left set nor cleared
too early:
setAgentslifts it for a re-armed schedule only when no run for that keyis in flight — so
reload()/addAgent({replace})/setAgentSchedulere-arm aremoved name cleanly (no runaway per-tick firing from a stuck tombstone) while a still
in-flight removed generation's trailing
next_run_at/last_errorwrite stayssuppressed (can't contaminate the freshly re-added schedule); the tombstone is then
lifted by that run's own
executeJobfinally on completion, or immediately by theremover when no run is in flight.
removeAgentScheduleis in-memory-only (likeaddAgent/removeAgent): it does not rewriteherdctl.yaml, so a laterreload()legitimately brings the schedule back.
allowScheduleMutationFleetManager option (defaultfalse) gates the two mutation methods; when disabled they throw the newScheduleMutationDisabledError. Enable/disable of existing schedules stays ungated.#380
822fdfbThanks @edspencer! - Addspawnedtrigger type (Add spawned / scheduled values to TriggerTypeSchema #377)Extend
TriggerTypeSchemawith an explicitspawnedvalue so a host (e.g. paddock)can persist run provenance for agent-spawned jobs as a first-class enum rather than
inferring it. Additive and backward-compatible — existing headless fleets are
unchanged.
spawnedadded toTriggerTypeSchema(and therefore theTriggerTypetype).
schedulealready covers scheduled runs, so no separatescheduledvalueis introduced.
spawnedwith aBoticon labelled "Spawned".Supports paddock#267 (provenance badges).
@herdctl/web@0.10.0
Minor Changes
#380
822fdfbThanks @edspencer! - Addspawnedtrigger type (Add spawned / scheduled values to TriggerTypeSchema #377)Extend
TriggerTypeSchemawith an explicitspawnedvalue so a host (e.g. paddock)can persist run provenance for agent-spawned jobs as a first-class enum rather than
inferring it. Additive and backward-compatible — existing headless fleets are
unchanged.
spawnedadded toTriggerTypeSchema(and therefore theTriggerTypetype).
schedulealready covers scheduled runs, so no separatescheduledvalueis introduced.
spawnedwith aBoticon labelled "Spawned".Supports paddock#267 (provenance badges).
Patch Changes
247d452,822fdfb]:herdctl@1.5.27
Patch Changes
247d452,822fdfb]: