Skip to content

fix(compose): bind standalone ports to loopback - #91

Closed
seonghobae wants to merge 11 commits into
mainfrom
agent/compose-loopback-publishing
Closed

fix(compose): bind standalone ports to loopback#91
seonghobae wants to merge 11 commits into
mainfrom
agent/compose-loopback-publishing

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Superseded

Closed unmerged because protected-main PR #138 (fix(compose): rebuild loopback publishing on current main) rebuilt this security slice on the current protected line and was merged at b7f8a48d4745ebd1b429027168c3d2f776c6a4a7.

The protected result preserves the material intent of this branch: PostgreSQL and component health publish only on IPv4 loopback in the bundled standalone Compose profile, the complete host-published service set is allow-listed, the obsolete shell-era PG_LLM_BATCH_HEALTH_PORT override is absent, the Compose model is validated structurally, and operator doctoring records the explicit-ingress boundary. Current main also contains later unrelated security/reliability work that this stale branch does not.

No checks, reviews, or approvals from this closed branch are transferred to #138 or protected main. The authoritative acceptance evidence is the exact-head evidence collected on #138 before its protected merge.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Standalone Compose의 PostgreSQL 및 컴포넌트 포트를 IPv4 loopback에 게시합니다. 포트 게시 계약 테스트와 배포 정책 문서, README 및 변경 기록을 추가했습니다.

Changes

Compose loopback 게시

Layer / File(s) Summary
Compose 포트 바인딩과 검증
docker-compose.yml, tests/test_compose_network_boundary.py
PostgreSQL 5432와 컴포넌트 8080127.0.0.1에 바인딩합니다. 테스트는 정규화된 Compose JSON에서 TCP 포트 매핑과 예상하지 않은 호스트 포트 게시를 검증합니다. 레거시 PG_LLM_BATCH_HEALTH_PORT 환경 변수도 검사합니다.
게시 정책 문서화
README.md, docs/doctoring/compose-loopback-publishing.md
Loopback 게시 정책, 배포별 네트워크·인증·노출 기준, 검증 범위와 Docker 참고자료를 문서화합니다.
변경 기록 갱신
CHANGELOG.md
PostgreSQL 및 컴포넌트 상태 확인 포트의 loopback 제한을 changelog에 기록합니다.

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

Possibly related issues

  • ContextualWisdomLab/mightyETL#180 — Compose의 PostgreSQL 및 컴포넌트 포트를 loopback에 바인딩하는 구현과 관련 문서 및 계약 테스트가 이슈의 제안과 일치합니다.
🚥 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%.
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 제목은 standalone Compose 포트를 loopback에 바인딩하는 변경 사항을 정확하고 간결하게 설명합니다.
✨ 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 agent/compose-loopback-publishing

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.

@seonghobae
seonghobae marked this pull request as ready for review August 9, 2026 11:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_compose_network_boundary.py`:
- Around line 12-19: Update
test_standalone_compose_publishes_database_and_health_only_on_loopback to parse
the Compose configuration rather than searching raw text. Validate the parsed
postgres.ports and component.ports values contain exactly the permitted
127.0.0.1 loopback mappings for ports 5432 and 8080, rejecting any 0.0.0.0,
[::], or other published mappings.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5550596b-a7cb-40b7-a34f-4704cfd18cf7

📥 Commits

Reviewing files that changed from the base of the PR and between bf2cc2e and f0ab870.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • docker-compose.yml
  • docs/doctoring/compose-loopback-publishing.md
  • tests/test_compose_network_boundary.py

Comment thread tests/test_compose_network_boundary.py Outdated

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 19 minutes and 9 seconds before sending another message.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 8e084be4d3504f6abe2dca75c859a2a9b0e04753.

  • Head SHA: 8e084be4d3504f6abe2dca75c859a2a9b0e04753

  • Workflow run: 31318273608

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: compose-loopback-publishing.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: compose-loopback-publishing.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test: test_compose_network_boundary.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_compose_network_boundary.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 085d672aaff668980a0be3e5965fa57080bc10c0
  • Workflow run: 31333595955
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 085d672aaff668980a0be3e5965fa57080bc10c0.

  • Head SHA: 085d672aaff668980a0be3e5965fa57080bc10c0

  • Workflow run: 31333595955

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: compose-loopback-publishing.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: compose-loopback-publishing.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test: test_compose_network_boundary.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_compose_network_boundary.py"]
  R3 --> V3["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_compose_network_boundary.py`:
