Skip to content

[quality] cover intake sniff gates, RTF hex escapes, and upload handler branches - #145

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-intake-gaps
Sep 27, 2026
Merged

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

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds pkg/intake/intake_gap_test.go covering the untested guard rails behind /api/intake (files/functions claimed: pkg/intake/intake.go — sniffMatchesDocument, sniffMatchesAudio, parseHexByte, hexVal, StripRTF hex escapes, cleanText, MaxUploadBytes, Error.Error, HandleUpload):

  • table tests for both sniff gates — every extension arm, accept and reject sides (the type-confusion gate was 50%/44%)
  • StripRTF \'xx hex-escape decoding plus direct parseHexByte nibble-range/reject cases (both 0%)
  • cleanText CR-strip, blank-line-cap, and whitespace-collapse branches
  • MaxUploadBytes DIBS_INTAKE_MAX_MB valid/invalid/negative override branches
  • HandleUpload success, unsupported-type (*Error propagation), oversize, and non-multipart branches

pkg/intake coverage: 68.8% → 88.3%. Test-only change; no production code touched.

Related Issue

Closes #144


Filed by quality agent (hold-gated mode). Human review required.

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

…ranches

pkg/intake was 68.8% covered with the upload type-confusion gate
(sniffMatchesDocument 50%, sniffMatchesAudio 44%) and the RTF hex-escape
decoder (parseHexByte/hexVal 0%) untested — directly behind the
/api/intake surface hardened by #142. Adds table tests for both sniff
gates (every extension arm, accept+reject), StripRTF \'xx escapes,
cleanText whitespace branches, MaxUploadBytes env override, Error.Error,
and HandleUpload branches (success, unsupported type, oversize, and
non-multipart). pkg/intake: 68.8% -> 88.3%.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hive-quality <sec-check@hive.kubestellar.io>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 26, 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

@hivecommons-hive hivecommons-hive Bot added quality Created by Hive for agent-filed issue provenance agent/quality Created by Hive for agent-filed issue provenance hive/hosted-available-oke-11-placeholder-r05x Created by Hive for agent-filed issue provenance labels Sep 26, 2026
@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 26, 2026
@hivecommons-hive hivecommons-hive Bot removed hive/hosted-available-oke-11-placeholder-r05x Created by Hive for agent-filed issue provenance hold labels Sep 27, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 101ad96 into main Sep 27, 2026
5 of 6 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-intake-gaps branch September 27, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/quality Created by Hive for agent-filed issue provenance dco-signoff: yes Indicates the PR's author has signed the DCO. quality Created by Hive for agent-filed issue provenance 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] intake upload sniff gates, RTF hex decoding, and HandleUpload branches untested (pkg/intake 68.8%)

0 participants