Context
Walk Ex5 added 11-assertion contract tests for StatusPresenter#summarize_json with a golden file. NodePresenter (used by knife node show --format json) has no schema contract — shape regressions go undetected.
Code Paths
lib/chef/knife/core/node_presenter.rb — format_for_display JSON path
spec/unit/knife/core/node_presenter_spec.rb — add contract describe block
spec/data/node_presenter_contract.json — new golden file
Acceptance Criteria
Dependencies
Follows pattern from Walk Ex5 (StatusPresenter contract). No blocking deps.
Size
Small — one PR.
Context
Walk Ex5 added 11-assertion contract tests for
StatusPresenter#summarize_jsonwith a golden file.NodePresenter(used byknife node show --format json) has no schema contract — shape regressions go undetected.Code Paths
lib/chef/knife/core/node_presenter.rb—format_for_displayJSON pathspec/unit/knife/core/node_presenter_spec.rb— add contract describe blockspec/data/node_presenter_contract.json— new golden fileAcceptance Criteria
name,chef_environment,run_list,normal)ohai_time) zeroed or omittedbundle exec rake specwith 0 failuresai-track-docs/contract-test.mdupdated with NodePresenter sectionDependencies
Follows pattern from Walk Ex5 (StatusPresenter contract). No blocking deps.
Size
Small — one PR.