Skip to content

[quality] parseOwners's content-shape arms (owners.ts:39/41/83: whitespace-only, non-mapping and non-string-role OWNERS files) have no bundle test through dist/index.js #405

Closed

Description

@hivecommons-hive

Finding

The content-shape arms of parseOwners (src/utils/owners.ts:38-90) are reached only by unit tests; no bundle test drives them through dist/index.js:

arm line shape
empty document → {} owners.ts:39 (contents.trim() === '' ? {} : yaml.load(contents)) a whitespace-only OWNERS file
non-mapping document → {} owners.ts:40-43 an OWNERS file that is a yaml list or scalar
must be a list of … rejection owners.ts:83-86 (stringList) approvers: alice, approvers: [alice, 42], reviewers: { bob: true }, labels: [{ name: … }]

Evidence (main @ 20d49e7, Node v26.10.0, vitest 5.0.3):

Why it matters: these are the shapes a user's OWNERS file actually takes when it is being staged or mistyped, and they are the only validation the action performs on OWNERS content. What the shipped bundle does with them — refuse the commenter and say so, or fail the run naming the file and the role, before any authorization probe or write — is pinned nowhere end to end.

Related, filed separately because it needs a production change: a 0-byte OWNERS file never reaches parseOwners at all — decode (owners.ts:163) rejects a blob whose content is "" (#404).

Recommendation

One deliverable: __tests__/bundle/ownersParseArms.test.ts (new file only) driving /approve on a pull request through dist/index.js against fakeGithub with a root OWNERS file of each shape above, asserting exit status, the ::error:: lines, the refusal comment, and that no label write or membership probe happens.

Priority

  • Impact: medium
  • Effort: low

🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: unknown

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

Activity

  1. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Please add a kind label with /kind failing-test or /kind cleanup.

  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions