chore(ocr-delegate): restore --format json behind the v1.9.3 gate that broke it - #38
Merged
Merged
Conversation
…t broke it `ocr delegate` gained a shared `-f, --format text|json` in v1.9.3 as a side effect of the SARIF work (alibaba/open-code-review#820). The skill still said in bold that the flag does not exist — true against v1.8.10, false against the installed v1.9.5. The CLI itself is already at the latest release, so nothing was upgraded on the binary side. Steps 1 and 2 instruct JSON again, but the text-parsing guide stays in the file as a named fallback branch rather than a silent retry: pinning this flag on v1.8.10 is what made every run through the skill exit on its first command and review nothing. The report has to say which path ran. All four local hardenings are kept, so this stays a fork of upstream's open-code-review-delegate rather than a re-vendor: the fallback, the (path, status) checklist identity, the coverage-rate denominator, and the Markdown-only-repo gotcha exist here and in no upstream release. `coverage_rate` is not a field OCR emits, so Step 6 still computes reviewed / reviewable_count. pr-review's probe becomes `ocr --version` rather than `which ocr`, since presence no longer determines which path the OCR track takes, and its degradation clause now excludes a rejected `--format` — the skill falls back on its own, so degrading there would discard a working review. Verified against the live CLI: preview and rule both emit schema_version "1", and `--format sarif` is rejected by delegate mode as documented. python3 scripts/validators/validate_all.py passes 3/3 (uv is absent on this box, so `make validate` could not be used).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ocr delegategained a shared-f, --format text|jsonin v1.9.3, as a side effect of the SARIF work (alibaba/open-code-review#820). Our skill still stated in bold that the flag does not exist.The CLI needed no upgrade. Installed
ocris v1.9.5; npmlatestand the newest GitHub release are both v1.9.5. Nothing was installed.Why the guard matters
Per
changelogs/sss.md:31,--format jsonwas ripped out of this skill because it exited non-zero on v1.8.10 and every run through the skill reviewed nothing. Restoring it therefore comes with the version written down and a named fallback branch to the text output forocr< 1.9.3 — not a silent retry. The report must say which path ran.Kept, not reverted
This stays a fork of upstream's
skills/open-code-review-delegate/SKILL.md, which is the plain JSON version. All four local hardenings exist here and in no upstream release:(path, status)checklist identitycoverage_rateis not a field OCR emits, so Step 6 computes reviewed /reviewable_count, never /total_files)Upstream's non-delegate skill and its
delegate-reviewClaude command are deliberately not pulled in: the first needs the LLM endpoint delegation mode exists to avoid, the second duplicates whatsss:pr-revieworchestrates.Changes
plugins/sss/skills/ocr-delegate/SKILL.md— JSON primary + fallback, field-name table, version floor incompatibility,-f, --formatrow restored beside--max-git-procs,ocr --versionprerequisite, new version-gate gotcha,metadata.version1.0.0 → 1.1.0plugins/sss/skills/pr-review/SKILL.md— probe isocr --version; degradation clause now excludes a rejected--format, because the skill falls back on its own and degrading there would discard a working reviewCHANGELOG.md— two## [Unreleased] / ### ChangedentriesVerification
ocr delegate preview --format jsonandocr delegate rule --format jsonboth run against this repo and emitschema_version: "1"withmode,from/to/merge_base,reviewable_files[], andexcluded_files[]carryingexclude_reason--format sarifis rejected by delegate mode, as the flag table now sayspython3 scripts/validators/validate_all.py— 3/3 passed.make validatecould not run:uvis not installed on this machine