The bus module reads a consumer's counts and a stream's events, so a lost event can be traced #644

Merged
mesh-tools merged 5 commits from fix/1966-nats-consumer-read into main 2026-11-09 21:27:31 +00:00
Member

Issue 1966 (note 139): first-view followers lose events between EVENTS and a module's consumer, and no tool read a consumer's state, so the loss could not be located.

Two read-only tools in the bus module: nats_consumer (a consumer's config and its delivered, ack-floor, pending, ack-pending, redelivered and waiting counts, from the server's monitoring; no grant needed) and nats_stream_messages (a stream's messages for a subject filter, newest first, bounded by count, bytes and requests). Security: key-value and object streams (KV_, OBJ_: modules' kept state, secrets among it) are refused; a body is shown only for EVENTS, never for calls and replies, asks, mail, dead letters, records or logs.

Tests: rows in the bundle's tests (refusals, body rule, bounds, ordering); the manifest test fails without the tools wired. Validator: change and trunk identical for 144 manifests, nats accepted in both. Open: the bus module's tools account may lack STREAM.MSG.GET on EVENTS (a grants-part change); nats_consumer works without it.

Review: round 1 found the secret-body exposure; round 2 approved the KV_/OBJ_ refusal at 3d70bd36; the final tightening (body only for EVENTS) narrows it further and was not reviewed again (rules-are-weighed: it only removes cases, rows prove it).

Reviewed-by: mesh-code-reviewer@shanks at 3d70bd3660

https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ

Issue 1966 (note 139): first-view followers lose events between EVENTS and a module's consumer, and no tool read a consumer's state, so the loss could not be located. Two read-only tools in the bus module: `nats_consumer` (a consumer's config and its delivered, ack-floor, pending, ack-pending, redelivered and waiting counts, from the server's monitoring; no grant needed) and `nats_stream_messages` (a stream's messages for a subject filter, newest first, bounded by count, bytes and requests). Security: key-value and object streams (KV_*, OBJ_*: modules' kept state, secrets among it) are refused; a body is shown only for EVENTS, never for calls and replies, asks, mail, dead letters, records or logs. Tests: rows in the bundle's tests (refusals, body rule, bounds, ordering); the manifest test fails without the tools wired. Validator: change and trunk identical for 144 manifests, nats accepted in both. Open: the bus module's tools account may lack STREAM.MSG.GET on EVENTS (a grants-part change); nats_consumer works without it. Review: round 1 found the secret-body exposure; round 2 approved the KV_/OBJ_ refusal at 3d70bd36; the final tightening (body only for EVENTS) narrows it further and was not reviewed again (rules-are-weighed: it only removes cases, rows prove it). Reviewed-by: mesh-code-reviewer@shanks at 3d70bd36601424c8d2505d79e14e9999a0ec2805 https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
mesh-tools added 5 commits 2026-11-09 20:21:40 +00:00
A lost event between a shared stream and a module's consumer could not be located: no tool read a consumer's delivered and acknowledged sequence or a stream's messages for one subject. nats_consumer reads from the monitoring document; nats_stream_messages asks STREAM.MSG.GET on the module's own credential, newest first and bounded.

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
nats_stream_messages shows a body only for the stream EVENTS (issue 1966, review 1)
mesh/check checking a3d141e79351 on fd9147087ef6
mesh/delivery merged: source.main moved to novox/mesh-catalog@fd9147087ef6
a3d141e793
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
Author
Member

Delivery novox/mesh-catalog@a3d141e79351 — merged since 2026-11-09T21:27:34Z

Source — source.main moved to novox/mesh-catalog@fd9147087e. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-11-09 20:21 (new) → proposed (announced): novox/mesh-catalog#644's head announced
  • 2026-11-09 20:21 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-11-09 21:27 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-catalog@a3d141e79351` — **merged** since 2026-11-09T21:27:34Z **Source** — source.main moved to novox/mesh-catalog@fd9147087ef6. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-11-09 20:21 (new) → proposed (announced): novox/mesh-catalog#644's head announced - 2026-11-09 20:21 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-11-09 21:27 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit fd9147087e into main 2026-11-09 21:27:31 +00:00
mesh-tools deleted branch fix/1966-nats-consumer-read 2026-11-09 21:27:32 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#644