feat: support debug in jq patches

Merged
DM
23d ago
+436-26

Summary

Support debug and debug(filter) in render and diff patches with readable diagnostics that identify the patch and resource.

What

  • BREAKING: Go callers of spec.ApplyPatches must append spec.ApplyPatchesOptions{}; set DiffSide to label the resource version.
  • Include the patch type, 1-based rule number and quoted resource in each message; diff messages also identify the live or dry-apply version.
  • Print strings as plain text, objects/arrays as indented JSON, and other values inline.
  • If JSON indentation fails, emit a warning and compact JSON without aborting the patch.
  • Emit diagnostics only with --log-level debug or --log-level trace.
  • Preserve the original input and native jq debug(filter) stream semantics.
  • Use each execution's logging context, including concurrent reuse of compiled patches.

Why

Both forms previously failed to compile because gojq requires applications to provide debug/0.