test(engine): port MAF review attack shapes into stream session tests - #32
Merged
Merged
Conversation
Three shapes from the MAF agent-hooks review rounds, pinned against the section 18.1 accounting (analysis/streaming-acs-vs-maf.md, R9): - Retry re-invocation across sessions: an abandoned attempt settles failed on its uncleared residue while the clean resumed retry settles clean, and a retry that replays the abandoned attempt's clearance frontier fails closed rather than releasing a gap nothing evaluated. - Success-then-discard: a fully cleared, never emitted stream settles Complete, because clearance is permission and not a delivery record; the companion test pins that the accounting cannot distinguish an emitting host from a discarding one, which names the host obligation boundary instead of pretending to check it. - Streaming versus whole-snapshot asymmetry probe: deny-bearing content reaches the same terminal outcome through one section 18 whole snapshot and through section 18.1 segments, with the incremental path differing only in the bounded exposure of the cleared prefix; a clean stream is the negative control and lands clean both ways. Complements the resume-boundary straddle pair in PR #30; tests live in a new file so the two branches do not contend. Signed-off-by: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com>
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.
Implements R9 from
analysis/streaming-acs-vs-maf.md: the attack shapes the MAF agent-hooks review rounds surfaced, ported into end-to-end tests against the section 18.1 accounting. Test-only; no behavior change, so no CHANGELOG entry.New file
engine/tests/stream_session_attack_shapes.rs(--features streaming; a separate file so this branch does not contend with #30, whose resume-boundary straddle pair it complements):an_abandoned_attempt_settles_failed_and_its_retry_settles_clean: attempt 1 abandoned mid-stream settlesFailed(UnclearedResidue)with its offsets kept for the audit record; the resumed attempt 2 settlesCompletewith no cross-session bleed.a_retry_cannot_inherit_the_abandoned_attempts_clearance_frontier: replaying attempt 1's clearance frontier into the retry fails closed withNonContiguousOutcomeinstead of releasing a gap nothing evaluated.a_fully_cleared_stream_the_host_never_emits_still_settles_complete: clearance is permission, not a delivery record, and the settled session offers no release point afterwards.settlement_records_clearance_not_delivery: an emitting host and a discarding host are indistinguishable to the accounting; the test pins the host-obligation boundary explicitly rather than pretending the session can audit delivery.a_deny_lands_on_both_the_whole_snapshot_and_the_incremental_path: the same deny-bearing content refused via one section 18 whole snapshot and via section 18.1 cumulative segments, with the incremental path differing only in bounded exposure of the cleared prefix.a_clean_stream_settles_the_same_on_both_pathsis the negative control.Verified:
cargo test --all-featuresgreen,cargo fmt --checkclean, clippy warnings unchanged from main.