OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

CLI diagnostics: warn at default log level when an invalid enum is substituted

Open antonio94770 opened this issue 1 month ago • 0 comments

Correction, 2026-10-29: reclassified as a diagnostics enhancement. The original claim of an entirely silent substitution was too broad.

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Snapmaker_Orca Version

2.4.1, official Windows installer; reproduced on 2026-10-28.

Operating System (OS)

Windows

OS Version

Windows 11

Printer

Snapmaker U1 (0.4 nozzle), bundled 0.20mm High Quality @Snapmaker U1 (0.4 nozzle) process and Generic PLA presets. Offline CLI slicing, no physical print required.

How to reproduce

Compare baseline and invalid-enum in the linked suite: same 20 mm cube and flattened presets, changing only the process to "support_type": "bogus". Inspect the log, exit code and G-code config comment block.

Actual results (corrected after recheck on 2026-10-29)

At the default logging level, the CLI exits 0 and writes support_type = normal(auto) when the input contains "support_type": "bogus".

The original claim that there is no diagnostic was incorrect. Repeating the same command with --debug 4 prints an info-level substitution message:

Found legacy configuration values, substituted when loading .../process.json:
key = "support_type" old_value = "bogus ... new_value = "normal(auto)"

The source intentionally enables forward-compatibility substitutions and logs these substitutions at info level. This report is therefore a request for more visible diagnostics, not evidence that the substitution is never logged.

Requested improvement

Consider emitting a warning at the default logging level when an unknown enum value is substituted, or documenting the logging option needed to observe it. The existing compatibility behavior and successful exit status may be intentional.

Project file & Debug log uploads

Reproducer script and recorded results, pinned to the tested revision. The script generates the inputs and preserves each command (command.json), input settings, output and combined stdout/stderr (slicer.log) in a separate probe directory. Raw logs are not attached here. To reproduce with Python >= 3.11 and Orca 2.4.1 installed:

git clone https://github.com/antonio94770/Snapmaker-U1-Print-Copilot.git

cd Snapmaker-U1-Print-Copilot

git checkout aa73504769f591bb9c993c9b662de601251da4e6

python -m pip install -e .

python research/m4-probe/recheck_release.py C:/orca-cli-recheck

Use a fresh short absolute work directory that does not already exist. The script copies bundled presets and does not modify the installation or user presets or communicate with a printer. The suite includes intentional crash probes, each with a 45-second timeout. Commands use Windows-style paths and four filament presets.

Checklist of files to include

  • [ ] Raw log file attached (preserved locally by the script)
  • [x] Reproducer and input-generation code linked above

Source context

2.4.1 substitution policy and reporting and info-level substitution log.

antonio94770 avatar Oct 29 '26 13:10 antonio94770