Skip to content

fix(reviewer): fail closed on empty CodeGraph semantics - #546

Merged
seonghobae merged 170 commits into
mainfrom
fix/codegraph-smoke-semantic-gate
Sep 6, 2026
Merged

fix(reviewer): fail closed on empty CodeGraph semantics#546
seonghobae merged 170 commits into
mainfrom
fix/codegraph-smoke-semantic-gate

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Defect

Noema strict reviewer must preserve exact current-head changed-file identity as untrusted data across CodeGraph admission, first explore, bounded empty-result recovery, sandbox path handling, and strict semantic gating. This lane owns reviewer semantic evidence only; provider/model routing, quarantine/security verdicts, outbound authority and central runner capacity remain with their canonical owners.

Retained RED → causal repairs

The branch retains the established executable lineage for complete changed-file scope, fail-before-execution budgets, canonical-JSON prompt isolation, empty-result symbol recovery, second-explore prompt isolation, and Linux exact Git-path identity. Hosted REDs then exposed stale dedup test authority/coverage holes and a missing nested-runner docstring; the minimum repairs culminated in exact head 7d3de5a859be96b953927201d9ba782673f4bb8e without weakening thresholds, sandbox boundaries, provider routing, or required gates.

Fresh exact-head GREEN — partial release gate

Exact 7d3de5a859be96b953927201d9ba782673f4bb8e now has terminal GREEN for both principal source gates:

  • reviewer-ci 33991772403, job 101375158146: exact checkout, hash-pinned dependencies, 100% line+branch pytest, 100% docstring coverage, lock-pinned CodeGraph tooling, Cosign/Trivy image verification, and the real no-network CodeGraph sandbox smoke test all succeeded;
  • ci 33991772454, job 101375158075: exact checkout, live-base verification, lockfile control, install, typecheck, release tests, release security scan, KPI verification, dependency-license inventory, acquisition manifest and acquisition integrity all succeeded.

The previously valid CodeRabbit finding about accepting an embedded ## codegraph explore substring had already been repaired by RED 895b4fc0fe8ef35d566619f506165aca26288909401c3ab54cb36157ebfa8995f985aa6d4a6973e5. Because the unchanged exact head now proves reviewer+CI GREEN, that outdated review thread has been resolved rather than left as stale process debt.

Current exact authority

  • protected Noema base: main@e1ac9d50f6c646f04be8c137c8acdc7200182fcd;
  • exact PR head: 7d3de5a859be96b953927201d9ba782673f4bb8e;
  • lifecycle: open / Draft / mergeable;
  • reviewer and CI: terminal success on the unchanged exact head;
  • patch-validator-image 33991772389 is still in progress on the exact head; its job has passed exact checkout, stale-head refusal, Trivy/Syft/Grype setup and dependency materialization and is currently in the exact-head image build;
  • required Security Scan 33991772437 remains queued.

Do not mark Ready or merge until Security and image/SBOM/vulnerability/provenance evidence also become terminal success on this unchanged exact head. Do not substitute predecessor evidence, rerun-storm, leaf runs-on changes, no-op source churn, self-approval, force-push/destructive rebase, or gate suppression.

Merge discipline

After #546 reaches protected semantic-review truth, affected open heads need regenerated semantic evidence and ordinary non-force restack as necessary. Raw/truncated/partial/cached-wrong-prompt evidence never becomes merge authority.

Summary by CodeRabbit

  • 개선 사항

    • 변경 파일 최대 80개까지 전체 컨텍스트를 유지해 검토합니다.
    • CodeGraph 결과의 출처와 의미를 엄격히 검증하며, 불완전하거나 모호한 결과는 안전하게 차단합니다.
    • 빈 탐색 결과에서 관련 심볼을 확인해 재탐색하는 복구 절차가 추가되었습니다.
    • 코드 검토 실행 환경이 격리되어 호스트 환경의 민감한 설정을 상속하지 않습니다.
    • 독립적인 현재 상태 검사가 없으면 검토가 차단됩니다.
    • 차단된 검토의 종료 코드가 3으로 명확히 구분됩니다.
  • 버그 수정

    • 동일한 위치의 서로 다른 검출 결과가 누락되지 않습니다.
    • 자체 검토 결과가 독립적인 검토 증거로 잘못 사용되지 않습니다.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 5a0417f3-8bc8-446f-9d50-b819ecb0121c

📥 Commits

Reviewing files that changed from the base of the PR and between d022de8 and 7d3de5a.

📒 Files selected for processing (36)
  • .github/codegraph/sandbox-node-runner.mjs
  • .github/codegraph/sandbox-runner.mjs
  • .github/workflows/central-review.yml
  • CHANGELOG.md
  • reviewer/README.md
  • reviewer/noema_reviewer/cli.py
  • reviewer/noema_reviewer/gating.py
  • reviewer/noema_reviewer/github_io.py
  • reviewer/noema_reviewer/sandbox.py
  • reviewer/tests/test_changed_file_context_bound.py
  • reviewer/tests/test_cli.py
  • reviewer/tests/test_codegraph_admission_coverage.py
  • reviewer/tests/test_codegraph_ambient_environment.py
  • reviewer/tests/test_codegraph_changed_scope_identity.py
  • reviewer/tests/test_codegraph_changed_scope_prompt_data.py
  • reviewer/tests/test_codegraph_marker_line_authority.py
  • reviewer/tests/test_codegraph_raw_marker_authority.py
  • reviewer/tests/test_codegraph_raw_marker_status_authority.py
  • reviewer/tests/test_codegraph_semantic_evidence.py
  • reviewer/tests/test_codegraph_symbol_seed_boundary.py
  • reviewer/tests/test_codegraph_symbol_seed_completeness.py
  • reviewer/tests/test_codegraph_symbol_seed_map_completeness.py
  • reviewer/tests/test_codegraph_symbol_seed_recovery.py
  • reviewer/tests/test_deterministic_finding_identity.py
  • reviewer/tests/test_gating.py
  • reviewer/tests/test_github_io.py
  • reviewer/tests/test_independent_check_evidence.py
  • reviewer/tests/test_production_symbol_seed_recovery.py
  • reviewer/tests/test_review_wait_self_cycle.py
  • reviewer/tests/test_sandbox.py
  • reviewer/tests/test_sandbox_retry_prompt_identity.py
  • reviewer/tests/test_sandbox_semantic_boundary.py
  • reviewer/tests/test_sandbox_source_root_provenance.py
  • test/codegraph-sandbox-node-runner.test.ts
  • test/codegraph-sandbox-runner.test.ts
  • test/codegraph-sandbox-unicode-scope-parity.test.ts

