Skip to content

πŸ› governor-pr-models-ui test: one extractFunction, so the per-model PR list test compiles - #18831

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
Danathar:fix/governor-ui-test-dup-extractor
Nov 17, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
Danathar:fix/governor-ui-test-dup-extractor

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

server-tests is red on every open v5 PR because dashboard/test/governor-pr-models-ui.test.js no longer compiles one of its tests. This removes a duplicate helper in that file; no product code changes.

Cause

Two PRs merged into v5 today each added a top-level function extractFunction(name) to the same test file:

Function declarations hoist, so the later one wins for the whole file. The per-model PR list test then extracts loadGovernorPRModelPRs without async, and vm.runInContext throws SyntaxError: await is only valid in async functions.

CI output: not ok 38 - Opening a model row requests model=… and lists its PRs with GitHub links in the server-tests job (Dashboard Lint).

What changed

  • Removed the second extractFunction. The remaining one handles both callers; the per-repository test only extracts governorPRModelSliceDetail, which is not async, so its result is unchanged.

Tests

node --test dashboard/test/governor-pr-models-ui.test.js: 5/5 pass locally (default env and TZ=UTC LANG=C). Before the change the per-model PR list test failed with the same SyntaxError as CI.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

Two PRs that merged into v5 each added a top-level extractFunction to
this file. Function hoisting makes the later one win, and it slices from
'function', dropping 'async' from loadGovernorPRModelPRs, so the
per-model PR list test fails to compile (await outside an async
function) and server-tests is red on every v5 PR. Keep the first
helper, which keeps 'async'; the per-repository test's use is the same.

Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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 hanthor 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 17, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 0b10ab4 into hivecommons:v5 Nov 17, 2026
61 of 62 checks passed
@hivecommons-hive

hivecommons-hive Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#18831b62b4e6` sha256:c87ac918a20eaa03cce7a8d5af4ff44dc743178aacd11cc0b37728140ae3dc5a β€” download from the dashboard or `hivectl review evidence #18831`.

merged by Hive trusted-author auto-merge: author Danathar holds role owner and GitHub permission maintain on repo; CI green at b62b4e6.

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant