Skip to content

test: prove pg-erd OCI least-privilege runtime - #19

Draft
seonghobae wants to merge 24 commits into
test/pg-erd-read-stall-recovery-v1from
test/pg-erd-oci-runtime-v1
Draft

test: prove pg-erd OCI least-privilege runtime#19
seonghobae wants to merge 24 commits into
test/pg-erd-read-stall-recovery-v1from
test/pg-erd-oci-runtime-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Valid remaining deployment-evidence gap

The historical #19 branch proved a valid requirement—pg-erd must be exercised as an actual least-privilege OCI process and its separate metrics listener must be operational—but its original package-both-binaries implementation is obsolete. Current parent ancestry already has the stronger CWL_GATEWAY_BIN boundary: one admitted process identity per image. This Draft preserves that packaging and owns only the still-valid deployment evidence.

Product auth/business logic, Keyverse identity, Wardnet/EgressWeave authority, routing authority, TLS issuance, service discovery, retries and consumer traffic state remain outside this slice.

Parent-first ordinary succession

Exact parent #18 is 9749d01ae0e9aae027d7fce1a2c15e6a8358acd9, with CI 34177466780 and Supply Chain 34177466712 terminal GREEN plus an exact owner technical sweep with no actionable finding. That sweep is not independent human approval.

Historical #19 exact e861f3d69330c2fa8e32fc9262c76293840f8917 remained 94 commits behind #18. Ordinary two-parent commit ef4acdffb08709eb47677cf3dd5b53b6902e1262 retains e861f3d... as first parent and adopts exact #18 as second parent without force-push or destructive rebase. Fresh compare from #18 to the current head remains behind=0 with merge base exactly 9749d01..., and six effective child paths only: .github/workflows/ci.yml, CHANGELOG.md, TEST_STRATEGY.md, docs/doctoring/TRACEABILITY.md, docs/product-technical-gap-baseline.md, and tests/pg_erd_oci_metrics_workflow_contract.rs.

The restack deliberately used the current #18 resolution tree and semantically reapplied only the valid child delta; stale workflow/docs blobs and the historical package-both-binaries approach were not overlaid.

Preserved deployment contract

The pg-erd image remains one admitted process identity, uid/gid 65532, read-only root, cap-drop ALL, no-new-privileges, with only versioned config mounted read-only. OCI acceptance requires /livez on the traffic listener and the separately published /metrics listener to identify the Prometheus service as exact text/plain after stripping only optional semicolon media-type parameters. No pre-traffic metric-family assertion is invented.

Review findings → minimal repairs

A fresh exact owner review of ef4acd... found one real false-positive edge in the shell predicate: [[ "${metrics_content_type}" == text/plain* ]] would also accept invalid types such as text/plainfoo. Commit 3f8c22497fe1ad018ba1e76b807fbea537a076f6 strips only the optional semicolon-parameter suffix via ${metrics_content_type%%;*} before requiring exact text/plain and strengthens the workflow regression. No production Rust, runtime topology, route, port, privilege boundary, dependency or product/security authority changed.

A second source/documentation sweep found that docs/product-technical-gap-baseline.md still described the repaired contract as text/plain*. Documentation-only 5e906a0652fbfc0da44d5929ca55212b0cccbde2 aligns that canonical gap authority with the exact predicate.

The same sweep found the new media-type contract lacked primary-source doctoring. Pinned Pingora pingora-prometheus/src/lib.rs@09696b51... sets Content-Type from prometheus::TextEncoder::format_type(), and exact prometheus 0.14.0 source at TiKV rust-prometheus@e07efb4f372f1245bf7410b71e822c69877bcb32 defines TEXT_FORMAT as text/plain; version=0.0.4. Documentation-only be78ab964b497f78d51ec04baaafecff1a5d8f3a records both primary sources and APA-style references in docs/doctoring/TRACEABILITY.md.

The final test-oracle sweep found the regression still proved the repaired shell semantics only as disconnected substrings. Test-only 86a6eb1b8fd5777b578cdbce49f40d52e916cc9b now requires the actual equality predicate [[ "${metrics_content_type%%;*}" == "text/plain" ]] and explicitly rejects the old == text/plain* wildcard form. This changes no workflow or production behavior; it makes the test fail closed against a future reintroduction of the false-positive predicate.

A fresh exact owner technical sweep of the current six effective child paths found no further actionable source/documentation defect or review thread. No formal submitted review currently exists on this PR, so this is technical evidence only, not self-approval or independent human APPROVED review.

Exact-head hosted closure

Current exact head is 86a6eb1b8fd5777b578cdbce49f40d52e916cc9b and has independently reacquired terminal hosted GREEN without predecessor transfer.

  • CI 34180261244: test 101917791952, load-contract 101917792069, and oci-runtime 101917792102 all completed success. The test job passed exact checkout, Rust 1.98.0 formatting, compile/test, strict lint, warning-denied public rustdoc, complete owned-production coverage enforcement, and resolved dependency-lock verification. OCI built both admitted profiles and exercised both under declared non-root/read-only least-privilege constraints.
  • Supply Chain 34180261252 completed success on the same exact SHA.

#19 is therefore stable enough to serve as the exact parent for ordinary/non-force #20 succession. It remains Draft because supplier #54/#62 and #56 independent approval are earlier promotion gates. No protected merge, immutable release, shadow/canary, cutover, rollback or legacy-removal credit is claimed.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 97d66f47-3b94-4377-ba40-330f551fc610

📥 Commits

