Wire the coalescing lane into the summon path behind a feature flag #958

Closed
opened 2026-08-18 15:58:24 +00:00 by coilyco-ops · 0 comments
Member

The coalescing lane landed in a325437: internal/ingest, internal/coalesce, and cmd/sirens-echo-bridge. It is tested, race-clean, and runnable end to end through just smoke, and nothing in the Discord summon path calls it yet.

What is left

Agent.runSerialized in internal/community/agent.go still takes the one execution slot built at agent.go:193 (slots: make(chan struct{}, 1)). That slot is the utilization-above-one bottleneck the lane exists to remove. The remaining change is small: build the ingress and coalescer at NewAgent, have handleMessage submit rather than call runSerialized, and let the pool run the turn.

Why it was not done in the same change

Turning the lane on needs a feature flag, and every flag binds a *bool into a Config field, so the table in featureflags.go cannot gain an entry without config.go gaining a field. config.go was out of scope for this work and is actively being edited on task/free-the-config-numbers. Wiring the lane in unconditionally would have replaced the serial slot with no way for a deployment to turn it back off, which is not a change to make while another branch is mid-flight in the same file.

What config.go needs

  • SIRENS_ECHO_COALESCE_ENABLED, defaulting false, so the serial lane stays the shipped behaviour until the flag is deliberately turned on.
  • The tuning the lane currently carries as named local constants, each marked TODO(prong-c) at its declaration: window span and ask count, their wide counterparts, the high-water mark, the age cap, the worker count, the turn deadline, and the queue capacity.

Both packages already read every one of these off a Policy struct, so the knobs only have to be passed in. No logic moves.

Acceptance

With the flag off the summon path behaves exactly as it does today. With it on, a member's rapid comments share one turn, each comment still carries its own acknowledgment, and sirens_echo.coalesce.* reports depth, batch size, turn latency, and escalations.

The coalescing lane landed in a325437: `internal/ingest`, `internal/coalesce`, and `cmd/sirens-echo-bridge`. It is tested, race-clean, and runnable end to end through `just smoke`, and **nothing in the Discord summon path calls it yet**. ## What is left `Agent.runSerialized` in `internal/community/agent.go` still takes the one execution slot built at `agent.go:193` (`slots: make(chan struct{}, 1)`). That slot is the utilization-above-one bottleneck the lane exists to remove. The remaining change is small: build the ingress and coalescer at `NewAgent`, have `handleMessage` submit rather than call `runSerialized`, and let the pool run the turn. ## Why it was not done in the same change Turning the lane on needs a feature flag, and every flag binds a `*bool` into a `Config` field, so the table in `featureflags.go` cannot gain an entry without `config.go` gaining a field. `config.go` was out of scope for this work and is actively being edited on `task/free-the-config-numbers`. Wiring the lane in unconditionally would have replaced the serial slot with no way for a deployment to turn it back off, which is not a change to make while another branch is mid-flight in the same file. ## What config.go needs - `SIRENS_ECHO_COALESCE_ENABLED`, defaulting **false**, so the serial lane stays the shipped behaviour until the flag is deliberately turned on. - The tuning the lane currently carries as named local constants, each marked `TODO(prong-c)` at its declaration: window span and ask count, their wide counterparts, the high-water mark, the age cap, the worker count, the turn deadline, and the queue capacity. Both packages already read every one of these off a `Policy` struct, so the knobs only have to be passed in. No logic moves. ## Acceptance With the flag off the summon path behaves exactly as it does today. With it on, a member's rapid comments share one turn, each comment still carries its own acknowledgment, and `sirens_echo.coalesce.*` reports depth, batch size, turn latency, and escalations.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo#958
No description provided.