Skip to content

Surface deleted MVO details and sync rule attribution in outcomes#1098

Merged
JayVDZ merged 5 commits into
mainfrom
claude/causality-tree-redesign-j7ltit
Jul 22, 2026
Merged

Surface deleted MVO details and sync rule attribution in outcomes#1098
JayVDZ merged 5 commits into
mainfrom
claude/causality-tree-redesign-j7ltit

Conversation

@JayVDZ

@JayVDZ JayVDZ commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #1085 and #1086

This PR implements two related improvements to sync outcome tracking in the causality tree:

  1. Sync Rule Attribution (Persist the scoping Synchronisation Rule on Out of Scope sync outcomes #1085): When a CSO falls out of scope or is projected, the resulting sync outcomes now record which Synchronisation Rule caused the change (rule id + name snapshot). This ensures the attribution survives later rule renames or deletions, providing administrators with clear context in the causality tree.

  2. Deleted MVO Details (Causality Tree: surface deleted Identity details on MVO Deleted outcomes #1086): When a Metaverse Object is deleted as a result of an out-of-scope disconnect, the MvoDeleted and MvoDeletionScheduled outcomes now carry:

    • The deleted MVO's id and display name snapshot (captured before deletion)
    • A human-readable Deletion Rule reason in the detail message
    • For scheduled deletions, combined with the existing grace-period text

Previously, the out-of-scope disconnection path left these fields null because the CSO→MVO join was broken before outcome nodes were built, producing bare "MVO Deleted" labels in the causality tree with no context.

Changes

  • Database: Added SyncRuleId and SyncRuleName columns to ActivityRunProfileExecutionItemSyncOutcome (migration 20260721215606)
  • Models: Extended MetaverseObjectChangeResult to capture deleted MVO id/name and deletion rule reason before the join is broken; updated ProjectionDecision and ExportEvaluationResult to carry sync rule attribution
  • Worker: Modified SyncTaskProcessorBase to record MVO deletion outcomes for out-of-scope disconnects with existing RPEIs; updated SyncOutcomeBuilder to populate sync rule and deletion details on outcomes
  • UI: Updated OutcomeTreeNode.razor to link to the durable deletion record browser for MVO Deleted outcomes (since the MVO no longer exists)
  • Tests: Added comprehensive workflow tests (MvoDeletionOutcomeDetailTests, SyncRuleOutcomeAttributionTests) and database-level tests (SyncOutcomeSyncRuleAttributionDatabaseTests) to verify both features; added export evaluation test for opportunistic provisioning attribution

Type of change

  • New feature (non-breaking change that adds functionality)
  • Documentation update

Testing

  • dotnet build JIM.sln succeeds with zero errors
  • dotnet test JIM.sln passes
  • New functionality has tests (workflow and database integration tests added)
  • Manually tested in local development environment (full-stack validation of out-of-scope disconnect flow with immediate and scheduled MVO deletion)

Test coverage:

  • MvoDeletionOutcomeDetailTests (410 lines): Verifies deleted MVO details appear in outcomes for both immediate and scheduled deletions via out-of-scope path
  • SyncRuleOutcomeAttributionTests (266 lines): Verifies sync rule attribution on DisconnectedOutOfScope and Projected outcomes
  • SyncOutcomeSyncRuleAttributionDatabaseTests (135 lines): Real PostgreSQL verification that bulk insert paths persist sync rule columns
  • ExportEvaluationTests: Added test for opportunistic provisioning rule attribution
  • SyncOutcomeBuilderTests: Added tests for sync rule field population
  • OutOfScopeChangeTypeTests: Extended to verify MVO deletion fate capture

Documentation

  • Engineering reference documentation updated (engineering/SYNC_RULE_CAUSALITY_TRACKING.md)
  • Public documentation updated (docs/configuration/activities.md) - clarified sync outcome field set and MVO deletion outcome details

Checklist

Additional context

The fix addresses a long-standing gap in causality tree visibility: administrators could not see why a

https://claude.ai/code/session_01Mio4FzDypheXHLL7Vgg9US

claude added 3 commits July 21, 2026 21:41
…o 10.0.10

Data Protection 10.0.10 pulls in System.Security.Cryptography.Xml 10.0.9,
which now carries four high-severity advisories (GHSA-23rf-6693-g89p,
GHSA-8q5v-6pqq-x66h, GHSA-cvvh-rhrc-wg4q, GHSA-g8r8-53c2-pm3f). NuGet
audit treats these as errors, so restore fails repo-wide. Re-apply the
previously used direct transitive override at the patched 10.0.10 and
refresh lock files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mio4FzDypheXHLL7Vgg9US
…#1085)

Adds nullable SyncRuleId + SyncRuleName snapshot columns to
ActivityRunProfileExecutionItemSyncOutcome so causality data records
which Synchronisation Rule caused an outcome. Populated for
DisconnectedOutOfScope (the scoping rule), and opportunistically for
Projected and Provisioned where the rule is already in hand. Stored as
plain scalars with a name snapshot, matching the TargetEntityId
pattern, so attribution survives rule rename/deletion. Raw-SQL bulk
insert, COPY, and cross-page merge paths updated; new migration
AddSyncRuleAttributionToSyncOutcomes; plan doc updated to keep #399 in
step. Attribute-level attribution remains with #399.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mio4FzDypheXHLL7Vgg9US
…mes (#1086)

The out-of-scope path broke the CSO-MVO join before outcome nodes were
built from that navigation, so MVO Deleted / MVO Deletion Scheduled
nodes rendered as bare labels. The display name is now snapshotted
before recall/deletion and threaded through the change result, all
build paths populate TargetEntityId/TargetEntityDescription, and
DetailMessage carries why the Metaverse Object Deletion Rule fired plus
the grace period for scheduled deletions. The Causality Tree links MVO
Deleted nodes to the deletion record browser. Historic rows without a
snapshot degrade to the previous label. Changelog and activities doc
updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mio4FzDypheXHLL7Vgg9US
Comment thread test/JIM.Worker.Tests/Workflows/SyncRuleOutcomeAttributionTests.cs Fixed
claude added 2 commits July 22, 2026 06:52
Fifth member of the July 2026 .NET servicing wave already suppressed in
.trivyignore; added to Trivy's database after that entry was written.
Flagged against System.Security.Cryptography.Xml 10.0.6 bundled inside
the SDK image's PowerShell 7.6.2 install, which exists only in the
build stage; the runtime images scan clean and JIM's own reference is
overridden to 10.0.10. No newer sdk:10.0-noble digest exists to pull.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mio4FzDypheXHLL7Vgg9US
@JayVDZ
JayVDZ merged commit b9640e4 into main Jul 22, 2026
16 checks passed
@JayVDZ
JayVDZ deleted the claude/causality-tree-redesign-j7ltit branch July 22, 2026 07:16
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.

Persist the scoping Synchronisation Rule on Out of Scope sync outcomes

2 participants