Skip to content

[scanner] fix: split oversized lib tests - #22784

Closed
kubestellar-hive[bot] wants to merge 2 commits into
mainfrom
scanner/fix-22773
Closed

[scanner] fix: split oversized lib tests#22784
kubestellar-hive[bot] wants to merge 2 commits into
mainfrom
scanner/fix-22773

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Part of #22749

— hive: agent=scanner backend=copilot model=auto

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Aug 24, 2026
@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit df1f098
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a8f48f9ffa49d0008c7c130
😎 Deploy Preview https://deploy-preview-22784.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@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 mikespreitzer 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

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ Playwright Tests Failed

📊 View Full Report

Download the playwright-report artifact from the workflow run for screenshots and detailed traces.

To view the report locally:

# Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 2): 3) [chromium] › e2e/enterprise-compliance.spec.ts:73:7 › Enterprise Compliance Portal › Vertical Dashboards › navigates to FedRAMP vertical 
Test (chromium, shard 2): 3) [chromium] › e2e/enterprise-compliance.spec.ts:73:7 › Enterprise Compliance Portal › Vertical Dashboards › navigates to FedRAMP vertical 
Test (chromium, shard 2): 2) [chromium] › e2e/enterprise-compliance.spec.ts:73:7 › Enterprise Compliance Portal › Vertical Dashboards › navigates to NIST 800-53 vertical 
Test (chromium, shard 2): 2) [chromium] › e2e/enterprise-compliance.spec.ts:73:7 › Enterprise Compliance Portal › Vertical Dashboards › navigates to NIST 800-53 vertical 
Test (chromium, shard 2): 2) [chromium] › e2e/enterprise-compliance.spec.ts:73:7 › Enterprise Compliance Portal › Vertical Dashboards › navigates to NIST 800-53 vertical 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

Comment thread web/src/lib/__tests__/analytics-coverage-tracking.errors.test.ts Fixed
Comment thread web/src/lib/__tests__/analytics-coverage-tracking.errors.test.ts Fixed
@github-actions

Copy link
Copy Markdown
Contributor

❌ Playwright Tests Failed

📊 View Full Report

Download the playwright-report artifact from the workflow run for screenshots and detailed traces.

To view the report locally:

# Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 1): Process completed with exit code 1.
Test (chromium, shard 1): web/[chromium] › e2e/compliance/card-cache-compliance.spec.ts took 5.1m
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

3 similar comments
@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 1): Process completed with exit code 1.
Test (chromium, shard 1): web/[chromium] › e2e/compliance/card-cache-compliance.spec.ts took 5.1m
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 1): Process completed with exit code 1.
Test (chromium, shard 1): web/[chromium] › e2e/compliance/card-cache-compliance.spec.ts took 5.1m
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 1): Process completed with exit code 1.
Test (chromium, shard 1): web/[chromium] › e2e/compliance/card-cache-compliance.spec.ts took 5.1m
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:388:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:520:1 › cold-nav — first visit to each dashboard via sidebar 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@github-actions

Copy link
Copy Markdown
Contributor

Auto Test Generator

The following new files have no corresponding test file:

  • web/src/components/cards/quantum/QuantumCircuitControls.tsx
  • web/src/components/cards/quantum/QuantumStatusTabs.tsx
  • web/src/components/cards/quantum/useQuantumMutations.ts
  • web/src/components/cards/rss/hooks/useRSSFeedData.ts
  • web/src/components/cards/rss/useRSSFeedFetcher.ts

Please add tests or apply the needs-tests label to track this PR.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

✅ Test Coverage Check

All new source files in this PR have corresponding test files.

Checked web/src/hooks/ and web/src/components/ against origin/main.

@github-actions github-actions Bot added the needs-tests PR adds source files without corresponding tests label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

♿ Accessibility Audit (WCAG 2.1 AA)

✅ No WCAG 2.1 AA violations detected in audited routes.


Powered by axe-core. Target: WCAG 2.1 AA compliance.

