Skip to content

build(deps): consolidate account-unification dependency updates and pin ruff rule set - #33

Open
seonghobae wants to merge 2 commits into
mainfrom
claude/contextualwisdomlab-audit-ci-se85n8
Open

build(deps): consolidate account-unification dependency updates and pin ruff rule set#33
seonghobae wants to merge 2 commits into
mainfrom
claude/contextualwisdomlab-audit-ci-se85n8

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Dependabot opened five PRs (#27#31) bumping services/account_unification dependencies, but each only edited pyproject.toml (or targeted a transitive package) without regenerating uv.lock. Every one therefore fails the account-unification-tests gate at uv sync --locked:

error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided.

This consolidates all five bumps into one lock-consistent change so the gate passes and the individual PRs can be closed:

Package From To Note
fastapi 0.139.0 0.140.13 #28 (pulls starlette 1.3.1)
uvicorn 0.51.0 0.52.0 #27
ruff 0.15.21 0.16.0 #31 (dev)
annotated-doc 0.0.4 0.0.5 #29 (transitive)
annotated-types 0.7.0 0.8.0 #30 (transitive)

Why the explicit ruff select

ruff had no [tool.ruff.lint] select, so it used ruff's implicit default. ruff 0.16.0 widened that default (adding flake8-bugbear, pyupgrade, flake8-pyi, flake8-blind-except, RUF100, isort), which surfaced 21 new lints on code that previously passed — e.g. B008 on FastAPI's required = Depends(...) parameter-default pattern. Rather than rewrite endpoints or silently adopt a broader lint policy on a version bump, this pins the classic default (["E4","E7","E9","F"]), keeping the established policy explicit and stable across future ruff upgrades. Verified: ruff check app tests tools --select E4,E7,E9,F was already clean, so this is behavior-preserving.

Verification

Run from services/account_unification/ (mirrors the account-unification-tests CI gate):

  • uv sync --locked --extra dev — lockfile consistent
  • uv run ruff check app tests tools — All checks passed
  • uv run interrogate . — PASSED (100%, gate ≥80%)
  • uv run pytest -q — 52 passed

Notes

Supersedes #27, #28, #29, #30, #31 (they can be closed once this merges). No source-code behavior change; runtime dependency versions and the pinned lint rule set only.


Generated by Claude Code

Summary by CodeRabbit

  • 버그 수정

    • 상태 점검 기능이 HTTP 및 HTTPS 주소만 허용하도록 개선되었습니다.
    • 지원되지 않는 URL 스킴 입력 시 명확한 오류 메시지를 표시하고 안전하게 종료합니다.
  • 개선 사항

    • 패키지 및 개발 도구 의존성이 업데이트되었습니다.
    • 코드 품질 검사를 위한 린트 규칙이 명확하게 적용됩니다.
  • 테스트

    • 지원되지 않는 URL 스킴이 올바르게 거부되는 동작을 검증하는 테스트가 추가되었습니다.

…in ruff rule set

Dependabot opened five PRs (#27-#31) bumping account_unification dependencies,
but each only edited pyproject.toml (or targeted a transitive package) without
regenerating uv.lock, so every one fails `uv sync --locked` on the
account-unification-tests gate ("The lockfile at uv.lock needs to be updated").

Apply all five bumps in one lock-consistent change:

- fastapi 0.139.0 -> 0.140.13 (pulls starlette 1.3.1)
- uvicorn 0.51.0 -> 0.52.0
- ruff 0.15.21 -> 0.16.0 (dev)
- annotated-doc 0.0.4 -> 0.0.5 (transitive)
- annotated-types 0.7.0 -> 0.8.0 (transitive)

ruff 0.16.0 widened its implicit default rule set (adding flake8-bugbear,
pyupgrade, flake8-pyi, flake8-blind-except, RUF100, isort), which surfaced 21
lints on code that previously passed. Pin the classic default select
(["E4","E7","E9","F"]) so the established lint policy stays explicit and stable
across ruff upgrades instead of silently changing on a version bump.

Verified in services/account_unification: `uv sync --locked --extra dev`,
`ruff check app tests tools` (All checks passed), `interrogate .` (100%),
`pytest -q` (52 passed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AqtiEQFfuYFsS75Aku9tPT
@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: 25d4cc41-ed4f-4498-b745-43bbe81f23ba

📥 Commits

Reviewing files that changed from the base of the PR and between 9385306 and 3e03346.

⛔ Files ignored due to path filters (1)
  • services/account_unification/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • services/account_unification/app/healthcheck.py
  • services/account_unification/pyproject.toml
  • services/account_unification/tests/test_healthcheck.py

📝 Walkthrough

Walkthrough

Healthcheck이 HTTP(S) 외 URL 스킴을 거부하도록 검증 로직과 테스트가 추가되었습니다. FastAPI, Uvicorn, Ruff 버전과 Ruff lint 규칙 설정도 갱신되었습니다.

Changes

Healthcheck URL validation

Layer / File(s) Summary
URL 스킴 검증과 회귀 테스트
services/account_unification/app/healthcheck.py, services/account_unification/tests/test_healthcheck.py
healthcheck.main()httphttps만 허용하고, 지원되지 않는 스킴에는 오류를 출력한 뒤 1을 반환하도록 변경되었습니다. 해당 동작을 테스트합니다.

패키지 및 린트 설정 업데이트

Layer / File(s) Summary
의존성 및 Ruff 설정
services/account_unification/pyproject.toml
FastAPI, Uvicorn, Ruff 버전이 업데이트되고 Ruff lint 규칙 선택이 E4/E7/E9/F로 명시되었습니다.

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

Possibly related PRs

Suggested labels: dependencies, python

🚥 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 제목이 account_unification 의존성 업데이트와 Ruff 규칙 고정이라는 핵심 변경을 잘 요약합니다.
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 claude/contextualwisdomlab-audit-ci-se85n8

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

Copy link
Copy Markdown
Contributor Author

Status on this dependency consolidation:


Generated by Claude Code

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 5c7e1dd820d887e862bafa6b187c429c4176db53.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

opencode-agent Bot commented Jul 29, 2026

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: 3e033462e719dc19d36e70a764d62379bafba056
  • Workflow run: 30482870472
  • 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 3e033462e719dc19d36e70a764d62379bafba056.

  • Head SHA: 3e033462e719dc19d36e70a764d62379bafba056

  • Workflow run: 30482870472

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

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["Test: test_healthcheck.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_healthcheck.py"]
  R2 --> V2["targeted test run"]
Loading

…llib finding

The org-central "Semgrep (multi-language SAST)" gate reports a real Medium
(WARNING) finding on every keyverse PR, blocking OpenCode approval:

  python.lang.security.audit.dynamic-urllib-use-detected
  services/account_unification/app/healthcheck.py:18 — dynamic value passed to
  urllib.request.urlopen (urllib honours file://, so a caller-controlled URL
  could read arbitrary files).

Mitigate the actual risk by rejecting any non-http(s) scheme before opening the
URL (closes the file:// vector), then annotate the audited call with a narrow,
documented `# nosemgrep` for that single rule. Add a regression test for the
rejected-scheme path. Fixed at base so all open keyverse PRs inherit a clean
SAST gate.

Verified in services/account_unification: `ruff check app tests tools`,
`interrogate .` (100%), `pytest -q`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AqtiEQFfuYFsS75Aku9tPT

Copy link
Copy Markdown
Contributor Author

Correction to my earlier comment: I mis-read the Semgrep (multi-language SAST) failure. The log tail I first looked at was only the post-job StepSecurity harden-runner monitoring dump (audit mode, ENFORCE_*=false), not the actual step output. The real cause is a genuine Medium (WARNING) SAST finding, pre-existing on main and failing every keyverse PR:

python.lang.security.audit.dynamic-urllib-use-detected
services/account_unification/app/healthcheck.py:18
Detected a dynamic value being used with urllib (urllib honours file://, so a
caller-controlled URL could read arbitrary files).

Fixed at base in 3e03346: reject any non-http(s) scheme before opening the URL (closes the file:// vector), annotate the audited call with a narrow, documented # nosemgrep for that single rule, and add a regression test for the rejected-scheme path. Once this merges, all open keyverse PRs inherit a clean SAST gate. Apologies for the earlier incorrect "nothing to fix" call.


Generated by Claude Code

@opencode-agent opencode-agent 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.

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 3e033462e719dc19d36e70a764d62379bafba056.

  • Head SHA: 3e033462e719dc19d36e70a764d62379bafba056

  • Workflow run: 30482870472

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

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["Test: test_healthcheck.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_healthcheck.py"]
  R2 --> V2["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

Blocker triage for the coverage-evidence REQUEST_CHANGES at 3e03346:

  • The earlier Semgrep dynamic-urllib-use-detected finding is resolved by 3e03346 (scheme allowlist + # nosemgrep), and the current-head check rollup is green (Semgrep, Trivy, osv-scanner, CodeQL, noema-review, opencode-review all success).
  • The remaining coverage-evidence failure is not a defect in this PR. Locally, from services/account_unification/, all repo gates pass: uv sync --locked ✓, ruff check app tests tools ✓, interrogate . → 100% ✓, pytest -q → all pass ✓.
  • Root cause is central-harness, not repo-side: the trusted offline coverage sandbox runs python3 -m coverage run -m pytest tests for this subdirectory service without its runtime deps, so collection fails at ModuleNotFoundError: No module named 'pydantic' (.github run 30482870472, job coverage-evidence). Root-level services (e.g. newsdom-api#456) pass the same job because their deps sit at the repo root.
  • This is exactly the gap tracked by ContextualWisdomLab/.github#612 (fix/offline-coverage-naruon-keyverse-deps). Re-running 30482870472 reproduces the same pydantic import error deterministically, so I'm not churning commits here; this PR is green-able once #612 lands the service deps into the offline sandbox.

Generated by Claude Code

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