neuralosd 2.2.0__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. {neuralosd-2.2.0/src/neuralosd.egg-info → neuralosd-2.2.2}/PKG-INFO +1 -1
  2. {neuralosd-2.2.0 → neuralosd-2.2.2}/pyproject.toml +1 -1
  3. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/__init__.py +1 -1
  4. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/init.py +5 -4
  5. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/logsources.py +41 -11
  6. {neuralosd-2.2.0 → neuralosd-2.2.2/src/neuralosd.egg-info}/PKG-INFO +1 -1
  7. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd_sdk/__init__.py +1 -1
  8. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_excel_deep_and_log_connectors.py +37 -1
  9. {neuralosd-2.2.0 → neuralosd-2.2.2}/MANIFEST.in +0 -0
  10. {neuralosd-2.2.0 → neuralosd-2.2.2}/README.md +0 -0
  11. {neuralosd-2.2.0 → neuralosd-2.2.2}/setup.cfg +0 -0
  12. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/__init__.py +0 -0
  13. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/_common.py +0 -0
  14. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/ask.py +0 -0
  15. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/audit.py +0 -0
  16. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/calibrate.py +0 -0
  17. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/deploy.py +0 -0
  18. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/diff.py +0 -0
  19. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/door.py +0 -0
  20. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/gaps.py +0 -0
  21. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/golden.py +0 -0
  22. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/invariants.py +0 -0
  23. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/lint.py +0 -0
  24. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/mesh.py +0 -0
  25. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/model_bridge.py +0 -0
  26. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/openapi.py +0 -0
  27. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/reason.py +0 -0
  28. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/scrub.py +0 -0
  29. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/serve.py +0 -0
  30. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/_cmd/truth.py +0 -0
  31. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/adapters.py +0 -0
  32. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/backends/__init__.py +0 -0
  33. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/backends/boxlite_backend.py +0 -0
  34. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/backends/msb_backend.py +0 -0
  35. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/banks.py +0 -0
  36. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/chains.py +0 -0
  37. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/cli.py +0 -0
  38. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/derived.py +0 -0
  39. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/docs/architecture.md +0 -0
  40. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/docs/cookbook.md +0 -0
  41. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/docs/reference.md +0 -0
  42. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/docs/usage.md +0 -0
  43. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/engine.py +0 -0
  44. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/hitl.py +0 -0
  45. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/instance.py +0 -0
  46. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/instance_audit.py +0 -0
  47. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/lint.py +0 -0
  48. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/mcp.py +0 -0
  49. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/memory.py +0 -0
  50. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/menu_adapter.py +0 -0
  51. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/meta.py +0 -0
  52. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/metrics.py +0 -0
  53. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/multi.py +0 -0
  54. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/probe.py +0 -0
  55. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/provision.py +0 -0
  56. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/reasoning.py +0 -0
  57. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/registry.py +0 -0
  58. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/router.py +0 -0
  59. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/scheduler.py +0 -0
  60. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/service.py +0 -0
  61. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/sidecar.py +0 -0
  62. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/sidecar_client.py +0 -0
  63. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/boxlite-neuralos.md +0 -0
  64. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/build_instance.sh +0 -0
  65. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/deploy_boxlite.py +0 -0
  66. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/env_setup.sh +0 -0
  67. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/msb-neuralos.md +0 -0
  68. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/neuralos-complete.md +0 -0
  69. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/neuralos-instance-builder.md +0 -0
  70. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/skills/neuralos-runtime.md +0 -0
  71. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/synapse.py +0 -0
  72. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/templates/itsm/bridge.py +0 -0
  73. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/templates/itsm/data/itsm_tickets.csv +0 -0
  74. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/templates/itsm/data/itsm_worklogs.csv +0 -0
  75. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/templates/itsm/golden.json +0 -0
  76. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/templates/itsm/probes.py +0 -0
  77. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd/templates/itsm/traps.json +0 -0
  78. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd.egg-info/SOURCES.txt +0 -0
  79. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd.egg-info/dependency_links.txt +0 -0
  80. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd.egg-info/entry_points.txt +0 -0
  81. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd.egg-info/requires.txt +0 -0
  82. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd.egg-info/top_level.txt +0 -0
  83. {neuralosd-2.2.0 → neuralosd-2.2.2}/src/neuralosd_sdk/client.py +0 -0
  84. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_backends.py +0 -0
  85. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_backends_bundled.py +0 -0
  86. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_boxlite_deploy.py +0 -0
  87. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_breakdown.py +0 -0
  88. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_component_versions.py +0 -0
  89. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_conformance_refusal_gate.py +0 -0
  90. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_derived.py +0 -0
  91. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_derived_routing.py +0 -0
  92. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_discarded.py +0 -0
  93. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_framework.py +0 -0
  94. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_instance_audit.py +0 -0
  95. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_integration.py +0 -0
  96. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_itsm_template.py +0 -0
  97. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_masking.py +0 -0
  98. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_menu_fidelity.py +0 -0
  99. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_menu_shape.py +0 -0
  100. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_menu_sqlite_diag.py +0 -0
  101. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_model_fallback.py +0 -0
  102. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_module_hygiene.py +0 -0
  103. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_multi_instance.py +0 -0
  104. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_out_of_range.py +0 -0
  105. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_perf_opts.py +0 -0
  106. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_probe.py +0 -0
  107. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_production_hardening.py +0 -0
  108. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_production_readiness.py +0 -0
  109. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_provision.py +0 -0
  110. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_reasoning.py +0 -0
  111. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_refusal_gate.py +0 -0
  112. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_release_150.py +0 -0
  113. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_robustness_sweep.py +0 -0
  114. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_router.py +0 -0
  115. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_sdk_client.py +0 -0
  116. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_serve_auth.py +0 -0
  117. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_sidecar.py +0 -0
  118. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_sidecar_menu_instances.py +0 -0
  119. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_sqlite_connector_and_auto_traps.py +0 -0
  120. {neuralosd-2.2.0 → neuralosd-2.2.2}/tests/test_synapse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuralosd
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Deterministic-first agentic runtime — @probe framework, chain runner, meta-selector, HITL guardrails, MCP/OpenAPI exposure, and microVM sandbox backends (BoxLite / Microsandbox)
5
5
  Author-email: Hyperspace Technologies <agent@superagent.ng>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "neuralosd"
