Repository navigation
fix(bridge): classify probe failures and reject non-zero api exits - #14
Merged
Merged
Conversation
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.
Fixes V04 and V05 from the 2026-11-18 cross-review, as separate, separately-tested changes.
V04 — probe error classification: a core that starts but answers integration-info with non-JSON or JSON missing schema_version was reported as VOYAGER_NOT_FOUND ("install the core"), sending users to reinstall a core they already have. Probe failures now carry a typed bridge code + found flag; found-but-unusable answers become INCOMPATIBLE with the real cause in the diagnostic. All per-candidate codes survive in both terminal branches. No new error code; VoyagerError union unchanged; existing consumers preserved.
V05 — callOp exit-code semantics: the core reports op errors in the JSON error field and cmd_api always exits 0, so a valid JSON answer paired with a non-zero exit means a broken wrapper or dying process. callOp now rejects it as CLI_FAILED before parsing. Evidence verification five-state path is untouched on normal exits.
Red/green: 4 red on the pre-fix tree (#6 non-JSON, #8 code flattening, #9 exit 3 accepted, #4 child re-run knock-on) -> 37/37 green; full suite 127/127. Mutation: removing the V05 check turns #9 red; flipping found=true to false turns #6 red. lib/ is build output (untracked); tests import the freshly compiled bridge. Bridge schema stays 1.