- Around line 63-66: Update _assert_standalone_port_contract to iterate over
every service in model["services"], preserving the existing loopback checks for
postgres and component while raising AssertionError when any other service has a
non-empty ports collection.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e2a0049-79d3-4fd6-bf0b-64b064d7ec88

📥 Commits

Reviewing files that changed from the base of the PR and between f0ab870 and d3515a0.

📒 Files selected for processing (1)
  • tests/test_compose_network_boundary.py

Comment thread tests/test_compose_network_boundary.py Outdated

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
⚠️ 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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 085d672aaff668980a0be3e5965fa57080bc10c0.

  • Head SHA: 085d672aaff668980a0be3e5965fa57080bc10c0

  • Workflow run: 31333595955

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: compose-loopback-publishing.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: compose-loopback-publishing.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test: test_compose_network_boundary.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_compose_network_boundary.py"]
  R3 --> V3["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact current source head 085d672aaff668980a0be3e5965fa57080bc10c0. Focus on the normalized Compose-model contract: exactly the intended PostgreSQL and component TCP ports may be host-published, each only on IPv4 loopback, and no unexpected service may publish a host port. The prior raw-text and incomplete-service-set findings are resolved. Treat the current OpenCode coverage-evidence failure as an infrastructure/merge-readiness blocker, not as a source finding.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='085d672aaff668980a0be3e5965fa57080bc10c0'

echo '== Checked-out commit =='
git rev-parse HEAD
git cat-file -e "${target}^{commit}"
git diff-tree --no-commit-id --name-status -r "$target"

echo
echo '== Compose file at target =='
git show "${target}:docker-compose.yml" | nl -ba

echo
echo '== Test file map =='
ast-grep outline tests/test_compose_network_boundary.py --items all --view expanded || true

echo
echo '== Test file at target =='
git show "${target}:tests/test_compose_network_boundary.py" | nl -ba

echo
echo '== Relevant documentation references =='
git show "${target}:README.md" | rg -n -C2 '127\.0\.0\.1|Compose|loopback|5432|8080' || true
git show "${target}:docs/doctoring/compose-loopback-publishing.md" | nl -ba

Length of output: 1255


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='085d672aaff668980a0be3e5965fa57080bc10c0'
number() { awk '{printf "%6d\t%s\n", NR, $0}'; }

echo '== Target commit diff =='
git show --format=fuller --stat --find-renames "$target"
git diff "${target}^" "$target" -- docker-compose.yml tests/test_compose_network_boundary.py

echo
echo '== docker-compose.yml at target =='
git show "${target}:docker-compose.yml" | number

echo
echo '== tests/test_compose_network_boundary.py at target =='
git show "${target}:tests/test_compose_network_boundary.py" | number

echo
echo '== All tracked Compose-related files at target =='
git ls-tree -r --name-only "$target" | grep -Ei '(^|/)(docker-?compose|compose)[^/]*\.(ya?ml|json)$|\.env(\.|$)' || true

echo
echo '== References to Compose files or port publication in target =='
git grep -n -E 'docker-compose\.yml|compose.*(-f|file)|published|ports:|5432|8080' "$target" -- \
  ':!README.md' ':!docs/doctoring/compose-loopback-publishing.md' || true

echo
echo '== Working-tree test difference (informational; not reviewed) =='
git diff -- tests/test_compose_network_boundary.py || true

Length of output: 16955


@seonghobae Reviewed exact source head 085d672aaff668980a0be3e5965fa57080bc10c0.

No source findings in the requested scope.

docker-compose.yml publishes only these TCP host ports:

  • postgres: 127.0.0.1:5432 to container port 5432.
  • component: 127.0.0.1:8080 to container port 8080.

tests/test_compose_network_boundary.py now evaluates the normalized Compose model across all services. It requires the published-service set to be exactly {"postgres", "component"}. It also requires one mapping per allowed service, IPv4 loopback binding, matching host and target ports, and TCP protocol. The negative test rejects an additional published service.

The sandbox could not run Docker Compose. This review therefore verifies the exact source and test logic statically. I treated the OpenCode coverage-evidence failure as a merge-readiness infrastructure blocker, not a source finding.

⚠️ 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 exact current head 085d672aaff668980a0be3e5965fa57080bc10c0, especially the complete published-service allow-list regression added after the prior review. Treat predecessor-head findings/evidence as historical and report only current-head source findings.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='085d672aaff668980a0be3e5965fa57080bc10c0'

echo '== Commit identity =='
git rev-parse HEAD
git cat-file -e "${target}^{commit}"
git show -s --format='%H%n%P%n%s' "$target"

echo
echo '== Files changed by target =='
git diff-tree --no-commit-id --name-status -r "$target"

echo
echo '== Compose inputs at target =='
git ls-tree -r --name-only "$target" |
  rg '(^|/)(docker-?compose|compose)[^/]*\.(ya?ml|json)$|(^|/)\.env(\.[^/]+)?$' || true

echo
echo '== docker-compose.yml at target =='
git show "${target}:docker-compose.yml" | nl -ba

echo
echo '== Test structure =='
git show "${target}:tests/test_compose_network_boundary.py" > /tmp/test_compose_network_boundary.py
ast-grep outline /tmp/test_compose_network_boundary.py --items all --view expanded || true

echo
echo '== Compose boundary test at target =='
nl -ba /tmp/test_compose_network_boundary.py

echo
echo '== Current target references to Compose port publication =='
git grep -n -E 'ports:|published:|target:|host_ip:|127\.0\.0\.1|5432|8080|docker-compose\.yml' "$target" -- \
  ':!README.md' ':!docs/doctoring/compose-loopback-publishing.md' || true

Length of output: 1863


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='085d672aaff668980a0be3e5965fa57080bc10c0'
number_lines() { awk '{printf "%6d  %s\n", NR, $0}'; }

echo '== docker-compose.yml at target =='
git show "${target}:docker-compose.yml" | number_lines

echo
echo '== Boundary test at target =='
git show "${target}:tests/test_compose_network_boundary.py" | number_lines

echo
echo '== Boundary test symbols =='
git show "${target}:tests/test_compose_network_boundary.py" > /tmp/test_compose_network_boundary.py
if command -v ast-grep >/dev/null 2>&1; then
  ast-grep outline /tmp/test_compose_network_boundary.py --items all --view expanded
else
  awk '/^(def |class |[[:space:]]+def )/ {printf "%6d  %s\n", NR, $0}' /tmp/test_compose_network_boundary.py
fi

echo
echo '== All target references relevant to Compose model parsing and assertions =='
git grep -n -E 'docker compose|compose config|--format|json|services|ports|published|host_ip|protocol|127\.0\.0\.1|5432|8080' \
  "$target" -- ':!README.md' ':!docs/doctoring/compose-loopback-publishing.md' || true

Length of output: 53639


@seonghobae Reviewed exact current head 085d672aaff668980a0be3e5965fa57080bc10c0.

No source findings in the requested scope.

docker-compose.yml publishes only these TCP host ports:

  • postgres: 127.0.0.1:5432 to container port 5432.
  • component: 127.0.0.1:8080 to container port 8080.

The current regression test uses the normalized Docker Compose JSON model. It iterates all services and requires the host-published service set to equal {"postgres", "component"}. It then requires each allowed service to have exactly one IPv4-loopback TCP mapping with matching published and target ports.

The added negative test verifies that a third service with a host-published port fails the contract. This covers the complete published-service allow-list requirement.

I reviewed current-head source only. I did not run Docker Compose in this inspection.

⚠️ 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

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
✅ 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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the unchanged exact source head 085d672aaff668980a0be3e5965fa57080bc10c0, especially the normalized Compose-model allow-list that rejects any unexpected host-published service/port while preserving the intended loopback-only postgres:5432 and component:8080 bindings. Do not treat the known central OpenCode coverage-evidence bootstrap failure as a local source defect.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='085d672aaff668980a0be3e5965fa57080bc10c0'

echo '== Commit identity =='
git rev-parse HEAD
git cat-file -e "${target}^{commit}"
git show -s --format='%H%n%P%n%s' "$target"

echo
echo '== Compose inputs at target =='
git ls-tree -r --name-only "$target" |
  rg '(^|/)(docker-?compose|compose)[^/]*\.(ya?ml|json)$|(^|/)\.env(\.[^/]+)?$' || true

echo
echo '== docker-compose.yml at target =='
git show "${target}:docker-compose.yml" | nl -ba

echo
echo '== Boundary-test structure =='
git show "${target}:tests/test_compose_network_boundary.py" > /tmp/test_compose_network_boundary.py
ast-grep outline /tmp/test_compose_network_boundary.py --items all --view expanded || true

echo
echo '== Boundary test at target =='
nl -ba /tmp/test_compose_network_boundary.py

echo
echo '== Relevant target references outside documentation =='
git grep -n -E 'ports:|published:|target:|host_ip:|127\.0\.0\.1|5432|8080|docker-compose\.yml' \
  "$target" -- ':!README.md' ':!docs/doctoring/compose-loopback-publishing.md' || true

Length of output: 1688


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='085d672aaff668980a0be3e5965fa57080bc10c0'
number_lines() { awk '{printf "%6d  %s\n", NR, $0}'; }

echo '== docker-compose.yml at target =='
git show "${target}:docker-compose.yml" | number_lines

echo
echo '== tests/test_compose_network_boundary.py at target =='
git show "${target}:tests/test_compose_network_boundary.py" | number_lines

echo
echo '== Function and class declarations in the boundary test =='
git show "${target}:tests/test_compose_network_boundary.py" |
  awk '/^(def |class |[[:space:]]+def )/ {printf "%6d  %s\n", NR, $0}'

echo
echo '== All target host-publication declarations outside documentation =='
git grep -n -E '^[[:space:]]*ports:|published:|target:|host_ip:|protocol:|127\.0\.0\.1|5432|8080' \
  "$target" -- ':!README.md' ':!docs/doctoring/compose-loopback-publishing.md' || true

Length of output: 12942


@seonghobae Reviewed exact current head 085d672aaff668980a0be3e5965fa57080bc10c0.

No source findings in the requested scope.

docker-compose.yml has only these host publications:

  • postgres: 127.0.0.1:5432 to container port 5432.
  • component: 127.0.0.1:8080 to container port 8080.

tests/test_compose_network_boundary.py evaluates the normalized Docker Compose JSON model. The contract:

  • Collects every service that has a non-empty ports list.
  • Requires the published-service set to equal {"postgres", "component"}.
  • Requires exactly one port mapping for each allowed service.
  • Requires IPv4 loopback, matching published and target ports, and TCP.
  • Rejects a third host-published rogue service.

I did not run Docker Compose in this source inspection. I excluded the known central OpenCode coverage-evidence bootstrap failure from source findings, as requested.

⚠️ Action not completed

Already reviewed.

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 exact current head 085d672aaff668980a0be3e5965fa57080bc10c0, especially the complete published-service allow-list and structural Docker Compose port-boundary regression. Treat predecessor-head findings as historical; all returned inline threads are resolved.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

@seonghobae I will review commit 085d672aaff668980a0be3e5965fa57080bc10c0.

I will focus on the normalized Compose-model allow-list and the Docker Compose port-boundary regression. I will treat predecessor-head findings as historical.

⚠️ Action not completed

Already reviewed.

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.

@Musthaq22 Musthaq22 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants