Skip to content

fix: prefer practical compatibility hours - #14

Merged
seonghobae merged 4 commits into
mainfrom
fix/practical-compatibility-hours
Jul 30, 2026
Merged

seonghobae merged 4 commits into
mainfrom
fix/practical-compatibility-hours

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • default two-person recommendations to practical 09:00–23:00 hours
  • keep an explicit 24-hour option and persist it in saved CalDAV calendars
  • document the product convention and cover both modes with regression tests

Validation

  • uv run pytest -q — 66 passed
  • uv run ruff check .
  • node --check app/static/app.js
  • local browser preview and calendar-save flow

Summary by CodeRabbit

  • 새로운 기능

    • 두 사람의 추천 시간대에 기본 생활 시간(09:00–23:00)과 24시간 전체(새벽 포함) 선택 옵션을 추가했습니다.
    • 선택한 시간 범위가 미리보기, 캘린더 저장 및 표시 결과에 일관되게 반영됩니다.
    • 추천 결과가 없을 때 선택한 검색 범위에 맞는 안내 문구를 제공합니다.
  • 문서

    • 기본 검색 범위와 24시간 검색 옵션에 대한 안내를 보강했습니다.
  • 품질 개선

    • 입력 오류, 중복·미존재 리소스, 동기화 오류 등 다양한 예외 상황에 대한 검증을 강화했습니다.
    • 테스트 실행 시 코드 커버리지를 측정하도록 개선했습니다.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 94b65385-8320-427d-bd50-4c0b84391728

📥 Commits

Reviewing files that changed from the base of the PR and between f5630a5 and bd55917.

📒 Files selected for processing (8)
  • README.md
  • app/static/app.js
  • docs/ARCHITECTURE.md
  • docs/research/README.md
  • pyproject.toml
  • tests/test_api.py
  • tests/test_caldav.py
  • tests/test_events.py
📝 Walkthrough

Walkthrough

호환성 추천의 기본 검색 범위를 09:00–23:00으로 제한하고, 선택 시 24시간 전체를 검색하도록 변경했습니다. 이 설정을 API, 캘린더 저장, 프론트엔드 표시, 문서와 테스트에 반영했으며 CI 커버리지 검사를 추가했습니다.

Changes

호환성 검색 범위

Layer / File(s) Summary
후보 생성과 API 설정
app/compatibility.py, app/main.py
include_overnight 옵션을 추가하고 기본 생활 시간 필터, 미리보기 응답, 캘린더 rule 저장에 연결했습니다.
검색 범위 UI와 문서
app/static/index.html, app/static/app.js, app/static/styles.css, README.md, docs/...
생활 시간과 24시간 전체 선택 UI를 추가하고 결과 표시 및 검색 규칙 문서를 갱신했습니다.
범위 동작 검증
tests/test_api.py, tests/test_compatibility.py
기본 시간 제한, 야간 후보 생성, 요청·응답의 include_overnight 보존을 검증했습니다.
검증 범위와 커버리지
tests/test_*.py, .github/workflows/ci.yml, pyproject.toml
오류·입력 검증 테스트를 확장하고 커버리지 실행 및 100% 기준을 CI에 추가했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant preview_compatibility
  participant generate_compatibility_candidates
  participant create_compatibility_calendar
  Browser->>preview_compatibility: include_overnight 전송
  preview_compatibility->>generate_compatibility_candidates: 검색 범위 적용
  generate_compatibility_candidates-->>preview_compatibility: 후보 반환
  preview_compatibility-->>Browser: 결과와 검색 범위 반환
  Browser->>create_compatibility_calendar: 선택 범위 전송
  create_compatibility_calendar-->>Browser: 저장된 rule 반환
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 호환성 추천의 기본 시간을 실용적 시간대로 바꾸는 핵심 변경을 간결하게 잘 요약합니다.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/practical-compatibility-hours

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

@seonghobae
seonghobae enabled auto-merge (squash) July 29, 2026 08:48

