Skip to content

fix: stop unit-test runaway render loops and misreported shard timeouts - #24608

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-24572
Oct 26, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-24572

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #24572, Closes #24575.

Root cause

#24576 raised the nightly unit-test cap to 7200s, but the 2026-10-25 nightly (run 40167737860) still reported ⏰ TIMEOUT (4916s) — 120 minute limit exceeded, well under the cap. The suite was not slow. Individual shards were hanging or OOMing:

  • Shards 26, 34, and 40 hit the 900s per-shard cap from 🐛 fix: bound each nightly unit-suite vitest shard so one hung shard cannot exhaust the 2h cap #24598. That script then exited with the shard's 124 code, and run-all-tests.sh reports 124 as a suite-wide wall-clock timeout. Because of that mislabel, the fix so far was to raise the cap.
  • Shard 19 (auth.test.tsx) and the 10-22/10-23/10-24 nightlies show FATAL ERROR: Ineffective mark-compacts near heap limit / worker SIGABRT in the same files (auth, MissionBrowser, useUpgradeStateMachine, UnifiedStatsSection). Hourly coverage shard 5 shows the same thing.
  • One confirmed mechanism: the global react-i18next mock in web/src/test/setup.ts built a new t on every render. Real react-i18next memoizes t. Any effect with t in its deps re-ran on every render. UnifiedStatsSection's [storageKey, t] effect calls setCustomBlocks(JSON.parse(saved)) (a new array each time), so tests that seed -blocks loop forever until the heap runs out.
  • cache.config.test.ts had an empty describe('initPreloadedMeta'). Vitest 5 fails it with No test found in suite initPreloadedMeta on every run. The same functions are covered in cache-coverage2.test.ts.

The Go toolchain part of #24575 (go.mod requires go >= 1.26.10) was already fixed by #24528. The latest nightly runs GO_VERSION: 1.26.10, and the only failing suite left is unit-test.

Changes

  • web/src/test/setup.ts, MissionBrowser.test.tsx (both): useTranslation now returns one stable { t, i18n } object.
  • cache.config.test.ts: removed the empty describe.
  • scripts/unit-test.sh: a shard that hangs before completing now exits 1 (a test failure) instead of 124, so it shows up as a hung shard rather than a fake suite timeout.

Not yet fixed / risks

  • I found no t-dependency loop in auth.test.tsx (clears kc-has-session on 401) or useUpgradeStateMachine.test.tsx, which also OOM. If the next nightly still shows those files, they need their own follow-up.
  • unit-test.sh's pass check (Errors +[1-9][0-9]* errors) does not match the singular Errors 1 error. That is how worker OOM crashes were reported as passing before 10-23. I left it unchanged here to keep this PR focused.
  • Nothing was run locally (not allowed on this pod); CI is the only verification.

— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88

- Return a stable t/i18n identity from the react-i18next test mocks (global
  setup.ts and both MissionBrowser test files). A fresh t per render re-fired
  every effect depending on t; UnifiedStatsSection's custom-block restore then
  looped forever, OOMing or hanging nightly shards.
- Remove the empty describe('initPreloadedMeta') in cache.config.test.ts,
  which Vitest 5 fails with 'No test found in suite' (covered in
  cache-coverage2.test.ts).
- Map a hung-shard timeout in unit-test.sh to exit 1 so run-all-tests.sh no
  longer reports it as a suite-wide wall-clock timeout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 26, 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 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

@netlify

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit db9e197
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6ade9f6c9f077a0f839e8e9e
😎 Deploy Preview https://deploy-preview-24608.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.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @hivecommons-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.

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Oct 26, 2026
@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 26, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 26, 2026
@github-actions

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

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.

@hivecommons-hive
hivecommons-hive Bot merged commit 2a96da4 into main Oct 26, 2026
55 of 56 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-24572 branch October 26, 2026 00:53
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#24608db9e197` sha256:9a5869a3781716ad7efb02894ded0ff844803789cd6c65d17dc577ee2abd2103 — download from the dashboard or `hivectl review evidence #24608`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge build verification passed ✅

Both Go and frontend builds compiled successfully against merge commit 2a96da495526c4e190c26fffa4032eac8affd0b2.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 2a96da495526c4e190c26fffa4032eac8affd0b2
Specs run: Missions.spec.ts mission-import.spec.ts smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/40251491235

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 author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[shared-ci] go test ./... failing across kubestellar/console Nightly regression: unit-test

0 participants