Skip to content

refactor(roles,feedback): share one projection per shape and name projection arguments - #642

Merged
StevenTCramer merged 4 commits into
feature/glue-followupsfrom
task/479-share-one-projection-for-getrole-and-getroles-and
Nov 5, 2026
Merged

StevenTCramer merged 4 commits into
feature/glue-followupsfrom
task/479-share-one-projection-for-getrole-and-getroles-and

Conversation

@StevenTCramer

Copy link
Copy Markdown
Contributor

Summary

Review disposition

  • Disposition: clean. 1 round, effort 2, reviewer roster: general (review oracle,
    claude-opus-5-5).
  • Final counts: bug 0, suggestion 0, nit 0 (0 open, 0 fixed, 0 wontfix).
  • The reviewer re-ran the gates in the claim worktree: ./bin/dev build gave 0 warnings and 0 errors, and
    ./bin/dev test --no-build -q gave 23 of 23 projects passed.
  • The implementer restatement matches the task. No misread.
  • Artifacts: review/review-framework.md, review/round-1/general.md,
    review/round-1/merged.md, review/disposition.md.

What changed

  • source/container-apps/web/features/admin/roles/role-contract-map-application.cs (new):
    RoleContractMap.Project(Role) reads RoleId, Name, Description, Permissions, and
    AgentScopes once into RoleContractMap.RoleProjection. Task 478 had landed, so it reads
    role.AgentScopes as is; there is no AgentScopeOrder.OrderKnown call.
  • GetRole and GetRoles handlers call RoleContractMap.Project and wrap it into GetRole.Response
    / GetRoles.RoleDto with named arguments. The two contract types stay separate
    (Response implements IRoleDetails with settable details; RoleDto is an immutable row), so
    the wire shape is unchanged.
  • FeedbackContractMap.Project(FeedbackAttachment) is the one attachment projection
    (FeedbackContractMap.AttachmentProjection). AttachmentsAsync wraps it into
    GetFeedback.Attachment; the upload handler wraps it into UploadFeedbackAttachment.Response.
    The upload handler no longer builds the download path itself.
  • Named arguments at every response construction in Roles (create, get, list, set-permissions,
    set-agent-scopes) and Feedback (list, list-mine, get, get-for-admin, submit, change-status,
    set-severity, reply, add-note, reply-as-filer, upload, remove, download), plus
    FeedbackAdminView and FeedbackActivityEntry in FeedbackContractMap.
  • Design regions in the touched handlers and both maps now point at the shared projection
    (task 479) and drop the "task 476 evaluates generating it" note.

Out of scope, not changed: FeedbackListFilter and EmailMessage constructors (not response
projections), the contract-side mock factories, and the Principals slice
(set-principal-*, list-principals, get-principal), which is not Roles.

Gates

  • ./bin/dev build: Build succeeded, 0 warnings, 0 errors.
  • ./bin/dev test --no-build -q: 23 of 23 projects passed (including web-jaribu-tests,
    web-server-integration-tests, aspire-tests, web-spa-playwright-tests). No test files edited.
  • ganda repo audit: exit 0, "Repository passes — 2 advisory (non-blocking) warning(s)". Both
    were already there: kanban-landed (other tasks' claims with no worktree on this machine) and
    source-file-line-cap (EF migration designers and an archived research runfile; that check is
    set to warning, and TWA0038 enforces the cap). Nothing to fix on this task.

Test plan

Smoke:

./bin/dev build
./bin/dev test --no-build -q
grep -rn "RoleContractMap.Project\|FeedbackContractMap.Project\|Select(Project)" source/container-apps/web/features

Expect: build reports 0 warnings and 0 errors; 23 of 23 projects passed; the grep shows
RoleContractMap.Project in the GetRole and GetRoles handlers and FeedbackContractMap.Project
in the upload handler and AttachmentsAsync (Select(Project)), with no other copy of either
member list. In the app, Admin > Roles list and role detail show the same permissions and agent
scopes as before, and a feedback attachment uploaded on the submit form shows the same name,
size, and download link before and after submit.

Kanban task 479
Session: 1002142

StevenTCramer and others added 4 commits November 5, 2026 15:54
…jection arguments

GetRole and GetRoles now read Role members through RoleContractMap.Project,
and the upload handler and FeedbackContractMap.AttachmentsAsync share
FeedbackContractMap.Project. Every response, DTO, admin-view, activity, and
attachment constructor call in the Roles and Feedback application layers
uses named arguments. Behavior and wire shapes are unchanged.

Task 479.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@StevenTCramer
StevenTCramer merged commit fa7636f into feature/glue-followups Nov 5, 2026
9 checks passed
@StevenTCramer
StevenTCramer deleted the task/479-share-one-projection-for-getrole-and-getroles-and branch November 5, 2026 09:30
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