Reviewing files that changed from the base of the PR and between 9749d01 and 86a6eb1.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • TEST_STRATEGY.md
  • docs/doctoring/TRACEABILITY.md
  • docs/product-technical-gap-baseline.md
  • tests/pg_erd_oci_metrics_workflow_contract.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

pg-erd OCI 검증이 /livez와 별도 /metrics 리스너를 함께 확인합니다. /metrics 응답은 선택적 세미콜론 매개변수를 제거한 뒤 정확한 text/plain이어야 합니다. 회귀 계약 테스트와 관련 추적 문서도 추가되었습니다.

Changes

pg-erd OCI 수락 검증

Layer / File(s) Summary
OCI 런타임 수락 게이트
tests/pg_erd_oci_metrics_workflow_contract.rs, .github/workflows/ci.yml, TEST_STRATEGY.md
계약 테스트와 CI 작업이 /livez 응답 및 /metrics 리스너의 정확한 text/plain 미디어 타입을 검증합니다. 기존 OCI 격리, 부하, 마이그레이션 검증 범위는 유지됩니다.
수락 기준 및 추적 문서
CHANGELOG.md, docs/doctoring/TRACEABILITY.md, docs/product-technical-gap-baseline.md
변경 로그와 기준 문서가 새 OCI 수락 조건을 기록합니다. 추적성 문서는 Pingora와 prometheus 0.14 텍스트 인코더의 미디어 타입 근거를 추가합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 86a6e

The OCI acceptance now verifies pg-erd health and Prometheus listener identity without changing production runtime behavior. No concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (5 skipped: 5 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 pg-erd의 OCI 최소 권한 런타임 검증이라는 주요 변경 사항을 명확하게 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/pg-erd-oci-runtime-v1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact current range d6e61e59bfdca47dd2e9542001938b5c33674314...e78f362b79a746b84c35dd68409b94d27070421d. Historical #19 review/evidence is stale after ordinary two-parent non-force succession. Focus on whether the current one-binary-per-image pg-erd profile is preserved, whether the OCI gate correctly requires both /livez and the separately published /metrics HTTP listener under uid/gid 65532 + read-only root + cap-drop ALL + no-new-privileges + read-only config mount, whether the metrics assertion avoids inventing pre-traffic metric-family requirements, and whether CHANGELOG/TEST_STRATEGY/product-technical-gap baseline are code-current without claiming hosted GREEN, release, canary, cutover, or product-domain authority.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='e78f362b79a746b84c35dd68409b94d27070421d'

echo '== Exact range verification =='
git merge-base "$base" "$head"
git diff --stat "$base" "$head"
git diff --name-status "$base" "$head"

echo '== Full exact diff =='
git diff --find-renames --find-copies --no-ext-diff "$base" "$head" --

echo '== Workflow outline and OCI-related context =='
ast-grep outline .github/workflows/ci.yml --items all || true
rg -n -i -C 12 \
  'oci-runtime|pg-erd|cwl-pingora-pg-erd-migration|CWL_GATEWAY_BIN|livez|metrics|read-only|read_only|cap-drop|no-new-privileges|65532|docker run|podman run' \
  .github/workflows/ci.yml

echo '== Packaging and pg-erd implementation references =='
rg -n -i -C 6 \
  'CWL_GATEWAY_BIN|cwl-pingora-pg-erd-migration|pg-erd-migration|ENTRYPOINT|USER[[:space:]]+65532|65532' \
  -g 'Dockerfile*' -g '*.yml' -g '*.yaml' -g '*.toml' -g '*.rs' .

echo '== Changed documentation with line numbers =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- $file ----"
  cat -n "$file"
done

echo '== Potential overclaims in changed documentation =='
rg -n -i -C 3 \
  'green|hosted|release|canary|cutover|parity|approved|production|complete|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery' \
  CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md || true

Length of output: 142963


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='e78f362b79a746b84c35dd68409b94d27070421d'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Dockerfile =='
cat -n Dockerfile

echo '== pg-erd OCI fixture =='
cat -n examples/pg-erd-migration.yaml

echo '== Full OCI workflow job =='
sed -n '168,270p' .github/workflows/ci.yml

echo '== Metrics listener implementation and endpoint routing =='
rg -n -C 8 --type rust \
  'metrics_listener|/metrics|metrics.*listener|listener.*metrics|serve_metrics|Metrics' \
  src tests

echo '== Exact PR metadata and current check state =='
gh pr view 19 --repo "$repo" \
  --json number,state,isDraft,headRefOid,baseRefOid,mergeCommit,statusCheckRollup \
  --jq '{number,state,isDraft,headRefOid,baseRefOid,mergeCommit,statusCheckRollup: [.statusCheckRollup[] | {name,conclusion,status,detailsUrl}]}'

echo '== Exact-head workflow runs =='
gh run list --repo "$repo" --commit "$head" --limit 30 \
  --json databaseId,workflowName,status,conclusion,event,headSha,url,createdAt,updatedAt \
  --jq '.[] | {databaseId,workflowName,status,conclusion,event,headSha,url,createdAt,updatedAt}'

echo '== Exact-head jobs and steps =='
for run in 34101515128 34101515141; do
  echo "---- run $run ----"
  gh run view "$run" --repo "$repo" --json status,conclusion,jobs \
    --jq '{status,conclusion,jobs: [.jobs[] | {databaseId,name,status,conclusion,steps: [.steps[] | {name,status,conclusion,number}]}]}'
done

Length of output: 80331


@seonghobae Reviewed exact range d6e61e59bfdca47dd2e9542001938b5c33674314...e78f362b79a746b84c35dd68409b94d27070421d.

I found no correctness issues in this range.

  • The effective delta contains only the four stated files.
  • The Dockerfile preserves one-binary-per-image packaging. It allowlists cwl-pingora-gateway and cwl-pingora-pg-erd-migration, then copies only the selected executable to the fixed runtime path.
  • The pg-erd OCI job builds the dedicated image with CWL_GATEWAY_BIN=cwl-pingora-pg-erd-migration.
  • The pg-erd container runs with uid/gid 65532:65532, --read-only, --cap-drop ALL, and no-new-privileges.
  • The job mounts only examples/pg-erd-migration.yaml as a read-only bind mount.
  • The fixture configures distinct traffic and metrics listeners on container ports 6188 and 6189.
  • The gate publishes both ports and requires HTTP success from both /livez and /metrics before acceptance.
  • The /metrics check verifies reachability only. It does not require a metric family before traffic emits metrics.
  • CHANGELOG.md, TEST_STRATEGY.md, and docs/product-technical-gap-baseline.md describe this scope accurately. They retain the stated limits on hosted GREEN, release, parity, canary, cutover, and product-domain authority.

The exact-head CI and Supply Chain runs are still queued with no executed steps. They are incomplete evidence. Keep the PR Draft until the required exact-head checks reach terminal states and the required governance review completes.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Retry the exact d6e61e59bfdca47dd2e9542001938b5c33674314...e78f362b79a746b84c35dd68409b94d27070421d review now that the reported included-review reset has passed. Previous request was rate-limited before review execution; do not transfer historical #19 evidence.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

@seonghobae I will review the exact current range d6e61e59bfdca47dd2e9542001938b5c33674314...e78f362b79a746b84c35dd68409b94d27070421d. I will not use historical #19 review evidence.

⚠️ Action not completed

Head commit changed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Final exact-head review after the formatting-only EOF repair: d6e61e59bfdca47dd2e9542001938b5c33674314...86087dc456496d6b083abf521220c2c14ebfbf69. Earlier e78f362... review attempts are stale. Please verify only the four effective paths, especially preservation of one-binary-per-image OCI isolation and simultaneous /livez + dedicated /metrics HTTP reachability without a premature metric-family assertion.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='86087dc456496d6b083abf521220c2c14ebfbf69'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact range identity =='
printf 'merge-base: '
git merge-base "$base" "$head"
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --stat "$base" "$head"

echo '== Exact four-file patch =='
git diff --no-ext-diff --find-renames --find-copies "$base" "$head" -- \
  .github/workflows/ci.yml \
  CHANGELOG.md \
  TEST_STRATEGY.md \
  docs/product-technical-gap-baseline.md

echo '== Workflow structure =='
ast-grep outline .github/workflows/ci.yml --items all || true

echo '== OCI workflow and packaging references =='
rg -n -i -C 18 \
  'oci-runtime|pg-erd|CWL_GATEWAY_BIN|cwl-pingora-pg-erd-migration|docker run|--user|65532|--read-only|cap-drop|no-new-privileges|pg-erd-migration.yaml|livez|metrics|publish|port' \
  .github/workflows/ci.yml

echo '== Dockerfile and pg-erd fixture =='
fd -a '^Dockerfile.*$|^pg-erd-migration\.yaml$' . -t f -x sh -c '
  for file do
    echo "---- $file ----"
    cat -n "$file"
  done
' sh {} +

echo '== Documentation claims and final newline check =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- $file ----"
  tail -c 1 "$file" | od -An -t x1
  rg -n -i -C 3 \
    'pg-erd|OCI|metrics|livez|GREEN|hosted|release|canary|cutover|approved|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery|complete' \
    "$file" || true
done

echo '== PR and exact-head checks =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,baseRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,baseRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}'

gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url,createdAt,updatedAt \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url,createdAt,updatedAt}'

