Conversation
… a review slot
Review slots exist only to load a handed-off branch and serve it for a
human (filled by the poller's review autoloader, never by direct
dispatch). Nothing enforced this: `task start` / `task assign` accepted
any workspace, so an orchestrator or human could route a normal dev task
onto a review slot. The orchestrator instructions already exclude review
slots from auto-dispatch, but that's soft — this adds the hard CLI
backstop.
Decisions (per user, 2026-08-16):
- Reject by default, with a logged `--force` escape hatch. Both `task
start` and `task assign` gain `--force`; without it a `review`-tagged
target is rejected with a message naming the tag and pointing at the
review queue + `--force`. With it, the override is recorded on
events.log via a new `review-slot-override task=<id> workspace=<ws>
reason=user:force` line (best-effort log; a logging failure warns
rather than blocking the deliberate human action).
- Detect a review slot with `effective_tags(ws).contains("review")` (the
canonical marker), matching the poller. The guard sits in the CLI
handlers only; the autoload path (`autoload_review_queue`) never calls
them, so the legitimate review-load path is unaffected (test added in
load.rs asserting it still plans a review task onto a review slot with
no `--force`).
- Mirror the live orchestrator-instructions edit into the shipped
default template so NEW projects exclude review slots from the
dev-dispatch pool.
- Add a config-upgrade `NeedsJudgment` sniffer over
`project.<name>.agent.orchestrator.instructions`: an absence sniff that
flags a "Free-workspace selection" section present but silent on review
slots, so EXISTING projects get a boot finding to self-heal (per the
AGENTS.md "changing shipped defaults needs a sniffer" guardrail).
Included a drift-guard test that the shipped template does not trip it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jlong
deleted the
jlong/dispatch-guard-refuse-assigning-a-normal-task-to-a-review-tagged-workspace-task-start-assign-with-force-escape
branch
August 17, 2026 00:47
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.
Task
An orchestrator dispatched a normal dev task onto a review-tagged workspace. Review slots exist only to load a handed-off branch and serve it for a human; they should never be selected for normal dev work. Today nothing enforces this —
shelbi task start/task assigndon't validate workspace tags, so any orchestrator (or human) can route dev work onto a review slot. The orchestrator instructions have been updated (live + this task updates the shipped default) to exclude review slots from auto-dispatch, but instructions are soft; this task adds the hard CLI backstop.Design decision (user, 2026-08-16): reject by default, with a
--forceescape hatch (logged).Current Behavior
shelbi task start <task> --workspace <review-slot>andshelbi task assign <task> --to <review-slot>succeed with no tag check, placing a dev task on a review workspace.Expected Behavior
task start/task assigntargeting a workspace whose tags includereviewis rejected with a clear error, e.g.:workspace 'review' is a review slot (tagged 'review') — review tasks load via the review queue, not direct dispatch; pick a non-review workspace (or pass --force to override).--forceflag on bothtask startandtask assignoverrides the guard for deliberate human use. When used, the override is recorded on~/.shelbi/events.log(auditable) — e.g. aworkspace=<ws> review-slot-override task=<id> reason=user:forceline.maybe_autoload_review_queue→shelbi_orchestrator::load::autoload_review_queue, which does NOT go through these CLI handlers, so it needs no change and no--force.Technical Details
crates/shelbi-cli/src/commands/task.rsin thestartandassignhandlers. Detect a review slot with the existing helperproject.effective_tags(&workspace).contains("review")(tags are the union of workspace + machine tags;reviewis the canonical marker — seeconfig_upgrade_applywhich migrates legacyrole: review→tags: [review], andpoller.rs:832which gates review handling oneffective_tags(...).contains("review")).--force(bool) to theTaskCmd::StartandTaskCmd::Assignvariants; thread it to the guard./activityand the orchestrator can see it.crates/shelbi-state/src/default_orchestrator.md.template): mirror the live edit to the "Free-workspace selection" section — excludereview-tagged workspaces from the dev auto-dispatch pool (an idle review slot is not available dev capacity). This reaches NEW projects.NeedsJudgment) incrates/shelbi-cli/src/commands/config_upgrade.rsover the orchestrator instructions surface (project.<name>.agent.orchestrator.instructions): flag instructions whose "Free-workspace selection" section is present but lacks the review-slot exclusion clause (an absence sniff — header present, exclusion phrase likereview-tagged / review slot absent), handing the orchestrator a boot finding to refresh its own copy. Existing projects self-heal. (Per the AGENTS.md "Changing shipped defaults" guardrail — a default change needs a sniffer to reach existing installs.) Include a drift-guard test that the shipped default template does NOT trip this sniffer.Acceptance Criteria
task start/task assigntargeting areview-tagged workspace is rejected (non-zero exit) with a message naming the tag and pointing to the review queue + the--forceoption.--forceontask start/task assignperforms the assignment and writes an auditable override line to~/.shelbi/events.log.--force(test asserts it's unaffected).NeedsJudgmentconfig-upgrade finding on boot; the shipped default does not trip the sniffer.cargo build/test/clippygreen; unit tests cover the reject, the--forceoverride, and the non-review pass-through.Auto-opened by Shelbi — review at: /Users/jlong/.shelbi/projects/shelbi/tasks/dispatch-guard-refuse-assigning-a-normal-task-to-a-review-tagged-workspace-task-start-assign-with-force-escape.md