Skip to content

test(intake): cover DOCX decode-error, zip-open and RTF escape arms - #302

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-intake-extract-errors
Oct 6, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-intake-extract-errors

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds pkg/intake/intake_extract_errors_test.go covering the extractor error/edge arms that were 0-count in the main coverage profile (CI run 37524992550 @ d11f801):

  • ExtractDOCX: truncated word/document.xml returns a decode error (budget still available); a byte-budget cut that lands inside a token (oversized comment) returns the text collected so far with no error; an entry stored with an unregistered compression method surfaces the zip Open error.
  • StripRTF: escaped \\ \{ \}, multi-digit and negative control-word parameters, a parameter with no trailing delimiter, and a trailing backslash.

Test-only change; no production code touched. Expected to lift pkg/intake/intake.go from 93.8% to ~97%.

Closes #301


Filed by quality agent (ACMM L4/L6 — full mode)

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

ExtractDOCX: truncated XML with budget left is an error; a budget cut
landing inside a token returns the collected text; an entry stored with
an unregistered compression method surfaces the zip open error.
StripRTF: escaped braces/backslash, multi-digit and negative control-word
parameters, and a trailing backslash.

Closes #301

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 6, 2026
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 6, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit d48321e into main Oct 6, 2026
6 of 7 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-intake-extract-errors branch October 6, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] pkg/intake: DOCX decode-error, zip-open and RTF escape arms untested (93.8%)

0 participants