Hygiene from banner validation: missing-ledger guard + drift line dedup #49

Merged
ClaudiuSchuster merged 1 commit from oss-oo/zdo-banner-hygiene into main 2026-09-25 22:53:50 +00:00
Owner

Two findings from the v1.24.0 banner validation fixture:

  1. Fresh-install crash: dispatch_strip() iterated the lifecycle ledger without a None guard — with stream-dispatches.json absent (observatory installed before any dispatch ran) /api/sessions answered 500. The station never saw it (the ledger always exists there); the banner fixture instance pointed at an empty config dir and crashed. Guarded (or []) + regression test through the REAL _read_json_file path (missing file).
  2. Cosmetic: the broken-banner meta line rendered the CLI version twice when drift was present (CLI 0.17.0 · CLI 0.16.9 → 0.17.0) — now a single CLI <from> → <to> (plain version when no drift).

Unittest 36/36 green; pinned Super-Linter slim v8.7.0 EXIT 0 (all six lanes).

Two findings from the v1.24.0 banner validation fixture: 1. **Fresh-install crash**: `dispatch_strip()` iterated the lifecycle ledger without a None guard — with `stream-dispatches.json` absent (observatory installed before any dispatch ran) `/api/sessions` answered 500. The station never saw it (the ledger always exists there); the banner fixture instance pointed at an empty config dir and crashed. Guarded (`or []`) + regression test through the REAL `_read_json_file` path (missing file). 2. **Cosmetic**: the broken-banner meta line rendered the CLI version twice when drift was present (`CLI 0.17.0 · CLI 0.16.9 → 0.17.0`) — now a single `CLI <from> → <to>` (plain version when no drift). Unittest 36/36 green; pinned Super-Linter slim v8.7.0 EXIT 0 (all six lanes).
Hygiene from banner validation: missing-ledger guard + drift line dedup
All checks were successful
Checks / Functional checks (pull_request) Successful in 15s
9a594e8620
dispatch_strip() crashed on a MISSING stream-dispatches.json (fresh
install, no dispatch yet — _read_json_file returns None and the id-set
comprehension iterated it; /api/sessions answered 500). Found by the
banner validation fixture instance, which pointed the observatory at an
empty config dir. Guarded + regression-tested through the real reader
path. Banner meta line deduplicated the version ('CLI 0.17.0 · CLI
0.16.9 → 0.17.0' → 'CLI 0.16.9 → 0.17.0').
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/zcode-dispatch-observatory!49
No description provided.