Skip to content

feat(flow): each step records when it started, and a node can write log lines - #4674

Merged
rubenvdlinde merged 3 commits into
developmentfrom
feat/flow-step-log-lines
Oct 17, 2026
Merged

rubenvdlinde merged 3 commits into
developmentfrom
feat/flow-step-log-lines

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

  • FlowEngine: every step entry in the run log carries startedAt, the moment the step began, ISO 8601 with milliseconds in UTC (2026-10-07T08:41:02.380+00:00). All step statuses (completed, failed, stopped, suspended, pinned), on both the single-stream and the stream walk.
  • FlowStepReport::line(level, message): a node appends a timestamped line to its step's entry under report.lines ({at, level, message}). Levels info, success, warning, error; anything else is recorded as info. At most 50 lines per step; past that the last line says how many were left out, so a node writing in a loop cannot grow the log without bound. Lines clear with the rest of the report after each hop.

Why

The run view in @conduction/nextcloud-vue (#1739, boards PqFlowRun / PqFlow / DqFlow) draws each step's log lines with an outcome pill and a time. Without a start per step the client adds durations up from the run's start, and without lines it can only restate the step's status. The library already reads startedAt and report.lines when present, so this lands without a library change. Nodes adopt line() per app in follow-ups; a node that does not call it is unaffected.

Verified locally

  • Touched suites: FlowStepReportTest (3, new) and FlowEngineTest (26, one new test plus a startedAt assertion on the pinned step): 29 passed. Both fail on development (no line(), no startedAt).
  • phpcs and phpmd on the changed files: no findings on changed lines (the engine test gained the phpcs header the other tests carry).
  • composer check:strict once: lint, migration-version, phpcs, phpmd, psalm ("No errors found"), phpstan ("No errors") green; test:all 26,289 tests, 15 errors, the same inherited AuditTrail* / DraftRemovalAuditRow DB tests that need the server's OC\DB\Schema\Table (red on development too, as recorded on feat(flow-runs): per-flow run summary, and since/flowIds on the run history #4672).

info.xml is untouched.

AI-assisted: written with Claude Code.

@rubenvdlinde
rubenvdlinde merged commit 41e7b34 into development Oct 17, 2026
39 checks passed
@rubenvdlinde
rubenvdlinde deleted the feat/flow-step-log-lines branch October 17, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant