Skip to content

test(email): consolidate thread identity and folder visibility coverage - #1288

Open
seonghobae wants to merge 15 commits into
developfrom
fix-emails-tests-3946903057199351733
Open

seonghobae wants to merge 15 commits into
developfrom
fix-emails-tests-3946903057199351733

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Scope

Consolidate adjacent email-thread helper test micro-PRs on one focused current-base owner.

Coverage includes canonical thread-key preference/fallback, Message-ID normalization, thread lookup expansion, inbox visibility, and sent-folder matching against configured sender addresses. Production behavior is unchanged.

The prior 32-file branch drift remains excluded. #1275 remains superseded because its useful thread_matches_folder scenarios are preserved in the same focused test file without its unrelated .trivyignore change.

Current-base refresh

  • Protected base: develop@c375c960eb6e409424541ecbdb2dc35694b9f495
  • Current head: fb3f58176b0000692b9be15b7bc34dd5ff9e31c5
  • Exact diff: one additive file, backend/tests/test_email_thread_contract.py

The branch was refreshed by a non-forced two-parent merge using current protected develop; no production, frontend, dependency, workflow, database, credential, generated-artifact, or vulnerability-suppression delta is present.

Verification boundary

Every predecessor-head check and review is historical after the refresh. Merge only after this exact unchanged head passes every live required current-head CI/security/coverage/container/review gate, zero actionable review threads remain, qualifying independent current-head approval exists under live governance, and normal protected-branch rules accept the merge without bypass.


Open in Devin Review

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 59 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e87c3122-b02d-4295-9484-73dfb8140198

📥 Commits

Reviewing files that changed from the base of the PR and between 8682f87 and 7788984.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 80497a38-0cfc-4901-ba6b-faef742f2310

📥 Commits

Reviewing files that changed from the base of the PR and between d74eebe and 8682f87.

⛔ Files ignored due to path filters (1)
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • CHANGELOG.md
  • backend/services/text_safety.py
  • backend/tests/test_frontend_nanoid_security.py
  • backend/tests/test_runtime_secrets.py
💤 Files with no reviewable changes (3)
  • CHANGELOG.md
  • backend/tests/test_runtime_secrets.py
  • backend/tests/test_frontend_nanoid_security.py

📝 Walkthrough

Walkthrough

The change adds email thread-key tests, changes malformed HTML preprocessing, removes frontend Nano ID and runtime encryption-key test coverage, and removes two Unreleased changelog entries.

Changes

Email thread-key tests

Layer / File(s) Summary
Canonical thread-key test coverage
backend/tests/test_emails_api.py
Tests cover bracket normalization, message-ID fallback, unbracketed identifiers, whitespace removal, and empty identifiers. Existing formatting changes do not alter behavior.

HTML safety parsing update

Layer / File(s) Summary
Malformed comment handling
backend/services/text_safety.py
strip_html_markup no longer preprocesses malformed <!--> sequences before HTML parsing.

Security test cleanup

Layer / File(s) Summary
Frontend Nano ID test removal
backend/tests/test_frontend_nanoid_security.py
The Nano ID lockfile security test and its supporting configuration are removed.

Runtime secret test cleanup

Layer / File(s) Summary
Encryption-key test cleanup
backend/tests/test_runtime_secrets.py
Encryption-key-related imports are removed. Authentication-session secret and entropy tests remain.

Unreleased changelog cleanup

Layer / File(s) Summary
Unreleased entry removal
CHANGELOG.md
The EmailDetail accessibility-test and UUID V4 generator entries are removed. CodeQL security-patch entries remain.

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

Merge Risk: ⚪ Minimal · up to 8682f

This change adds focused regression coverage without changing production behavior, so no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
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 The title clearly identifies the email thread-identity test coverage, which is the main objective, although folder visibility is not reflected in the changes.
✨ 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-emails-tests-3946903057199351733

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.

coderabbitai[bot]

This comment was marked as resolved.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate update for 77889846c541e624113df6b8f14d6160e8a67314: no current blocking failures remain.

PR governance metadata gate is waiting on current-head requirements; see the latest check for pending reasons.

