v1.0.19 (roadmap P2): multi-parent / CC bells + valr fold-ins (F-1/F-2/F-3) #50

Merged
ClaudiuSchuster merged 1 commit from oss-oo/pinky-cc-bells into main 2026-10-02 03:38:19 +00:00
Owner

Roadmap P2 item 1 — Multi-parent / CC bells, plus the three fold-ins from the retained/fleet round validation (valr F-1 LOW, F-2 INFO, F-3 INFO).

The mechanism — CC notification fan-out

  • CLI: --notify-cc <sid>[,<sid>…] (stripped, deduped, parent-equal entries dropped; all-equals-parent proceeds with zero CC bells + NOTE) and --cc-on {all,failure} (default all = the parent bell event set; failure = failed/timeout observers). Fail-fast exit 2: unknown recipient (named), zero-parse, --cc-on without --notify-cc, >16 after dedupe. --notify-cc without --notify-parent is legal (sender = the new session). Result JSON + START lifecycle record carry notify_cc/cc_on.
  • Firing (notify_cc() from finish_eval, after the parent bell): one independent steer per recipient — recipient-resolved cwd/model (same queries as the parent bell), own systemd scope, per-recipient bell id <DISPATCH_ID>-cc-<recipient> (delivery-once dedupes by bell id alone — CC ids must never share the parent bell id or they collapse into it), bell-ledger record {child, parent: recipient, sender, event, role, kind: "cc", bell_id, spawned_at, result_out, parent_cwd, parent_model, prompt_file}, CC doorbell wording (informed observer, never "You are the parent"), ZCODE_DISPATCH_NOTIFY_PARENT=<recipient> so the busy-queue / ghost-send / delivery-once / scope-self-check machinery works per recipient unchanged.
  • Rate budget: CC pending/history/intent records carry cc (sender) + cc_lane; the sweep bell-bucket key is cc-or-parent — the recipient own bucket untouched; starvation guard unchanged (age-based).
  • Token attribution: a CC steer usage entry lands in the SENDER lane (parent field = sender); lane resolved at firing time with the recorder fallback and riding the env — never re-derived in the steer.
  • MQTT/state (additive-only): turn-* payloads + retained state snapshots gain optional cc: [<sids>] only when CC fired; notification-delivered gains cc (sender); SSE/webhook envelopes embed the payload untouched so the field flows (EVENTS.md line).

Fold-ins (valr)

  • F-1 (LOW): publish_dual serializes the LEGACY topic with default json.dumps (ASCII escapes — byte-identical to pre-v1.0.18 wire bytes for ALL content); only the fleet mirror is raw UTF-8. MQTT-TOPICS byte-compat claim needs no ASCII qualifier.
  • F-2 (INFO): archive-tombstone suite guard — a static source scan asserts every in-repo archive surface calls fleet.publish_state_tombstone (fails when a new unguarded surface appears).
  • F-3 (INFO): explicit bridge mirror-skip legs — with the SSE bridge AND a webhook rig consumer subscribed, publishes onto zcode/fleet/# topics assert NO envelope event on either bridge (legacy topic as positive control).

Suite (podman shim tripewire: ZERO real invocations; rig brokers only)

CC validation classes; happy path (2 recipients: dedupe, distinct bell ids + sender, CC wording without parent phrasing, spawn stamps, recipient-resolved steers, result/START carry notify_cc); --cc-on failure both directions (parent bell still fires on all three); parentless CC with sender-lane usage entry (rig usage ledger); additive MQTT fields (turn-completed, retained state legacy+mirror, notification-delivered); busy delivery-once (exactly one cc-keyed pending record, re-queue dedupe, delivered stamp + history dedupe on redelivery); sender-keyed rate bucket (CC skips under the SENDER key, recipient bell delivers, starvation override delivers); F-1 byte assertions; F-2 static guard; F-3 behavioral mirror-skip.

make check green; pinned Super-Linter station lanes green (BASH, BASH_EXEC, MARKDOWN, PYTHON_PYLINT, PYTHON_RUFF, YAML).

Canary discipline: no new upstream assumptions — the session-DB reads and resume semantics this feature rides are the already-pinned contract canaries (env/db/proto groups).