7
- version = "2.2.0"
7
+ version = "2.2.2"
8
8
  description = "Deterministic-first agentic runtime — @probe framework, chain runner, meta-selector, HITL guardrails, MCP/OpenAPI exposure, and microVM sandbox backends (BoxLite / Microsandbox)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -6,7 +6,7 @@ One pip install. Two sandbox backends (BoxLite, Microsandbox). Any data
6
6
  source. Offline. On CPU. With verification gates, audit trail, and
7
7
  deterministic routing.
8
8
  """
9
- __version__ = "2.2.0"
9
+ __version__ = "2.2.2"
10
10
 
11
11
  _DOCS = {
12
12
  "usage": "neuralOS usage and operations guide",
@@ -391,16 +391,17 @@ def _capture_cmd(cmd, cap):
391
391
  if _capture is not None:
392
392
  return _capture(cmd, cap)
393
393
  import subprocess
394
+ from ..logsources import decode_tool_output
394
395
  try:
395
- r = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
396
+ r = subprocess.run(cmd, capture_output=True, timeout=120)
396
397
  except FileNotFoundError:
397
398
  raise SystemExit(
398
399
  f"error: {' '.join(cmd[:2])} is not available on this host.\n"
399
400
  " (this source must be read on the machine that owns the log)")
400
401
  if r.returncode != 0:
401
- raise SystemExit(f"error: {' '.join(cmd)} failed: "
402
- f"{(r.stderr or '').strip()[:200]}")
403
- return r.stdout
402
+ err = decode_tool_output(r.stderr or b"").strip()[:200]
403
+ raise SystemExit(f"error: {' '.join(cmd)} failed: {err}")
404
+ return decode_tool_output(r.stdout)
404
405
 
405
406
 
406
407
  def _log_info(kind, rows, cap, columns, parse_errors=0, truncated=False,
@@ -187,25 +187,33 @@ def wevt_rows(channel, cap=None, runner=None):
187
187
 
188
188
 
189
189
  def parse_wevt_xml(text):
190
- """Parse concatenated wevtutil XML <Event> fragments into rows."""
190
+ """Parse concatenated wevtutil XML <Event> fragments into rows.
191
+
192
+ Defensive on purpose — wevtutil's redirected render varies by Windows
193
+ release: XML namespaces in double OR single quotes, an XML declaration
194
+ before (or between) fragments, BOM'd UTF-16 already decoded upstream.
195
+ A capture that parses to zero rows is the classic silent failure, so
196
+ every quirk is normalized here rather than trusted.
197
+ """
191
198
  import xml.etree.ElementTree as ET
192
199
  rows = []
193
200
  if not text or not text.strip():
194
201
  return rows
202
+ # normalize: strip declarations, namespaces (both quote styles), BOMs
203
+ text = re.sub(r"<\?xml[^>]*\?>", "", text)
204
+ text = text.replace("\ufeff", "").replace("\ufffe", "")
205
+ text = re.sub(r"\sxmlns='[^']*'", "", text)
195
206
  wrapped = "<__events__>" + text + "</__events__>"
196
- # wevtutil fragments declare nothing hostile, but namespaces appear on
197
- # the root Event tag only; strip them for flat System/... paths.
198
- wrapped = re.sub(r"\sxmlns=\"[^\"]*\"", "", wrapped)
207
+ wrapped = re.sub(r'\sxmlns="[^"]*"', "", wrapped)
199
208
  try:
200
209
  root = ET.fromstring(wrapped)
201
210
  except ET.ParseError:
202
211
  # tolerate a truncated capture: salvage complete <Event> blocks
203
- blocks = re.findall(r"<Event[\s>].*?</Event>", text, flags=re.S)
212
+ blocks = re.findall(r"<Event[\s>].*?</Event>", wrapped, flags=re.S)
204
213
  salvaged = []
205
214
  for b in blocks:
206
215
  try:
207
- salvaged.append(ET.fromstring(
208
- re.sub(r"\sxmlns=\"[^\"]*\"", "", b)))
216
+ salvaged.append(ET.fromstring(b))
209
217
  except ET.ParseError:
210
218
  continue
211
219
  root = {"__salvaged__": salvaged}
@@ -238,17 +246,39 @@ def parse_wevt_xml(text):
238
246
 
239
247
  # ── execution ──────────────────────────────────────────────────────────────
240
248
 
249
+ def decode_tool_output(data):
250
+ """Decode native-tool stdout, BOM-aware — with a NUL heuristic fallback.
251
+
252
+ wevtutil writes UTF-16LE when its output is redirected (the classic way
253
+ a Windows Event Log capture comes back as zero parseable events: the
254
+ XML is there, every other byte is a NUL). Some Windows builds emit the
255
+ UTF-16 WITHOUT the BOM, so decoded-as-UTF-8-with-NULs is detected and
256
+ retried as UTF-16LE. Everything else (journalctl, text logs) is UTF-8.
257
+ """
258
+ if isinstance(data, str):
259
+ return data
260
+ if data[:2] in (b"\xff\xfe", b"\xfe\xff"):
261
+ return data.decode("utf-16")
262
+ if b"\x00" in data[:4096]:
263
+ # text tool output never contains NULs — this is UTF-16 without BOM
264
+ try:
265
+ return data.decode("utf-16-le", errors="strict")
266
+ except UnicodeDecodeError:
267
+ pass
268
+ return data.decode("utf-8", errors="replace")
269
+
270
+
241
271
  def _execute(cmd, cap, runner):
242
272
  if runner is not None:
243
273
  return runner(cmd, cap)
244
274
  import subprocess
245
275
  try:
246
- r = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
276
+ r = subprocess.run(cmd, capture_output=True, timeout=120)
247
277
  except FileNotFoundError:
248
278
  raise SystemExit(
249
279
  f"error: {' '.join(cmd[:2])} is not available on this host.\n"
250
280
  " (this source must be read on the machine that owns the log)")
251
281
  if r.returncode != 0:
252
- raise SystemExit(f"error: {' '.join(cmd)} failed: "
253
- f"{(r.stderr or '').strip()[:200]}")
254
- return r.stdout
282
+ err = decode_tool_output(r.stderr or b"").strip()[:200]
283
+ raise SystemExit(f"error: {' '.join(cmd)} failed: {err}")
284
+ return decode_tool_output(r.stdout)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuralosd
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Deterministic-first agentic runtime — @probe framework, chain runner, meta-selector, HITL guardrails, MCP/OpenAPI exposure, and microVM sandbox backends (BoxLite / Microsandbox)
5
5
  Author-email: Hyperspace Technologies <agent@superagent.ng>
6
6
  License: MIT
@@ -6,4 +6,4 @@ from .client import ( # noqa: F401
6
6
  RefusalError,
7
7
  TransportError,
8
8
  )
9
- __version__ = "2.2.0"
9
+ __version__ = "2.2.2"
@@ -220,6 +220,34 @@ def test_init_profiles_wevtutil_via_injected_capture(tmp_path, monkeypatch):
220
220
  assert "wevt_rows" in bridge_src
221
221
 
222
222
 
223
+ def test_wevtutil_utf16_output_still_parses():
224
+ """wevtutil writes UTF-16LE when redirected — the classic way a Windows
225
+ Event Log capture comes back as ZERO parseable events (every other byte
226
+ a NUL). The decode layer must be BOM-aware. This is the Windows CI
227
+ failure from the v2.2.0 tag, pinned here so it cannot come back.
228
+ """
229
+ from neuralosd.logsources import (decode_tool_output, parse_wevt_xml,
230
+ wevt_rows)
231
+ raw = WEVT_FIXTURE.encode("utf-16") # includes the BOM
232
+ rows = parse_wevt_xml(decode_tool_output(raw))
233
+ assert len(rows) == 2
234
+ assert rows[0]["event_id"] == "4624"
235
+ assert rows[1]["level"] == "error"
236
+ # BOM-less UTF-16LE (some Windows builds) must also survive:
237
+ rows = parse_wevt_xml(decode_tool_output(WEVT_FIXTURE.encode("utf-16-le")))
238
+ assert len(rows) == 2
239
+ # single-quoted namespaces + mid-document XML declaration:
240
+ sq = ("<?xml version=\"1.0\" encoding=\"utf-16\"?>\n"
241
+ + WEVT_FIXTURE.replace('xmlns="', "xmlns='")
242
+ .replace('\"]>', "'>").replace('\"', "'"))
243
+ sq = sq.replace("'>\n<Event", "'>\n<Event") # already single-quoted
244
+ rows = parse_wevt_xml(sq)
245
+ assert len(rows) == 2, f"single-quoted/decl variant parsed to {len(rows)}"
246
+ # and the decode alone is transparent for utf-8 tool output:
247
+ assert decode_tool_output(JOURNALD_FIXTURE.encode("utf-8")) == \
248
+ JOURNALD_FIXTURE
249
+
250
+
223
251
  @pytest.mark.skipif(not (os.path.isfile("/bin/journalctl")
224
252
  or os.path.exists("/usr/bin/journalctl")),
225
253
  reason="journald not present on this host")
@@ -241,4 +269,12 @@ def test_wevtutil_end_to_end_when_wevtutil_exists(tmp_path):
241
269
  inst = load_instance(out)
242
270
  env = inst.ask("how many rows", use_cache=False)
243
271
  assert env["probe"] == "row_count"
244
- assert _res(env)["count"] > 0
272
+ # diagnostics live in the message: if the channel parses to zero events,
273
+ # show what the capture actually looked like.
274
+ import subprocess
275
+ raw = subprocess.run(["wevtutil", "qe", "System", "/c:3", "/rd:true",
276
+ "/f:XML"], capture_output=True).stdout
277
+ n_events = decode_tool_output(raw).count("<Event")
278
+ assert _res(env)["count"] > 0, (
279
+ f"wevtutil capture parsed to zero events; raw sample: "
280
+ f"{raw[:120]!r}; decoded '<Event' occurrences: {n_events}")
File without changes
File without changes
File without changes
File without changes