@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 d74eebe66a025d2ce67445e0e5fdf181da7b3c23.

  • Head SHA: d74eebe66a025d2ce67445e0e5fdf181da7b3c23

  • Workflow run: 31703911685

  • 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: .trivyignore"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: .trivyignore"]
  R1 --> V1["required checks"]
  Evidence --> S2["Backend: test_emails_api.py"]
  S2 --> I2["API and service runtime"]
  I2 --> R2["Review risk: Backend: test_emails_api.py"]
  R2 --> V2["backend tests"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 9884ffccde55b47577537a18c693ad31fe74f68f
  • Workflow run: 32420960000
  • 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 9884ffccde55b47577537a18c693ad31fe74f68f.

  • Head SHA: 9884ffccde55b47577537a18c693ad31fe74f68f

  • Workflow run: 32420960000

  • 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["Backend: test_email_thread_contract.py"]
  S1 --> I1["API and service runtime"]
  I1 --> R1["Review risk: Backend: test_email_thread_contract.py"]
  R1 --> V1["backend tests"]
Loading

@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 d74eebe66a025d2ce67445e0e5fdf181da7b3c23.

  • Head SHA: d74eebe66a025d2ce67445e0e5fdf181da7b3c23

  • Workflow run: 31708785722

  • 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: .trivyignore"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: .trivyignore"]
  R1 --> V1["required checks"]
  Evidence --> S2["Backend: test_emails_api.py"]
  S2 --> I2["API and service runtime"]
  I2 --> R2["Review risk: Backend: test_emails_api.py"]
  R2 --> V2["backend tests"]
Loading

Copy link
Copy Markdown
Contributor Author

@opencode-agent review current exact head 31b3258232f29bf320e94abb88fe2b1498477016. The current head now has successful coverage-evidence and the only inline CodeRabbit thread is resolved/outdated; CodeRabbit's current-head run is rate-limited and did not start. Evaluate this exact head independently under the structured adversarial-review contract and do not reuse the predecessor-head REQUEST_CHANGES evidence.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 15, 2026
@seonghobae seonghobae changed the title 🧪 [테스트 커버리지 개선: canonical_thread_key 및 thread_lookup_values] test(email): consolidate thread identity and folder visibility coverage Aug 15, 2026
@seonghobae
seonghobae dismissed stale reviews from coderabbitai[bot], opencode-agent[bot], and opencode-agent[bot] August 15, 2026 04:25

Stale predecessor-head review. It evaluated d74eebe and found only an unrelated .trivyignore suppression. Current exact head 3ea0384 changes only backend/tests/test_email_thread_contract.py; .trivyignore is not in the current diff. The predecessor finding is therefore superseded, not current approval evidence.

@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 a37ab2a27cb4fd3b0d22ff15e07e1ae0482ebfc6.

  • Head SHA: a37ab2a27cb4fd3b0d22ff15e07e1ae0482ebfc6

  • Workflow run: 31926960733

  • 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["Backend: test_email_thread_contract.py"]
  S1 --> I1["API and service runtime"]
  I1 --> R1["Review risk: Backend: test_email_thread_contract.py"]
  R1 --> V1["backend tests"]
Loading

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@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 ffde9263ef238cf83fe1323f8cba9d51ff87f962.

  • Head SHA: ffde9263ef238cf83fe1323f8cba9d51ff87f962

  • Workflow run: 32085993695

  • 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["Backend: test_email_thread_contract.py"]
  S1 --> I1["API and service runtime"]
  I1 --> R1["Review risk: Backend: test_email_thread_contract.py"]
  R1 --> V1["backend tests"]
Loading

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 20:09

@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 9884ffccde55b47577537a18c693ad31fe74f68f.

  • Head SHA: 9884ffccde55b47577537a18c693ad31fe74f68f

  • Workflow run: 32420960000

  • 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["Backend: test_email_thread_contract.py"]
  S1 --> I1["API and service runtime"]
  I1 --> R1["Review risk: Backend: test_email_thread_contract.py"]
  R1 --> V1["backend tests"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 21, 2026 08:15
@seonghobae
seonghobae enabled auto-merge (squash) August 21, 2026 08:43
@opencode-agent
opencode-agent Bot disabled auto-merge August 21, 2026 11:46
@seonghobae
seonghobae dismissed stale reviews from opencode-agent[bot], opencode-agent[bot], and opencode-agent[bot] August 22, 2026 07:49

Verified: coverage-evidence and other non-metadata-gate required checks on the current head now report pass (gh pr checks). The coverage-evidence failure this review cited has since cleared on rerun. Dismissing as superseded.

@opencode-agent opencode-agent Bot added area: auth Authentication, authorization, identity, or tenant isolation area: ci-cd CI, GitHub Actions, checks, release, or supply chain priority: medium Normal-priority or P2 work status: needs-update Pull-request branch is behind its current base type: test Test coverage, fixtures, fuzzing, or validation labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

1 similar comment
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

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

Labels

area: auth Authentication, authorization, identity, or tenant isolation area: ci-cd CI, GitHub Actions, checks, release, or supply chain maintenance priority: medium Normal-priority or P2 work status: needs-update Pull-request branch is behind its current base type: test Test coverage, fixtures, fuzzing, or validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant