Skip to content

Releases: google/lightflow

v0.6.5 — BLOCKED State Consistency, Visualizer & Mermaid Status Normalization, and Benchmark Refresh

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 18:28

Fixes & Improvements

  • BLOCKED stage handling after resume --cascade=false: _execute_engine_loop now prints Lightflow incomplete. Blocked downstream stage(s) (not re-armed): ... instead of an empty Root failure(s): header when only blocked downstream stages remain, and lightflow list (_summarise_run) now reports INCOMPLETE (matching lightflow status) instead of COMPLETED.
  • Visualizer & Mermaid effective status normalization: generate_visualizer_html and generate_status_mermaid now normalize stamp statuses via state.effective_status_name(stamp) so WAITING (POLL_YIELD), REJECTED, and BLOCKED (UPSTREAM_FAILED) stages render with their semantic status styling, and the HTML visualizer stage inspector surfaces rollback_action, trigger_rule, and timeout_seconds.
  • quarterly_revenue_brief & benchmark suite: Enabled strict_expressions: true and explicit approve_send / send_report run_if wiring on examples/quarterly_revenue_brief/lightflow.yaml, and added quarterly_revenue_brief as Task 6 in benchmarks/run_benchmark.py.

v0.6.4 — README Demo & Quarterly Revenue Brief Example

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 17:35

