feat(comments): gate organization-wide search with comments.manage #36
Loading…
Reference in a new issue
No description provided.
Delete branch "mc/aeb1579b-9eed-4312-8a37-efd7634f2438"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Organization-wide comment search already supports tags, since and limit. This applies Morten's confirmed permission boundary:
The service enforces the permission for HTTP and MCP. Task-local reading/commenting and author-only edit/delete rules stay unchanged. Generated API types and docs include the permission. No migration or automatic grants.
Evidence
8c0076f6c2.0.12.0@sha256:d71556bcfd3273415981698eff7ccefa9c7ce0303693c287f39f5d240af4df15. Search by friction tag succeeded before the gate. Not deployed yet.Merge danger
Door: two-way before role grants; no migration. Later grants must be removed before rollback to a version whose permission enum lacks comments.manage.
Blast radius: app. Search access narrows; owners must grant comments.manage to retrospective roles. No automatic grants or infrastructure changes.
Rollback and verification
Review record copied by Software Engineer at the validator's request. Original author: Security Engineer. Original task: 5f5f5ed8-a003-44eb-b144-84e46e7707a2
Security review of PR #36, pinned locally to
8c0076f6c2using review/comments-manage-36. Inspected git log origin/main..HEAD and git diff origin/main...HEAD (one commit), full service/HTTP/MCP authorization paths, tests, permission registry and ADR 0005. Read Homelab AGENTS.md and security runbooks; no applicable Mission Control AGENTS.md exists.Standards
No blocking security findings. TaskCommentService.search asserts comments.manage before querying; both HTTP and MCP delegate to that service. AccessContext checks organization access first (foreign organization -> NotFound), owners receive registered permissions, ordinary members receive none, and role permissions are read within the requested organization. Search selects only undeleted comments on live tasks/projects in that organization, uses parameterized tag/time filtering and bounded limits. MCP discovery uses server-derived permissions and a fresh request context; no client-supplied organization or permission override. Role create/update enforce grant-only-what-you-hold; restore delegates to update, so roles.manage alone cannot grant comments.manage. No secrets, dependency/image changes, privileged/host access, exposure manifests, migrations or automatic grants in the diff.
Spec
No blocking findings against Morten's confirmed “Yes agreed” scope. Only organization-wide search is gated. Task-local list/add and author-only edit / author-or-owner delete logic are unchanged. Existing tag/since/limit and deleted/foreign-task tests remain; added service test covers owner/permitted success, member/unpermitted denial, task-local reads and foreign organization denial. MCP baseline tool-list tests exclude search for unpermitted roles; permitted tagged search remains exercised.
Evidence and limitations
Static review only for the new behavior. Owner's recorded evidence: local 663 tests/77 files and checks passed; pipeline 179 and 180 success and exact-head Forge statuses green (parent comment 9b2f2641-3c4c-4056-822f-c40d70223f66). Pipeline: https://woodpecker.olsen.cloud/repos/32/pipeline/179 . I could not independently inspect build results: tea has no available login, woodpecker-cli has no configured context; pnpm absent. Software Engineer must confirm current head and build remain green before merge; a changed head or red/missing build blocks merge.
Read live: kubectl get deployment mission-control -n prod -o jsonpath='{.spec.template.spec.containers[*].image}{"\n"}{.status.readyReplicas}{"\n"}' -> code.olsen.cloud/ai/mission-control:0.12.0@sha256:d71556bcfd3273415981698eff7ccefa9c7ce0303693c287f39f5d240af4df15; readyReplicas 1. New behavior is not deployed. No mutation performed.
Non-blocking UNKNOWN verification limit: rollout behavior not yet observed, rather than an identified vulnerability. After rollout owner verifies expected image/digest/readiness; owner and explicitly permitted role search succeeds; ordinary member HTTP search denies (403), unpermitted role tool is hidden and direct invocation cannot succeed; foreign organization search denies (404), permitted search returns no foreign/deleted task comments; tag/since/limit and task-local comment access still work; nonauthor edit/delete still denied except owner delete.
Rollback: revert code/image. Remove any future comments.manage grants before deploying an older permission enum; historical revisions may retain the new string and must not be restored on that older version. Older code restores membership-only organization-wide search, so rollback also restores the broader former access boundary; get Morten's decision if that risk needs acceptance.
Standards: 0 findings; worst none. Spec: 0 findings; worst none. One non-blocking UNKNOWN verification limit; no verified CRITICAL/HIGH finding. Security review complete; Software Engineer retains implementation/merge/rollout ownership.
Review by the Software Engineer role, an agent in Mission Control, for the task Add comment search tool.
Review record copied by Software Engineer at the validator's request. Original author: Designer. Original task: c67bdae2-27b2-4d70-91b8-6ad6facb2b25
Designer review of PR #36 at
8c0076f6c2— static-only.Standards
No findings. Reviewed git diff origin/main...HEAD and commit log, permission registry descriptions, existing Role/PermissionOptions → OptionList presentation, docs permission tables, and packages/ui/CLAUDE.md. No applicable AGENTS.md/CONTRIBUTING.md/CODING_STANDARDS.md found. The new action-first description uses the existing identifier-plus-explanation convention. It is shorter than several adjacent descriptions and uses the existing wrapping text container; no component, layout, typography or colour changes.
Spec
No findings. Checked against the parent’s confirmed search-only boundary (Morten’s “Yes agreed”). The visible description is “Search comments across the organization by tag and time.” Although the identifier uses “manage” (Morten’s chosen name), the explanation specifies search. tasks.md explains owners/permitted agents vs ordinary members and unchanged task-local reading/writing; agent-tools.md explicitly excludes editing/deleting another author’s comments and moves search out of the base-tool table. No automatic grants appear in the diff.
Evidence and unverified checks
Static copy/presentation review only; no rendered UI or screenshots captured or supplied. This checkout has no pnpm, installed node_modules, or Chromium/Chrome executable, and no browser/screenshot tool is exposed. Did not run a web runtime or visual interaction checks. Unverified: actual role-editor rendering/wrapping at desktop/mobile viewport sizes, checkbox keyboard/touch interaction and save/reload success, and loading/empty/error/offline presentation. No panel/device viewport was specified; this review concerns the existing web role editor, not a panel design.
Build evidence reviewed from the owner’s parent-task comment: pnpm test 77 files/663 tests passed; typecheck/lint/dependencies/format/pipeline renderings passed; pipeline 179 (PR) and 180 (push) success, six commit checks green. Pipeline: https://woodpecker.olsen.cloud/repos/32/pipeline/179 . Independent command woodpecker-cli pipeline info ai/mission-control 179 could not run because this container’s CLI is not configured. Owner must reconfirm current-head green before merge; no build waiver is given.
After rollout / rollback
Owner should confirm the role editor shows this description, explicit selection saves/reloads without automatic grants, owners/permitted agents can search, ordinary members/unpermitted agents cannot, and task-local comments and author edit/delete restrictions remain unchanged. Remove any later comments.manage grants before reverting to the older code/image.
Standards: 0 findings, worst none. Spec: 0 findings, worst none.
Review by the Software Engineer role, an agent in Mission Control, for the task Add comment search tool.