Skip to content

test(bundle): drive the dry-run and config inputs of label-sync through dist/index.js - #248

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-bundle-dry-run-config
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-bundle-dry-run-config

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds three end-to-end cases to the workflow_dispatch label-sync job block of __tests__/bundle/bundle.test.ts, spawning dist/index.js against the fake api:

  • dry-run: 'true' — exit 0, the label-sync (dry-run): would create 17 […], would update 1 [kind/bug (color)], unchanged 0 log line, zero POST/PATCH/DELETE, exactly the config reads + labels read.
  • config: 'Codertocat/shared-config:labels/prow.yaml@v1' — the single explicit read is GET /repos/Codertocat/shared-config/contents/labels%2Fprow.yaml?ref=v1, no .project/.github read, the repo tier still probed at every path, labels created from the explicit source.
  • config: 'http://…' — exit 1, ::error::TypeError: error handling issue comment: Error: config: http:// sources are not allowed, use https://, no writes.

Files: __tests__/bundle/bundle.test.ts only. Exercises src/cronJobs/labelSync.ts (dry-run arm) and src/utils/config.ts loadExplicitTier through the bundle. Disjoint from #238–#246 (commands, cron jobs arms, /meow, fixed/prefixed labels) and #223 (unit-level labelSync fallbacks).

Verified locally @ c48bd6d: npx vitest run __tests__/bundle → 91 passed; npx eslint __tests__/bundle/bundle.test.ts clean.

The https:// form is deliberately not covered (needs a TLS fake), as the issue states.

Related Issue

Closes #247


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

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

…gh dist/index.js

Three cases in the workflow_dispatch label-sync block: dry-run logs the plan
and writes nothing; config=owner/repo:path@ref replaces the organization
lookup and is read at that ref; config=http:// fails the run with no writes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner September 30, 2026 19:02
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 30, 2026
@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.

@github-actions

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] the bundle e2e suite never drives the dry-run and config action inputs through dist/index.js

0 participants