Length of output: 44019


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='86087dc456496d6b083abf521220c2c14ebfbf69'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact-head documentation final bytes =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  printf '%s: ' "$file"
  git show "${head}:${file}" | tail -c 1 | od -An -t x1
done

echo '== Exact-head documentation content and restricted claims =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- ${file} ----"
  git show "${head}:${file}" | rg -n -i -C 3 \
    'pg-erd|OCI|metrics|livez|GREEN|hosted|release|canary|cutover|approved|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery|terminal|exact.head' || true
done

echo '== Exact line-ending / whitespace validation =='
git diff --check "$base" "$head"
git show "${head}:docs/product-technical-gap-baseline.md" | tail -n 16 | cat -n

echo '== PR and exact-head workflow state =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,baseRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,baseRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}'

gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url,createdAt,updatedAt \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url,createdAt,updatedAt}'

Length of output: 1853


🏁 Script executed:

#!/bin/bash
set -u

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='86087dc456496d6b083abf521220c2c14ebfbf69'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Utility availability =='
command -v xxd || true
command -v hexdump || true
command -v git || true
command -v gh || true

echo '== Exact-head final-byte checks =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  printf '%s: ' "$file"
  if command -v xxd >/dev/null 2>&1; then
    git show "${head}:${file}" | tail -c 1 | xxd -p
  elif command -v hexdump >/dev/null 2>&1; then
    git show "${head}:${file}" | tail -c 1 | hexdump -v -e '1/1 "%02x\n"'
  else
    echo 'no byte-dump utility available'
  fi
done

echo '== Git whitespace validation =='
git diff --check "$base" "$head" || true

