Skip to content

Conversation

@Ulthran
Copy link
Contributor

@Ulthran Ulthran commented Jan 12, 2026

Motivation

  • Allow running an archive job even when validation checks (file path vs header, file size, run consistency) fail so files can still be copied and MD5s generated.
  • Prevent the CLI from aborting on non-critical validation issues while preserving visibility via warnings.
  • Make the behavior configurable so operators can opt into lenient mode when needed.

Description

  • Add an allow_check_failures parameter to backup_fastq with default False and propagate a new --allow-check-failures CLI flag to the function.
  • Replace immediate ValueError raises for check_fp_vs_content, check_file_size, and run-consistency checks with collected result arrays so failures can be handled conditionally.
  • Emit warnings.warn when checks fail and allow_check_failures is enabled, otherwise preserve the original ValueError behavior.
  • Keep existing behavior for index-read warnings and sample sheet validation unchanged.

Testing

  • No automated tests were run.

Codex Task

Copilot AI review requested due to automatic review settings January 12, 2026 20:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a configurable --allow-check-failures CLI flag that allows the backup process to continue when validation checks fail, converting fatal errors to warnings while still completing file archiving and MD5 generation.

Changes:

  • Added allow_check_failures parameter to backup_fastq function with default False
  • Refactored three validation checks (file path vs content, file size, and run consistency) to collect results in arrays and conditionally emit warnings instead of raising ValueError
  • Added --allow-check-failures CLI argument that propagates the setting through to the backup function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ulthran Ulthran merged commit 3ce089d into master Jan 12, 2026
6 checks passed
@Ulthran Ulthran deleted the codex/add-option-to-run-backup-despite-checks branch January 12, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants