Skip to content

feat(console): workload switch re-previews the expected route - #14

Merged
command0r merged 1 commit into
mainfrom
feat/workload-switch-live-route
Nov 16, 2026
Merged

command0r merged 1 commit into
mainfrom
feat/workload-switch-live-route

Conversation

@command0r

Copy link
Copy Markdown
Owner

Problem

In the Playground, switching the workload (for example Internal → Public) kept the prompt but left the Expected route as "Stale · Not evaluated yet · Unknown until previewed" until Preview route was pressed. On screen the switch appeared to do nothing, which hides the point of the sensitive-data comparison: the same request, a different workload, a different outcome.

Change

  • The composer's workload switch now runs the Host dry run for the new workload immediately, when the form has a sender and a prompt. The route scheme then shows the new outcome for the unchanged prompt, e.g. Local · ollama/… under Internal and Rejected — nothing would be sent under a Public workload that rejects detected sensitive data.
  • The prompt is still kept on a switch. Nothing is sent to a model and nothing runs until Run; the preview is POST /admin/policies/simulate as before.
  • A newer dry run wins over an older one that completes late, so two quick switches cannot leave the previous workload's route on screen.
  • The "Switch to …" web-search hint and the server's "Use workload … (prompt kept)" suggestion use the same path.
  • User guide: one sentence updated.

Not in this PR

  • Presentation mode has no workload switch or Expected route; unchanged here.
  • The prohibition still depends on detection (identifiers) and the workload's "reject" setting. Marking undetectable private content, such as code, as internal-only needs its own ADR.

Verification

  • dotnet build Covenant.sln -c Release: 0 warnings, 0 errors.
  • dotnet test Covenant.sln -c Release: 1,280 passed (6 new cases in PreviewFreshnessTests).
  • Not verified in a browser. Please check in the console: Demo application → "Internal workload: sensitive data served locally" → Use example → switch to Public; the scheme should change to the rejection without pressing Preview route.

🤖 Generated with Claude Code

Switching the workload in the Playground kept the prompt but left the
Expected route as "Stale / Unknown until previewed" until Preview route
was pressed, so the switch appeared to do nothing.

The switch now runs the Host dry run for the new workload at once when
the form has a sender and a prompt. The same request then shows its new
outcome in the route scheme (for example Internal: served locally;
Public: rejected at Classify). Nothing is sent to a model and nothing
runs until Run.

A newer dry run now wins over an older one that completes late, so two
quick switches cannot leave the previous workload's route on screen.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@command0r
command0r merged commit dc828da into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant