fix(delegate): guard JSON workflow against old CLI versions - #802
Conversation
|
✅ OpenCodeReview: Review skipped: no items were selected. |
|
Thanks for both the report and the PR, @amh1k — the diagnosis here was spot on. Your version-skew analysis (newer skill instructions reaching an older binary, rather than a missing implementation) is exactly right, and the write-up in #800 made it fast to confirm. We're going to close this one without merging, and that's not a reflection on the change itself. As raised in #800, we want to settle a more fundamental question first: whether The insight we do want to carry forward is the one your PR is built on: silently falling back to text output is the wrong failure mode. The downstream steps consume structured fields like We'll put together a proper design for this module and open it up for discussion — including compatibility in both directions (older CLI × newer skill, and the reverse, which today has no protection at all). We'd be glad to have you in that thread. Thanks again for the CLA, the added test coverage, and the detailed PR description. |
Description
Fixes the delegation skill/CLI version mismatch where newer skill instructions invoke:
against older OCR binaries that do not support the
--formatflag.This adds CLI parser regression coverage and updates both delegation skill copies to detect unsupported OCR versions and instruct users to upgrade instead of silently falling back to incompatible text output.
Type of Change
How Has This Been Tested?
make testpasses locallygo test ./...go test ./cmd/opencodereview -run TestDelegateFlags_RegisterJSONFormat -count=1make checkgo run ./cmd/opencodereview delegate preview --helpgo run ./cmd/opencodereview delegate rule --helpocr delegate preview --format jsonoutput validated as JSONgit diff --checkChecklist
go fmt,go vet)Related Issues
Closes #800