Skip to content

[quality] labelCatalog.desiredLabels' custom-section, require_matching_label and dedup arms are never driven through dist/index.js #350

Closed

Description

@hivecommons-hive

Finding

src/utils/labelCatalog.ts desiredLabels() composes the label set the label-sync cron job creates. Three of its arms are exercised by the unit suite only; no bundle (end-to-end) test reaches them through the committed dist/index.js:

  • line 52 — a labels.<key> section outside the command registry (e.g. labels.team) emitted as <key>/<value>
  • line 61 — one label per require_matching_label[].missing_label (with the needs-* default color ededed)
  • line 68 — the case-insensitive dedup (first definition wins) when two rules or sections spell the same label

__tests__/bundle/bundle.test.ts' three workflow_dispatch label-sync cases all use the same orgConfig with a kind section only, so the shipped bundle has never been shown to create a custom section's labels or a needs-* label.

Evidence

  • Unit: npx vitest run --coverage on main @ 3fc21f2 — labelCatalog.ts 100 % stmts / 100 % branches / 100 % funcs / 100 % lines (__tests__/utils/labelCatalog.test.ts).
  • End-to-end: npm run test:coverage:e2e on main @ 3fc21f2 (6 files / 142 tests) — labelCatalog.ts 32/35 lines, uncovered 52, 61, 68; repository e2e 1855/2381 lines (77.9 %).

Unit and e2e evidence are reported separately (see #235 for why they cannot be line-merged).

Recommendation

  • add a bundle test that runs jobs: label-sync against a configuration with a non-registry section, two require_matching_label rules sharing a missing_label in different case, and asserts the POST /labels sequence and bodies (team/docs with the lowercased color, needs-kind with ededed, no duplicate)

Cluster: labelCatalog.desiredLabels via label-sync. Disjoint from held #312 (labelSync.ts refused-write / description-drift arms, labelSyncFailureArms.test.ts) and #242 (cron jobs input, cronJobsInput.test.ts).

Priority

  • Impact: medium — the label-sync job's main output for a configured repository is only verified in isolation, not through the shipped bundle
  • Effort: low

Filed by quality agent (hold-gated mode)


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

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

Activity

  1. github-actions commented on Oct 6, 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 6, 2026
  3. added
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 7, 2026
  4. hivecommons-hive commented on Oct 7, 2026

    @hivecommons-hive
    ContributorAuthor

    task-list sweep: 0 of 1 items ticked. Not closing yet — outstanding boxes remain.

    Outstanding items:

    • 🔲 add a bundle test that runs jobs: label-sync against a configuration with a non-registry section, two require_matching_label rules sharing a missing_label in different case, and asserts the POST /labels sequence and bodies (team/docs with the lowercased color, needs-kind with ededed, no duplicate)

    Merged PRs referencing this issue so far:

    This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.

  5. hivecommons-hive commented on Oct 7, 2026

    @hivecommons-hive
    ContributorAuthor

    Verified on main @ c18e968 with npm run test:coverage:e2e (22 files / 214 tests): src/utils/labelCatalog.ts 100 % lines through dist/index.js (labelSyncCatalog.test.ts); L52, L61 and L68 are all hit.

    Resolved by #351; closing.


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

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

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 provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions