Skip to content

sa3: make the pipeline submit queue cap configurable - #318

Open
ryanontheinside wants to merge 1 commit into
mainfrom
ryanontheinside/fix/sa3-queue-cap
Open

sa3: make the pipeline submit queue cap configurable#318
ryanontheinside wants to merge 1 commit into
mainfrom
ryanontheinside/fix/sa3-queue-cap

Conversation

@ryanontheinside

Copy link
Copy Markdown
Collaborator

Summary

StreamPipeline.submit() documents queue_cap=1 as the intended policy for callers that re-submit every tick, but SA3Backend._build_pipeline never passed it, so the cap fell back to the historical default of depth. With depth < steps, the queue sits full and a knob move (denoise, seed, the bundle a prompt swap publishes) waits behind up to depth - 1 stale requests before it can reach a ring slot. ACE's StreamDenoise node has passed queue_cap=1 since the option was added; SA3 was the one caller left on the default.

Flipping that default is a live behavior change to the shipped product, so this PR only adds the dial: a queue_cap ctor kwarg (None = unchanged) plus a DEMON_SA3_QUEUE_CAP env override for A/B-ing a running server. It's an env var rather than a SessionConfig field because this is a measurement dial, not a client control — the wire contract and its generated TS types stay untouched. Flipping the default itself is deliberately left for a follow-up.

Test plan

  • python -m pytest tests/unit/test_sa3_backend.py -q — 19 passed

StreamPipeline.submit() documents queue_cap=1 as the intended policy for
callers that re-submit every tick, and SA3Backend._generate does exactly
that -- but _build_pipeline never passed it, so the cap fell back to the
historical default of `depth`. With depth < steps the queue sits full, and
a knob move (denoise, seed, the bundle a prompt swap publishes) waits
behind up to depth-1 stale requests before it can reach a ring slot. ACE's
StreamDenoise node has passed queue_cap=1 since the option was added; SA3
was the one caller left on the default.

Flipping that default is a live behavior change to the shipped product, so
this only adds the dial: a `queue_cap` ctor kwarg (None = unchanged) plus a
DEMON_SA3_QUEUE_CAP env override for A/B-ing a running server. Env-var
rather than a SessionConfig field because this is a measurement dial, not a
client control -- the wire contract and its generated TS types stay
untouched until the Phase 0 sweep harness says which policy SA3 should
ship.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant