Skip to content

fix(review): trust exported requirements.lock files - #644

Merged
seonghobae merged 3 commits into
mainfrom
fix/trusted-requirements-lock
Jul 29, 2026
Merged

fix(review): trust exported requirements.lock files#644
seonghobae merged 3 commits into
mainfrom
fix/trusted-requirements-lock

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

원인

중앙 OpenCode 실행 https://github.com/ContextualWisdomLab/.github/actions/runs/30437562009ContextualWisdomLab/saju-caldav#14@63d0f00의 coverage 샌드박스에서 FastAPI 등 base-declared 의존성을 찾지 못했습니다. 대상 저장소는 해시 고정 requirements.lock을 이미 Docker와 CI에 사용하지만, 중앙 materializer는 requirements-hashes.txt라는 이름만 인식했습니다.

변경

  • 검증된 정확한 base SHA의 regular blob 중 requirements.lock도 신뢰 입력으로 선택합니다.
  • PR head가 잠금 내용을 바꿔도 base 내용만 물질화되는 회귀 테스트를 추가합니다.
  • 기존 --require-hashes --only-binary=:all:, networkless PR 실행, symlink/경로/SHA 검증은 그대로 유지합니다.

검증

  • python3 -m pytest -q — 674 passed
  • coverage run -m pytest -q && coverage report --fail-under=100 — 5,703 statements, 100%
  • Ruff check/format, Interrogate 100%, Bandit, py_compile, git diff --check 통과
  • ContextualWisdomLab/saju-caldav base 0c451b4에서 requirements.lock 단독 선택 및 byte-for-byte 일치 확인
  • 중앙과 같은 Python 3.14 digest 이미지에서 --require-hashes --only-binary=:all: 설치 성공

Unblocks ContextualWisdomLab/saju-caldav#14

Summary by CodeRabbit

  • 개선 사항
    • Python 의존성 잠금 파일로 requirements.lock도 지원합니다.
    • 잠금 파일이 없을 때 표시되는 오류 메시지를 더 명확하게 개선했습니다.
    • 정확한 기준 커밋에서 잠금 파일이 올바르게 생성되는 동작을 검증했습니다.

@coderabbitai

coderabbitai Bot commented Jul 29, 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: Pro Plus

Run ID: 57905e62-b620-4707-b9fb-ed8d944819de

📥 Commits

Reviewing files that changed from the base of the PR and between 159d2c8 and 248ae8e.

📒 Files selected for processing (2)
  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_base_python_requirements.py

📝 Walkthrough

Walkthrough

기준 커밋에서 requirements.lock도 materialization 대상 해시 잠금으로 처리하도록 변경하고, 관련 산출물 검증과 잠금 없음 CLI 메시지 테스트를 갱신했습니다.

Changes

Python 잠금 materialization

Layer / File(s) Summary
잠금 탐색 및 산출물 검증
scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py
requirements.lock을 잠금 후보에 추가하고, 기준 커밋의 잠금만 매니페스트와 산출물에 포함되는지 검증합니다.
잠금 없음 CLI 메시지
scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py
잠금이 없을 때 메시지를 모든 해시 고정 Python 요구사항 잠금을 포괄하도록 변경하고 기대값을 갱신합니다.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 requirements.lock을 추가로 신뢰하도록 바뀐 CI 스크립트 변경을 정확히 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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/trusted-requirements-lock

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

@seonghobae
seonghobae disabled auto-merge July 29, 2026 09:24
@seonghobae
seonghobae enabled auto-merge (squash) July 29, 2026 09:24
@seonghobae
seonghobae disabled auto-merge July 29, 2026 10:11
@seonghobae
seonghobae enabled auto-merge (squash) July 29, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant