nats: say every bus user's slow consumer and closed connection on the bus (hq issue 270, ADR 0357) #292
Closed
mesh-admin
wants to merge 1 commits from
fix/270-the-bus-module-says-every-users-slow-consumer into main
pull from: fix/270-the-bus-module-says-every-users-slow-consumer
merge into: :main
:main
:feat/072-moves
:fix/turn-handed-on-approve
:fix/checker-full-failure
:revert/774-l3
:fix/check-names-every-conflict
:fix/check-speed
:probe/1126-seed-10
:probe/1126-seed-9
:probe/1126-seed-8
:probe/1126-seed-7
:probe/1126-seed-6
:probe/1126-seed-5
:feat/1126-seed-4
:revert/1126-seed-2
:feat/774-vault-mints
:fix/1901-node-test-cause
:fix/1945-adopt-hashes
:fix/1945-vault-hashing
:feat/try-speed
:fix/1921-every-failure
:feat/r4g-finish-composer
:feat/r4g-finish-1935
:fix/1901
:fix/forge-requires-no-status
:feat/mail-list
:feat/modules-name-no-node
:fix/r4e-r2
:fix/r4e-k2
:fix/r4e-k1
:feat/r4e-leaf
:feat/r4e-buildmods
:feat/r4e-gate
:fix/1106-sdk-member-merges
:feat/r4c5-checker
:fix/xterm-config-defaults
:fix/1165-fill-retry
:feat/r4d-automx-go
:feat/r4d-n8n
:fix/1275-group-merges-whole-or-not
:fix/1129-no-drift-pass
:fix/270-nats-emits-bus-faults
:fix/claude-code-tips-preference
:fix/628-modules-declare-every-package-they-need
:fix/613-home-network-shares
:feat/bus-websocket-listener
:fix/340-tool-servers-only-from-the-terminal
:feat/the-store-collects-nightly-again
:feat/dbus-module
No Reviewers
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
agent-ace
agent-g14
agent-novox
agent-shanks
jschoubben
mesh-tools
miel.truyen
nox-agent
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: novox/mesh-catalog#292
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
after: mesh-controller
What
modules/nats/cmd/nats-tools/watch.go: a watch beside the tools reads the server's record of closed connections (/connz?state=closed&auth=1) every 30 seconds and publishes, through the runtime,bus.slow-consumerfor each connection closed as a slow consumer andbus.connection-closedfor each closed for breaking the bus's rules (any reason not on the routine list: the client's own close, stale connection, read/write error, TLS handshake, login timeout, refused login, server shutdown). Each event names the user, connection name and id, reason, opened, closed, lived and pending bytes; never a credential.nats_bus_watch: last look, counts said, newest said, reasons not said, anything not published, last error.module.json:emitsthe two events;toolsgainsnats_bus_watch.Why
The server records the user of every connection it closes as a slow consumer and says it nowhere the controller hears (issue 270, open question 2; research 036 found two on 2026-10-07 that only the log held). Decided in ADR 0357. Refused subjects are not in that record or anywhere but the log: issue 702.
Tested
watch_test.go: one event per closure the server dropped and none for routine ones or ones older than the hour; none said twice while running; a failed publish retried; a restarted watch says the last hour again; a reused connection id with a new opening is a new closure; an unreadable record said; the manifest's tools, emits and the 30 s / 1 h bounds. All fail on main (the watch does not exist).MESH_GATE=<controller built from the mesh-controller branch> MESH_CHECK_MODULES=nats sh merge-check.sh: exit 0 (62 without health, as kept). With main's controller the nats manifest is refused ("its emits would be granted nothing"), henceafter: mesh-controller.Delivery note: nats is the bus; a change to it waits for the planned bus step a person starts (ADR 0236). The server image does not change, only the tools bundle and the manifest.
Fixes issue 270
Delivery
novox/mesh-catalog@9e50c1eb36f0— stopped since 2026-10-14T06:58:17ZDelivery plan — builds nats, sent nowhere; merging this needs a person's bus upgrade; 1 wait(s) for a person
mesh_call mesh-controller.bus {"upgrade": "true", "why": "…", "reversible" or "irreversible": "true"}runs, nothing else is sent to novox either — unless the new build turns out the same as the one running there (issue 280)Group
fix/270-the-bus-module-says-every-users-slow-consumer, in order: novox/mesh-controller@fd9308d328 → novox/mesh-catalog@9e50c1eb36Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition:git log --notes=mesh-plan.Merge check at
9e50c1ebJudged: head
9e50c1eb36f0merged into trunka44d490d974c; read beside it: mesh-controller2959c8143536, mesh-controller-main3479a35462b2, mesh-host1a2677882380, mesh-tools954e1a53eef9mesh/merge-gate: FAIL — a manifest the change touches fails the module check: modules/nats/module.json: this manifest cannot be used: (modules: nats)mesh/repo-check: FAIL — its merge-check.sh failed: files asking for a setting without saying whether it is trusted: 25Delivery plan — builds nats, sent nowhere; merging this needs a person's bus upgrade; 1 wait(s) for a person
mesh_call mesh-controller.bus {"upgrade": "true", "why": "…", "reversible" or "irreversible": "true"}runs, nothing else is sent to novox either — unless the new build turns out the same as the one running there (issue 280)Run by the build seat on novox as
build-1791960187616491354(builds --log build-1791960187616491354).Replaced by #293 (branch fix/270-nats-emits-bus-faults, same head
9e50c1eb), taken out of the delivery group so mesh-controller #326 can merge on its own checks.Pull request closed