echo '== Exact documentation tail =='
git show "${head}:docs/product-technical-gap-baseline.md" | tail -n 18 | cat -n

echo '== Exact-head PR checks =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,baseRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,baseRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' || true

echo '== Exact-head workflow runs =='
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url,createdAt,updatedAt \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url,createdAt,updatedAt}' || true

Length of output: 12788


@seonghobae Reviewed exact range d6e61e59bfdca47dd2e9542001938b5c33674314...86087dc456496d6b083abf521220c2c14ebfbf69.

I found one issue.

  • docs/product-technical-gap-baseline.md still has no final newline. The exact patch marks the final line with \ No newline at end of file. The direct exact-head output also joins the final line with the next command output. Add a terminating LF to complete the stated EOF-format repair.

The OCI implementation preserves the requested boundary.

  • The Dockerfile allowlists the generic and pg-erd executable identities at build time.
  • Each image contains only the selected executable at the fixed runtime path.
  • The pg-erd OCI job uses uid/gid 65532:65532, a read-only root filesystem, --cap-drop ALL, and no-new-privileges.
  • The job mounts only examples/pg-erd-migration.yaml as read-only configuration.
  • The acceptance loop requires both http://127.0.0.1:6288/livez and http://127.0.0.1:6289/metrics.
  • The /metrics probe checks HTTP reachability only. It does not require a metric family before traffic exists.
  • The changed documentation preserves the stated limits on hosted GREEN, release, canary, cutover, and product-domain authority.

The exact-head CI and Supply Chain runs are queued. They remain incomplete evidence.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the exact current range d6e61e59bfdca47dd2e9542001938b5c33674314...86087dc456496d6b083abf521220c2c14ebfbf69. Do not transfer predecessor review credit from e78f362...; the final head includes the documentation newline repairs. Verify only the effective four-file delta (.github/workflows/ci.yml, CHANGELOG.md, TEST_STRATEGY.md, docs/product-technical-gap-baseline.md), especially that the one-binary-per-image pg-erd OCI profile is preserved and acceptance requires both /livez and the separately published metrics listener under uid/gid 65532, read-only root, cap-drop ALL, no-new-privileges, and read-only config mount. Treat metrics reachability as HTTP endpoint evidence only; do not invent pre-traffic metric-family requirements. Also verify that the docs claim no hosted GREEN, release, canary/cutover, or product-domain authority.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='86087dc456496d6b083abf521220c2c14ebfbf69'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact range =='
printf 'merge-base: '
git merge-base "$base" "$head"
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --stat "$base" "$head"
echo '== Exact patch: workflow =='
git diff --no-ext-diff "$base" "$head" -- .github/workflows/ci.yml
echo '== Exact patch: documentation =='
git diff --no-ext-diff "$base" "$head" -- \
  CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md

echo '== Changed workflow OCI context at exact head =='
git show "${head}:.github/workflows/ci.yml" |
  rg -n -i -C 20 \
  'oci-runtime|pg-erd|CWL_GATEWAY_BIN|cwl-pingora-pg-erd-migration|docker run|--user|65532|--read-only|cap-drop|no-new-privileges|pg-erd-migration.yaml|livez|metrics|publish|curl'

echo '== Supporting packaging and pg-erd fixture at exact head =='
for file in Dockerfile examples/pg-erd-migration.yaml; do
  echo "---- ${file} ----"
  git show "${head}:${file}" | cat -n
done

echo '== Documentation final byte and relevant claims at exact head =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- ${file}: final byte ----"
  git show "${head}:${file}" | tail -c 1 | od -An -t x1
  echo "---- ${file}: scope claims ----"
  git show "${head}:${file}" |
    rg -n -i -C 4 \
    'pg-erd|OCI|metrics|livez|hosted|GREEN|release|canary|cutover|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery|traffic'
done

echo '== Exact-head PR and runs =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}'
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url}'

Length of output: 43024


🏁 Script executed:

#!/bin/bash
set -u

head='86087dc456496d6b083abf521220c2c14ebfbf69'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact-head documentation final bytes =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  printf '%s: ' "$file"
  git show "${head}:${file}" | tail -c 1 | base64 || true
done

echo '== Exact-head documentation scope excerpts =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- ${file} ----"
  git show "${head}:${file}" | \
    rg -n -i -C 5 \
    'pg-erd|OCI|metrics|livez|hosted|GREEN|release|canary|cutover|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery|exact.head|terminal' || true
done

echo '== Exact whitespace check =='
git diff --check \
  d6e61e59bfdca47dd2e9542001938b5c33674314 \
  "$head" || true

echo '== Pull request and exact-head workflow state =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' || true
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url}' || true

Length of output: 49497


@seonghobae Reviewed exact range d6e61e59bfdca47dd2e9542001938b5c33674314...86087dc456496d6b083abf521220c2c14ebfbf69.

I found one issue.

  • docs/product-technical-gap-baseline.md still has no final newline. Its final byte is . (Lg==), while the other changed documentation files end with LF (Cg==). Add one terminating LF to complete the stated EOF repair.

The requested OCI boundary is preserved.

  • The effective delta contains only the four requested paths.
  • The Dockerfile allowlists cwl-pingora-gateway and cwl-pingora-pg-erd-migration.
  • The Dockerfile builds and copies only the selected executable to the fixed runtime path.
  • The pg-erd image build sets CWL_GATEWAY_BIN=cwl-pingora-pg-erd-migration.
  • The pg-erd OCI command uses uid/gid 65532:65532, --read-only, --cap-drop ALL, and no-new-privileges.
  • The command mounts only examples/pg-erd-migration.yaml as read-only configuration.
  • The job publishes the traffic listener on port 6288 and the dedicated metrics listener on port 6289.
  • The acceptance loop requires both http://127.0.0.1:6288/livez and http://127.0.0.1:6289/metrics to return successful HTTP responses.
  • The metrics probe asserts endpoint reachability only. It does not require a metric family before application traffic.
  • The changed documentation does not claim hosted GREEN, release, canary, cutover, or product-domain authority.