@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 63d0f00acf8492d9e5d3bd6e0a6c30d6e4682070.

  • Head SHA: 63d0f00acf8492d9e5d3bd6e0a6c30d6e4682070

  • Workflow run: 30437562009

  • 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 (6 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (6 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs (2 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs (2 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (2 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (2 files)"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 63d0f00acf8492d9e5d3bd6e0a6c30d6e4682070
  • Workflow run: 30437562009
  • 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 63d0f00acf8492d9e5d3bd6e0a6c30d6e4682070.

  • Head SHA: 63d0f00acf8492d9e5d3bd6e0a6c30d6e4682070

  • Workflow run: 30437562009

  • 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 (6 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (6 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs (2 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs (2 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (2 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (2 files)"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae

seonghobae commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

정정합니다. 이 저장소의 통과 기준은 app 전체 100%이며, 이전 코멘트의 “변경 경로 테스트 통과” 판단은 기준에 미달해 철회합니다.

최신 헤드 bd559172e06ea3e8a61ed7d858b75d743bb562a5에서:

  • Python 3.12: 86 passed
  • 구문 커버리지: 767 / 767, 100%
  • 분기 커버리지: 182 / 182, 100%
  • fail_under = 100 CI 게이트 적용
  • 앱 CI: PASS (run 30518057137)
  • 중앙 동일 헤드 coverage-evidence: PASS (run 30518384962)
  • 컨테이너 빌드 및 전체 보안 체크: PASS

리뷰에서 발견된 시간 기준 표기와 종료 시각 검증도 최신 헤드에서 수정했고, 모든 리뷰 스레드가 해결됐습니다.

Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
@seonghobae

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: 2

🧹 Nitpick comments (2)
pyproject.toml (1)

36-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

분기 커버리지도 함께 강제하는 것을 고려해 보세요.

현재 설정은 구문 커버리지만 100%를 요구합니다. 이 코드베이스는 include_overnight, time_mode 등 조건 분기가 핵심 동작을 결정하므로 branch = true가 회귀 방어에 더 효과적입니다.

♻️ 제안 설정
 [tool.coverage.run]
 source = ["app"]
+branch = true
🤖 Prompt for 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.

In `@pyproject.toml` around lines 36 - 42, Update the [tool.coverage.report]
configuration in pyproject.toml to enable branch coverage with branch = true,
while preserving the existing 100% fail_under requirement and missing-line
reporting.
tests/test_events.py (1)

106-115: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

테스트 의도를 값에 맞춰 정리하세요.
time_mode="invalid"여도 현재는 _civil_from_calculation_time()true_solar mode requires longitude를 먼저 내서 통과하지만, 이 케이스는 진태양시 경도 누락 검증으로 읽힙니다. 의도가 그거라면 true_solar를 넘기고, 아니면 테스트를 별도 케이스로 분리하는 편이 좋습니다.

🤖 Prompt for 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.

In `@tests/test_events.py` around lines 106 - 115, Update the iter_chart_windows
test case to pass "true_solar" as time_mode when asserting the "requires
longitude" ValueError, so the test explicitly covers missing longitude
validation. If invalid-mode validation is also required, add a separate focused
test with its expected error.
🤖 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 `@app/static/app.js`:
- Line 332: 추천 결과와 저장 캘린더 문구가 첫 번째 프로필의 time_mode를 반영하도록 업데이트하세요.
app/static/app.js 332-332의 `#pair-timezone` 및 app/static/app.js 255-255의 저장 캘린더
문구에 civil과 true_solar 기준을 구분해 표시하고, README.md 32-33, docs/ARCHITECTURE.md 39-41,
docs/research/README.md 85-86의 설명도 동일한 기준으로 갱신하세요.

In `@tests/test_api.py`:
- Around line 394-398: Update the event-time assertion around the
payload["events"] check so it validates the complete end time rather than the
always-true datetime.hour <= 23 condition. Ensure each event’s end date remains
the expected date and compare its time against the intended closing boundary,
adding the datetime.time import requested by the review.

---

Nitpick comments:
In `@pyproject.toml`:
- Around line 36-42: Update the [tool.coverage.report] configuration in
pyproject.toml to enable branch coverage with branch = true, while preserving
the existing 100% fail_under requirement and missing-line reporting.

In `@tests/test_events.py`:
- Around line 106-115: Update the iter_chart_windows test case to pass
"true_solar" as time_mode when asserting the "requires longitude" ValueError, so
the test explicitly covers missing longitude validation. If invalid-mode
validation is also required, add a separate focused test with its expected
error.
🪄 Autofix (Beta)

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: 3565f6cf-76da-400a-be66-25358a43a05c

📥 Commits

Reviewing files that changed from the base of the PR and between 0c451b4 and f5630a5.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • .github/workflows/ci.yml
  • README.md
  • app/compatibility.py
  • app/main.py
  • app/static/app.js
  • app/static/index.html
  • app/static/styles.css
  • docs/ARCHITECTURE.md
  • docs/research/README.md
  • pyproject.toml
  • tests/test_api.py
  • tests/test_caldav.py
  • tests/test_compatibility.py
  • tests/test_events.py
  • tests/test_rules.py
  • tests/test_saju.py
  • tests/test_store.py

Comment thread app/static/app.js Outdated
Comment thread tests/test_api.py Outdated
@coderabbitai

coderabbitai Bot commented Jul 30, 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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 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.

@seonghobae
seonghobae merged commit 08fb7fa into main Jul 30, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Jul 30, 2026
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