Repository navigation
Enforce the local-only rule where each auxiliary call is made (#380) - #461
Merged
Merged
Conversation
Each caller checked thread.localTarget itself before skipping Jev, credit fallback, naming or a routine turn, so a new caller could leak a local thread. localOnly(thread) in run-policy.ts is now enforced at the chokepoints too: Decisions.connect gives a question naming a local thread no connection before any key is resolved; creditFallback and recentCreditFallback return nothing; nameThread asks no title model; sendUnattended refuses rather than reroutes. The callers' checks stay. One regression calls each chokepoint directly with cloud controls; disabling each of the five guards in the compiled output made it fail. Docs: local-models.md, status.md and a dated review record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 31, 2026
# Conflicts: # docs/status.md
# Conflicts: # docs/local-models.md
3 of 13 tasks
This branch was successfully deployed
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.
LM-5 (#380), slice 2. This makes the no-cloud-fallback rule for local threads hold where each auxiliary call is made, instead of relying on every caller to check.
mainstill doesn't constructLocalExecution, so product behaviour is unchanged.Why
Before this, each caller checked
thread.localTargetitself:A new caller that forgot the check would leak a local thread to a cloud model or to Jev.
What changes
localOnly(thread)inengine/local-models/run-policy.tsis true for any persisted local target, valid or not.Decisions.guardThreads.Decisions.connectthen returns no connection for a question naming a local thread (routing, follow-up or approval), before any key is resolved or CLI probed. Settings' Try it names no thread and is unaffected.creditFallbackandrecentCreditFallbackreturn nothing for a local thread.nameThreadnever asks a title model about a local thread.sendUnattendedrefuses a local thread, and does not reroute it to a cloud model.Tests
One new regression in
runner-local-models.test.tscalls each chokepoint directly, with cloud controls. Disabling each of the five guards in the compiled output made it fail, and it passed again after a byte-for-byte restore.A stub router in
runner-routing-ceiling.test.tsgained thedecisionsseam.runner-local-models,local-run-policy,routing)pnpm build && pnpm test, run 1pnpm build && pnpm test, run 2pnpm build && pnpm test, run 3 (head6fbec39)The run 2 failure was
companion-network, "each supported address has a reachable advertised listener", with a request timeout. This change doesn't touch that code, and it passed 12/12 in each of 5 isolated reruns.No UI changes.
Docs:
docs/local-models.md,docs/status.md, and the review record.Still open on #380:
LocalExecution, which is Val's decision.🤖 Generated with Claude Code