The exact-head CI and Supply Chain runs are queued. They are incomplete evidence. Keep the PR Draft until the required exact-head checks and governance review reach terminal states.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact current range d6e61e59bfdca47dd2e9542001938b5c33674314...e0ab23d43d3ef4ae77aaf8475154084d72ff4a95; do not transfer review credit from 86087dc... or earlier. The new TDD is b0183680... RED → 651793716... GREEN, with docs current through e0ab23d.... Verify that tests/pg_erd_oci_metrics_workflow_contract.rs correctly prevents a bare HTTP 200 from proving metrics-service identity, that the OCI workflow requires the separately published /metrics endpoint to report a text/plain media type while preserving uid/gid 65532 + read-only root + cap-drop ALL + no-new-privileges + read-only config mount, and that no metric-family, routing, auth/business, hosted GREEN, release, canary or cutover claim was invented.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='e0ab23d43d3ef4ae77aaf8475154084d72ff4a95'
red='b0183680d6a9e3ff9531db0b833e80ad2742fcc3'
green='651793716e6f96735fca3f9ea313b3561fcc642e'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact range identity and changed paths =='
printf 'merge-base: '; git merge-base "$base" "$head"
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --stat "$base" "$head"

echo '== Exact patch =='
git diff --no-ext-diff --find-renames --find-copies "$base" "$head" --

echo '== TDD commit identity and patches =='
for commit in "$red" "$green"; do
  echo "---- $commit ----"
  git show -s --format='%H%n%P%n%s' "$commit"
  git show --format=fuller --no-ext-diff --find-renames --find-copies "$commit" -- \
    tests/pg_erd_oci_metrics_workflow_contract.rs .github/workflows/ci.yml
done

echo '== Exact-head workflow contract test =='
if git cat-file -e "${head}:tests/pg_erd_oci_metrics_workflow_contract.rs" 2>/dev/null; then
  git show "${head}:tests/pg_erd_oci_metrics_workflow_contract.rs" | cat -n
fi

echo '== Exact-head OCI workflow context =='
git show "${head}:.github/workflows/ci.yml" | nl -ba | \
  rg -n -i -C 18 \
  'oci-runtime|pg-erd|CWL_GATEWAY_BIN|cwl-pingora-pg-erd-migration|docker run|--user|65532|--read-only|cap-drop|no-new-privileges|pg-erd-migration\.yaml|livez|metrics|content-type|text/plain|curl|publish'

echo '== Supporting exact-head packaging and configuration =='
for file in Dockerfile examples/pg-erd-migration.yaml; do
  echo "---- $file ----"
  git show "${head}:${file}" | cat -n
done

echo '== Exact-head documentation claims =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- $file ----"
  git show "${head}:${file}" | nl -ba | \
    rg -n -i -C 4 \
    'pg-erd|OCI|metrics|livez|text/plain|metric.family|metric family|routing|auth|business|hosted|GREEN|release|canary|cutover|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery|traffic' || true
done

echo '== Exact-head pull request and workflow state =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' || true
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url}' || true

Length of output: 40158


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='d6e61e59bfdca47dd2e9542001938b5c33674314'
head='e0ab23d43d3ef4ae77aaf8475154084d72ff4a95'
repo='ContextualWisdomLab/pingora-gateway'

echo '== OCI workflow step at exact head =='
git show "${head}:.github/workflows/ci.yml" | \
  sed -n '/Exercise pg-erd read-only least-privilege runtime:/,/^[[:space:]]*-[[:space:]]name:/p'

echo '== Workflow occurrences that can satisfy the contract literal =='
git show "${head}:.github/workflows/ci.yml" | \
  grep -nE -C 2 'content-type|content_type|text/plain|6288|6289|--user|--read-only|cap-drop|no-new-privileges|pg-erd-migration\.yaml|CWL_GATEWAY_BIN' || true

echo '== Test target registration and execution =='
for file in Cargo.toml .github/workflows/ci.yml; do
  echo "---- $file ----"
  git show "${head}:${file}" | \
    grep -nE -C 3 'pg_erd_oci_metrics_workflow_contract|cargo test|test --|tests/' || true
done

echo '== Exact test assertion versus extracted workflow literals =='
test_file="$(git show "${head}:tests/pg_erd_oci_metrics_workflow_contract.rs")"
workflow="$(git show "${head}:.github/workflows/ci.yml")"
printf 'test uses script.contains("content-type"): '
printf '%s\n' "$test_file" | grep -Fq 'script.contains("content-type")' && echo yes || echo no
printf 'workflow contains literal content-type: '
printf '%s\n' "$workflow" | grep -Fq 'content-type' && echo yes || echo no
printf 'workflow contains literal content_type: '
printf '%s\n' "$workflow" | grep -Fq 'content_type' && echo yes || echo no
printf 'workflow contains literal text/plain: '
printf '%s\n' "$workflow" | grep -Fq 'text/plain' && echo yes || echo no