Comment thread web/src/components/cards/__tests__/DynamicCard.tier1.api.test.tsx Fixed
Comment thread web/src/components/cards/__tests__/DynamicCard.tier1.api.test.tsx Fixed
Comment thread web/src/components/cards/__tests__/DynamicCard.tier1.api.test.tsx Fixed
Comment thread web/src/components/cards/__tests__/DynamicCard.tier2.test.tsx Fixed
Comment thread web/src/components/cards/__tests__/DynamicCard.tier2.test.tsx Fixed
Comment thread web/src/components/cards/__tests__/DynamicCard.tier2.test.tsx Fixed
Comment thread web/src/components/cards/__tests__/DynamicCard.tier2.test.tsx Fixed
Comment thread web/src/contexts/__tests__/AlertsContext.evaluation.test.tsx Fixed
Comment thread web/src/contexts/__tests__/AlertsContext.persistence.test.tsx Fixed
Comment thread web/src/hooks/mcp/__tests__/shared-websocket.connect-fetch.test.ts Fixed
@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: All Cards TTFI (Hard Gate), App Visual Regression, Build Frontend, build (linux/amd64, ubuntu-24.04, amd64), build (linux/arm64, ubuntu-24.04-arm, arm64), build-gate, fullstack-smoke

Raw failure evidence (from check-run annotations):

All Cards TTFI (Hard Gate): No files were found with the provided path: web/e2e/test-results/ttfi-report.json
All Cards TTFI (Hard Gate): 'React' is declared but its value is never read.
All Cards TTFI (Hard Gate): 'LARGE_CIRCUIT_QASM' is declared but its value is never read.
All Cards TTFI (Hard Gate): 'Play' is declared but its value is never read.
All Cards TTFI (Hard Gate): 'Loader2' is declared but its value is never read.
All Cards TTFI (Hard Gate): Cannot find name 'is32Qubit'.
All Cards TTFI (Hard Gate): Module '"../../../hooks/useQASMFiles"' declares 'QASMFile' locally, but it is not exported.

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: All Cards TTFI (Hard Gate), App Visual Regression, Build Frontend, build (linux/amd64, ubuntu-24.04, amd64), build (linux/arm64, ubuntu-24.04-arm, arm64), build-gate, fullstack-smoke

Raw failure evidence (from check-run annotations):

build-gate: 'React' is declared but its value is never read.
build-gate: 'LARGE_CIRCUIT_QASM' is declared but its value is never read.
build-gate: 'Play' is declared but its value is never read.
build-gate: 'Loader2' is declared but its value is never read.
build-gate: Cannot find name 'is32Qubit'.
build-gate: Module '"../../../hooks/useQASMFiles"' declares 'QASMFile' locally, but it is not exported.
build (linux/amd64, ubuntu-24.04, amd64): buildx failed with: ERROR: failed to build: failed to solve: process "/bin/sh -c if [ -d dist ] && [ -n \"$(ls -A dist 2>/dev/null)\" ]; then       echo \"Using pre-built frontend dist/ — skipping npm ci and build\";     else       for attempt in 1 2 3; do

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

1 similar comment
@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: All Cards TTFI (Hard Gate), App Visual Regression, Build Frontend, build (linux/amd64, ubuntu-24.04, amd64), build (linux/arm64, ubuntu-24.04-arm, arm64), build-gate, fullstack-smoke

Raw failure evidence (from check-run annotations):

build-gate: 'React' is declared but its value is never read.
build-gate: 'LARGE_CIRCUIT_QASM' is declared but its value is never read.
build-gate: 'Play' is declared but its value is never read.
build-gate: 'Loader2' is declared but its value is never read.
build-gate: Cannot find name 'is32Qubit'.
build-gate: Module '"../../../hooks/useQASMFiles"' declares 'QASMFile' locally, but it is not exported.
build (linux/amd64, ubuntu-24.04, amd64): buildx failed with: ERROR: failed to build: failed to solve: process "/bin/sh -c if [ -d dist ] && [ -n \"$(ls -A dist 2>/dev/null)\" ]; then       echo \"Using pre-built frontend dist/ — skipping npm ci and build\";     else       for attempt in 1 2 3; do

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

Split 7 oversized test files (>500 lines) into 23 focused test modules:

**Issue #22773 — lib tests:**
- kubectlProxy.additional.resources (915 → 4 files)
- analytics-coverage-tracking (908 → 4 files)
- worker.module (867 → 3 files)
- kubectlProxy.resources.transform (865 → 3 files)
- ModalRuntime-coverage (857 → 3 files)

**Issue #22774 — component & context tests:**
- DynamicCard (890 → 4 files)
- AlertsContext.additional (851 → 2 files)

All resulting files are <500 lines. Test coverage maintained.

Fixes #22773
Fixes #22774