Docs: README (flags + CC section + intro + roadmap checklist), CLI-REFERENCE, USAGE §8 (CC doorbell + ledger schema + rate rule), MQTT-TOPICS (fields + F-1/F-2/F-3 notes), BUDGETS (CC attribution), EVENTS (cc field), ROADMAP P2 marked shipped.

**Roadmap P2 item 1 — Multi-parent / CC bells**, plus the three fold-ins from the retained/fleet round validation (valr F-1 LOW, F-2 INFO, F-3 INFO). ## The mechanism — CC notification fan-out - **CLI**: `--notify-cc <sid>[,<sid>…]` (stripped, deduped, parent-equal entries dropped; all-equals-parent proceeds with zero CC bells + NOTE) and `--cc-on {all,failure}` (default `all` = the parent bell event set; `failure` = failed/timeout observers). Fail-fast exit 2: unknown recipient (named), zero-parse, `--cc-on` without `--notify-cc`, >16 after dedupe. `--notify-cc` without `--notify-parent` is legal (sender = the new session). Result JSON + START lifecycle record carry `notify_cc`/`cc_on`. - **Firing** (`notify_cc()` from `finish_eval`, after the parent bell): one independent steer per recipient — recipient-resolved cwd/model (same queries as the parent bell), own systemd scope, per-recipient bell id `<DISPATCH_ID>-cc-<recipient>` (delivery-once dedupes by bell id alone — CC ids must never share the parent bell id or they collapse into it), bell-ledger record `{child, parent: recipient, sender, event, role, kind: "cc", bell_id, spawned_at, result_out, parent_cwd, parent_model, prompt_file}`, CC doorbell wording (informed observer, never "You are the parent"), `ZCODE_DISPATCH_NOTIFY_PARENT=<recipient>` so the busy-queue / ghost-send / delivery-once / scope-self-check machinery works per recipient unchanged. - **Rate budget**: CC pending/history/intent records carry `cc` (sender) + `cc_lane`; the sweep bell-bucket key is `cc`-or-`parent` — the recipient own bucket untouched; starvation guard unchanged (age-based). - **Token attribution**: a CC steer usage entry lands in the SENDER lane (parent field = sender); lane resolved at firing time with the recorder fallback and riding the env — never re-derived in the steer. - **MQTT/state (additive-only)**: turn-* payloads + retained state snapshots gain optional `cc: [<sids>]` only when CC fired; notification-delivered gains `cc` (sender); SSE/webhook envelopes embed the payload untouched so the field flows (EVENTS.md line). ## Fold-ins (valr) - **F-1 (LOW)**: `publish_dual` serializes the LEGACY topic with default `json.dumps` (ASCII escapes — byte-identical to pre-v1.0.18 wire bytes for ALL content); only the fleet mirror is raw UTF-8. MQTT-TOPICS byte-compat claim needs no ASCII qualifier. - **F-2 (INFO)**: archive-tombstone suite guard — a static source scan asserts every in-repo archive surface calls `fleet.publish_state_tombstone` (fails when a new unguarded surface appears). - **F-3 (INFO)**: explicit bridge mirror-skip legs — with the SSE bridge AND a webhook rig consumer subscribed, publishes onto `zcode/fleet/#` topics assert NO envelope event on either bridge (legacy topic as positive control). ## Suite (podman shim tripewire: ZERO real invocations; rig brokers only) CC validation classes; happy path (2 recipients: dedupe, distinct bell ids + sender, CC wording without parent phrasing, spawn stamps, recipient-resolved steers, result/START carry notify_cc); `--cc-on failure` both directions (parent bell still fires on all three); parentless CC with sender-lane usage entry (rig usage ledger); additive MQTT fields (turn-completed, retained state legacy+mirror, notification-delivered); busy delivery-once (exactly one cc-keyed pending record, re-queue dedupe, delivered stamp + history dedupe on redelivery); sender-keyed rate bucket (CC skips under the SENDER key, recipient bell delivers, starvation override delivers); F-1 byte assertions; F-2 static guard; F-3 behavioral mirror-skip. `make check` green; pinned Super-Linter station lanes green (BASH, BASH_EXEC, MARKDOWN, PYTHON_PYLINT, PYTHON_RUFF, YAML). **Canary discipline**: no new upstream assumptions — the session-DB reads and resume semantics this feature rides are the already-pinned contract canaries (env/db/proto groups). Docs: README (flags + CC section + intro + roadmap checklist), CLI-REFERENCE, USAGE §8 (CC doorbell + ledger schema + rate rule), MQTT-TOPICS (fields + F-1/F-2/F-3 notes), BUDGETS (CC attribution), EVENTS (cc field), ROADMAP P2 marked shipped.
v1.0.19 (roadmap P2): multi-parent / CC bells + valr fold-ins (F-1/F-2/F-3)
All checks were successful
Checks / Functional checks (pull_request) Successful in 8m54s
bf9919d2b8
CC notification fan-out (--notify-cc / --cc-on):

