Skip to content

[Product Gap] Implement evidence-based email, media, and document resolution pipeline #1350

Description

@seonghobae

Buyer problem

Naruon has broad workspace surfaces, but the buyer-visible trust gap remains: users must know why a mail/thread/document/image was connected, what source evidence supports an AI judgment, what confidence/boundary applies, and what action a control will perform before provider/workspace state changes.

This issue is the umbrella implementation contract for the evidence-based workspace direction introduced by #1349. None of the active slices below is shipped until it reaches protected develop; PR-head evidence must not be described as protected-branch product truth.

Current implementation truth — revalidated 2026-08-16

Protected develop was observed at bc98789521d21271e84789888413c182aa111b4d. Current bounded lanes include:

All PR heads/base tips/checks/reviews/threads/workflows above are observations, not durable passing evidence; refetch them before action.

Live merge-contract correction — 2026-08-17

Repository ruleset 15586698 by itself requires zero approving reviews, but the effective default-branch contract is the union of all active applicable rulesets. Repository ruleset 17214772 (Lock default branch) and inherited organization ruleset 18156473 (CWL Central required workflows) are also active and each requires one approving review, dismisses stale reviews on push, requires approval after the last push, and requires review-thread resolution. No active ruleset currently requires CODEOWNER review. The effective live contract therefore still requires a qualifying independent post-last-push approval, exact-head status checks, and required workflows. Issue #1371 remains open because the current collaborator inventory exposes only seonghobae, so the independent human approval route is not presently verifiable from this repository writer's authority. This does not authorize merging over a current valid formal CHANGES_REQUESTED finding or any failed/pending/absent/stale required evidence; each finding must still be verified against source and each live gate must pass on the unchanged head. Refetch every active ruleset and exact-head review/check/workflow state before action.

Required implementation slices

Slice 1 — canonical email identity

  • Add or validate email_raw, email_message, email_instance, and duplicate-review state.
  • Use RFC headers, raw MIME hash, body similarity/hash, embeddings, attachment-manifest similarity, participant overlap, and sent-time delta as resolver features without treating collection time as source evidence.
  • Distinguish same_message, review_required, related_message, and distinct_message.
  • Test forwarded copies, missing/reused Message-ID across tenants, provider duplicate instances, and genuine-vs-synthetic date provenance.

Slice 2 — thread graph resolver

  • Store reply/provider/quote/participant/semantic/manual edges with evidence and tenant/context isolation.
  • Return thread confidence and evidence rather than an unexplained thread identifier.
  • Support merge/split/manual-override UX with auditability.
  • Test multi-parent, forwarded, Korean subject-prefix, equal-date ordering, and provider-thread mismatch cases.

Slice 3 — media and image pipeline

  • Resolve cid: images through MIME multipart/related before OCR/vision.
  • Classify tracking pixels, logos/signatures, screenshots, charts, document scans, table images, and unsupported media.
  • Normalize only supported images into bounded LLM-safe artifacts; remote images remain no-fetch unless a separately authorized egress policy permits them.
  • Preserve source/member position and hash provenance for base64/CID/repeated images.

Slice 4 — HWP/HWPX documents

Slice 5 — AI synthesis and UX action contract

  • Bind every AI judgment/action/calendar candidate to authorized source artifacts and evidence IDs.
  • Store prompt/model/artifact versions or privacy-safe cryptographic provenance where raw prompts/results must not be retained.
  • Require confirmation/authorization for send, calendar writeback, external share, policy change, and destructive provider/file action.
  • Update UI action states and audit events according to docs/ui-ux/button-action-contract.md; shared disabling must not falsely mark unrelated actions busy.
  • Keep deterministic safety/authorization gates independent of model judgment.

Standards and doctoring

Use and keep code-current:

  • docs/planning/naruon-evidence-workspace-task-definition.md
  • docs/architecture/evidence-pipeline-architecture.md
  • docs/ui-ux/button-action-contract.md
  • docs/doctoring/evidence-workspace-technical-sources.md

Doctoring must preserve primary/authoritative references and APA 7 citations for applicable RFC mail/MIME standards, record-linkage research, current HWP/HWPX/OWPML standards/docs, supported image/vision boundaries, accessibility requirements, and any material security/privacy standard used by code.

Quality gates

  • Database objects use descriptive two-or-more-word snake_case names and persistent relational state remains 3NF unless a documented bounded exception is justified.
  • Tests use realistic mail/document/image examples, including malicious/ambiguous package structures and source-provenance edge cases.
  • Hosted-model tests use the approved NVIDIA NIM path; COPILOT_GITHUB_TOKEN is not a development/test credential.
  • Do not blanket-mask business PII; enforce purpose-bound authorization, tenant/context isolation, least privilege, retention, encryption, access/export logging, and auditable external-sharing contracts.
  • Current exact-head CI/security/coverage/dependency/container/package/provenance evidence and review-thread resolution are mandatory; predecessor/stacked/pending/skipped/neutral/model-only evidence is non-passing.
  • Protected integration must satisfy the live ruleset, required workflows, and any still-valid formal review finding on the unchanged head; never substitute a partial ruleset snapshot or model-only status for current evidence.

Done

Close only when the protected product lets a buyer open a relevant Naruon screen and determine, from real persisted/derived evidence:

  • what source evidence backs a result and which source bytes/artifacts it came from;
  • how confident/bounded Naruon is and what remains unknown/partial;
  • what action each control performs and whether it changes provider/workspace state;
  • how authorization, confirmation, and audit evidence apply to that action; and
  • how to correct a wrong duplicate, thread, document, image, or AI judgment without losing provenance.

Activity

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

Metadata

Metadata

Assignees

Labels

aiarchitecturearea: accessibilityAccessibility and assistive-technology supportarea: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dependenciesDependency or lockfile maintenanceemailpriority: mediumNormal-priority or P2 workproduct-gapscope: product-gapCustomer-visible product gapstatus: triagedOpen issue has an organization taxonomy assignmenttype: featureNew or expanded product capability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions