Skip to content

feat(fusion): parameter sweep for doctor validation - #44

Open
adamrtalbot wants to merge 55 commits into
mainfrom
COMP-POC/fusion-doctor-parameter-sweep
Open

feat(fusion): parameter sweep for doctor validation#44
adamrtalbot wants to merge 55 commits into
mainfrom
COMP-POC/fusion-doctor-parameter-sweep

Conversation

@adamrtalbot

Copy link
Copy Markdown
Collaborator

Why

Instead of maintaining separate low/recommended/high threshold profiles per cloud provider, we can validate fusion doctor across a range of parameter values using a single sweep. This simplifies configuration and provides broader test coverage.

What

  • Replace 12 tiered cloud profiles (low/recommended/high x 4 clouds) with 3 simple cloud profiles (AWS/GCP/Azure)
  • Add parameter sweep support: comma-separated values for kernel version, memory, disk, CPU, and open files are expanded into all combinations
  • Add comprehensive nf-test suite covering the parameter sweep workflow
  • Expose sweep parameters in nextflow_schema.json with descriptions and defaults
  • Refactor main.nf to generate parameter combinations and run fusion doctor across the full matrix

Generated with Claude Code

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
…3b0a0e59d95a6`

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
…tion

- Add --template argument to generate_fusion_report.py
- Update TEST_FUSION_REPORT process to pass template file path directly
- Removes need to copy template to /usr/local/assets/templates
- Makes template handling more flexible and container-agnostic
The real `fusion doctor` binary outputs a different JSON schema than the
mock: `checks` as a list (not a dict), `check_summary.overall` instead
of `summary.status`, and `fusion_version` instead of `version`. The
template and merge logic now handle both formats.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
…urce sections

Display rich system environment, storage, and resource limit data from
fusion doctor JSON. Improve UX with native details/summary elements,
structured check details, filesystem filtering/sorting, thousands
separators, copy-to-clipboard buttons, and localized timestamps.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Rewrite HTML template (v3) adopting Seqera Platform design tokens,
card-based layout, and kv-grid patterns. Add Instance card with cloud
metadata, humanized check names, bucket URI in check titles, trimmed
sub-check messages, consistent used/total usage framing, and clean
Jinja whitespace output.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Add check label mappings for nvme, cpu_cores, open_files, and
kernel_version checks introduced in fusion doctor schema 1.2.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Add three new reference profile parameters for fusion doctor checks:
- nvme_required: false (low), true (recommended/high)
- cpu_cores_min: 2/4/16 matching target instance vCPU counts
- open_files_min: 65536/131072/1048576 (high matches docs ulimit)

Bump AWS high tier disk_gb_min from 474 to 950 to align with
.4xlarge instances (16 vCPUs) instead of .2xlarge (8 vCPUs).

Wire new params through nextflow.config defaults and main.nf
YAML builder.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Add validation logic to prevent multiple Fusion profiles from being
specified simultaneously. When multiple fusion_* profiles are detected,
the pipeline now exits with a clear error message.

This ensures that the reference profile passed to the fusion doctor
process contains consistent, non-conflicting thresholds from a single
well-defined profile (e.g., fusion_aws_recommended) rather than merged
parameters from multiple profiles that could overwrite each other.

The validation:
- Parses workflow.profile to identify all fusion_* profiles
- Exits with error if more than one Fusion profile is detected
- Provides helpful guidance on correct usage
- Allows normal operation with 0 or 1 Fusion profile
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Use brand color (#160f26) background with white text and icons,
consistent with cloud.seqera.io top nav style.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
- Passed card gets green background/text, failed gets red (when > 0)
- Overall status badge moved into the overview grid as first tile
- Total and skipped cards stay neutral

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
…details

Replace check-item cards with a compact table (Status, Check, Category,
Message) and a toggle button to expand/collapse technical details per row.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
- Remove duplicate status badge from header (now in overview grid)
- Add subtle row tinting for warn/fail checks in validation table
- Rename "Category" column to "Severity" for clarity
- Make entire check row clickable to toggle details (not just button)
- Animate expand button rotation on toggle

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Rebuild the HTML report with Seqera Platform design tokens, split check
tables (system/storage/bucket), overview metrics, collapsible
environment cards, FontAwesome icons, access tags, and remediation
callouts.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Add keyboard navigation, ARIA attributes, screen reader support,
semantic heading hierarchy, warn badge WCAG AA contrast, Jinja2
`check_row` macro deduplication, and `humanize` package integration.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
alberto-miranda and others added 13 commits March 9, 2026 11:37
- Full-bleed header/footer backgrounds with content constrained to 1200px
- Resource limits: replace hardcoded open_files threshold with dynamic
  check data from doctor JSON
- Generalize resource limit rows with collapsible details, status colors,
  and expand chevron matching the check-row pattern
- Fix mobile: use col-expand class instead of generic last-child hiding

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Match the common Linux default soft limit so vanilla systems are not
flagged at the lowest validation tier.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Example JSON profiles (passed, degraded, failed) and corresponding
generated HTML reports for development and review.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
The collapsible details and remediation are already shown in the System
Checks section; resource limits now only shows values with status color
and Low tag.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Adds a boolean parameter (disabled by default) that passes --redact to
fusion doctor, stripping hostnames, IPs, bucket names, etc. from the
diagnostic output.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
… boundary

Let errors propagate from library code instead of returning error dicts.
Bad file paths now fail fast with a clean error message instead of
producing partial results.

Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Replace tiered fusion profiles (low/recommended/high per cloud) with
simple per-cloud profiles and comma-separated sweep parameters. The
FUSION_DOCTOR workflow builds a Cartesian product of all sweep values
(kernel, memory, disk, NVMe, CPU, open files) and runs fusion doctor
once per combination, collecting all reports into a single consolidated
HTML/JSON output.

Generated by Claude Code
Base automatically changed from COMP-1319/generate-doctor-html-report to main March 13, 2026 16:23
Comment thread README.md Outdated
Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
@adamrtalbot

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

@alberto-miranda

Copy link
Copy Markdown
Contributor

@adamrtalbot I noticed that you are updating this branch and this line in the description concerns me:

  • Replace 12 tiered cloud profiles (low/recommended/high x 4 clouds) with 3 simple cloud profiles (AWS/GCP/Azure)

Please do not remove the tiered profiles, because we rely on them in the public Fusion docs. It would not be a problem to do the parameter sweep in addition to that if you think it's valuable. Thanks!

…ML report changes

Co-authored-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 5e234d4. The branch now incorporates:

  • Dedicated fusion-doctor container image (cr.seqera.io/public/fusion/doctor:1.0.0-dev-260420150843)
  • Updated HTML report template and generator from main
  • Pinned GitHub Actions hashes
  • Correct test task counts (15/14 for non-fusion tests)

Our parameter sweep logic (3 simple cloud profiles, Cartesian product sweep) is preserved.

@adamrtalbot

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI added 2 commits July 22, 2026 13:04
- Resolve nextflow.config: add gpu_container, rename fusion params to match
  updated fusion-doctor schema (memory_capacity_gb_min, disk_capacity_gb_min,
  vcpus_min), keep sweep defaults
- Resolve main.nf: use fusion-doctor:1.0.0 container, add gpu_container to
  NF_CANARY workflow signature and call, add onComplete handler from main
- Update FUSION_DOCTOR workflow YAML keys to new schema names
- Update nextflow_schema.json with renamed param keys
- Replace simplified fusion profiles with full tiered profiles from main
- Update test comment labels for renamed parameters

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit fix: resolve merge conflicts with origin/main. The resolution incorporates:

  • fusion-doctor:1.0.0 container (bumped from dev version)
  • gpu_container parameter added to nextflow.config, NF_CANARY workflow signature, and the workflow {} entrypoint
  • onComplete handler from main
  • Renamed fusion params to align with the updated fusion-doctor schema: fusion_memory_capacity_gb_min, fusion_disk_capacity_gb_min, fusion_vcpus_min (and corresponding YAML keys in the sweep)
  • Tiered cloud profiles (fusion_aws_low/recommended/high, etc.) restored from main
  • New logo SVGs, updated HTML report generator, and CI workflow changes from main

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.

3 participants