feat(scheduler): #1174 — flow_yaml schedule action kind (inline YAML flow)#1265
Open
ohdearquant wants to merge 3 commits into
Open
feat(scheduler): #1174 — flow_yaml schedule action kind (inline YAML flow)#1265ohdearquant wants to merge 3 commits into
ohdearquant wants to merge 3 commits into
Conversation
Add a new schedule action kind `flow_yaml` whose payload is an inline YAML flow spec (same format as `li o flow -p`). On fire it writes the spec to a temp file and dispatches via the existing `li o flow -f` path, reusing the real flow execution entry rather than reimplementing parsing. - Validate the YAML spec at schedule-creation time (reject malformed or incomplete specs with a clear error), not only at fire time. - Persist the `action_flow_yaml` payload: add it to the INSERT column list + value tuple in create_schedule and to the allowed set in update_schedule so it round-trips through StateDB. - Add a registered migration (_drop_legacy_action_kind_check) that rebuilds the schedules table to include 'flow_yaml' in the action_kind CHECK, mirroring the existing legacy-check rebuild pattern and running after column reconciliation. - Keep status reporting / invocation lifecycle uniform with the other action kinds so the reapers and monitor treat flow_yaml identically. - Add tests/cli/test_scheduler_flow_yaml.py incl. a DB round-trip test proving the YAML payload survives create -> read -> update. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l_complete The four sync tests in test_scheduler_flow_yaml.py drove their coroutines via asyncio.get_event_loop().run_until_complete(...), which raises "RuntimeError: There is no current event loop" under pytest-xdist workers on Python 3.10+ (no implicit loop in a non-main worker thread). asyncio.run() creates and tears down a fresh loop per call — the correct modern idiom and a drop-in for these isolated tests (exception propagation is identical, so the try/except ValueError cases are unaffected). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ohdearquant
added a commit
that referenced
this pull request
Jun 3, 2026
…en config PR #1231 was 1 commit / 66 behind main, bundling a parallel scheduler (lionagi/runtime/scheduler.py SchedulerEngine + an engine-model cli/schedule.py) that collided with main's shipped API-model scheduler (flow_yaml #1265 + lifecycle reapers #1260, v0.26.15). It also carried cli/config.py, which imports lionagi.config_resolution — a module that exists nowhere in the tree (only survived via a try/except ImportError). - Merge current main (de-stale: add_schedule_subparser now resolves). - Drop lionagi/runtime/ (engine scheduler superseded by main's API model). - Restore cli/schedule.py + cli/main.py to main's API-model scheduler. - Drop cli/config.py (unsalvageable: missing config_resolution dependency). Keeps the genuine work system (lionagi/work/: forms, rules, engine, worker) plus the unique, tested cli/cleanup.py and cli/orchestrate/charter.py. Net diff vs main: 13 additive files, work-system only. Was: 6 schedule-CLI tests failing on stale import; now green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
New
flow_yamlschedule action from thelionagi-sweepshow (#1174) — schedule an inline YAML flow spec (same shape asli o flow -p). Critic APPROVE (CRIT:0 MAJ:0 MIN:1) after a redo: attempt 1 was correctly REJECTED (the YAML spec persisted as NULL and the tests bypassed the DB layer / false-greened); the gate caught it and the redo fixed all four blockers. 12 schedule tests pass (incl. a non-tautological round-trip); pre-commit ruff green.What it does
flow_yamlaction kind: payload is a YAML flow spec, dispatched on fire via the same flow execution entry asflow/play(no re-parser, no stub).action_flow_yamlthreaded through INSERT + UPDATE allow-list + a migration (_drop_legacy_action_kind_check, mirroring the session-status-check rebuild) so existing DBs accept the new kind.Tests
12 passing incl. a DB round-trip test that fails-before / passes-after the persistence fix (the gap that false-greened attempt 1). Frontend schedule-builder UI for the new kind noted as a follow-up.
Closes #1174
🤖 Generated with Claude Code