Skip to content

feat(email): Slice 3 wire admission so only document_image continues - #1398

Draft
seonghobae wants to merge 9 commits into
cursor/email-media-admission-slice3-c9defrom
cursor/email-media-admission-wiring-cd1a
Draft

feat(email): Slice 3 wire admission so only document_image continues#1398
seonghobae wants to merge 9 commits into
cursor/email-media-admission-slice3-c9defrom
cursor/email-media-admission-wiring-cd1a

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

#1350 Slice 3 follow-on stacked on Draft #1397. Admission existed on the parent, but nothing called it, so a 1×1 CID tracker or unresolved CID could still reach the local parse/resolution path as usable document input.

This draft wires admit_email_inline_media() through resolve_email_inline_media() and the existing parse_eml / parse_eml_bytes path. Only document_image admissions continue. tracking_pixel, unsupported_media, and unresolved_cid_reference are quarantined with those stable error_codes and are dropped from filename-bearing image attachments. No OCR, VLM, NewsDOM, egress, or new tables. The #1376 EmailMediaArtifact pixel contract is not copied.

Exact previous head: db9688768cb682edbc0195913e8ae9b0e1551dfb (stale parent 51c003d701cce4eb0779ccbba96c499fb3e5379d)
Exact current head: 1af546dbb01964e9a620ed341ae0dd3dab9439fd
Exact parent SHA (live #1397 head): 37b4af566d749028f7dc99545fff1db517d61d1a
Live develop SHA: dd8d15191338b841f9e6f3a06507c6a5643b95d0

Predecessor evidence does not transfer. The previous wiring-head tests, coverage, and review evidence, and #1397 predecessor-head evidence, are not this head's proof. Re-run the focused wiring tests on this exact head.

Refs #1350

Customer next action

Send only document_image continuations downstream. Do not send a tracker, unsupported part, or unresolved CID to a model. Do not merge this draft until it is no longer Draft and a qualifying independent APPROVE exists on the unchanged head. Keep #1397 Draft as well.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Exact-head verification

Retarget: normal merge 1af546db of live #1397 (cursor/email-media-admission-slice3-c9de @ 37b4af56, which already contains develop@dd8d1519) into cursor/email-media-admission-wiring-cd1a. Not a squash. Not a force-push of develop. #1399 and #1400 were not retargeted.

Focused product tests on this exact head:

cd backend
PYTHONPATH=. PYTHONWARNINGS=error python3 -m pytest -c /dev/null --noconftest -p no:cacheprovider \
  tests/test_email_media_resolution.py \
  tests/test_email_media_resolution_boundaries.py \
  tests/test_email_media_admission.py \
  tests/test_email_media_admission_boundaries.py \
  tests/test_email_parser.py -q
# 61 passed

Local count on 1af546db: 61 passed. Predecessor-head counts do not transfer.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Merge boundary

This PR must remain Draft. Merge is prohibited while Draft and prohibited without a qualifying independent non-author APPROVE on the unchanged head. Do not self-approve, mark Ready, squash-merge over a draft, merge #1397, or treat predecessor/stacked/#1376 evidence as this head's proof.

Open in Web Open in Cursor 

cursoragent and others added 7 commits August 17, 2026 18:28
Add four synthetic multipart/related .eml fixtures and failing
acceptance tests for CID resolution, unresolved CID fail-closed,
1x1 tracking-pixel exclusion, and repeated base64 hash provenance.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Resolve cid: against same-message multipart/related parts, fail closed
on unresolved CID, and classify tracking_pixel, unsupported_media, and
document_image from local header and dimension evidence only. No remote
fetch, OCR, or VLM.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Add APA 7 RFC and email-tracking citations, state the no-fetch
admission boundary, and record the anti-pattern so 1x1 beacons are
not treated as document evidence.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Bring live develop@a81ac4f7 into #1397 so predecessor-head evidence
does not transfer. Keep the admission contract unchanged.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Prove the local parse/resolution path still treats a 1x1 CID tracker or
unresolved CID as usable document input until admission is called first.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Call admit_email_inline_media() first on the local parse path and
quarantine tracking_pixel, unsupported_media, and unresolved_cid_reference
so they cannot continue as OCR or document evidence.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Document that later parse/resolution must send only document_image
continuations downstream and must not send tracker or unresolved CID
bytes to a model.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 17 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

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

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 23141564-daf4-48c9-9ac7-43b04666082e

📥 Commits

Reviewing files that changed from the base of the PR and between 37b4af5 and 1af546d.

📒 Files selected for processing (8)
  • AGENTS.md
  • backend/services/email_media_resolution.py
  • backend/services/email_parser.py
  • backend/tests/test_email_media_resolution.py
  • backend/tests/test_email_media_resolution_boundaries.py
  • backend/tests/test_email_parser.py
  • docs/architecture/image-content-detection.md
  • docs/doctoring/email-inline-media-admission.md

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.

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for 1af546dbb01964e9a620ed341ae0dd3dab9439fd:

  • Draft PR: merge automation is paused.
  • Merge state is DIRTY; resolve conflicts before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

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 and others added 2 commits August 18, 2026 04:37
Normal merge of cursor/email-media-admission-slice3-c9de@37b4af56
into the wiring branch. Predecessor-head evidence does not transfer.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the unchanged exact current head 1af546dbb01964e9a620ed341ae0dd3dab9439fd stacked on live #1397 37b4af56. Predecessor db968876 evidence does not transfer. Local focused tests: 61 passed. This comment is not an approval. Keep Draft.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

@seonghobae I will review the unchanged exact head 1af546dbb01964e9a620ed341ae0dd3dab9439fd. I will treat predecessor evidence as non-transferable. I will keep the PR Draft.

⚠️ Action not completed

Review rate limited.

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.

cursor Bot pushed a commit that referenced this pull request Aug 17, 2026
Bring cursor/email-media-admission-wiring-cd1a @ 1af546d into
cursor/email-media-quarantine-persist-0ad6 so Draft #1399 stacks on the
live wiring head (itself stacked on #1397 @ 37b4af5 / develop@dd8d1519).

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@seonghobae
seonghobae force-pushed the cursor/email-media-admission-slice3-c9de branch from 40aef47 to 5a80583 Compare August 21, 2026 03:26
@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability labels Aug 22, 2026
@seonghobae seonghobae added the enhancement New feature or request label Sep 7, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants