GEN-02: add bounded local artefact text extraction - #1346
Conversation
…o issue-1316/artefact-text-extraction
FULL-tier self-review ? exact head
|
|
@codex review Please perform a fresh FULL-tier adversarial review of exact head c3e3e4c. Focus on PDF parser/resource bounds, warning honesty, user isolation and store-time races, migration/cascade deletion, bounded and streaming GDPR export, Unicode/offset discipline, and all existing comments. Report every severity. |
There was a problem hiding this comment.
Code Review
This pull request introduces a local, size-bounded text extraction feature for plain-text, Markdown, and PDF artefacts, including database persistence for extraction history and integration with the GDPR data export services. The review feedback highlights valuable optimization opportunities, such as caching the deserialized warnings array in the domain entity to reduce CPU overhead, removing redundant raw SQLite queries in the repository in favor of unified LINQ queries, and resetting the position of seekable streams in the PDF extractor to prevent unnecessary buffering.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3e3e4c104
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…o issue-1316/artefact-text-extraction # Conflicts: # backend/tests/Taskdeck.Application.Tests/Services/DataExportServiceTests.cs
Review remediation — repaired-parent absorb + 6 review threadsParent absorb / conflict resolutionThis PR was stacked on the pre-repair head of #1341 (
Both are valid against the merged service (extraction-bytes check runs before Findings → fix → verification
Test evidence (targeted, SQLite; no Docker)
Failing check: "API Integration (windows-latest)"Investigated — not caused by this PR. The prior run failed a single test, Scope notes
|
Follow-up: two LOW/cosmetic nits closed (head
|
…o issue-1316/artefact-text-extraction
…ext-extraction # Conflicts: # autodoc/AGENT_INDEX.md
There was a problem hiding this comment.
💡 Codex Review
When extraction receives a hostile PDF under MaxInputBytes, the work inside PdfDocument.Open and the immediate page-tree inspection runs synchronously before any cancellation check and without a timeout. The GEN-02 resource budget requires per-extraction wall-clock timeout/cancellation, so a parser-bomb PDF can still tie up the extraction worker despite the byte/page/character caps; wrap or isolate this parse with a configured timeout and convert timeout into a safe extraction warning.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
IArtefactTextExtractorcontract with bounded plaintext/Markdown and PdfPig PDF text-layer adaptersautodoc/AGENT_INDEX.mdImplementation notes
no-text-layer; there is no OCR or LLM path.extractor-errorwarning and log only the exception type, not parser detail or user content.CreatedAtthenIdordering.b149bd49; merge the dependency first and do not retarget/delete the stacked branch.Assumption: the issue's "size-bounded sync" option authorizes an explicit bounded application service without an upload hook. Reason: GEN-02 defines extraction and persistence, while downstream invocation belongs to the worker/review flow. Reversible by invoking
IArtefactExtractionServicefrom a worker without a schema or extractor change.Verification
dotnet test backend/Taskdeck.sln -c Release -m:1 --no-restore --filter FullyQualifiedName~ArtefactExtraction? 31 passed, 0 faileddotnet test backend/tests/Taskdeck.Api.Tests/Taskdeck.Api.Tests.csproj -c Release -m:1 --no-restore --filter FullyQualifiedName~MigrationBootstrap? 7 passed, 0 faileddotnet test backend/Taskdeck.sln -c Release -m:1 --no-restore? 6,896 passed, 0 failed, 1 pre-existing INV-09 skipnode scripts/check-docs-governance.mjs? passednode scripts/check-golden-principles.mjs? passedgit diff origin/issue-1315/artefact-storage...HEAD --check? passeddotnet list backend/Taskdeck.sln package --vulnerable --include-transitive? surfaced the pre-existing unpatched SQLite advisory now tracked in Track SQLite native dependency CVE-2025-6965 until a patched package exists #1345; PdfPig introduced no reported advisoryDocs impact
autodoc/AGENT_INDEX.mdnow points to the extraction seam and verification command. Canonical direction sections indocs/STATUS.md/ the active memory were intentionally not edited here because the operative revival/generalist direction is landing through #1296 and #1328.Risks / not yet verified
Closes #1316