📝 Walkthrough

Walkthrough

CodeGraph 실행이 현재 헤드 변경 파일 범위와 격리된 환경을 사용하도록 변경되었다. 빈 탐색 결과는 심볼 복구 후 재탐색한다. 엄격한 게이트는 wrapper-owned provenance와 독립 check 증거를 검증한다.

Changes

CodeGraph 범위와 실행 경계

Layer / File(s) Summary
변경 범위와 실행 환경 검증
.github/codegraph/sandbox-runner.mjs, reviewer/noema_reviewer/cli.py, reviewer/noema_reviewer/github_io.py, reviewer/tests/*
경로를 원문 그대로 보존하고 누적 범위 예산을 적용한다. 현재 헤드의 일반 파일과 JSON 범위를 검증한다. CodeGraph 프로세스는 허용 목록 환경 변수와 임시 디렉터리를 사용한다.
의미론적 탐색과 심볼 복구
reviewer/noema_reviewer/cli.py, reviewer/tests/test_codegraph_symbol_seed_*.py, reviewer/tests/test_codegraph_changed_scope_prompt_data.py
explore 결과에서 변경 파일별 node --symbols-only 결과를 JSON 시드로 만들고 재탐색한다. 경로, 심볼 맵, 프로브 예산을 초과하거나 복구가 불완전하면 빈 결과를 유지한다.
격리된 CodeGraph 샌드박스 경계
.github/codegraph/sandbox-node-runner.mjs, reviewer/noema_reviewer/sandbox.py, reviewer/tests/test_sandbox*.py
탐색과 심볼 조회를 별도 하드닝 컨테이너에서 실행한다. 물리적 소스 루트와 신뢰된 session envelope를 검증하고 프롬프트별 결과를 캐시한다.
Provenance와 엄격 증거 게이트
reviewer/noema_reviewer/gating.py, reviewer/tests/test_codegraph_semantic_evidence.py, reviewer/tests/test_codegraph_*marker*.py, reviewer/tests/test_independent_check_evidence.py
정확히 하나의 wrapper-owned explore marker와 실제 의미론적 내용을 요구한다. reviewer-dependent check만 관찰된 경우를 누락 증거로 분류한다. Finding deduplication은 전체 identity를 사용한다.
워크플로와 회귀 계약
.github/workflows/*.yml, reviewer/README.md, CHANGELOG.md, reviewer/tests/*, test/*
Smoke test가 commercialReadiness 심볼과 소스 라인을 확인한다. 중앙 리뷰 대기는 자체 noema-review check를 제외한다. 문서와 회귀 테스트가 범위, 환경, 종료 코드와 샌드박스 계약을 반영한다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: 🟡 Moderate · up to e064e

Malformed CodeGraph output can be treated as trusted semantic evidence, potentially allowing strict reviewer runs to proceed without wrapper-owned provenance. Require standalone-marker parsing before merge.

Sequence Diagram(s)

sequenceDiagram
  participant ReviewerCLI
  participant DockerCodeGraphRunner
  participant ExploreContainer
  participant NodeContainer
  participant EvidenceGate
  ReviewerCLI->>DockerCodeGraphRunner: changed-file scope와 explore 요청
  DockerCodeGraphRunner->>ExploreContainer: 격리된 codegraph explore 실행
  ExploreContainer-->>DockerCodeGraphRunner: trusted session envelope 반환
  DockerCodeGraphRunner->>NodeContainer: 빈 결과이면 변경 파일 심볼 조회
  NodeContainer-->>DockerCodeGraphRunner: JSON 심볼 맵 반환
  DockerCodeGraphRunner->>ExploreContainer: 심볼 시드로 explore 재실행
  ExploreContainer-->>ReviewerCLI: wrapper-owned explore 결과 반환
  ReviewerCLI->>EvidenceGate: ReviewManifest 전달
  EvidenceGate-->>ReviewerCLI: semantic evidence 또는 blocked reason 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 94.59% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 8 files. (2 skipped: 2 …
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 제목은 CodeGraph의 빈 의미론적 출력에 대해 reviewer가 fail closed하도록 수정한 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ 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 fix/codegraph-smoke-semantic-gate

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 changed the title fix(ci): fail closed on empty CodeGraph smoke retrieval fix(reviewer): fail closed on empty CodeGraph semantics Sep 3, 2026
@seonghobae
seonghobae marked this pull request as ready for review September 6, 2026 00:04
@seonghobae
seonghobae merged commit 85b1701 into main Sep 6, 2026
17 of 18 checks passed
@seonghobae
seonghobae deleted the fix/codegraph-smoke-semantic-gate branch September 6, 2026 00:04
seonghobae added a commit that referenced this pull request Sep 6, 2026
Promote source-bound Context Graph release attestation after post-#546 exact-head application CI, semantic reviewer, required Security Scan, and patch-validator image GREEN with no unresolved review threads.
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.

1 participant