Repository navigation
feat: bytes_sent on upstream_reset audit line, with H2 upstream tests - #16
Merged
Merged
Conversation
…ream tests Tests (macmini, cargo 1.100): cargo fmt --all --check ok; clippy --workspace --all-targets -D warnings ok; cargo test --workspace all pass (incl. 3 new pipeline::h2_tests and audit bytes_sent test); release build has no test hooks; ap-egress not dependent on ap-broker; tests/matrix/matrix.py 41/41 PASS. cargo matrix target fails on this host's cargo layout (test exe not under deps/), unrelated to this change.
…, saturate the counter Checked on macmini: fmt, clippy -D warnings, cargo test --workspace, matrix.py 41/41, h2_tests x100 loop 0 failures, release binaries carry no AP_TEST_ hooks. The cargo matrix test cannot find binaries on that host (pre-existing path lookup).
Contributor
Author
|
Review follow-up, fixed in d425c6c (additive commit):
Checked on macmini: fmt, clippy -D warnings, |
chaodu-agent
added a commit
that referenced
this pull request
Nov 17, 2026
- passthrough audit record gets bytes_sent: None (field added by #16) - drop dead __ap_probe reserved-name check; mark caller key header values sensitive - evidence digest comment says what the digest covers - PT-12: obs-fold row, GET CL+TE and bare-LF measured as known gap - design 3.1/3.5/acc 12 and runbook: hyper behaviour, loopback + front reliance, stage 2 raw-head scanner Checked on macmini: fmt, clippy (default and stage1-probe,matrix-upstream) -D warnings, cargo test --workspace, release hook greps clean, sidecar matrix 41/41, passthrough matrix 13/13, matrix_passthrough cargo target ok. cargo matrix target fails on this host only (new cargo test-exe layout; bin_dir lookup), driver run directly instead.
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.
Port of finding B from the
feat/phase1-k8sinvestigation: design intent (docs/design/phase1.md, "Upstream error mid-stream") is that the audit line for a mid-stream upstream reset records how many response bytes were already forwarded.Changes
ap-core/audit.rs: newbytes_sent: Option<u64>,skip_serializing_if = None. Present only on theupstream_resetline, omitted on every other line. No new secret-bearing field.ap-proxy/pipeline.rs:StreamAuditcounts response body bytes forwarded; on reset the Drop writesbytes_sent.test_support.rs:tls_server_config(alpn)extracted fromstart_upstream(unchanged behaviour, still http/1.1) plusUpstream::from_parts, so a test can run its own server.pipeline/h2_tests.rs, using a real h2-only TLS server (ALPNh2) under the throwaway CA:bytes_sent.upstream_resetline,bytes_sent == 8(partial-), no key, surrogate, credential or/ap/in the audit text.upstream_unavailableline, nobytes_sent, noupstream_reset.h2only (bytes, rustls, tokio-rustls were already present). No policy config change; noconnect_toor test-resolve from the old branch.Evidence (macmini, cargo 1.100)
cargo fmt --all --check: okcargo clippy --workspace --all-targets -- -D warnings: okcargo test --workspace: all pass (3 new h2 tests, 1 new audit test)ap-egressdoes not depend onap-brokerpython3 tests/matrix/matrix.py: 41 PASS of 41 rows (count unchanged; audit field-shape rows pass)cargo test -p ap-proxy --features matrix-upstream --test matrixfails on this host only because cargo 1.100 places the test exe outsidedeps/, sobin_dir()intests/matrix.rsmisses the binaries. Not caused by this PR; CI on ubuntu is the check.