Skip to content

fix: Report incomplete ingestion parsing and extraction - #798

Draft
buildingjoshbetter wants to merge 5 commits into
fix/ingestion-recall-invalidation-769from
fix/ingestion-outcomes-768
Draft

buildingjoshbetter wants to merge 5 commits into
fix/ingestion-recall-invalidation-769from
fix/ingestion-outcomes-768

Conversation

@buildingjoshbetter

@buildingjoshbetter buildingjoshbetter commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Scope

Outcome-reporting foundation for #768, stacked on fix/ingestion-recall-invalidation-769. This provides evidence for later durable completion and recovery work. It does not activate new pipeline/CLI completion, storage receipts, retry guards or automatic replay.

Changes

  • Add detailed transcript outcomes distinguishing complete/empty, partial, salvaged, malformed and unreadable input. Explicit Path objects remain files even when missing. Preserve the existing list parser's functions and format selection.
  • Capture the exact bytes' SHA-256/count and descriptor identities during reading and a final read-only pathname reopen. Later file changes cannot retroactively alter that capture. Exclude paths and message text from diagnostic representations.
  • Keep supported legacy top-level tool calls. Missing/non-string text fields are malformed; known thinking blocks remain intentionally excluded. Unknown/image/audio/document blocks report unrecognized coverage without adding a decoder. Mixed records retain supported text and report missing coverage.
  • Add extraction outcomes with attempted/successful/partial/failed/deferred chunk counts and explicit parse, salvage and fact-limit evidence. Preserve existing provider calls, fact selection/order/deduplication, caps and the list-returning wrapper.
  • Log categorical provider failures without raw exceptions, response text or tracebacks. A valid empty result is distinguishable from failed extraction.

Validation

  • 31 stdlib/fake-provider tests and eight existing recall-invalidation tests pass.
  • 175 original-versus-new extractor combinations match facts, order and provider-call counts. The legacy transcript parser's existing function ASTs are unchanged.
  • Initial negative controls fail when source failure is labeled empty success, response failure is labeled success, or chunk/fact omission coverage is lost.
  • Independent review found three parser gaps in the first freeze despite a passing full suite: a supported tool record was rejected, and missing/unknown blocks could be certified complete. The corrected tests produce eight assertion failures and zero execution errors against that first freeze, then pass with the correction.
  • Exact revised synthetic GPUBox source suite: 2,297 passed, 22 skipped, 3 deselected; 531 subtests passed. Ruff, Python 3.10 syntax, diff, changed-content and commit-metadata privacy checks pass.
  • No native model, external extraction provider, personal database or real transcript is used in these tests.

Windows and dependency corrections

Windows CI exposed a test-loader default-encoding failure and a real capture-identity failure. Source loaders now specify UTF-8. The remaining diagnostic showed only ctime_ns differing between descriptor and pathname observations, matching CPython Windows stat/fstat semantics.

The final identity observation now reopens the pathname read-only and uses fstat without rereading content. It preserves every identity/timestamp comparison, captured hash and byte count. Tests cover genuine timestamp changes, replacement, deletion, denied reopen and handle cleanup. Pre-fix Windows semantics fail the new control; removing ctime checks fails genuine-change controls. A stable capture still does not lock the source against later changes.

This branch also incorporates the #801 MCP/Pydantic dependency correction. Final head f4c091a6992679be24ef9edb11c5e3a6a0ffcbd6 passed the isolated Linux suite above; log SHA256 7462d1d99439832dacdd201a88b7741cb16639fcfce5c259ec73068949ce7f11. Fresh hosted Windows and dependency-boundary CI remain pending.

Limits and next steps

The detailed file API still reads full bytes and decoded text. Its stable flag concerns capture time only, not later appends or completion. Legacy salvage remains uncapped per response before the existing final merge cap. Invalid envelopes can retain legacy-selected facts while reporting failed coverage; partial facts must not be treated as completed extraction.

The existing pipeline and CLI are not yet switched to these outcomes. Durable per-operation receipts, storage commit-then-raise ambiguity, partial extraction recovery, Stop-hook markers and drain/retry coordination remain unresolved work under #768. This draft does not certify ingestion completion or implement archive-level Deep Search.

Draft only. #768 remains open. No main merge, release or live-service change. Historical repository contents are outside the new-change privacy scan.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant