Skip to content

feat(stream-service-core): log lines for a technician's decisions on profiles CU-17tkuw64b0y - #3356

Merged
oleksandrd-flamingo merged 3 commits into
mainfrom
feature/CU-17tkuw64b0y
Dec 5, 2026
Merged

oleksandrd-flamingo merged 3 commits into
mainfrom
feature/CU-17tkuw64b0y

Conversation

@oleksandrd-flamingo

@oleksandrd-flamingo oleksandrd-flamingo commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Stream side of "Possible duplicates and left-out accounts are decided by a technician" (ticket 3 of Phase 1, Client identity gateway). Follows #3325.

Change-Set: feature-cu-17tkuw64b0y
ClickUp task: CU-17tkuw64b0y Possible duplicates and left-out accounts are decided by a technician
Design-Doc: https://product-hub.flamingo.so/admin/design-docs/client-identity-gateway-iam-sso

Contract: docs/build/client-identity-gateway-iam-sso/CONTRACT.md, the rows of ticket 3 (agreed in 0.8).

Why

A technician's decisions on profiles are written as access changes and reach the unified log through the stream. The stream skips an access change whose action it does not know, so the three new actions have to be known here before a tenant sends them. This is released first; the library and tenant pull requests of the change set follow.

What changes

  • UnifiedEventType: IDENTITY_ACCOUNT_MARKED_AS_PERSON, IDENTITY_PROFILE_MARKED_NOT_A_PERSON, IDENTITY_POSSIBLE_DUPLICATE_DISMISSED, all INFO.
  • AccessChangeEventDeserializer:
    • the three actions get a type and a readable line: "Marked Microsoft 365 account as a person: ", "Marked as not a person", "Marked and as not the same person";
    • an unlink with reason HAND reads "(by a technician)"; any other unlink still reads "(account gone)";
    • a link with evidence TECHNICIAN_DECISION reads "(by a technician)" instead of "(created by the sync)";
    • the details of a dismissal (otherProfileId, otherProfileName, reasons) are carried into the event.

Nothing changes for the six existing actions.

Tests

AccessChangeEventDeserializerTest (+6), UnifiedEventTypeTest (+3 rows). The two modules: 58 and 470 tests, 0 failed. Full repository suite: 14,031 run, 0 failed, 751 skipped (the flag-gated integration tests).

Change set flamingo-stack/openframe-oss-lib#3356: these pull requests are one change, reviewed together.

  • flamingo-stack/openframe-oss-lib#3356 (this pull request): feat(stream-service-core): log lines for a technician's decisions on profiles CU-17tkuw64b0y · landed
  • …and 3 pull requests not visible

Linked work

  • …and 2 linked items not shown here

Linked by the Depends-On / Change-Set lines in these descriptions; this block is maintained by the hub.

@oleksandrd-flamingo oleksandrd-flamingo added the build Run the PR builds and publish snapshots (Java, npm preview); stays on until removed label Dec 4, 2026
@flamingo

flamingo Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🦩 flamingo Code Review

✅ Tests and checks passed on this commit (3 lanes).

✅ No findings on the current head.

Advisory: findings do not block the merge.

Files Lines Languages Tests Checks 🔴 Action required 🟠 Recommended 🔵 Informational
4 +156 / -5 Java (1 Maven lane) ✅ 4134 / 4134 green (437 skipped) ✅ 1 / 1 passed 0 0 0

✅ What this change does well

  • The new identity event types in UnifiedEventType.java are mirrored one-for-one in UnifiedEventTypeTest's CsvSource, so severity/summary drift is caught.
  • AccessChangeEventDeserializer keeps all new action/reason/evidence values as named constants and extends DETAIL_FIELDS so the new payload fields (otherProfileId, otherProfileName, reasons) survive into details.
  • AccessChangeEventDeserializerTest covers both branches of the new unlink reason logic (HAND vs absent reason) and the technician-decision link branch.
  • openframe-stream-service-core/src/test/java/com/openframe/stream/deserializer/AccessChangeEventDeserializerTest.java asserts the exact log line for every new action and for both unlink reasons, so a wrong wording cannot pass.
1 possible problem checked and ruled out
  • openframe-stream-service-core/src/main/java/com/openframe/stream/deserializer/AccessChangeEventDeserializer.java:246 duplicateDismissedMessage renders "null" when otherProfileName is absent from the change event: text(after, FIELD_OTHER_PROFILE_NAME) may be null and String.formatted then renders the literal 'null' in an audit message; sibling helpers in the same file guard with fallbacks, so it's real but only when the optional field is absent.

