Skip to content

[Cross-repo] Consume LineageWeave for email lineage and project intelligence without duplicating authority #1437

Description

@seonghobae

Buyer outcome

Naruon should be able to use LineageWeave as an optional evidence-analysis capability so that selected authorized email/thread evidence can be reconstructed into explainable lineage and project-history candidates, while Naruon remains the system of record for customer-owned mail/calendar/file state and its own project/task/commitment records.

This issue is the Naruon consumer-side counterpart to ContextualWisdomLab/LineageWeave#338.

Product scenario

Examples this integration should eventually support:

selected authorized email/thread evidence
→ LineageWeave reconstruction
→ explainable predecessor/successor / related-history candidates
→ project-history candidate links
→ Naruon buyer surface shows evidence + confidence + truth status
→ user or deterministic Naruon policy may adopt/correct a relation

and:

Naruon email / attachment / task / commitment evidence
→ LineageWeave project lineage
→ Naruon project workspace / timeline / Ask context

This must not become:

LineageWeave copied into Naruon
or
LineageWeave given Naruon DB/provider credentials
or
LineageWeave inference silently promoted to authoritative provider/project truth

Existing Naruon landing points

Coordinate with, do not duplicate:

Authority boundary

Naruon remains authoritative for

  • provider source access and credentials;
  • canonical email/message/instance/thread identities;
  • tenant/workspace authorization and source visibility;
  • tasks, commitments, and Naruon-owned project records;
  • mail/calendar/file provider mutations and reconciliation;
  • user confirmation and correction workflows.

LineageWeave remains authoritative for

  • its released lineage reconstruction algorithm and run contract;
  • channel-level evidence and reconstruction provenance;
  • project-history inference produced from caller-supplied evidence;
  • algorithm/profile/model versioning for its own analysis artifact.

LineageWeave output is inferred or proposed unless a particular field is simply echoing caller-supplied observed evidence. Naruon must never label a LineageWeave-inferred relation as provider truth solely because it came from a trusted CWL service.

Required consumer design

1. Explicit admission policy

Not every email is sent to LineageWeave. Add a versioned admission decision such as:

lineage_analysis_policy
lineage_analysis_candidate
lineage_analysis_request
lineage_analysis_receipt

Candidate reasons may include:

  • explicit user request;
  • project/commitment evidence already present;
  • thread ambiguity requiring lineage analysis;
  • configured workspace policy;
  • project-history refresh.

Default must be fail-closed / no external analysis when authorization, purpose, data classification, or LineageWeave capability is unknown.

2. Bounded evidence projection

Project Naruon facts into the released LineageWeave contract without direct SQL or shared ORM models. Prefer opaque references and data minimization.

Possible evidence channels:

  • Message-ID / References / In-Reply-To evidence;
  • provider thread reference and duplicate provenance;
  • sent/received/available timestamps;
  • source-authorized subject/body excerpt or caller-computed text feature, according to policy;
  • participant/organization evidence when explicitly authorized;
  • attachment/content evidence references;
  • Naruon project/task/commitment hints as observed/authoritative_in_caller, not LineageWeave-owned truth.

Provider credentials, browser sessions, raw access tokens, unrelated mailbox contents, and cross-tenant facts never leave Naruon.

3. Async and durable execution

Potentially model-backed lineage work must not block email request paths. Use a bounded durable job/analysis-run contract with:

  • idempotency identity;
  • exact source/evidence revisions;
  • knowledge cutoff / available-time binding;
  • timeout/cancellation;
  • retry classification;
  • explicit unavailable/degraded state;
  • result artifact digest and LineageWeave version.

4. Result projection

Store a Naruon-owned projection/receipt, not a shadow copy of the full LineageWeave database.

Suggested normalized objects:

external_analysis_run
external_analysis_artifact
lineage_relation_candidate
lineage_candidate_evidence
lineage_candidate_decision

Use descriptive two-or-more-word snake_case, 3NF, and hot-partition-safe indexing/partitioning if persistence is added.

A candidate decision distinguishes at least:

proposed
accepted
rejected
superseded

Acceptance must record actor/policy, time, evidence revision, and the Naruon object actually updated. Provider mutation remains a separate confirmation path.

5. Buyer surface

Do not add a second product UI. Integrate results into existing email/thread/project surfaces:

  • "Related history" / "Email lineage" evidence disclosure;
  • project timeline/history candidate links;
  • channel evidence and algorithm version;
  • clear inferred wording and confidence/limitations;
  • one-step accept/correct/reject where Naruon owns the resulting relation;
  • no hover-only exact values;
  • keyboard/screen-reader and print/export parity.

Plugin vs service decision

When LineageWeave publishes the reusable boundary from #338:

  • prefer a released package only if it is truly store-agnostic, stateless, and does not pull LineageWeave persistence into Naruon;
  • otherwise consume it as a separately released service or a Naruon Phase 1 — Platform / Plugin SDK #976 plugin using a reviewed extension point;
  • no mutable git branch/submodule is acceptable as the production contract;
  • package/service/plugin compatibility must be contract-tested on both repositories.

TDD acceptance

  1. An authorized selected email can be analyzed without exposing Naruon credentials or unrelated mailbox data.
  2. An unauthorized/private email never appears in a LineageWeave request, candidate, cache, log, metric, or fixture.
  3. RFC reply/thread facts remain distinct from semantic lineage candidates.
  4. Duplicate delivery/retry executes one logical analysis and produces one Naruon projection.
  5. Later-available evidence cannot affect a historical knowledge_cutoff run.
  6. LineageWeave outage/degraded state leaves normal Naruon mail/project operation available.
  7. A returned inferred candidate cannot directly mutate provider mail/calendar state.
  8. Accept/reject/correct decisions are auditable and preserve the original LineageWeave artifact reference.
  9. Consumer contract tests run against an immutable released LineageWeave artifact and fail on incompatible schema/version.
  10. Owned production statement/branch coverage and public docstrings remain 100%, plus exact-head security/review/release gates.

Delivery ordering

  1. ContextualWisdomLab/LineageWeave#338 releases the provider contract/artifact.
  2. Naruon adds consumer/admission contract behind a disabled-by-default capability.
  3. Wire email/thread evidence from [Product Gap] Implement evidence-based email, media, and document resolution pipeline #1350 only after canonical identity/provenance is stable.
  4. Add project-workspace projection after the project-history contract is proven.
  5. Evaluate a Naruon Phase 1 — Platform / Plugin SDK #976 plugin packaging path only after plugin lifecycle is production-safe.

This is a future integration track and must not block current core mail/calendar/file operation.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dataDatabase, schema, migration, ETL, or lineagepriority: mediumNormal-priority or P2 workscope: 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