Repository navigation
Integrate shared Documents while retaining IngestionDocument - #7904
Open
luisquintanilla wants to merge 4 commits into
Open
luisquintanilla wants to merge 4 commits into
luisquintanilla wants to merge 4 commits into
Conversation
Preserve Preview2 AIContent chunks and typed writers; add direct shared-document ingestion, source provenance, and an isolated extraction reader. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 2, 2026
Use authoritative text payloads, ordinary source pages and borrowed native results. Preserve sparse heading contexts, layout/source identity and detached payload ownership in owning consumer coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore IngestionDocument root extension points with independent persistence identity and an exact shared ExtractedDocument. Forward concrete section Lists, preserve shared content/source traversal across built-in consumers, and wrap extraction results without copying. Regenerate all five API inventories and migrate canonical coverage for envelope identity, all built-in chunkers, image enrichment and typed writer keys. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
@adamsitnik - This builds on #7835 and #7588 But it'd be good to take a look as well to ensure you agree with these changes in MEDI. These target the preview-2 branch |
Preserve ordered cell semantics and descendant provenance across ingestion chunkers and image enrichment. Migrate the optional extraction reader to DocumentExtractionClient without changing ingestion core dependencies. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Let MEDI process the shared Documents model without replacing
IngestionDocumentas its entry point or maintaining a second document model.An extraction result can be passed directly into the existing ingestion pipeline:
The ingestion identifier remains independent of the extracted document's identifier. The document graph is shared, not copied or converted through Markdown.
What changes
IngestionDocument, its existing string constructor, and the ingestion-root signatures on readers, processors, chunkers, chunks and pipeline results. Add a constructor accepting anExtractionDocumentand a get-onlyExtractedDocumentproperty.Sectionsforwards the underlyingList<ExtractionDocumentSection>;EnumerateContent()returns shared elements.List<T>.DocumentExtractionReader. It wraps the exact extraction result using the requested ingestion key, preserving inner object identity, borrowed input/client ownership, option snapshots and cancellation.SourceElementsandVectorStoreWriter<TRecord>.CreateRecordlet applications persist source attribution with their records.Dependency boundary: core ingestion references Documents, not Extraction. Only the optional extraction-reader package references the extraction contracts. Existing non-generic
AIContentchunks, typed vector records/Guid keys and incremental writer behavior remain.Compatibility
This retains the ingestion root, not complete legacy source/binary compatibility. The old ingestion-specific section/element types are replaced by shared primitives, and processor collection signatures change to concrete Lists. The original
IngestionDocument(string identifier)constructor creates an empty shared document.No separate legacy-mode tree, renderer or pipeline redesign is introduced.
Suggested review order
IngestionDocument, reader/processor/chunker signatures, pipeline overloads and regenerated API inventories.DocumentExtractionReader, especially distinct ingestion/source identifiers and exact shared-graph identity.Merge gate: Documents #7835 and Extraction #7588 must reach
data-ingestion-preview2. Current-head CI fails during restore because those prerequisite projects are missing from the target. This PR is not merge-ready until they are integrated and required checks pass.Validation and package details
Source and API validation
Actual-package consumers
Private review packages
Five original owning MEDI projects use fresh immutable version
10.10.0-review.20261102.2. Owning dependency edges use.2; Documents/Extraction/AI/AI.Abstractions remain10.10.0-review.20261102.1, including byte-for-byte unchanged AI main support.Ten owning main/symbol archives, five-TFM nuspec dependency groups and 25 main-package DLL entries are sealed. Original projects/targets use a private
DirectoryBuildTargetsPathimport selecting PackageVersion per project. There is no archive rewriting, shadow project, core repack or committed version-manifest change.Private owning nuspec RepositoryCommit records the packaging base; exact accepted source blobs bind to the published head rather than claiming uncommitted edits existed in that base. Earlier package bytes remain unchanged. These are review candidates, not a public feed release.
Prerequisites, local reproduction and CI diagnosis
Published source
Owning head:
f5a1e88adb328aa594a91e6e4111b74f93a307b3.Tree:
ef9228908d9d3cc52b14fab378d37540b19a36ae.Normal coauthored fast-forward publication from parent
426b44dedcfd7e30dd81fd9878f3c93934aeaecc: 54 focused files in this commit, 49 net owning files against the target. All 54 committed source/test/doc/API blobs match accepted inputs. No private prerequisite snapshots, review inputs, packs, notes or version manifests are committed.Reproduce local validation before prerequisites land
The approved target is
data-ingestion-preview2ate124c123afeeda2f271f3b99a70eb3cfe187a471. Restore only these pinned prerequisite production paths into the worktree; do not commit them:The 21 required production files match public Git blobs and remain outside the focused owning commit. Remove this temporary prerequisite-restoration step after the real dependencies reach the target, reconcile and rerun required checks. Private packages are not a substitute for integrating those public-source prerequisites.
Current-head CI
Azure build1660213 completed/failed. It evaluates PR merge revision
f4d2a0694d5d6481ee1b5f219746b74d4c9162ae, with exact parents approved basee124c123afeeda2f271f3b99a70eb3cfe187a471and owning headf5a1e88adb328aa594a91e6e4111b74f93a307b3.Actual Ubuntu Restore log15, Windows Restore log27 and WarningsCheck Restore log32 each report two MSB4025 errors for missing
Microsoft.Extensions.Documents.Abstractions.csprojandMicrosoft.Extensions.DocumentExtraction.Abstractions.csproj, with zero MSBuild warnings. These jobs do not establish later build/test/AOT/pack success. This is new-head evidence, not relabeled previous builds1660161/1658900.Documents build1660145 and Extraction build1660146 complete successfully at their published heads. Their CI does not integrate prerequisites into this target or waive this PR's required checks. No CI workaround or warning suppression for missing prerequisites is added.
Microsoft Reviewers: Open in CodeFlow