🧪 Tests and mutation

Tests per lane

Language Project Command Status Counts Time
Java (Maven) . mvn -B test -pl openframe-data-kafka,openframe-stream-service-core -am ✅ passed openframe-core 271 · openframe-data-kafka 58 · openframe-data-loki 96 · openframe-data-mongo-common 115 · openframe-data-mongo-sync 3377 (405 skipped) · openframe-data-redis 2 · openframe-event-publishing 103 (32 skipped) · openframe-exception 9 · openframe-stream-service-core 470 · fleetmdm 70 · 0 failures 56.9 s

Checks

Check Kind Language Project Status Time
OpenGrep security Java (OpenGrep) . ✅ passed 12.9 s

Both changed modules pass their tests; the deserializer has no surviving mutant on a line this change added. UnifiedEventType is an enum of constants and is outside the module's mutation targets.

Mutation testing

This build has no PIT plugin, so each module is mutated from the command line with pit-adhoc.sh, changing nothing in the repository.

Module Classes Whole classes New lines only Time
data-kafka 0 mutants, 0 killed (0%) none on added lines 10 s
stream-service-core AccessChangeEventDeserializer 39 mutants, 38 killed (97%), 1 survived, test strength 97%, line coverage 100% 5 mutants: 5 killed 12 s

New code, its covering tests and the result

New code Covering tests Result
unlinkedMessage in AccessChangeEventDeserializer, line 243 AccessChangeEventDeserializerTest (3) killed
duplicateDismissedMessage in AccessChangeEventDeserializer, line 248 AccessChangeEventDeserializerTest (1) killed
linkedMessage in AccessChangeEventDeserializer, lines 253-254 AccessChangeEventDeserializerTest (3), 3 more killed
The covering tests by name (3 methods)
  • AccessChangeEventDeserializer.unlinkedMessage: AccessChangeEventDeserializerTest.deserialize_unlinkWithoutReason_lineEndsAccountGone, AccessChangeEventDeserializerTest.deserialize_accountUnlinked_unlinkedEventTypeAndGoneReason, AccessChangeEventDeserializerTest.deserialize_unlinkByHand_lineSaysByATechnician
  • AccessChangeEventDeserializer.duplicateDismissedMessage: AccessChangeEventDeserializerTest.deserialize_possibleDuplicateDismissed_typeLineAndDetailsCarried
  • AccessChangeEventDeserializer.linkedMessage: AccessChangeEventDeserializerTest.deserialize_accountLinkedSyncCreated_createdBySyncMessage, AccessChangeEventDeserializerTest.deserialize_accountLinkedVerifiedEmail_linkedMessageWithVerifiedAddress, AccessChangeEventDeserializerTest.deserialize_accountLinkedByATechnician_lineSaysByATechnician, and 3 more

1 gap (not tested here):

  • Java (Maven) .: UnifiedEventType.java changed but not mutation-tested (outside the mutation targets openframe-data-kafka configures)

Review again. New commits are not reviewed until you ask:

  • Review the new commits: only what was pushed since this review
  • Review the whole diff again: everything, including what was already reviewed

Or comment @flamingo-review (new commits) or @flamingo-review full (everything). Add the flamingo-review-always label to review every push.

Updated 2026-12-04 22:30 UTC · reviewed from Oleksandr Didukh's machine

@flamingo

flamingo Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🦩 flamingo Code Review / security

✅ No findings on the current head.

Advisory: findings do not block the merge.

Files Lines 🔴 Action required 🟠 Recommended 🔵 Informational
4 +156 / -5 0 0 0

Review again. New commits are not reviewed until you ask:

  • Security-check the new commits: only what was pushed since this security review
  • Security-check the whole diff again: everything, including what was already checked

Or comment @flamingo-review security (new commits) or @flamingo-review security full (everything). Add the flamingo-security-review-always label to security-review every push.

Updated 2026-12-05 11:58 UTC · reviewed from Oleksandr Didukh's machine

@oleksandrd-flamingo
oleksandrd-flamingo added this pull request to the merge queue Dec 5, 2026
Merged via the queue into main with commit 13f01c7 Dec 5, 2026
21 checks passed
@oleksandrd-flamingo
oleksandrd-flamingo deleted the feature/CU-17tkuw64b0y branch December 5, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Run the PR builds and publish snapshots (Java, npm preview); stays on until removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants