Repository navigation
feat(aviator): bounded and server-guided flow control for DAST audit and correlation streams (27.1) - #1173
Merged
ankit2995 merged 5 commits intoNov 25, 2026
Conversation
…ion streams (backport of fortify#1146 to 27.1) Cherry-pick of 43607ce onto feat/v3.x/aviator/27.1. Conflict resolution: keep 27.1's FPR model packages (com.fortify.cli.aviator.fpr/dast; the fcli-common-fpr module from fortify#1151 is dev-only) and drop the StreamInitializationTimeout field/test changes that depend on dev-only fortify#1145.
…on streams Declare supports_flow_control on stream init, follow the server's recommended_window (never above the client's 10), use retry_after_ms for SERVER_BUSY retries, and re-open a stream the server refuses at start with SERVER_BUSY instead of failing. Proto fields are optional, so older servers are unaffected. SAST is unchanged in this commit (it does not declare flow-control support, so the server never refuses its stream at start).
kireetivar
reviewed
Nov 20, 2026
- SAST stream: on APPLICATION_LOCK_LOST/ERROR, complete the result with the
responses received so far, release the stream latch, stop pings, and
half-close without flushing queued prompts (new
RequestHandler.completeDiscardingPending).
- Correlation: leave last_correlation unchanged when any correlation or
validation request failed, and only treat an unchanged artifact as already
correlated when last_correlation is not older than its upload date, so
failed pairs are retried by bulk and direct runs.
- ServerBusyBackoff: honour positive server retry_after_ms hints as sent;
cap only locally generated delays.
- Correlation: close() cancels a pending busy-start restart and the restart
checks a closed flag, so no new RPC starts after close.
- Fix log placeholders (%s for String.format-based warn, {} for SLF4J info).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The target branch now contains fortify#1146 itself (back-merged from dev/v3.x), along with fortify#1145 (StreamInitializationTimeout) and fortify#1151 (FPR classes moved to com.fortify.cli.common.fpr). Conflicts were resolved by taking the target's version of each conflicted file and replaying only this branch's changes made after the fortify#1146 backport (server flow control, keepalive/lock-lost robustness, review fixes). Correlation now creates its StreamInitializationTimeout per stream attempt, as DAST audit already does, so a stream re-opened after SERVER_BUSY gets its own countdown instead of inheriting the first attempt's. Both processors close the refused attempt's timer before a busy-start retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kireetivar
approved these changes
Nov 24, 2026
anishkumarnagaraj-design
approved these changes
Nov 24, 2026
ankit2995
merged commit Nov 25, 2026
187a38a
into
fortify:feat/v3.x/aviator/27.1
15 of 16 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The DAST audit and SAST-DAST correlation clients now follow the server's flow-control signals, with robustness fixes for long-running streams.
The bound on in-flight requests (#1146) and the stream initialization timeout (#1145) are no longer part of this PR.
feat/v3.x/aviator/27.1now contains both from the dev/v3.x back-merge, and this branch is merged with it (dee221d).Follow server flow control (517336b) in the DAST audit and correlation clients:
Proto mirrors of the new optional fields (dast_audit.proto, correlation.proto, issue.proto).
RequestSendWindow.recommend(): the client applies the server'srecommended_window, capped at the initial window of 10.The init request sets
supports_flow_control=true.On SERVER_BUSY at stream start, the client retries after
retry_after_ms(ServerBusyBackoff, at mostMAX_BUSY_STREAM_START_RETRIES= 60). A positive server hint is used as sent; only the client's own backoff is capped.Each stream attempt gets its own
StreamInitializationTimeout, so a stream re-opened after SERVER_BUSY does not inherit the first attempt's countdown.CorrelationStreamProcessorignores responses from a stale stream after a retry.close()cancels a pending busy-start retry, so no new stream opens after close.Robustness (9c09027, 59a1e92):
Keepalive pings use
scheduleWithFixedDelayinstead ofscheduleAtFixedRate, so the client no longer sends every missed ping at once after the machine sleeps.The SAST client now handles APPLICATION_LOCK_LOST / APPLICATION_LOCK_ERROR. It shows a clear warning, returns the results received so far, releases the stream, and half-closes without sending prompts that are still queued (
RequestHandler.completeDiscardingPending()), instead of logging "unknown requestId" and waiting.Correlation retries after partial failures (59a1e92):
If any correlation or validation request fails, the FPR is still uploaded with the confirmed and rejected pairs, but
last_correlationis not written, so bulk correlation selects the version again.A direct run skips an unchanged artifact only when
last_correlationis at or after that artifact's upload date. After a partial run the rerun proceeds and retries only the undecided pairs. If the attribute definition is missing or SSC cannot be read, the previous artifact-only check applies.Compatibility
Works against current 27.1 servers: the new fields are optional and ignored when absent.
The SAST stream behaviour is unchanged (still at most 10 in flight); aligning SAST with the server's window is a separate follow-up.