- CLI: comma list parsed (stripped, deduped, parent-equal entries
  dropped — all-equals-parent proceeds with zero CC bells + NOTE),
  fail-fast exit 2 for unknown recipients (named), zero-parse,
  --cc-on without --notify-cc, and >16 recipients after dedupe;
  --notify-cc without --notify-parent is legal (sender = the new
  session). Result JSON + START lifecycle record carry notify_cc/cc_on.
- Firing (notify_cc after the parent bell): one independent steer per
  recipient — recipient-resolved cwd/model, own systemd scope,
  per-recipient bell id <DISPATCH_ID>-cc-<recipient> (delivery-once
  dedupes by bell id alone; CC ids must never share the parent's),
  kind:"cc" ledger record with sender + target-in-parent, CC doorbell
  wording (informed observer, never "You are the parent"),
  ZCODE_DISPATCH_NOTIFY_PARENT=<recipient> so the busy-queue /
  ghost-send / delivery-once / scope machinery works unchanged.
- Rate budget: CC pending/history/intent records carry cc (sender);
  the sweep's bell-bucket key is cc-or-parent — the recipient's own
  bucket is untouched by CC traffic; starvation guard unchanged.
- Token attribution: the CC steer's usage records into the SENDER's
  lane (lane resolved at firing time, rides the env as
  ZCODE_DISPATCH_NOTIFY_CC_LANE; parent = sender via
  ZCODE_DISPATCH_NOTIFY_CC); redeliveries keep the markers.
- MQTT/state (additive): turn-* payloads + retained state snapshots
  gain optional "cc": [<sids>] only when CC fired;
  notification-delivered gains cc (sender) on CC deliveries; the
  SSE/webhook envelopes embed the payload untouched (field flows).

valr fold-ins:

- F-1 (LOW): publish_dual serializes the legacy topic with default
  json.dumps (ASCII escapes — byte-identical to pre-v1.0.18 wire
  bytes for ALL content); only the fleet mirror is raw UTF-8.
- F-2 (INFO): suite guard — every in-repo archive surface must call
  fleet.publish_state_tombstone (static scan, fails on new unguarded
  surfaces).
- F-3 (INFO): suite legs prove zcode/fleet/# mirror publishes fire NO
  envelope event on the SSE bridge nor the webhook runner (with the
  legacy topic as positive control).

Suite: CC validation classes, happy path (2 recipients, dedupe,
distinct bell ids, CC wording, spawn stamps, recipient-resolved
steers), --cc-on failure both directions, parentless CC with
sender-lane usage entry, additive MQTT fields, busy delivery-once
(one pending record with cc/cc_lane, re-queue dedupe, delivered stamp
+ history dedupe), sender-keyed rate bucket + starvation override,
F-1 byte assertions, F-2 static guard, F-3 behavioral mirror-skip.

Docs: README (flags + CC section + intro + roadmap checklist),
CLI-REFERENCE, USAGE §8 (CC doorbell, ledger schema, rate rule),
MQTT-TOPICS (cc fields, F-1 byte-compat, F-2/F-3 notes), BUDGETS (CC
attribution), EVENTS (cc field line), ROADMAP P2 marked shipped.

No new upstream assumptions (session-DB reads and resume semantics
remain the pinned canaries).
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!50
No description provided.