Skip to content

Develop New Tool to Review Validate Logs For Expected Warnings/Errors #1302

@jordanpadams

Description

@jordanpadams

snooze: Validation Log Triage Tool

snooze is a CLI companion to the validate tool, designed to intelligently review, suppress, and surface only unexpected issues in PDS validation reports. It’s ideal for automated workflows like those in Nucleus.


📁 Sample Configuration File (snooze.yml)

# snooze.yml
dataset_id: urn:nasa:pds:my_dataset
version: 1.0

# What levels of messages to act on
severity_threshold: WARNING  # Options: INFO, WARNING, ERROR, FATAL

# Known issues to ignore or suppress in triage
suppressions:
  - code: 1.2.3.4
    message: "Missing checksum"
    note: "Expected for older bundles submitted pre-2022"

  - code: 2.1.1.1
    message: "Unregistered reference to context product"
    note: "Label updates pending LDD revision"

  - code: 3.9.*
    note: "Ignore all category 3.9 warnings — non-critical XML metadata formatting"

# Flags for advanced behavior
options:
  allow_new_warnings: true
  treat_new_errors_as_fatal: true
  log_retention_days: 30
  auto_learn_from_baseline: false

# Baseline (optional) for change detection
baseline_log: logs/validate_baseline.json

🔧 CLI Usage Examples

# Basic triage run (uses snooze.yml in current dir)
snooze validate.json

# Specify config explicitly
snooze validate.json --config snooze.yml

# Compare two logs for new issues
snooze validate.json --baseline validate_2024-06-01.json

# Add a new suppression from the CLI
snooze validate.json --suppress "2.1.1.1:Unregistered reference"

# Output only unexpected issues (machine-friendly)
snooze validate.json --summary --output json

# Use as part of a Nucleus workflow
nucleus validate && snooze nucleus_output/validate.json --config snooze.yml

🚦 Exit Codes

Code Meaning
0 Only expected issues found (or none)
1 New WARNs found (soft failure)
2 New ERRORs found (hard failure)
3 Malformed input / config error

✨ Future Ideas

  • --learn flag to auto-capture suppressions from a known-good baseline
  • GitHub action integration
  • Markdown or HTML report output for review boards

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    ToDo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions