diff --git a/CHANGELOG.md b/CHANGELOG.md index e6abca2..4c26b7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## 1.9.1 - 2026-09-15 + +Changes since 1.9.0: + +### Added + +- Scenario run logs now include an automatic entry when a step starts and when it finishes (pass or fail), so step boundaries are visible in run logs even for steps that don't call `context.log`/`context.assert` themselves. + ## 1.9.0 - 2026-09-15 Changes since 1.8.0: diff --git a/package.json b/package.json index a0149ba..e841844 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liqa", - "version": "1.9.0", + "version": "1.9.1", "private": true, "workspaces": [ "server", diff --git a/server/src/scenario/scenario-scheduler.service.ts b/server/src/scenario/scenario-scheduler.service.ts index b6cb3f7..6dff53e 100644 --- a/server/src/scenario/scenario-scheduler.service.ts +++ b/server/src/scenario/scenario-scheduler.service.ts @@ -345,6 +345,12 @@ export class ScenarioSchedulerService implements OnModuleInit { this.logger.log( `StepRun #${stepRun.id} (run #${stepRun.runId}, step #${step.id} order=${step.order}) → in_progress`, ); + this.persistLog( + stepRun.runId, + stepRun.id, + "log", + `Step ${step.order} started${step.title ? `: ${step.title}` : ""}`, + ); try { if (!step.execCode) throw new Error("step has no execCode"); @@ -453,6 +459,12 @@ export class ScenarioSchedulerService implements OnModuleInit { output !== null && output !== undefined ? JSON.stringify(output) : null; await this.runStepRepo.save(stepRun); this.logger.log(`StepRun #${stepRun.id} → pass`); + this.persistLog( + stepRun.runId, + stepRun.id, + "log", + `Step ${(stepRun.scenarioStep as ScenarioStepEntity | undefined)?.order ?? "?"} passed`, + ); // Find the next waiting step in this run (next by order) const nextStep = await this.runStepRepo.findOne({ @@ -489,6 +501,12 @@ export class ScenarioSchedulerService implements OnModuleInit { stepRun.description = description; await this.runStepRepo.save(stepRun); this.logger.log(`StepRun #${stepRun.id} → fail: ${description}`); + this.persistLog( + stepRun.runId, + stepRun.id, + "error", + `Step ${(stepRun.scenarioStep as ScenarioStepEntity | undefined)?.order ?? "?"} failed: ${description}`, + ); // Cancel all remaining waiting/pending step runs in this run await this.runStepRepo