echo '== Documentation restricted-claim excerpts =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- $file ----"
  git show "${head}:${file}" | \
    grep -nEi -C 3 'pg-erd|metrics|text/plain|metric family|hosted|GREEN|release|canary|cutover|routing|auth|business|authority' || true
done

echo '== Exact-head pull request and runs =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' || true
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url}' || true

Length of output: 54269


@seonghobae Reviewed exact range d6e61e59bfdca47dd2e9542001938b5c33674314...e0ab23d43d3ef4ae77aaf8475154084d72ff4a95.

I found one issue.

  • tests/pg_erd_oci_metrics_workflow_contract.rs, Line 44, requires the extracted OCI script to contain the literal content-type. The OCI script uses curl %{content_type} and metrics_content_type, not content-type. The script therefore does not satisfy this assertion. Because CI runs cargo test --all-targets --locked, the new test will fail before it can protect the intended behavior. Match the assertion to the implemented curl variable/format, or change the workflow to emit the asserted literal.

The OCI workflow itself preserves the requested runtime boundary. It builds the pg-erd image with CWL_GATEWAY_BIN=cwl-pingora-pg-erd-migration, runs as 65532:65532, uses a read-only root filesystem, drops ALL capabilities, sets no-new-privileges, and mounts only examples/pg-erd-migration.yaml as read-only configuration.

The acceptance loop requires both /livez and the separately published /metrics listener. It requires the metrics response media type to match text/plain*. It does not require any metric family before application traffic.

CHANGELOG.md and TEST_STRATEGY.md describe the media-type requirement and scope limits. The reviewed documentation does not claim hosted GREEN, release, canary, cutover, or product auth/business authority.

The exact-head CI and Supply Chain runs are queued. They remain incomplete evidence.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head ef4acdffb08709eb47677cf3dd5b53b6902e1262 against exact parent 9749d01ae0e9aae027d7fce1a2c15e6a8358acd9. This is the ordinary/non-force parent succession; predecessor review or hosted evidence must not be transferred.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='9749d01ae0e9aae027d7fce1a2c15e6a8358acd9'
head='ef4acdffb08709eb47677cf3dd5b53b6902e1262'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact range identity =='
printf 'merge-base: '
git merge-base "$base" "$head"
echo 'Changed paths:'
git diff --name-status "$base" "$head"
echo 'Whitespace errors:'
git diff --check "$base" "$head"
echo 'Diff stat:'
git diff --stat "$base" "$head"

echo '== Exact patch =='
git diff --no-ext-diff --find-renames --find-copies "$base" "$head" --

echo '== Contract-test and OCI workflow structure =='
if git cat-file -e "${head}:tests/pg_erd_oci_metrics_workflow_contract.rs" 2>/dev/null; then
  ast-grep outline tests/pg_erd_oci_metrics_workflow_contract.rs --items all
  echo '---- tests/pg_erd_oci_metrics_workflow_contract.rs ----'
  git show "${head}:tests/pg_erd_oci_metrics_workflow_contract.rs" | nl -ba
fi
echo '---- .github/workflows/ci.yml OCI context ----'
git show "${head}:.github/workflows/ci.yml" | nl -ba | rg -n -i -C 22 \
  'oci-runtime|pg-erd|CWL_GATEWAY_BIN|cwl-pingora-pg-erd-migration|docker run|--user|65532|--read-only|cap-drop|no-new-privileges|pg-erd-migration\.yaml|livez|metrics|content_type|text/plain|curl|publish'

echo '== Supporting exact-head packaging and listener configuration =='
for file in Dockerfile examples/pg-erd-migration.yaml Cargo.toml; do
  if git cat-file -e "${head}:${file}" 2>/dev/null; then
    echo "---- ${file} ----"
    git show "${head}:${file}" | nl -ba | rg -n -C 8 \
      'CWL_GATEWAY_BIN|cwl-pingora-gateway|cwl-pingora-pg-erd-migration|ENTRYPOINT|USER|traffic|metrics|6188|6189|pg_erd_oci_metrics_workflow_contract|test' \
      || true
  fi
done

echo '== Documentation claims in changed files =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  if git cat-file -e "${head}:${file}" 2>/dev/null; then
    echo "---- ${file} ----"
    git show "${head}:${file}" | nl -ba | rg -n -i -C 5 \
      'pg-erd|OCI|metrics|livez|text/plain|metric.family|metric family|hosted|GREEN|release|canary|cutover|routing|auth|business|authority|Keyverse|Wardnet|EgressWeave|TLS|service discovery|traffic' \
      || true
  fi
done

echo '== Pull request and exact-head checks =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,baseRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,baseRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' \
  || true
gh run list --repo "$repo" --commit "$head" --limit 30 \
  --json databaseId,workflowName,status,conclusion,event,headSha,url,createdAt,updatedAt \
  --jq '.[] | {databaseId,workflowName,status,conclusion,event,headSha,url,createdAt,updatedAt}' \
  || true

Length of output: 29244


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='ef4acdffb08709eb47677cf3dd5b53b6902e1262'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Full pg-erd OCI workflow step =='
git show "${head}:.github/workflows/ci.yml" |
  sed -n '/Exercise pg-erd read-only least-privilege runtime:/,/^[[:space:]]*-[[:space:]]name:/p'

echo '== Generic OCI workflow step =='
git show "${head}:.github/workflows/ci.yml" |
  sed -n '/Exercise generic gateway read-only least-privilege runtime:/,/^[[:space:]]*-[[:space:]]name:/p' || true

echo '== Exact-head Dockerfile =='
git show "${head}:Dockerfile" | cat -n

