Skip to content

test: add Go + React UI coverage gates and fill test gaps#9989

Merged
mudler merged 1 commit into
mudler:masterfrom
richiejp:chore/test-coverage
May 26, 2026
Merged

test: add Go + React UI coverage gates and fill test gaps#9989
mudler merged 1 commit into
mudler:masterfrom
richiejp:chore/test-coverage

Conversation

@richiejp
Copy link
Copy Markdown
Collaborator

Description

Introduces testing coverage for both Go and React. It adds a check in CI that coverage does not go below the baseline. Also there is a git commit hook which devs can install that
runs the tests with coverage which is useful to force coding agents to actually run the tests.

Notes for Reviewers

  • Strict monotonic Go coverage gate (make test-coverage-check, 45% baseline)
    run in CI; fixes ginkgo dropping all-but-one coverprofile across multiple
    recursive roots, builds with -tags auth, and folds in the in-process
    tests/e2e suite via --coverpkg.
  • React UI e2e coverage (make test-ui-coverage: vite-plugin-istanbul + nyc,
    nix-provided Chromium) plus e2e specs for 6 previously-untested pages, and a
    UI coverage gate (make test-ui-coverage-check) with a small tolerance since
    e2e line coverage jitters ~0.5pp run-to-run.
  • pre-commit hook: lint + coverage on Go changes, Playwright e2e + UI coverage
    gate on react-ui changes; install with make install-hooks.
  • New Go handler tests (settings, branding), hermetic base64 download test.
  • fix(ui): model editor reads vram_display (snake_case), so the VRAM estimate
    renders again; covered by a regression test.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Richard Palethorpe io@richiejp.com

Signed commits

  • Yes, I signed my commits.

- Strict monotonic Go coverage gate (make test-coverage-check, 45% baseline)
  run in CI; fixes ginkgo dropping all-but-one coverprofile across multiple
  recursive roots, builds with -tags auth, and folds in the in-process
  tests/e2e suite via --coverpkg.
- React UI e2e coverage (make test-ui-coverage: vite-plugin-istanbul + nyc,
  nix-provided Chromium) plus e2e specs for 6 previously-untested pages, and a
  UI coverage gate (make test-ui-coverage-check) with a small tolerance since
  e2e line coverage jitters ~0.5pp run-to-run.
- pre-commit hook: lint + coverage on Go changes, Playwright e2e + UI coverage
  gate on react-ui changes; install with make install-hooks.
- New Go handler tests (settings, branding), hermetic base64 download test.
- fix(ui): model editor reads vram_display (snake_case), so the VRAM estimate
  renders again; covered by a regression test.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Richard Palethorpe <io@richiejp.com>
@richiejp richiejp force-pushed the chore/test-coverage branch from 8eea83d to 588dc5d Compare May 26, 2026 08:31
- The user may say they want to build AMD or ROCM instead of hipblas, or Intel instead of SYCL or NVIDIA insted of l4t or cublas. Ask for confirmation if there is ambiguity.
- Sometimes the user may need extra parameters to be added to `docker build` (e.g. `--platform` for cross-platform builds or `--progress` to view the full logs), in which case you can generate the `docker build` command directly.

## Test coverage gate
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would even enforce here for agents to install make install-hooks so automatically enroll themselves when pointed at this repository

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I agree, I'd even consider making the agent submit a hash of the test results, so it can't reason its way out of using the hooks without getting caught.

@mudler mudler merged commit 8d70855 into mudler:master May 26, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants