Skip to content

Fix strict-flake-inputs validator

Horizon Bot requested to merge add-strict-flake-inputs into master

Summary

Fixes jq path and logic bugs in strict-flake-inputs validator:

  1. Wrong path: Changed .locks.nodes to .nodes (locks key doesn't exist at top level of flake.lock)
  2. Wrong root access: Changed .locks.nodes.root.inputs to .nodes[.root].inputs
  3. Simplified logic: Use .nodes[.root].inputs as $directs directly in jq instead of passing bash variables via --argjson
  4. Better null handling: Check $directs[$k] != null for proper object key lookup instead of index($k)

Changes

  • Rewrote jq query to use correct flake.lock structure
  • Eliminates --argjson JSON parsing issues
  • Properly filters to only direct dependencies

🤖 Generated with Claude Code

Merge request reports