What's Changed in v0.6.4

  • README Opening & Animated SVG Demo (#26):
    • Rewrote the opening of README.md around how Lightflow replaces prose SKILL.md checklists with an executable DAG driven by the agent via CLI while the user stays in chat (enforced ordering and checkpoints, intermediate data kept off the context window, resumability without repeating side effects, passport.json audit trail, and reliability in scheduled agent automations).
    • Added docs/demo.svg, an animated two-column SVG showing the 6-stage DAG spine alongside a 3-act Claude Code / Antigravity session.
  • New Bundled Example — examples/quarterly_revenue_brief/:
    • 6-stage workflow (query_sql_metrics → analyze_variances → draft_commentary → render_report → approve_send → send_report) using only standard-library sqlite3, demonstrating both roles of operator_action checkpoints (exit 2): content synthesis/review and final side-effect authorization.

Lightflow v0.6.3

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 15:11

What's Changed in Lightflow v0.6.3

Return-Key Parity Verification in create_lightflow (#25)

  • Static AST return-key consistency (examples/create_lightflow/actions.py): verify_actions now inspects every return statement (including tracked local dictionary variables mutated across branches) in each target action function and raises a ValueError naming the action, line numbers, and missing/extra keys whenever two return paths (such as dry_run/offline vs. live execution) return different dictionary keys.
  • Dynamic sample_payload vs. dry_run=True parity check: When sample_payload is provided to verify_actions, it verifies that the runtime keys returned for sample_payload match both the static return path keys and a dry_run=True invocation.
  • Bundled example return-key parity: Aligned dry_run return keys with live return keys in examples/create_lightflow/actions.py (validate_manifest_dry_run) and examples/pypi_upgrade_guard/actions.py (apply_and_smoke_test), with automated test coverage across all bundled examples.

Lightflow v0.6.2

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 14:31

Fixes

  • secret_keys console output redaction (#24): Values held under secret_keys are now scrubbed from live start and resume console output (stage progress lines, retry/timeout warnings, failure announcements, rollback lines, paused gate briefings, and run footers) as well as JSON schema validation errors on resume, while remaining intact in passport.json.
  • CI (tests/test_hardening.py): Uses block YAML in HardeningTest manifests so the zero-dependency stdlib YAML parser suite passes without PyYAML, and skips the POSIX 0o700 mode-bit check on windows-latest.

Lightflow v0.6.1

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 13:48

Lightflow v0.6.1

Closes #22 and #23.

Visualizer Header Run State (#22)

  • #wf-status-badge in the visualizer header now reflects the overall run state (RUNNING > FAILED > REJECTED > PAUSED > WAITING > INCOMPLETE > COMPLETED) computed by state.run_state(...)—the exact same helper lightflow status uses—instead of lastStamp.status. A failed or paused run whose last stamp is an independent stage's completion now reads FAILED / PAUSED, never COMPLETED. Without a passport, the badge stays STATIC.

secret_keys Value Scrubbing (#23)

  • Non-empty string values currently held under any secret_keys key in payload are now scrubbed (single-pass, longest-first) wherever they appear:
    • inside other payload strings in redact_payload (e.g. "session": "sess-for-<redacted>"),
    • in status (stage summaries, paused gate Instructions:, and --verbose STAGE STAMPS LOG:),
    • in dry_run (simulated Dry-Run Output:, gate Instructions:, and CEL evaluation error strings),
    • in the visualizer HTML (PASSPORT_DATA.stamps message and instructions).
  • passport.json keeps the real values for resume. Opaque values derived from a secret (e.g. a hash or server-minted token) should have their own key listed in secret_keys.

All 132 standalone tests pass. The Google3 and standalone editions remain in AST lockstep.

Lightflow v0.6.0

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 13:13

Lightflow v0.6.0

Closes #20 and the remaining actionable items of #21 (2, 4, 6). Also two internal refactors with no behaviour change beyond those listed.

Visualizer (#20)

  • A PENDING stamp now reads "Started." on the timeline (only COMPLETED says "Executed successfully."); a stage with no stamp yet keeps a grey PENDING badge, distinct from a started one.
  • Trace cards show only the first line of a stamp message; the inspector shows the full text.
  • Opening the inspector no longer overlaps the Timeline / Payload / Raw views (right padding equal to the drawer width at each breakpoint).
  • Status rendering refactored: the JS sets data-status on three role classes (stage-card, status-badge, status-dot) and one CSS block owns every status colour, the PAUSED pulse, the SKIPPED dashed look and the selected outline. Deliberate differences from 0.5.x: the status border wins over the kind border on finished cards (a failed polling stage shows rose, not sky), the inspector badge is status-coloured, and passport status text is HTML-escaped in attributes.

Manifest: secret_keys (#21 item 6)

  • New optional secret_keys: [..] list on the workflow. Listed payload keys are shown as *** in status --verbose, the dry-run payload echo and the generated visualizer HTML. The passport file keeps the real values so resume works; the state directory is created 0700.

CLI (#21 item 4)

  • --json / --format=json were silently accepted and ignored; they are now rejected like any other unknown flag.

Docs (#21 item 2)

  • skills/create_lightflows/SKILL.md gains "1b. Starting From an Existing SKILL.md": how to classify an existing skill's steps into stages, gates and polls, with a worked YAML example. README points to it under "Authoring Your Own Workflow".

Internal

  • add_stamp() helper replaces 44 copies of the four-line stamp boilerplate in the engine.
  • Gate instructions stay neutral: they say what to do and what payload to resume with, never who must decide.

All 132 standalone tests pass. The Google3 and standalone editions remain in AST lockstep.

Lightflow v0.5.2

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 10:48

Lightflow v0.5.2

Patch release: two visualizer rendering fixes found by post-submit review of v0.5.1, and a sturdier guard against CSS drift.

Fixes

  • Stage cards show their status border colour. The status border rules added in v0.5.1 were emitted before the default border-slate-700, so at equal specificity the grey default won. The default now precedes the status rules (Tailwind's own palette order), and completed / paused / failed cards render with emerald / amber / rose borders as designed.
  • Status rings no longer disappear when you select a card. selectStage cleared the previous selection by removing ring-2 from every card, which also stripped the status ring from completed, paused and failed cards (a latent bug that v0.5.1's rings made visible). It now removes only the selection classes and keeps ring-2 wherever a status ring is present. Verified in headless Chrome: status border and 2 px status outline unchanged after selecting another card.

Guard

The drift test now scans the places class names are actually spelled — class attributes (HTML and template literals), className assignments, classList.* calls, and the renderer's class-string variables — rather than every quoted string. It needs no utility whitelist, covers responsive and layout tokens too (226 distinct classes checked, up from ~190), and cannot pick up JS identifiers or SVG attribute names.

Also: hover:shadow-2xl alpha now matches shadow-2xl; space-y-* use the same :not([hidden]) form as the existing rules; -webkit-backdrop-filter added for older WebKit.

Unchanged

Engine, CLI, exit codes, passport.json. 131 standalone tests pass.

Lightflow v0.5.1

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 10:35

Lightflow v0.5.1

Patch release: the visualizer renders run status again.

Fix (#19)

visualizer.html ships a hand-written subset of utility CSS, and a class the markup uses but the subset lacks fails silently. v0.5.0 restored the timeline dots' colours but not their size, and several other status-bearing classes were missing too. Defined the ~60 missing utilities:

  • status dots now have size (w-3/h-3) as well as colour;
  • stage cards show their status ring (ring-*, drawn as outlines so they combine with the cards' shadows);
  • status badges and the Operator Action chip have their background/border colours (bg-*-500/15, border-*-500/30, bg-*-950, …);
  • the page uses the system UI font instead of the browser serif default;
  • multi-line gate instructions and JSON schemas keep their line breaks (whitespace-pre-wrap);
  • spacing, hover/focus/active/placeholder variants and transitions used by the markup.

Verified in headless Chrome: dots compute to 12×12 px in the status colour, rings to 2 px outlines, body font system-ui, pre-wrap applied.

Guard

A new test extracts every utility-shaped class token from the template (HTML attributes and JS class-name literals) and asserts it is defined in the inline <style>, so a class added to the markup without CSS fails CI instead of rendering as nothing. On its first run it caught six undefined colour classes beyond those listed in the issue.

Unchanged

Engine, CLI, exit codes, passport.json. 131 standalone tests pass.

Lightflow v0.5.0

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 10:15

Lightflow v0.5.0

Fixes for issues #11, #14, #15, #16, #17 and #18. Two behaviour changes are called out first because existing workflows will see them.

Behaviour changes

A paused gate no longer halts the whole run (#15). An operator_action that pauses now parks only its own dependents, the same way a polling yield does; independent branches keep running before the process suspends. Several gates can be open at once, and the briefing (and status) lists each with its resume command. If a stage also failed in the same run, the run exits 1 with the failure footer naming the open gates; gates-only still exits 2. status, list and the footer now agree on precedence: failed > rejected > paused > waiting. A parked gate no longer prevents resume from re-arming a failed sibling.

Timed-out attempts are never overlapped (#11). Threads cannot be cancelled, so timeout_seconds bounds how long the engine waits; the action keeps running. Previously a retry started while the timed-out attempt was still running, and rollback_action could run (and report success) while both were live. Now: a retry is started only if the timed-out attempt finishes during the backoff — otherwise the stage fails with an explicit "not retried" note; rollback_action waits up to one more timeout_seconds for a live attempt and otherwise skips with an explicit "rollback skipped … verify by hand" note. The same guard applies to polling ticks. Net effect: retry_policy on timeouts is weaker than before, in exchange for the passport never claiming a rollback that raced a live side effect. README updated accordingly.

Fixes

  • #14 Stamp.reason (REJECTED / UPSTREAM_FAILED / POLL_YIELD) is now recorded, and run status is derived from it instead of from message text. A stage whose exception text happens to contain the yield marker is reported as FAILED, not WAITING. Old passport.json files round-trip unchanged; the legacy text fallback is anchored on the engine's own message prefix so it cannot misfire.
  • #15 A stage failure is printed when it happens (❌ [stage] …), like skipped and blocked stages already were, so it is visible even when the run later pauses at a gate.
  • #16 hn_digest, usgs_seismic_alert and pypi_upgrade_guard no longer substitute bundled sample data when the live source is unreachable: the fetch raises (so retry_policy applies) with a message naming the fix and the explicit opt-in (--payload='{"offline": true}'). When fixture data is used, the gate instructions are prefixed [OFFLINE FIXTURE].
  • #17 resume --operator=<who> keeps the session that made the call in the audit trail: stamps read approved by <who> (via <session>); payload.operator stays the supplied identity.
  • #18 Errors raised while importing an action module (SyntaxError, ImportError, anything at import time) fail the stage immediately instead of being retried. A missing third-party dependency is reported as such rather than as a misplaced manifest. visualizer.html timeline dots regain their colours (the inline CSS subset lacked the status classes).

Wording

The gate briefing footer, the status/start hints, AGENTS.md, CLAUDE.md and skills/run_lightflows/SKILL.md now say only what to do — follow the Instructions, then resume with a payload matching the Payload Schema — rather than asserting who must decide. Gates pace a run and record who decided (#17); they are not a containment boundary, and the previous "do not self-approve" wording implied an enforcement the engine does not provide. (Issue #8 had asked for neutral wording in v0.2.0; that change had not actually shipped.)

Unchanged

  • Python API (lightflow.engine, lightflow.lib, lightflow.schema, lightflow.visualizer); StampReason is added to lightflow.schema.
  • CLI commands, flags, exit codes, and the passport.json format (one new optional reason key on stamps).
  • 130 standalone tests pass (PYTHONPATH=. python3 -B -m unittest discover -s tests).

Lightflow v0.4.0

Choose a tag to compare

@cedricbellet cedricbellet released this 19 Oct 08:55

Lightflow v0.4.0

Breaking: the lightflow-mcp server is removed. Agents drive Lightflow through the CLI (lightflow / python3 -m lightflow) and skills/run_lightflows/SKILL.md.

Why

Lightflow's model is process-boundary suspension: each command runs in its own process, exits with a status code (0 done, 2 paused at a gate, 5 waiting on a poll, …), and leaves state in passport.json. Hosting that engine inside a long-lived server worked against the design and produced bugs the CLI path cannot have:

  • #12 — workflows leaked imported modules into one another inside the server process (sys.path mutated per manifest and never restored).
  • #13 — a single polling stage blocked every other tool call, by default for up to an hour, on the single-threaded stdio loop.

The MCP surface also drifted from the CLI more than once (#5 oversized responses, #7 description wording). Every agent host Lightflow targets can run a shell, and the CLI + skill is the path the benchmarks measure.

If you relied on lightflow-mcp, a thin wrapper that shells out to python3 -m lightflow … per call gives the same tools with per-process isolation; open an issue if you want that upstream.

Removed

  • lightflow/mcp_server.py, tests/test_mcp_server.py, mcp_config.json
  • lightflow-mcp console script and the mcpServers entry in plugin.json
  • MCP sections of README.md, AGENTS.md, CLAUDE.md, skills/run_lightflows/SKILL.md

Unchanged

  • Python API: lightflow.engine, lightflow.lib, lightflow.schema, lightflow.visualizer
  • CLI commands, flags, exit codes, and passport.json format
  • 121 standalone tests pass (PYTHONPATH=. python3 -B -m unittest discover -s tests)