Skip to content

fix(artifact): ARTIFACT task & embedded-extraction reliability + verification harness#2272

Draft
pirhoo wants to merge 19 commits into
mainfrom
audit/artifact-embedded-reliability
Draft

fix(artifact): ARTIFACT task & embedded-extraction reliability + verification harness#2272
pirhoo wants to merge 19 commits into
mainfrom
audit/artifact-embedded-reliability

Conversation

@pirhoo

@pirhoo pirhoo commented Jul 16, 2026

Copy link
Copy Markdown
Member

Makes the ARTIFACT task reliable for embedded-document retrieval and adds a verification harness. Paired with extract-lib 9.15.5, a real 66 MB OST now yields 289/289 embeds retrievable (up from 16). Do not merge before extract-lib 9.15.5 is published to Maven.

  • feat: ArtifactCoverageChecker + ArtifactCoverageMain to audit manifest + source completeness of any project
  • feat: count legitimately-empty embeds separately from coverage holes
  • fix: report per-document production failures in the end-of-run summary (silent → loud)
  • fix: terminate ARTIFACT on an enqueue poison pill and drain residual poison so re-runs/kills aren't silently zeroed
  • fix: fail loudly when a polled document's raw bytes were not produced
  • fix: try the legacy digester in SERVER mode so legacy-keyed embeds stay retrievable
  • test: NastyCorpus fixtures, end-to-end coverage test, and chaos tests (kill/resume, parallelism, corrupt member)
  • chore: bump extract to 9.15.5

@pirhoo
pirhoo force-pushed the audit/artifact-embedded-reliability branch from 1fe2e54 to afe08cf Compare July 16, 2026 16:20
pirhoo added 16 commits July 16, 2026 17:13
… corrupt members

killed_run_then_rerun_converges_to_full_coverage and corrupt_member_is_reported_visibly_and_siblings_are_covered pass; parallelism_4_produces_identical_coverage is committed RED as an F1 (embedded-extraction race) audit finding, per the branch's chaos-test policy.
executor.shutdownNow() only requests shutdown; it does not wait for
worker threads to unwind. On the cancellation path, cancel() interrupts
the task thread first, so future.get() throws InterruptedException and
reaches the finally block before workers have actually stopped. That
left a race where drainResidualPoison() could run concurrently with a
worker mid-relay of STRING_POISON (dequeued, about to offer() it back),
letting a stale poison slip past the drain and strand the next run.

Wait for the pool to terminate (bounded, 30s) before draining, mirroring
the awaitTermination precedent in IndexTask. The wait's own
InterruptedException is caught locally and re-interrupts the thread so
the original InterruptedException from future.get() still propagates
unmasked.
…age holes

A terminal manifest entry + a readable (even 0-byte) source is a correct
representation of an empty embed on real OSTs (empty mail-item nodes, empty
message bodies), not a loss — extract-lib's atomic writes preclude
truncation-to-zero for our own writer. Redefine COVERED as terminal manifest
+ getSource not throwing; track 0-byte-but-present docs in a new
Report.empties() tally surfaced as an FYI line in summary(), instead of
flagging them as holes. Report.complete() and ArtifactCoverageMain's exit
code stay gated on holes only, so empties-only runs still exit 0.
@pirhoo
pirhoo force-pushed the audit/artifact-embedded-reliability branch from afe08cf to 528a769 Compare July 16, 2026 17:14
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