From 0633fa64ad3211ea0fafe157d9b6047961921a95 Mon Sep 17 00:00:00 2001 From: Juliet Shen Date: Sun, 19 Jul 2026 17:30:16 -0700 Subject: [PATCH] osprey-stress: update measure/open-loop wording now that #236 merged The JetStream input stream sample (#236) has merged, so the "once #236 lands" framing in the `measure` stub and the consumer/reporter docstrings is stale. Reword to say the prerequisite external source now exists (the JetStream stream is one), while making clear that `run` is the working closed-loop stress test and `measure` (open-loop) is simply not implemented yet. No behavior change. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01TEcfpqhza3dPepZUVWw36X --- osprey_worker/src/osprey/worker/stress/cli.py | 17 +++++++++-------- .../src/osprey/worker/stress/consumer.py | 6 +++--- .../src/osprey/worker/stress/reporter.py | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/osprey_worker/src/osprey/worker/stress/cli.py b/osprey_worker/src/osprey/worker/stress/cli.py index 146f1c188..7e3e29c2d 100644 --- a/osprey_worker/src/osprey/worker/stress/cli.py +++ b/osprey_worker/src/osprey/worker/stress/cli.py @@ -12,9 +12,10 @@ the output topic, and reports drop rate + latency. Exits non-zero on threshold breach so it can be wired into CI as a gate. -The `measure` subcommand is reserved for when #236 (jetstream input stream -plugin) lands — it will let the same measurement layer run in open-loop mode -against any external input source. Today it prints a stub message. +The `measure` subcommand is a planned open-loop mode: it would run the same +measurement layer against events produced by an external source (such as the +JetStream input stream sample from #236) rather than synthetic ones. It is not +implemented yet, so today it prints a stub message; use `run` in the meantime. """ from __future__ import annotations @@ -282,7 +283,7 @@ def build_parser() -> argparse.ArgumentParser: measure = subparsers.add_parser( 'measure', - help='Measure-only mode (open-loop). Stub until #236 lands.', + help='Open-loop measurement mode; not yet implemented (use `run`).', ) _add_common_kafka_args(measure) _add_threshold_args(measure) @@ -428,10 +429,10 @@ def cmd_run(args: argparse.Namespace) -> int: def cmd_measure(args: argparse.Namespace) -> int: print( - '[osprey-stress] `measure` is not yet implemented. It will activate once ' - '#236 (jetstream input stream plugin) lands so this CLI can run the ' - 'measurement layer against externally-produced events. ' - 'Use `osprey-stress run` for synthetic closed-loop testing.', + '[osprey-stress] `measure` (open-loop mode) is not yet implemented. It is ' + 'intended to measure against externally-produced events, such as the ' + 'JetStream input stream sample (#236). ' + 'Use `osprey-stress run` for synthetic closed-loop testing in the meantime.', file=sys.stderr, ) return EXIT_INTERNAL_ERROR diff --git a/osprey_worker/src/osprey/worker/stress/consumer.py b/osprey_worker/src/osprey/worker/stress/consumer.py index 0fa636faa..85e0c9834 100644 --- a/osprey_worker/src/osprey/worker/stress/consumer.py +++ b/osprey_worker/src/osprey/worker/stress/consumer.py @@ -4,9 +4,9 @@ wall-clock receive time per `ActionId` so the reporter can pair every input event with its output and compute end-to-end latency. -Producer-agnostic: the same consumer works against synthetic load (#324), -jetstream-driven load (once #236 lands), or any other input source. The -optional `action_id_filter` decides whether we're in closed-loop matching mode +Producer-agnostic: the same consumer works against synthetic load (#324), an +external source such as the JetStream input stream, or any other input source. +The optional `action_id_filter` decides whether we're in closed-loop matching mode (only count IDs we know about) or open-loop throughput mode (count everything). """ diff --git a/osprey_worker/src/osprey/worker/stress/reporter.py b/osprey_worker/src/osprey/worker/stress/reporter.py index 9f6fe5e40..05595af5a 100644 --- a/osprey_worker/src/osprey/worker/stress/reporter.py +++ b/osprey_worker/src/osprey/worker/stress/reporter.py @@ -8,7 +8,7 @@ * Closed-loop (synthetic source): we know every action_id we sent and when we sent it, so we can compute exact drop rate and per-event latency. -* Open-loop (external source — e.g. jetstream once #236 lands): we don't have +* Open-loop (external source, e.g. the JetStream input stream): we don't have per-event produce timestamps, so latency is unavailable; we report aggregate throughput and drop rate via input/output counts. """