Signed-off-by: GitHub Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added tier/1-lightweight and removed needs-tests PR adds source files without corresponding tests labels Aug 26, 2026
import userEvent from '@testing-library/user-event'
import { Tier1CardRuntime } from '../DynamicCard'
import type { DynamicCardDefinition } from '../../../lib/dynamic-cards/types'
import { BTN } from '../../../test-utils/buttonLabels'
* new URL() instead of includes() to prevent CodeQL
* js/incomplete-url-substring-sanitization false positives (#9119).
*/
function srcHasHostname(el: Element, hostname: string): boolean {
* new URL() instead of includes() to prevent CodeQL
* js/incomplete-url-substring-sanitization false positives (#9119).
*/
function srcHasHostname(el: Element, hostname: string): boolean {
@@ -0,0 +1,400 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
// ---------------------------------------------------------------------------

/** Maximum number of messages to queue while waiting for database init. */
const MAX_PENDING_MESSAGES = 1000
}

// Replicate processMessage for dispatch testing
function processMessage(
Comment on lines +22 to +26
import {
ModalRuntime,
registerSectionRenderer,
parseModalYAML,
} from '../ModalRuntime'
* - parseModalYAML throws
*/
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { render, screen, fireEvent } from '@testing-library/react'
Comment on lines +22 to +26
import {
ModalRuntime,
registerSectionRenderer,
parseModalYAML,
} from '../ModalRuntime'
@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: All Cards TTFI (Hard Gate), App Visual Regression, Build Frontend, build (linux/amd64, ubuntu-24.04, amd64), build (linux/arm64, ubuntu-24.04-arm, arm64), build-gate, fullstack-smoke

Raw failure evidence (from check-run annotations):

All Cards TTFI (Hard Gate): No files were found with the provided path: web/e2e/test-results/ttfi-report.json
All Cards TTFI (Hard Gate): ',' expected.
All Cards TTFI (Hard Gate): '>' expected.
All Cards TTFI (Hard Gate): Unterminated regular expression literal.
All Cards TTFI (Hard Gate): Property assignment expected.

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

1 similar comment
@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: All Cards TTFI (Hard Gate), App Visual Regression, Build Frontend, build (linux/amd64, ubuntu-24.04, amd64), build (linux/arm64, ubuntu-24.04-arm, arm64), build-gate, fullstack-smoke

Raw failure evidence (from check-run annotations):

All Cards TTFI (Hard Gate): No files were found with the provided path: web/e2e/test-results/ttfi-report.json
All Cards TTFI (Hard Gate): ',' expected.
All Cards TTFI (Hard Gate): '>' expected.
All Cards TTFI (Hard Gate): Unterminated regular expression literal.
All Cards TTFI (Hard Gate): Property assignment expected.

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@github-actions

Copy link
Copy Markdown
Contributor

❌ Playwright Tests Failed

📊 View Full Report

Download the playwright-report artifact from the workflow run for screenshots and detailed traces.

To view the report locally:

# Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 1): Process completed with exit code 1.
Test (chromium, shard 1): web/[chromium] › e2e/compliance/card-cache-compliance.spec.ts took 5.1m
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:390:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:390:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:521:1 › cold-nav — first visit to each dashboard via sidebar 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:521:1 › cold-nav — first visit to each dashboard via sidebar 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@kubestellar-hive

Copy link
Copy Markdown
Contributor Author

🛑 Fix loop escalated — human attention needed

This PR has failed CI on 1 distinct fix attempts (new commits, still red). The hive has stopped dispatching further automated fixes for it.

Failing checks: Test (chromium, shard 1), Test (chromium, shard 2), Test (chromium, shard 3), build-gate

Raw failure evidence (from check-run annotations):

Test (chromium, shard 1): Process completed with exit code 1.
Test (chromium, shard 1): web/[chromium] › e2e/compliance/card-cache-compliance.spec.ts took 5.1m
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:390:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 1): 1) [chromium] › e2e/compliance/interaction-compliance.spec.ts:390:3 › Interaction Compliance › sidebar collapse/expand 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:521:1 › cold-nav — first visit to each dashboard via sidebar 
Test (chromium, shard 3): 1) [chromium] › e2e/perf/dashboard-nav.spec.ts:521:1 › cold-nav — first visit to each dashboard via sidebar 

Remove the needs-human label after addressing the root cause to return the PR to the automated fix lane.

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 27, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@clubanderson

Copy link
Copy Markdown
Collaborator

Superseded: main already contains equivalent splits of every file this PR touched except DynamicCard.test.tsx — AlertsContext.additional (#22820-era split), analytics-coverage-tracking (#22800), kubectlProxy resources+transform (#22825 et al), worker.module, and ModalRuntime-coverage are all already split on main with identical test counts. The one remaining novel piece, the DynamicCard.test.tsx split, continues in the dedicated PR #22826. Closing to avoid duplicate work.

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

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. needs-human needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. scanner-checks-failing size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tier/1-lightweight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants