Repository navigation
feat(tickets): email tickets of linked requesters visible to the device CU-17tkuw66na0 - #3337
andriikachur wants to merge 15 commits into
Conversation
🦩 flamingo Code Review / security✅ No findings on the current head. Advisory: findings do not block the merge.
Review again. New commits are not reviewed until you ask:
Or comment Started 2026-12-04 14:02 UTC · updated 2026-12-04 14:03 UTC · workflow run |
🦩 flamingo Code Review✅ Tests and checks passed on this commit (3 lanes). 9 findings: 🔴 0 action required · 🟠 0 recommended · 🔵 9 informational Advisory: findings do not block the merge. Rules cited:
🔵 Informational (9)
✅ What this change does well
Inline comments: 8 new Outside the lines this diff changes (no inline comment possible)
2 possible problems checked and ruled out
🧪 Tests and mutationTests per lane
Checks
Stage 2 lanes: Maven test passed (7853 run, 0 failed, 443 skipped - skipped are ITs gated by -Dintegration.tests, including the new TicketAgentVisibilityIT); PIT mutation passed; OpenGrep security check passed with no places. Mutation on new lines: openframe-api-lib 6/6 killed, openframe-data-mongo-sync 11/11 killed, openframe-gateway-service-core 6/6 killed. The 9 NO_COVERAGE mutants on ClientOwnerScope (lines 34, 40, 60, 62, 63) are a tool artefact: ClientOwnerScope lives in openframe-data-mongo-common but its tests (ClientOwnerScopeTest, 17 cases covering null requester, null accountId, non-EMAIL source, unlinked account, other customer, pre-cut-off, empty set, null set) live in openframe-data-mongo-sync, which per-module PIT does not run against mo. ClientRequesterAccounts.java is an interface with no logic, so 'not mutation-tested' is not a real gap. Worktree carries uncommitted local pom pins (feature-CU-17tkuw66na0-SNAPSHOT); left untouched. PR head 00c86fd equals the local HEAD. Mutation testingThis build has no PIT plugin, so each module is mutated from the command line with pit-adhoc.sh, changing nothing in the repository.
New code, its covering tests and the result
The covering tests by name (12 methods)
What the surviving mutations leave unverified
9 mutants on lines this change added are not caught (0 survived, 9 with no test reaching them): each is annotated on its line in the 1 gap (not tested here):
🤖 Prompt for AI agents: fix every findingNext: commit a suggestion, or hand a comment's prompt to your coding agent. React 👍 on a finding that helped and 👎 on one that is wrong: the reviewer learns from both. Review again. New commits are not reviewed until you ask:
Or comment Updated 2026-12-03 21:02 UTC · reviewed from Andrii Kachur's machine |
yevhenii-flamingo
left a comment
There was a problem hiding this comment.
A couple of points from the checklist pass.
6624fee to
c8a3d3a
Compare
# Conflicts: # openframe-data-mongo-sync/src/test/java/com/openframe/data/repository/ticket/CustomTicketRepositoryFilterTest.java
…filters are combined
…ch and activity criteria
…ed directory summary
…ory summary, gateway context keeps no token
Email tickets in Fae, backend part 1 of 3 (oss-lib). ClickUp: https://app.clickup.com/t/17tkuw66na0
A device (AGENT) now also sees the email-created tickets whose requester is a directory user linked to that device. Same ticket entity, same reads; only the visibility rule is wider.
ClientOwnerScopegets the requester account ids of the calling machine;allows(Ticket)= today's owner rule OR (creationSource = EMAILandrequester.accountIdin that set). The email branch ignores the organization and the cut-off. A requester without an account id is never visible.ClientRequesterAccounts(openframe-data-mongo-common);ClientOwnerScopeResolveruses it when a bean exists (saas-lib registers it behind the email-to-ticket flag), else an empty set, so behaviour is unchanged without it.getTickets:$and: [{$or: [ownerBranch, emailBranch]}]; the search's top-level$orand all filters apply to both branches; the owner branch keeps the cut-off.getTicket/getTicketByNumberfilter byallows.tenant_requester_account(tenantId,requester.accountId).NatsClientContextcarries the device's bearer token and tenant namespace from the websocket upgrade (excluded fromtoString, never logged), so the tenant gateway can ask ai-agent which dialogs the device may read.Tests: red spec tests first, then implementation; PIT on changed lines 32/32 killed.
TicketAgentVisibilityITruns against real Mongo.Change-Set: feature-cu-17tkuw66na0
Change set
flamingo-stack/openframe-oss-lib#3337: these pull requests are one change, reviewed together.Linked work
Linked by the
Depends-On/Change-Setlines in these descriptions; this block is maintained by the hub.