nats: a tool purges a stream's messages below a sequence #695

Merged
mesh-tools merged 1 commits from fix/nats-stream-purge into main 2026-11-16 21:07:49 +00:00
Member

Recovery under design 47 G (lead-47@shanks, 2026-11-16 22:10 CET).

SEAT_NODE_BUILD_GO holds about 370 asks of the 21:18 mass start of pipelines (mesh-delivery #231), ahead of node-tools' asks (from sequence 13360); shanks runs about 3 steps per 4 minutes, so node-tools' steps would wait hours. No tool could empty a work queue short of removing the stream. nats_stream_purge removes the messages below a sequence and keeps the rest, the stream and its consumers; it needs why, reads first, offers dry_run, refuses a purge past the stream's end and the module-kept data nats_drop owns, and says stream-purged as its audit event.

Quick vs thorough: quick is this tool (one stream, by hand, on a sequence); thorough is the pipeline runner dropping a pipeline's open asks when it ends or is superseded (noted for after G with the generic pipeline research). Chosen quick now: it unblocks node-tools tonight.

Tests: go test ./cmd/nats-tools passes, go vet clean, gofmt clean. Placed on novox by a hand pack before its pipeline runs (recovery mode).

Recovery under design 47 G (lead-47@shanks, 2026-11-16 22:10 CET). SEAT_NODE_BUILD_GO holds about 370 asks of the 21:18 mass start of pipelines (mesh-delivery #231), ahead of node-tools' asks (from sequence 13360); shanks runs about 3 steps per 4 minutes, so node-tools' steps would wait hours. No tool could empty a work queue short of removing the stream. `nats_stream_purge` removes the messages below a sequence and keeps the rest, the stream and its consumers; it needs `why`, reads first, offers `dry_run`, refuses a purge past the stream's end and the module-kept data `nats_drop` owns, and says `stream-purged` as its audit event. Quick vs thorough: quick is this tool (one stream, by hand, on a sequence); thorough is the pipeline runner dropping a pipeline's open asks when it ends or is superseded (noted for after G with the generic pipeline research). Chosen quick now: it unblocks node-tools tonight. Tests: `go test ./cmd/nats-tools` passes, `go vet` clean, `gofmt` clean. Placed on novox by a hand pack before its pipeline runs (recovery mode).
mesh-tools added 1 commit 2026-11-16 21:07:44 +00:00
A build seat's work queue (SEAT_NODE_BUILD_GO) held about 370 asks of
pipelines nobody waits for, ahead of the one pipeline wanted, and no tool
could empty it short of removing the stream. nats_stream_purge removes the
messages below a given sequence, keeping the rest, the stream and its
consumers; it needs why, reads first, offers dry_run, refuses a purge past
the stream's end and the module-kept data nats_drop owns, and says
stream-purged as its audit event, like the three removal tools.
mesh-tools merged commit 7c6aed9d69 into main 2026-11-16 21:07:49 +00:00
mesh-tools deleted branch fix/nats-stream-purge 2026-11-16 21:07:50 +00:00
Author
Member

{
"records": [
{
"instance": "record/main_978_2dad35d4/5cce1ea7c27b0386",
"sequence": 9473,
"bytes": 1898,
"of-bytes": 262144,
"waits": "its difference is not known yet",
"record": {
"milestone": "main.978",
"heads": {
"novox/mesh-catalog@695": "7c6aed9d692662feae2baad5502d40dd86434537",
"novox/mesh-catalog@696": "3f3f6789dd07c7ff6c18b913f8781aa458f17f84",
"novox/mesh-tools@74": "42a752f052b497b8eb61275f80406ac1b0fa9afb"
},
"opened": "2026-11-16T22:01:23.038451964Z",
"form": 1,
"group": {
"group": "",
"members": [
"novox/mesh-catalog@696",
"novox/mesh-tools@74"
],
"pulls": [
{
"repository": "novox/mesh-catalog",
"number": 695,
"head": "7c6aed9d692662feae2baad5502d40dd86434537",
"state": "merged",
"commit": "7c6aed9d692662feae2baad5502d40dd86434537",
"base": "main"
},
{
"repository": "novox/mesh-catalog",
"number": 696,
"head": "3f3f6789dd07c7ff6c18b913f8781aa458f17f84",
"state": "merged",
"commit": "3f3f6789dd07c7ff6c18b913f8781aa458f17f84",
"base": "main"
},
{
"repository": "novox/mesh-tools",
"number": 74,
"head": "42a752f052b497b8eb61275f80406ac1b0fa9afb",
"state": "merged",
"commit": "42a752f052b497b8eb61275f80406ac1b0fa9afb",
"base": "main"
}
]
},
"entries": {
"nats|src2:6dd7434409832e1a3330a7a27d6fa526ab1043e6bf2c466314a0fff37fb7d321|": {
"key": "nats|src2:6dd7434409832e1a3330a7a27d6fa526ab1043e6bf2c466314a0fff37fb7d321|",
"module": "nats",
"fingerprint": "src2:6dd7434409832e1a3330a7a27d6fa526ab1043e6bf2c466314a0fff37fb7d321"
},
"node-tools|src2:b5c7a048a73a1f6aa03758d1708940f8a9e7edc33056a61d5594a8d4b3ca7369|": {
"key": "node-tools|src2:b5c7a048a73a1f6aa03758d1708940f8a9e7edc33056a61d5594a8d4b3ca7369|",
"module": "node-tools",
"fingerprint": "src2:b5c7a048a73a1f6aa03758d1708940f8a9e7edc33056a61d5594a8d4b3ca7369"
}
},
"outcomes": {
"|||take-in": {
"key": "|||take-in",
"module": "",
"step": "take-in",
"outcome": "taken-in",
"why": "lead-47@shanks: the wait holds mesh-catalog #695/#696 and mesh-tools #74 (node-tools probe) for an indexer build src2:4c7fa765 that is not coming tonight (no new indexer build before node-tools is released); taken in with the running indexer so node-tools gets its pipeline",
"at": "2026-11-16T22:01:23.037448093Z"
}
}
}
}
]
}

<!-- mesh-delivery:view --> { "records": [ { "instance": "record/main_978_2dad35d4/5cce1ea7c27b0386", "sequence": 9473, "bytes": 1898, "of-bytes": 262144, "waits": "its difference is not known yet", "record": { "milestone": "main.978", "heads": { "novox/mesh-catalog@695": "7c6aed9d692662feae2baad5502d40dd86434537", "novox/mesh-catalog@696": "3f3f6789dd07c7ff6c18b913f8781aa458f17f84", "novox/mesh-tools@74": "42a752f052b497b8eb61275f80406ac1b0fa9afb" }, "opened": "2026-11-16T22:01:23.038451964Z", "form": 1, "group": { "group": "", "members": [ "novox/mesh-catalog@696", "novox/mesh-tools@74" ], "pulls": [ { "repository": "novox/mesh-catalog", "number": 695, "head": "7c6aed9d692662feae2baad5502d40dd86434537", "state": "merged", "commit": "7c6aed9d692662feae2baad5502d40dd86434537", "base": "main" }, { "repository": "novox/mesh-catalog", "number": 696, "head": "3f3f6789dd07c7ff6c18b913f8781aa458f17f84", "state": "merged", "commit": "3f3f6789dd07c7ff6c18b913f8781aa458f17f84", "base": "main" }, { "repository": "novox/mesh-tools", "number": 74, "head": "42a752f052b497b8eb61275f80406ac1b0fa9afb", "state": "merged", "commit": "42a752f052b497b8eb61275f80406ac1b0fa9afb", "base": "main" } ] }, "entries": { "nats|src2:6dd7434409832e1a3330a7a27d6fa526ab1043e6bf2c466314a0fff37fb7d321|": { "key": "nats|src2:6dd7434409832e1a3330a7a27d6fa526ab1043e6bf2c466314a0fff37fb7d321|", "module": "nats", "fingerprint": "src2:6dd7434409832e1a3330a7a27d6fa526ab1043e6bf2c466314a0fff37fb7d321" }, "node-tools|src2:b5c7a048a73a1f6aa03758d1708940f8a9e7edc33056a61d5594a8d4b3ca7369|": { "key": "node-tools|src2:b5c7a048a73a1f6aa03758d1708940f8a9e7edc33056a61d5594a8d4b3ca7369|", "module": "node-tools", "fingerprint": "src2:b5c7a048a73a1f6aa03758d1708940f8a9e7edc33056a61d5594a8d4b3ca7369" } }, "outcomes": { "|||take-in": { "key": "|||take-in", "module": "", "step": "take-in", "outcome": "taken-in", "why": "lead-47@shanks: the wait holds mesh-catalog #695/#696 and mesh-tools #74 (node-tools probe) for an indexer build src2:4c7fa765 that is not coming tonight (no new indexer build before node-tools is released); taken in with the running indexer so node-tools gets its pipeline", "at": "2026-11-16T22:01:23.037448093Z" } } } } ] } <!-- mesh-act:view.record/main_978_2dad35d4/5cce1ea7c27b0386.novox/mesh-catalog#695@1794866487341020285.b5cf01dd -->
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#695