test sweep: cover kernel/src/{events,ipc} (T-91)
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Three new test files + a small DaemonClient dispose-safety fix: - test/kernel/src/events/types_test.dart (7 tests): every ClideEvent subclass's subsystem / kind / payload contract + the ClideEventEnvelope v1 JSON shape. - test/kernel/src/events/message_bus_test.dart (6 tests): Message shape, MessageBus publish/subscribe/dispose, filter-by-publisher, filter-by-channel, intersection. - test/kernel/src/ipc/client_test.dart (9 tests): real Unix-socket roundtrip via a _TestDaemon helper — connect + correlate request/ response, event forwarding to the DaemonBus, malformed-line skip, daemon-disconnect failing pending requests, stop cleanup, dispose, connect-failure-then-reconnect, daemon-sent-Request warn-and-skip, DaemonConnectionChanged emission. Fix in lib/kernel/src/ipc/client.dart: _setConnected now skips notifyListeners / event emit when _disposed. The socket stream's onDone can fire after dispose runs, which previously hit ChangeNotifier's "used after disposed" assertion. State flip stays unconditional so stop()'s explicit transition still works. Coverage: ipc/client.dart 14% -> 92% (79/86; remaining 7 lines are the socket onError callback + 1 const ctor phantom); events/types .dart 95% (37/39 — 2 const-ctor phantoms); events/message_bus.dart 100%; events/bus.dart stays 100%. Total coverage 71.93% -> 73.34%; floor bumped to 73. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ repository: https://github.com/postmeridiem/clide
|
||||
|
||||
# Pre-push line-coverage floor. Ratchets up only — see D-66.
|
||||
# Reading: `awk -F: '/^coverage_floor:/ {gsub(/ /,"",$2); print $2}' pubspec.yaml`.
|
||||
coverage_floor: 71
|
||||
coverage_floor: 73
|
||||
|
||||
# Project metadata (was project.yaml, folded in per D-056).
|
||||
# version: above is the single source of truth. The Makefile reads
|
||||
|
||||
Reference in New Issue
Block a user