perf: remove Python from current load hot path - #64
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughPython 업스트림 고정 장치를 Rust 기반 고정 장치로 교체했습니다. 새 서버는 제한된 작업자 풀, HTTP/1.1 keep-alive, 응답 지연, 헤더 크기 제한을 지원합니다. CI는 Rust 바이너리를 검증하고 실행합니다. ChangesRust 로드 오리진
Estimated code review effort: 3 (Moderate) | ~30 minutes Merge Risk: ⚪ Minimal · up to This replaces the local Python load-test origin with a bounded Rust HTTP/1.1 fixture while preserving the existing gateway smoke contract. No current merge-blocking risk remains for the documented loopback regression scope. Sequence Diagram(s)sequenceDiagram
participant CI
participant load_origin
participant Gateway
participant LoadTest
CI->>load_origin: 바이너리 컴파일 및 실행
LoadTest->>Gateway: 로드 요청 전송
Gateway->>load_origin: HTTP/1.1 업스트림 요청
load_origin-->>Gateway: 상태, 헤더, 페이로드 응답
Gateway-->>LoadTest: 다운스트림 응답
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review Please review the exact current head only. Focus on whether the std-only Rust origin preserves the existing low-contention HTTP/1.1/k6 semantics, whether the bounded worker/queue implementation can deadlock or distort the 4-VU measurement, whether the direct rustc/rustfmt test path is sound under Rust 1.98.1, and whether removing |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="389801461e28f422c166fb0918a2805d7085d05a"
printf '%s\n' '=== exact HEAD ==='
git rev-parse HEAD
git status --short
printf '%s\n' '=== changed paths against declared base ==='
git diff --name-status "$base"...HEAD
printf '%s\n' '=== stat ==='
git diff --stat "$base"...HEAD
printf '%s\n' '=== diff ==='
git diff --find-renames --find-copies --unified=80 "$base"...HEAD -- \
.github/workflows/ci.yml \
tests/load/load_origin.rs \
tests/load/upstream_fixture.py \
TEST_STRATEGY.md
printf '%s\n' '=== Rust fixture outline ==='
ast-grep outline tests/load/load_origin.rs --items all --view expanded || true
printf '%s\n' '=== workflow and strategy files ==='
cat -n .github/workflows/ci.yml
printf '%s\n' '--- TEST_STRATEGY.md ---'
cat -n TEST_STRATEGY.md
printf '%s\n' '=== all Python fixture and load-origin references ==='
rg -n -i -C 3 'upstream_fixture\.py|load_origin(?:\.rs)?|fixture-ready|LOAD_ORIGIN|FIXTURE_' \
-g '!target/**' -g '!node_modules/**' .
printf '%s\n' '=== load-related files ==='
fd -t f . tests | sortLength of output: 67065 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '=== gateway smoke contract ==='
cat -n tests/load/gateway_smoke.js
printf '%s\n' '=== contract outlines ==='
ast-grep outline tests/toolchain_contract.rs --items all --view expanded
ast-grep outline tests/coverage_contract.rs --items all --view expanded
ast-grep outline tests/documentation_contract.rs --items all --view expanded
ast-grep outline tests/workflow_concurrency_contract.rs --items all --view expanded
printf '%s\n' '=== focused workflow/fixture contract references ==='
rg -n -i -C 8 \
'load_origin|upstream_fixture|rustfmt|rustc|load-contract|gateway_smoke|tests/load|coverage denominator|Cargo production|fixture-ready' \
tests README.md TEST_STRATEGY.md .github/workflows/ci.yml \
-g '!target/**' -g '!node_modules/**'
printf '%s\n' '=== Rust toolchain authority and repository selector files ==='
fd -HI -t f 'rust-toolchain.*|config(\.toml)?|Cargo.toml|Cargo.lock' . | sort | \
xargs -r -n1 sh -c 'echo "--- $0"; cat -n "$0"'Length of output: 140550 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="ContextualWisdomLab/pingora-gateway"
pr="64"
sha="ea32917f97c81d1c3053302ec9b2099de8990ea5"
printf '%s\n' '=== PR exact-head metadata ==='
gh pr view "$pr" --repo "$repo" --json number,headRefOid,baseRefOid,isDraft,mergeStateStatus,statusCheckRollup
printf '%s\n' '=== check runs for exact head ==='
gh api "repos/${repo}/commits/${sha}/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, .status, .conclusion, .details_url] | `@tsv`'
printf '%s\n' '=== exact-head tracked references to removed Python fixture ==='
git grep -n -i 'upstream_fixture\.py' "$sha" -- ':!Cargo.lock' || true
printf '%s\n' '=== exact-head tracked Python measured-path references ==='
git grep -n -i -E 'python3|ThreadingHTTPServer|http\.server' "$sha" -- \
.github TEST_STRATEGY.md tests ':!tests/production_path.rs' || true
printf '%s\n' '=== diff whitespace validation ==='
git diff --check 389801461e28f422c166fb0918a2805d7085d05a...HEAD
printf '%s\n' '=== fixture serving and test ranges ==='
nl -ba tests/load/load_origin.rs | sed -n '90,373p'Length of output: 3623
I found no blocking issue in the requested scope.
The exact-head CI checks are still queued. This review does not treat queued checks as execution evidence. I did not transfer review credit from ✅ Action performedReview finished.
|
|
@coderabbitai review Please review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="389801461e28f422c166fb0918a2805d7085d05a"
head="bad9e0ed158d633c259861106f50e223247370dd"
repo="ContextualWisdomLab/pingora-gateway"
printf '%s\n' '=== repository state and exact revisions ==='
git rev-parse HEAD
git cat-file -t "$base"
git cat-file -t "$head"
git status --short
printf '%s\n' '=== exact changed paths and diff ==='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --find-renames --find-copies --unified=100 "$base" "$head" -- \
.github/workflows/ci.yml \
tests/load_evidence_workflow_contract.rs \
tests/load \
TEST_STRATEGY.md
printf '%s\n' '=== focused file outline ==='
ast-grep outline tests/load_evidence_workflow_contract.rs --items all --view expanded
printf '%s\n' '=== relevant files with line numbers ==='
nl -ba tests/load_evidence_workflow_contract.rs
printf '%s\n' '--- .github/workflows/ci.yml ---'
nl -ba .github/workflows/ci.yml
printf '%s\n' '=== load-evidence workflow and contract references ==='
rg -n -i -C 6 \
'load_evidence_workflow_contract|load-contract|always\(\)|artifact|summary|k6|gateway_smoke|failure\(\)|success\(\)|if:' \
.github tests TEST_STRATEGY.md \
-g '!target/**' -g '!node_modules/**'
printf '%s\n' '=== exact-head GitHub metadata and checks ==='
gh pr view 64 --repo "$repo" --json number,headRefOid,baseRefOid,isDraft,mergeStateStatus,statusCheckRollup
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, .status, .conclusion, .details_url] | `@tsv`'Length of output: 42528 🏁 Script executed: #!/bin/bash
set -euo pipefail
head="bad9e0ed158d633c259861106f50e223247370dd"
repo="ContextualWisdomLab/pingora-gateway"
printf '%s\n' '=== gateway smoke script ==='
cat tests/load/gateway_smoke.js
printf '%s\n' '=== focused workflow range ==='
sed -n '60,175p' .github/workflows/ci.yml
printf '%s\n' '=== focused workflow contract ==='
cat tests/load_evidence_workflow_contract.rs
printf '%s\n' '=== summary producer and all scoped references ==='
rg -n -C 4 -F 'k6-summary.json' .github tests TEST_STRATEGY.md \
-g '!target/**' -g '!node_modules/**'
rg -n -C 3 -i 'handleSummary|summary.*json|k6 run|Exercise concurrent loopback traffic contract|Require loopback latency summary|Upload loopback latency evidence' \
.github tests TEST_STRATEGY.md \
-g '!target/**' -g '!node_modules/**'
printf '%s\n' '=== test registration and YAML dependency evidence ==='
rg -n -C 3 -P 'load_evidence_workflow_contract|serde_yaml' Cargo.toml Cargo.lock tests \
-g '!target/**' -g '!node_modules/**'
printf '%s\n' '=== exact-head GitHub metadata and checks ==='
gh pr view 64 --repo "$repo" --json number,headRefOid,baseRefOid,isDraft,mergeStateStatus,statusCheckRollup
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, .status, .conclusion, .details_url] | `@tsv`'Length of output: 40791
I found no blocking issue in the requested scope.
The RED→GREEN change preserves the primary cause for pre-k6 failures. It also preserves successful-k6 evidence enforcement. The exact-head checks are queued. This static review does not treat queued checks as execution evidence. I did not transfer review credit from predecessor work. You are interacting with an AI system. |
|
@coderabbitai review Please review the current exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="389801461e28f422c166fb0918a2805d7085d05a"
head="bad9e0ed158d633c259861106f50e223247370dd"
repo="ContextualWisdomLab/pingora-gateway"
printf '%s\n' '=== exact revisions ==='
git cat-file -t "$base"
git cat-file -t "$head"
git rev-parse HEAD
printf '%s\n' '=== exact effective range ==='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
printf '%s\n' '=== exact scoped diff ==='
git diff --find-renames --find-copies --unified=100 "$base" "$head" -- \
.github/workflows/ci.yml \
tests/load/load_origin.rs \
tests/load/upstream_fixture.py \
tests/load_evidence_workflow_contract.rs \
TEST_STRATEGY.md
printf '%s\n' '=== workflow contract outline ==='
ast-grep outline tests/load_evidence_workflow_contract.rs --items all --view expanded
printf '%s\n' '=== exact workflow job and evidence contract ==='
nl -ba .github/workflows/ci.yml | sed -n '55,190p'
nl -ba tests/load_evidence_workflow_contract.rs
printf '%s\n' '=== exact strategy references ==='
rg -n -C 5 -i \
'k6|summary|artifact|always|load origin|Python|Rust|loopback|latency evidence' \
TEST_STRATEGY.md
printf '%s\n' '=== scoped summary producers and consumers ==='
rg -n -C 5 -F 'k6-summary.json' \
.github tests TEST_STRATEGY.md \
-g '!target/**' -g '!node_modules/**'
printf '%s\n' '=== workflow control-flow references ==='
rg -n -C 4 \
'load-contract|always\(\)|success\(\)|failure\(\)|if-no-files-found|Upload loopback latency evidence|Require loopback latency summary|Exercise concurrent loopback traffic contract' \
.github/workflows/ci.yml tests/load_evidence_workflow_contract.rs
printf '%s\n' '=== stale removed-fixture and Python server references at exact head ==='
git grep -n -i -E 'upstream_fixture\.py|ThreadingHTTPServer|http\.server' "$head" -- \
.github TEST_STRATEGY.md tests ':!tests/production_path.rs' || true
printf '%s\n' '=== exact-head GitHub status ==='
gh pr view 64 --repo "$repo" --json number,headRefOid,baseRefOid,isDraft,mergeStateStatus,statusCheckRollup
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, .status, .conclusion] | `@tsv`'Length of output: 43161 🏁 Script executed: #!/bin/bash
set -euo pipefail
base="389801461e28f422c166fb0918a2805d7085d05a"
head="bad9e0ed158d633c259861106f50e223247370dd"
repo="ContextualWisdomLab/pingora-gateway"
printf '%s\n' '=== effective range count and paths ==='
git diff --name-only "$base" "$head" | awk 'END { print "changed_path_count=" NR } { print }'
printf '%s\n' '=== exact-head load-contract workflow ==='
git show "${head}:.github/workflows/ci.yml" | sed -n '55,180p'
printf '%s\n' '=== exact-head workflow contract ==='
git show "${head}:tests/load_evidence_workflow_contract.rs"
printf '%s\n' '=== exact-head test strategy load paragraph ==='
git show "${head}:TEST_STRATEGY.md" | rg -n -C 3 \
'gateway_smoke\.js|load_origin\.rs|k6-summary\.json|always-run|artifact'
printf '%s\n' '=== integration-test registration and YAML dependency ==='
git show "${head}:Cargo.toml" | rg -n -C 3 'serde_yaml|dev-dependencies|\[\[test\]\]'
git ls-tree -r --name-only "$head" -- tests | rg -n 'load_evidence_workflow_contract\.rs|load_origin\.rs|upstream_fixture\.py'
printf '%s\n' '=== exact-head summary references ==='
git grep -n -C 4 -F 'k6-summary.json' "$head" -- \
.github tests TEST_STRATEGY.md || true
printf '%s\n' '=== exact-head stale removed-fixture/Python server references ==='
git grep -n -i -E 'upstream_fixture\.py|ThreadingHTTPServer|http\.server|python3' "$head" -- \
.github TEST_STRATEGY.md tests ':!tests/production_path.rs' || true
printf '%s\n' '=== exact-head PR and check status ==='
gh pr view 64 --repo "$repo" --json number,headRefOid,baseRefOid,isDraft,mergeStateStatus,statusCheckRollup
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, .status, .conclusion, .details_url] | `@tsv`'Length of output: 28814
I found no blocking issue in the requested scope.
The I did not transfer review credit from predecessor work. You are interacting with an AI system. |
|
@coderabbitai review Please review current exact head |
|
Oops, something went wrong! Please try again later. 🐰 💔 |
|
@coderabbitai review Please review current exact head |
|
Oops, something went wrong! Please try again later. 🐰 💔 |
|
@coderabbitai review Review current exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
base="389801461e28f422c166fb0918a2805d7085d05a"
head="1b6c5307e6ff7837dd7504ea2cc23936ab44a86c"
previous="bad9e0ed158d633c259861106f50e223247370dd"
repo="ContextualWisdomLab/pingora-gateway"
printf '%s\n' '=== exact revisions and workspace ==='
git cat-file -t "$base"
git cat-file -t "$previous"
git cat-file -t "$head"
git rev-parse HEAD
git status --short
printf '%s\n' '=== exact effective range ==='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --stat "$base" "$head"
printf '%s\n' '=== final commit metadata and formatter-only diff ==='
git show --no-patch --format=fuller "$head"
git diff --check "$previous" "$head"
git diff --find-renames --find-copies --unified=100 "$previous" "$head"
printf '%s\n' '=== full scoped exact-range diff ==='
git diff --find-renames --find-copies --unified=80 "$base" "$head" -- \
.github/workflows/ci.yml \
TEST_STRATEGY.md \
tests/load/load_origin.rs \
tests/load/upstream_fixture.py \
tests/load_evidence_workflow_contract.rs
printf '%s\n' '=== fixture and workflow-contract outlines ==='
ast-grep outline tests/load/load_origin.rs --items all --view expanded
ast-grep outline tests/load_evidence_workflow_contract.rs --items all --view expanded
printf '%s\n' '=== exact-head fixture ==='
git show "${head}:tests/load/load_origin.rs"
printf '%s\n' '=== exact-head workflow load contract ==='
git show "${head}:.github/workflows/ci.yml" | sed -n '55,210p'
printf '%s\n' '=== exact-head k6 and workflow evidence contract ==='
git show "${head}:tests/load/gateway_smoke.js"
git show "${head}:tests/load_evidence_workflow_contract.rs"
printf '%s\n' '=== exact-head strategy load evidence ==='
git show "${head}:TEST_STRATEGY.md" | rg -n -C 5 \
'gateway_smoke\.js|load_origin\.rs|k6-summary\.json|always-run|artifact|warm|loopback|400|4 VU|p95|zero'
printf '%s\n' '=== exact-head relevant references ==='
git grep -n -i -C 4 -E \
'upstream_fixture\.py|ThreadingHTTPServer|http\.server|python3|load_origin|fixture-ready|k6-summary\.json|Require loopback latency summary|Upload loopback latency evidence|Exercise concurrent loopback traffic contract' \
"$head" -- .github tests TEST_STRATEGY.md ':!tests/production_path.rs' || true
printf '%s\n' '=== exact-head test registration and rust authority ==='
git show "${head}:Cargo.toml" | rg -n -C 3 'serde_yaml|dev-dependencies|\[\[test\]\]'
git ls-tree -r --name-only "$head" -- tests | rg -n \
'load_origin\.rs|gateway_smoke\.js|load_evidence_workflow_contract\.rs|upstream_fixture\.py'
fd -HI -t f 'rust-toolchain.*|Cargo.toml' . | sort | \
xargs -r -n1 sh -c 'echo "--- $0"; cat -n "$0"'
printf '%s\n' '=== exact-head GitHub status ==='
gh pr view 64 --repo "$repo" --json number,headRefOid,baseRefOid,isDraft,mergeStateStatus,statusCheckRollup
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, .status, .conclusion, .details_url] | `@tsv`'Length of output: 111635
I found no blocking issue in the requested scope. Exact-head coverage included these five changed paths:
The final commit is formatter-only. It changes only formatting in The Rust origin preserves the required low-contention HTTP/1.1 behavior:
The k6 contract remains unchanged. The workflow installs and verifies Rust 1.98.1 before it runs The direct readiness probe calls The causal evidence path remains fail-closed:
No scoped exact-head reference remains to The exact-head You are interacting with an AI system. |
32e0aee
into
test/pingora-peer-options-debug-contract-v1
Refs #34. Current-stack successor for the still-valid generic portion of Draft #35. Do not close #35 until its remaining pg-erd delta/test/fixture/contract/evidence is also fully succeeded.
Authority / scope
Exact base is supplier-semantics #62
389801461e28f422c166fb0918a2805d7085d05a, which is terminal hosted GREEN. Current exact head is1b6c5307e6ff7837dd7504ea2cc23936ab44a86c. Exact compare is ahead 9 / behind 0 with #62 as merge base and five effective paths:.github/workflows/ci.ymlTEST_STRATEGY.mdtests/load/load_origin.rstests/load/upstream_fixture.pytests/load_evidence_workflow_contract.rsThe measured k6 origin moves from Python
ThreadingHTTPServerto a std-only Rust HTTP/1.1 fixture. It validates startup controls before bind, caps workers at 256, uses a bounded accepted-socket queue and bounded header buffer, uses TCP_NODELAY and deterministic Content-Length framing, and stays outside Cargo production/example targets.Rust 1.98.1 remains current compiler authority from #56. The Rust 1.98.0 value on historical #35 is explicitly historical and is not a current acceptance requirement.
The direct origin-only readiness probe stays at
127.0.0.1:18081/fixture-readyand does not warm the gateway route. The measured contract remains 400 requests / 4 VUs, exact status/body checks, zero failed HTTP requests, and p95<20 ms. No Pingora pin,Cargo.lock, production gateway Rust, route/TLS/auth/business behavior, sample count, concurrency, or threshold changes.Causal RED → minimal repair
Earlier commits add a semantic regression that requires a non-empty
k6-summary.jsonafter successful traffic while preventing analways()artifact upload from replacing a pre-k6 causal failure with a secondary missing-file error. The success-only summary gate remains fail-closed; only the later evidence upload usesif-no-files-found: ignore.The first hosted execution on predecessor
bad9e0ed158d633c259861106f50e223247370ddis terminal. CI34041022444has GREENtest 101507678628and GREENoci-runtime 101507678563;load-contract 101507678702fails inBuild exact gateway candidate and Rust load origin. Supply Chain34041022495is GREEN.The load log proves the exact gateway release build completed under Rust 1.98.1. The next command,
rustfmt --edition 2021 --check tests/load/load_origin.rs, reported exactly three layout-only diffs and stopped execution before direct fixture tests, optimized helper compilation, or k6. The later artifact step found no summary and succeeded with the intended missing-file policy, so the formatter failure remained the causal signal.Commit
1b6c5307e6ff7837dd7504ea2cc23936ab44a86cis the minimal repair: one-file, formatter-only relative tobad9e0ed...(tests/load/load_origin.rs, +8/-10). Exact ancestry is ahead 1 / behind 0 withbad9e0ed...as merge base. No fixture semantics or acceptance thresholds changed.Exact-head GREEN
Current exact CI
34045381577is terminal GREEN on1b6c5307...:oci-runtime 101519398319: exact checkout, exact candidate image, declared non-root identity, read-only least-privilege runtime GREEN;load-contract 101519398398: Rust 1.98.1, exact gateway release build, Rust-origin rustfmt/direct tests/optimized compilation, checksum-pinned k6 2.2.0, measured traffic, non-empty summary gate and evidence upload GREEN;test 101519398430: formatting, compile/test, strict lint, public rustdoc, pinned coverage tooling, owned-production workload/diagnostics, complete owned-production coverage enforcement, resolved dependency-lock verification/evidence GREEN.Exact load artifact
9993754723, digestsha256:0c545787f21d264fd012d9b34f16d4272c5c8afeeccd3795ac256c70487d321e, is bound to1b6c5307...and records 400/400 HTTP-200 checks, 400/400 body-identity checks,checksrate1,http_req_failedrate0, andhttp_req_duration p(95)=0.9037063 msunder the unchanged 400-request / 4-VU contract. This is Rust-only loopback regression evidence; it is not an Internet/TLS/multi-hop production SLO.Current exact Supply Chain
34045381591/candidate-evidence 101519398528is also terminal GREEN on the same SHA through exact checkout, Rust 1.98.1, pinned dependency-policy tooling, committed dependency audit, exact candidate image, SPDX SBOM, image scan, exact-source binding and evidence upload.Review boundary
A later CodeRabbit static review explicitly covered exact head
1b6c5307e6ff7837dd7504ea2cc23936ab44a86cagainst exact base389801461e28f422c166fb0918a2805d7085d05a, enumerated all five changed paths, and found no blocking issue in the requested scope. This supersedes the earlier transient exact-head review failures for technical static-review evidence.The older CodeRabbit summary footer still carries a merge-risk marker only through
ea32917f97c81d1c3053302ec9b2099de8990ea5; that footer is stale for current coverage and is not used as authority. The exact-head static bot review is not an organization-required independentAPPROVEDreview. Formal GitHub review enumeration currently contains no reviews, and no unresolved inline review threads are present.Promotion boundary
This PR does not repair upstream
derivative, replace #54's supplier RED, satisfy #56's independent approval, or claim representative production-network/TLS latency, immutable release, canary, cutover, or legacy removal. Next causal order is#54 derivative RED + #62 supplier semantics + #64 Rust-only load GREEN/exact static review → maintainer-integrated immutable supplier repair → gateway supplier bump/Cargo.lock regeneration → unchanged #54 absence regression GREEN + preserved #62/#64 GREEN → #56 independent APPROVED governance → protected integration → protocol restack and real-wire RED/GREEN → immutable release/shadow/canary/cutover.