echo '== Exact-head pg-erd OCI fixture =='
git show "${head}:examples/pg-erd-migration.yaml" | cat -n

echo '== Contract-test registration =='
git show "${head}:Cargo.toml" |
  rg -n -C 3 'pg_erd_oci_metrics_workflow_contract|test\s*=|name\s*=' || true
git show "${head}:.github/workflows/ci.yml" |
  rg -n -C 3 'cargo test|all-targets|locked' || true

echo '== Exact-head documentation scope excerpts =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- ${file} ----"
  git show "${head}:${file}" |
    rg -n -i -C 4 \
      'pg-erd|OCI|metrics|livez|text/plain|metric family|hosted|GREEN|release|canary|cutover|auth|business|routing|Keyverse|Wardnet|EgressWeave|authority' \
    || true
done

echo '== Exact-head PR metadata and checks =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,baseRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,baseRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' \
  || true

echo '== Exact-head workflow runs =='
gh run list --repo "$repo" --commit "$head" --limit 30 \
  --json databaseId,workflowName,status,conclusion,event,headSha,url,createdAt,updatedAt \
  --jq '.[] | {databaseId,workflowName,status,conclusion,event,headSha,url,createdAt,updatedAt}' \
  || true

Length of output: 49301


@seonghobae Reviewed exact range 9749d01ae0e9aae027d7fce1a2c15e6a8358acd9...ef4acdffb08709eb47677cf3dd5b53b6902e1262.

I found no correctness issues.

The exact merge base is the stated parent. I did not use predecessor review or hosted evidence.

The effective delta has five paths: the four workflow/documentation paths and the added tests/pg_erd_oci_metrics_workflow_contract.rs.

The one-binary-per-image boundary remains intact.

  • Dockerfile allowlists only cwl-pingora-gateway and cwl-pingora-pg-erd-migration.
  • The build selects one allowed binary.
  • The final image copies that binary to the fixed runtime path.
  • The final image does not contain both gateway binaries or a runtime binary selector.

The pg-erd OCI acceptance preserves the required runtime boundary.

  • The pg-erd fixture uses separate traffic and metrics listeners on 6188 and 6189.
  • The OCI profile runs as uid/gid 65532:65532.
  • The profile uses a read-only root filesystem, --cap-drop ALL, and no-new-privileges.
  • The profile mounts the versioned configuration as read-only.
  • The acceptance loop requires /livez on the traffic listener.
  • The loop also requires /metrics on the separately published metrics listener.
  • The metrics probe captures curl %{content_type} in metrics_content_type.
  • The probe requires text/plain*.

tests/pg_erd_oci_metrics_workflow_contract.rs now verifies the implemented media-type mechanism. It prevents a bare HTTP success from proving metrics-service identity. It does not require a metric family before application traffic.

The changed documentation describes the source acceptance accurately. It does not claim #19 hosted GREEN, release, canary, cutover, or product-domain authority.

The exact-head CI and Supply Chain runs are still queued or in progress. They are not terminal evidence. Keep the PR as Draft until exact-head checks and required governance review complete.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the current exact head 86a6eb1b8fd5777b578cdbce49f40d52e916cc9b against exact parent 9749d01ae0e9aae027d7fce1a2c15e6a8358acd9. Focus on the OCI metrics-listener media-type gate, its exact-predicate regression, and the pinned Pingora/prometheus TRACEABILITY update. Do not transfer findings or approval from predecessor heads.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='9749d01ae0e9aae027d7fce1a2c15e6a8358acd9'
head='86a6eb1b8fd5777b578cdbce49f40d52e916cc9b'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Exact range identity =='
printf 'merge-base: '
git merge-base "$base" "$head"
echo 'head parents:'
git show -s --format='%H%n%P%n%s' "$head"
echo 'changed paths:'
git diff --name-status "$base" "$head"
echo 'whitespace:'
git diff --check "$base" "$head"
echo 'stat:'
git diff --stat "$base" "$head"

echo '== Exact patch for reviewed paths =='
git diff --no-ext-diff --find-renames --find-copies "$base" "$head" -- \
  .github/workflows/ci.yml \
  tests/pg_erd_oci_metrics_workflow_contract.rs \
  docs/doctoring/TRACEABILITY.md \
  CHANGELOG.md \
  TEST_STRATEGY.md \
  docs/product-technical-gap-baseline.md

echo '== Exact-head OCI workflow step and adjacent test invocation =='
git show "${head}:.github/workflows/ci.yml" | nl -ba | \
  rg -n -i -C 28 \
  'Exercise pg-erd|CWL_GATEWAY_BIN|pg-erd-migration|docker run|--user|65532|--read-only|cap-drop|no-new-privileges|pg-erd-migration\.yaml|6288|6289|livez|metrics|content.type|content_type|text/plain|cargo test|all-targets'

echo '== Exact-head regression test =='
git show "${head}:tests/pg_erd_oci_metrics_workflow_contract.rs" | nl -ba

echo '== Exact-head packaging and fixture contract =='
for file in Dockerfile examples/pg-erd-migration.yaml; do
  echo "---- $file ----"
  git show "${head}:${file}" | nl -ba
done

echo '== Exact-head traceability entries =='
git show "${head}:docs/doctoring/TRACEABILITY.md" | nl -ba | \
  rg -n -i -C 10 \
  'Pingora|pingora-prometheus|prometheus|TextEncoder|format_type|TEXT_FORMAT|09696b51|e07efb4f|text/plain|pg-erd|metrics'

