feat: a fallback chain can be configured through the API, not only the CLI - #144
Open
thedancingdeveloper wants to merge 1 commit into
Open
feat: a fallback chain can be configured through the API, not only the CLI#144thedancingdeveloper wants to merge 1 commit into
thedancingdeveloper wants to merge 1 commit into
Conversation
…e CLI Chains shipped in the CLI and in the stored role map, and `RoleRoute` -- the only way to configure a deployed pod -- could not express one. Found while repointing Node B: the models an operator had chosen could be set locally and not on the machine that runs the work, which makes the feature unshipped where it matters. `models` names the chain in preference order; `model` stays the preferred one and is filled in from the first when omitted, so every existing map, client and reader that knows only `model` is unaffected. Giving both is allowed and checked: a route whose two fields contradict each other behaves differently depending on which one a reader consults, so it is refused with the mismatch named rather than silently resolved.
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.
Follow-up to #141, found while repointing Node B's models.
#141 added fallback chains to
ModelClient, the CLI (--implementer a,b,c)and the stored role map. It did not add them to
RoleRoute, which is theonly way to configure a deployed harness:
So the models an operator chose could be set on a laptop and not on the machine
that runs the work. A feature that cannot be configured where it is used is not
shipped.
Change
models: the chain, in preference order.model: still there, still the preferred route, filled in frommodels[0]when omitted — so every existing stored map, client and reader that knows
only
modelis untouched.disagree behaves differently depending on which field a reader consults, so
it is refused with the mismatch named.
Four tests: the chain round-trips schema → stored map →
Chain; a singlemodelis unchanged; and both refusal cases.Suite, ruff and
mypy .green.