diff --git a/.changeset/v03-assertions.md b/.changeset/v03-assertions.md deleted file mode 100644 index 754adcf..0000000 --- a/.changeset/v03-assertions.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@ocpp-debugkit/toolkit': minor ---- - -Add rich scenario assertions — 8 declarative assertion types for scenario evaluation: -- `event_order`, `event_count`, `payload_field`, `timing`, `session_state`, - `failure_severity`, `no_failures`, `failure_count` - -New API: `runAssertions()`, `evaluateScenario()`. Backward compatible — -existing scenarios with only `expectedFailures` work unchanged. diff --git a/.changeset/v03-cli-commands.md b/.changeset/v03-cli-commands.md deleted file mode 100644 index 507c8a6..0000000 --- a/.changeset/v03-cli-commands.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@ocpp-debugkit/toolkit': minor ---- - -Add three new CLI commands: -- `ocpp-debugkit ci [dir]` — run all scenarios, exit 0/1 for CI integration, supports `--format json` -- `ocpp-debugkit anonymize ` — strip sensitive fields from trace files -- `ocpp-debugkit diff ` — compare two trace files, supports `--format json` - -Also fixes evaluateScenario to deduplicate failure codes before comparison. diff --git a/.changeset/v03-detection-rules.md b/.changeset/v03-detection-rules.md deleted file mode 100644 index 8428e5c..0000000 --- a/.changeset/v03-detection-rules.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@ocpp-debugkit/toolkit': minor ---- - -Add 5 new failure detection rules for v0.3.0: - -- `SUSPICIOUS_SESSION_DURATION` — sessions shorter than 60s or longer than 24h -- `SLOW_RESPONSE` — Call→CallResult/CallError gap exceeding 10s -- `HEARTBEAT_INTERVAL_VIOLATION` — heartbeat intervals deviating >50% from expected -- `METER_VALUE_ANOMALY` — non-monotonic or negative meter readings -- `UNRESPONSIVE_CSMS` — Call messages with no matching CallResult or CallError - -Total detection rules: 15 (10 from v0.1/v0.2 + 5 new). diff --git a/.changeset/v03-scenarios-assertions.md b/.changeset/v03-scenarios-assertions.md deleted file mode 100644 index 8e7e2c7..0000000 --- a/.changeset/v03-scenarios-assertions.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@ocpp-debugkit/toolkit': minor ---- - -Add 5 new scenarios using rich assertions (15 total): -- `slow-csms-response` — SLOW_RESPONSE + timing assertion -- `meter-anomaly` — METER_VALUE_ANOMALY + payload_field/event_count assertions -- `short-session` — SUSPICIOUS_SESSION_DURATION + session_state/event_count assertions -- `heartbeat-irregular` — HEARTBEAT_INTERVAL_VIOLATION + event_count assertion -- `unresponsive-csms` — UNRESPONSIVE_CSMS + failure_severity/failure_count assertions - -Add `compareScenarioReports()` — compare two scenario evaluation results for regression testing. diff --git a/.changeset/v03-trace-diffing.md b/.changeset/v03-trace-diffing.md deleted file mode 100644 index bef5fa1..0000000 --- a/.changeset/v03-trace-diffing.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@ocpp-debugkit/toolkit': minor ---- - -Add `diffTraces()` — compare two parsed traces and surface event-level differences: -- Events only in A or B (by messageId) -- Field-level modifications (timestamp, direction, action, payload, errorCode) -- Failure differences (detected in A but not B, and vice versa) -- Summary differences (event count, failure count, duration, status) diff --git a/apps/web/CHANGELOG.md b/apps/web/CHANGELOG.md index c263678..c7bf5d6 100644 --- a/apps/web/CHANGELOG.md +++ b/apps/web/CHANGELOG.md @@ -1,5 +1,16 @@ # web +## 0.1.3 + +### Patch Changes + +- Updated dependencies [6775642] +- Updated dependencies [1b8cb39] +- Updated dependencies [c580737] +- Updated dependencies [8db857e] +- Updated dependencies [8f765f9] + - @ocpp-debugkit/toolkit@0.3.0 + ## 0.1.2 ### Patch Changes diff --git a/apps/web/package.json b/apps/web/package.json index fe01807..e4f3c65 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "web", - "version": "0.1.2", + "version": "0.1.3", "private": true, "scripts": { "dev": "next dev", diff --git a/packages/toolkit/CHANGELOG.md b/packages/toolkit/CHANGELOG.md new file mode 100644 index 0000000..e86f039 --- /dev/null +++ b/packages/toolkit/CHANGELOG.md @@ -0,0 +1,44 @@ +# @ocpp-debugkit/toolkit + +## 0.3.0 + +### Minor Changes + +- 6775642: Add rich scenario assertions — 8 declarative assertion types for scenario evaluation: + - `event_order`, `event_count`, `payload_field`, `timing`, `session_state`, + `failure_severity`, `no_failures`, `failure_count` + + New API: `runAssertions()`, `evaluateScenario()`. Backward compatible — + existing scenarios with only `expectedFailures` work unchanged. + +- 1b8cb39: Add three new CLI commands: + - `ocpp-debugkit ci [dir]` — run all scenarios, exit 0/1 for CI integration, supports `--format json` + - `ocpp-debugkit anonymize ` — strip sensitive fields from trace files + - `ocpp-debugkit diff ` — compare two trace files, supports `--format json` + + Also fixes evaluateScenario to deduplicate failure codes before comparison. + +- c580737: Add 5 new failure detection rules for v0.3.0: + + - `SUSPICIOUS_SESSION_DURATION` — sessions shorter than 60s or longer than 24h + - `SLOW_RESPONSE` — Call→CallResult/CallError gap exceeding 10s + - `HEARTBEAT_INTERVAL_VIOLATION` — heartbeat intervals deviating >50% from expected + - `METER_VALUE_ANOMALY` — non-monotonic or negative meter readings + - `UNRESPONSIVE_CSMS` — Call messages with no matching CallResult or CallError + + Total detection rules: 15 (10 from v0.1/v0.2 + 5 new). + +- 8db857e: Add 5 new scenarios using rich assertions (15 total): + - `slow-csms-response` — SLOW_RESPONSE + timing assertion + - `meter-anomaly` — METER_VALUE_ANOMALY + payload_field/event_count assertions + - `short-session` — SUSPICIOUS_SESSION_DURATION + session_state/event_count assertions + - `heartbeat-irregular` — HEARTBEAT_INTERVAL_VIOLATION + event_count assertion + - `unresponsive-csms` — UNRESPONSIVE_CSMS + failure_severity/failure_count assertions + + Add `compareScenarioReports()` — compare two scenario evaluation results for regression testing. + +- 8f765f9: Add `diffTraces()` — compare two parsed traces and surface event-level differences: + - Events only in A or B (by messageId) + - Field-level modifications (timestamp, direction, action, payload, errorCode) + - Failure differences (detected in A but not B, and vice versa) + - Summary differences (event count, failure count, duration, status) diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index d61a19d..d860fe3 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@ocpp-debugkit/toolkit", - "version": "0.2.1", + "version": "0.3.0", "description": "Open-source DevTools for debugging OCPP charging sessions — parser, normalizer, timeline, failure detection, scenarios, replay, reports, CLI, and React components.", "license": "Apache-2.0", "type": "module",