echo '== Documentation scope claims =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- $file ----"
  git show "${head}:${file}" | nl -ba | \
    rg -n -i -C 3 \
    'pg-erd|OCI|metrics|text/plain|metric.family|metric family|hosted|GREEN|release|canary|cutover|auth|business|routing|authority' || true
done

echo '== Exact-head PR and check state =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' || true
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url}' || true

Length of output: 34294


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='86a6eb1b8fd5777b578cdbce49f40d52e916cc9b'
repo='ContextualWisdomLab/pingora-gateway'

echo '== Full pg-erd OCI runtime step =='
git show "${head}:.github/workflows/ci.yml" |
  sed -n '/Exercise pg-erd read-only least-privilege runtime:/,/^[[:space:]]*-[[:space:]]name:/p'

echo '== Workflow test execution and image-build context =='
git show "${head}:.github/workflows/ci.yml" |
  rg -n -i -C 10 \
  'cargo test|all-targets|locked|CWL_GATEWAY_BIN|cwl-pingora-pg-erd-migration|docker build|docker run|--user|--read-only|cap-drop|no-new-privileges|pg-erd-migration\.yaml|6288|6289'

echo '== Dockerfile build and final-stage boundary =='
git show "${head}:Dockerfile" | cat -n

echo '== Exact pg-erd fixture =='
git show "${head}:examples/pg-erd-migration.yaml" | cat -n

echo '== Regression-test registration =='
git show "${head}:Cargo.toml" | rg -n -C 4 \
  'pg_erd_oci_metrics_workflow_contract|test[[:space:]]*=|name[[:space:]]*=' || true
git show "${head}:.github/workflows/ci.yml" | rg -n -C 4 \
  'cargo test[[:space:]]+--all-targets[[:space:]]+--locked' || true

echo '== Traceability record and references =='
git show "${head}:docs/doctoring/TRACEABILITY.md" |
  rg -n -i -C 8 \
  'Pingora.s Prometheus|pingora-prometheus|rust-prometheus|TextEncoder|format_type|TEXT_FORMAT|09696b51|e07efb4f|text/plain'

echo '== Documentation scope excerpts =='
for file in CHANGELOG.md TEST_STRATEGY.md docs/product-technical-gap-baseline.md; do
  echo "---- ${file} ----"
  git show "${head}:${file}" | rg -n -i -C 3 \
    'pg-erd|OCI|metrics|text/plain|metric family|hosted|GREEN|release|canary|cutover|auth|business|routing|authority' || true
done

echo '== Exact-head PR and workflow state =='
gh pr view 19 --repo "$repo" \
  --json state,isDraft,headRefOid,statusCheckRollup \
  --jq '{state,isDraft,headRefOid,checks:[.statusCheckRollup[] | {name,status,conclusion,detailsUrl}]}' || true
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,workflowName,status,conclusion,headSha,url \
  --jq '.[] | {databaseId,workflowName,status,conclusion,headSha,url}' || true

Length of output: 65940


🤖 web_search executed:

At Cloudflare Pingora commit 09696b51bc59315353d96686355861604d0bb48c, does pingora-prometheus/src/lib.rs set the HTTP Content-Type header from prometheus::TextEncoder::format_type()?

Length of output: 3320


🤖 web_search executed:

At TiKV rust-prometheus commit e07efb4f372f1245bf7410b71e822c69877bcb32, what exact TEXT_FORMAT value is defined in src/encoder/text.rs?

Length of output: 2830


@seonghobae Reviewed exact range 9749d01ae0e9aae027d7fce1a2c15e6a8358acd9...86a6eb1b8fd5777b578cdbce49f40d52e916cc9b.

I found no correctness issues.

  • The merge base is the stated exact parent.
  • The effective delta contains the stated six paths.
  • The Dockerfile preserves the one-binary-per-image boundary. It allowlists the two admitted identities at build time and copies only the selected binary to the fixed runtime path.
  • The pg-erd OCI job builds with CWL_GATEWAY_BIN=cwl-pingora-pg-erd-migration.
  • The job runs the container as 65532:65532 with --read-only, --cap-drop ALL, and no-new-privileges.
  • The job mounts only examples/pg-erd-migration.yaml as read-only configuration.
  • The fixture keeps the traffic listener on 6188 and the metrics listener on 6189.
  • The acceptance loop requires both /livez on port 6288 and /metrics on port 6289.

The media-type gate is correct.

  • The workflow captures curl %{content_type} from /metrics.
  • It normalizes with ${metrics_content_type%%;*}.
  • It requires the exact base media type text/plain.
  • This accepts the documented Prometheus type text/plain; version=0.0.4.
  • This rejects invalid prefix values such as text/plainfoo.
  • The gate does not require a metric family before application traffic.

tests/pg_erd_oci_metrics_workflow_contract.rs binds to the actual equality predicate:

[[ "${metrics_content_type%%;*}" == "text/plain" ]]

The test also rejects the previous == text/plain* wildcard form. It therefore prevents a bare HTTP success or a prefix-wildcard media-type check from proving Prometheus service identity.

docs/doctoring/TRACEABILITY.md is consistent with the pinned sources. The Pingora Prometheus application sets Content-Type from TextEncoder::format_type(). The pinned rust-prometheus source defines TEXT_FORMAT as text/plain; version=0.0.4. The cited commit identifiers and source paths match this contract.

I did not use predecessor review or hosted execution evidence. PR #19 remains Draft. CI and Supply Chain for 86a6eb1b8fd5777b578cdbce49f40d52e916cc9b are queued or in progress, so they are not terminal evidence.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant