Repository navigation
fix(platform): say why an ungranted agent cannot be the reviewer - #4132
Merged
Merged
Conversation
Choosing a project agent as a task's reviewer failed with the generic "Choose an eligible project member or an agent in this project" when the agent simply lacked the task_review tool: the picker listed every project agent, and the door answered one code for "not this project's agent" and "permission missing". - setTaskReviewer, replacePendingTaskReviewer and setProjectTaskReviewer answer TASK_REVIEWER_PERMISSION_MISSING / PROJECT_REVIEWER_PERMISSION_MISSING for a missing grant; TASK_REVIEWER_INVALID / PROJECT_REVIEWER_INVALID keep meaning an agent the project does not have. - The task reviewer picker greys an agent without the grant — and the project default it would inherit — with the existing permission sentence; AssignableActor carries the agent's tools for it. - The refusal toasts map the new codes to the existing permission sentences (no new locale keys). - Registered in the REST app-door-only code list and the manual error-code register; new manual box PROJ-B13; routing unit test and the review-routing integration lane assert the split codes.
Contributor
|
Post-merge independent review of #4132 at Verdict: source accepted with LOW follow-ups. No check is weaker and nothing new is disclosed.
LOW
INFO
|
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.
Problem
Choosing a project agent as a task's Reviewer failed with the generic "Choose an eligible project member or an agent in this project." when the agent simply lacked the Review other agents’ task results (
task_review) grant. The picker listed every project agent with "Reviews the result from its own review task", and the door answered one code —TASK_REVIEWER_INVALID— for both "not this project's agent" and "permission missing", so the toast could not say what to fix.Change
setTaskReviewer,replacePendingTaskReviewerandsetProjectTaskRevieweranswerTASK_REVIEWER_PERMISSION_MISSING/PROJECT_REVIEWER_PERMISSION_MISSINGfor a missing grant;TASK_REVIEWER_INVALID/PROJECT_REVIEWER_INVALIDkeep meaning an agent the project does not have.tasks.reviewer.agentPermissionRequiredsentence as its description (same treatment as the implementation agent).AssignableActorcarries the agent'stoolsfor it.reviewerRefusalMessageand the project's default-reviewer section map the new codes to the existing permission sentences. No new locale keys.reference/error-codes.md(two rows edited, two added), new manual boxPROJ-B13.Proof
reviewer-picker,reviewer-refusal,task-reviewer-field,use-actor-directory,project-task-reviewer-sectionspecs; all 85 UI spec files underapp/features/{tasks,projects}green; 14 guard files green.reviews.routing.test.ts(split codes foragentTools: []vs. a missing agent),service.reviewer.test.ts,rest/error-codes.test.tsgreen.task=400/TASK_REVIEWER_PERMISSION_MISSING, project=400/PROJECT_REVIEWER_PERMISSION_MISSING.bun devrestart): the picker on the reporting task lists the implementation agent and the ungranted agent greyed, each with its reason; people stay selectable.typecheck, platformlint,format:check,lint:manual,check-guideonsuites/projects.mdgreen.