Skip to content

refactor(assetregistry): close kernel and projection modules - #270

Merged
kl3inIT merged 5 commits into
mainfrom
refactor/modulith-assetregistry-kernel
Aug 2, 2026
Merged

refactor(assetregistry): close kernel and projection modules#270
kl3inIT merged 5 commits into
mainfrom
refactor/modulith-assetregistry-kernel

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • close assetregistry.kernel around canonical Asset identity, accountable roles, authorization outbox leases, and readiness
  • expose immutable parent-facing commands and queries through the exact assetregistry::api named interface
  • close assetregistry.authorization around OpenFGA projection/convergence and enforce Propagation.NEVER for external writes
  • serialize Skill replacement, review submission, and direct publication on the parent-owned Draft row
  • keep parent-owned draft/revision/review/release/catalog persistence and preserve endpoints, schema, and OpenFGA behavior

Architecture evidence

The planned intermediate parent-to-Kernel projection edge failed modules.verify() with an assetregistry -> kernel -> assetregistry cycle. This PR therefore applies the already-reviewed projection-module topology in the same code-bearing slice instead of weakening verification. Both nested modules are closed with exact allowlists; no JPA entity, repository, or lock capability is public.

Verification

  • Core: 453 tests, 0 failures
  • Asset Registry API integration: 22 tests, 0 failures
  • Worker: 65 tests, 0 failures
  • documentation operating model: 509 Markdown files, 8 mirrored pairs
  • release policy: 23 tests on Node 24.15.0
  • terminating clean test --no-parallel --max-workers=1: 99 tasks in 4m18s
  • modules.verify(), import-boundary audit, and git diff --check
  • JetBrains semantic inspection unavailable; documented Gradle/mechanical fallback used

Scope

46 changed paths, including production code and focused tests. No endpoint, schema, persistence mapping, or authorization-semantic change. Public product docs are unaffected because this is an internal package and transaction-boundary refactor.

skip-release: intermediate modular refactor; release follows completion of the full refactor goal

Summary by CodeRabbit

  • New Features

    • Added asset registration, identity, authorization, role, and portfolio management capabilities.
    • Added support for querying asset ownership health, role history, and active assets.
    • Added authorization projection queueing with completion and failure handling.
  • Bug Fixes

    • Improved organization-scoped asset access and validation.
    • Added safeguards for oversized namespace and slug values and duplicate role assignments.
  • Tests

    • Expanded coverage for asset lifecycle, authorization projection, modular boundaries, and validation.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 30154d98-c9bc-4669-8afb-385c75af1f13

📥 Commits

Reviewing files that changed from the base of the PR and between 1a06156 and fab2c0b.

⛔ Files ignored due to path filters (1)
  • docs/increments/active/2026-07-31-spring-modulith-package-refactor/plan.md is excluded by !docs/**
📒 Files selected for processing (7)
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionService.java
  • core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/AssetRegistryServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/SkillDistributionServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetKernelServiceTests.java
📝 Walkthrough

Walkthrough

The asset registry is reorganized into API, kernel, catalog, and authorization modules. New command/query contracts and kernel services replace direct repository access. Authorization projection uses a queue with explicit transaction boundaries.

Changes

Asset registry boundaries

Layer / File(s) Summary
Kernel contracts and persistence
core/src/main/java/com/orgmemory/core/assetregistry/api/*, core/src/main/java/com/orgmemory/core/assetregistry/kernel/*, core/src/test/java/com/orgmemory/core/assetregistry/kernel/*
New asset command/query contracts and AssetKernelService handle registration, role assignment, lifecycle transitions, identity lookup, authorization targets, and role history. Authorization batching uses a public projection queue.
Registry service integration
core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java, core/src/main/java/com/orgmemory/core/assetregistry/AssetCatalogReadModelRepository.java, core/src/main/java/com/orgmemory/core/assetregistry/AssetDraftRepository.java, core/src/main/java/com/orgmemory/core/assetregistry/SkillDistributionService.java, core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryService.java, core/src/test/java/com/orgmemory/core/assetregistry/*
Registry workflows now use identity, role, portfolio, catalog, draft, and authorization APIs instead of direct asset and authorization repositories.
Authorization projection queue
core/src/main/java/com/orgmemory/core/assetregistry/authorization/*, apps/worker/src/main/java/com/orgmemory/worker/authorization/AssetAuthorizationConvergenceScheduler.java, apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java, core/src/test/java/com/orgmemory/core/assetregistry/authorization/*
Projection and convergence services use AssetAuthorizationProjectionQueue, claim batches explicitly, complete or fail batches, and run their entry points with Propagation.NEVER.
Module boundary verification
core/src/main/java/com/orgmemory/core/assetregistry/kernel/package-info.java, core/src/main/java/com/orgmemory/core/assetregistry/authorization/package-info.java, core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java
The kernel and authorization packages are declared as closed application modules. Tests verify permitted dependencies and exposed root types.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Scheduler
  participant ConvergenceService
  participant ProjectionQueue
  participant ProjectionService
  participant ExternalWriter
  Scheduler->>ConvergenceService: reconcile(limit)
  ConvergenceService->>ProjectionQueue: claimPending(limit)
  ProjectionService->>ProjectionQueue: claimForAsset(organizationId, assetId)
  ProjectionService->>ExternalWriter: write relationship tuples
  ExternalWriter-->>ProjectionService: authorization model ID or failure
  ProjectionService->>ProjectionQueue: complete(batch, model ID)
  ProjectionService->>ProjectionQueue: fail(batch, code, message)
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: closing the Asset Registry kernel and projection modules.
Description check ✅ Passed The description covers the change, architecture rationale, verification evidence, scope, and documentation impact.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/modulith-assetregistry-kernel

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Tegami

This repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under .tegami/ before merging.

Create a changelog → · Changelog format

Release preview

Package Bump Version
orgmemory minor 0.1.10.2.0

This PR does not add changelog files. Pending changelogs from other branches are included in the preview above.

Run pnpm run tegami locally to create a changelog interactively.

Managed by Tegami.

@kl3inIT

kl3inIT commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kl3inIT

kl3inIT commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java (1)

5-11: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add null validation to match sibling API records.

AssetAuthorizationTarget is now public and part of the fail-closed authorization lookup contract, per AssetAuthorizationTargetQuery. Unlike AssetIdentity and AssetRegistrationCommand.NewAsset in the same package, this record has no compact constructor validating required fields. Add the same Objects.requireNonNull pattern for consistency and to fail loudly on malformed authorization targets.

♻️ Proposed fix
+import java.util.Objects;
 import java.util.UUID;

 public record AssetAuthorizationTarget(
         UUID organizationId,
         UUID assetId,
         UUID knowledgeSpaceId,
         AssetType type,
         boolean authorizationReady) {
+
+    public AssetAuthorizationTarget {
+        Objects.requireNonNull(organizationId, "organizationId");
+        Objects.requireNonNull(assetId, "assetId");
+        Objects.requireNonNull(knowledgeSpaceId, "knowledgeSpaceId");
+        Objects.requireNonNull(type, "type");
+    }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java`
around lines 5 - 11, Add a compact constructor to AssetAuthorizationTarget that
applies Objects.requireNonNull to each required reference field—organizationId,
assetId, knowledgeSpaceId, and type—matching the validation pattern used by
sibling API records. Leave the primitive authorizationReady unchanged and ensure
malformed targets fail during construction.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@core/src/main/java/com/orgmemory/core/assetregistry/AssetDraftRepository.java`:
- Around line 15-23: Update the AssetDraftRepository.findForUpdate method to add
the jakarta.persistence.lock.timeout query hint alongside its PESSIMISTIC_WRITE
lock. Set the hint to the established finite timeout value used by the project
so concurrent requests fail fast while preserving the existing query and lock
behavior.

In
`@core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java`:
- Around line 872-878: Update the changeAvailability transition around
allReleasesWithdrawn and startSunsettingAfterReleaseChange so sunsetting is
attempted only for portfolios in a valid non-terminal state. Add a
coordinator-level state guard before
portfolios.startSunsettingAfterReleaseChange, or update that method to
explicitly handle terminal states, while preserving retireAfterFinalWithdrawal
for final withdrawals.

In
`@core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionService.java`:
- Around line 45-52: Add logging in the RuntimeException catch block of
AssetAuthorizationProjectionService before queue.fail, including the original
exception and contextual details about the failed OpenFGA authorization write.
Keep the existing queue.fail call and AssetUnavailableException conversion
unchanged.

In
`@core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetKernelService.java`:
- Around line 101-118: Add a Flyway migration creating a partial unique index on
the asset-role assignment table over asset_id, principal_type, principal_id, and
role where valid_until is null, preserving the active-assignment uniqueness
enforced by AssetKernelService.assign for all database writers.

In
`@core/src/test/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionServiceTests.java`:
- Around line 47-70: Add a test alongside
recordsAnOpaqueFailureWhenTheExternalWriterThrows that stubs
queue.claimForAsset(organizationId, assetId) to return Optional.empty() and
invokes AssetAuthorizationProjectionService.project with those IDs. Assert that
the call throws AssetUnavailableException, covering the already-being-projected
or unavailable branch without configuring the writer or batch.
- Around line 72-87: Replace the reflection-only assertions in
externalProjectionExplicitlyRejectsAnAmbientDatabaseTransaction with a Spring
proxy-based integration test that invokes both project(AssetAuthorizationBatch)
and reconcile(int) inside an existing transaction and verifies Propagation.NEVER
rejects execution. Ensure the test reaches the package-private batch overload
through the proxied service, rather than only checking annotations on the public
methods.

In
`@core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetKernelServiceTests.java`:
- Around line 117-139: Extend
kernelCommandsJoinTheParentTransactionAndQueueOperationsOwnShortTransactions in
AssetKernelServiceTests to assert that AssetAuthorizationCoordinator.complete
and fail use Propagation.REQUIRES_NEW, matching the existing claimForAsset and
claimPending assertions and covering completion and failure state updates.

In
`@core/src/test/java/com/orgmemory/core/assetregistry/SkillDistributionServiceTests.java`:
- Around line 185-195: Add a test in SkillDistributionServiceTests that creates
a valid-coordinate AssetIdentity with a non-SKILL AssetType, invokes
SkillDistributionService.manifest, and asserts AssetNotFoundException.
Parameterize or extend assetIdentity as needed while preserving existing
SKILL-based tests.

In `@core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java`:
- Around line 1167-1181: Update the expected API type set in
ModulithVerificationTests to use class literals with getName() for each exposed
top-level AssetAuthorization, AssetIdentity, AssetPortfolio, AssetRegistration,
and AssetRole type. Represent nested types using nested class literals such as
AssetRegistrationCommand.NewAsset.class.getName(), preserving the existing
expected fully qualified names while enabling compile-time rename checks.
- Around line 1225-1227: Add a concise comment immediately above the
`resideInAnyPackage` entries explaining that `com.orgmemory.core.assetregistry`
intentionally matches only the exact package, while the authorization pattern
includes subpackages; preserve both patterns unchanged.

---

Outside diff comments:
In
`@core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java`:
- Around line 5-11: Add a compact constructor to AssetAuthorizationTarget that
applies Objects.requireNonNull to each required reference field—organizationId,
assetId, knowledgeSpaceId, and type—matching the validation pattern used by
sibling API records. Leave the primitive authorizationReady unchanged and ensure
malformed targets fail during construction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ca17a1ba-12c2-451d-b3a1-4190a27200f4

📥 Commits

Reviewing files that changed from the base of the PR and between da32eef and 1a06156.

⛔ Files ignored due to path filters (5)
  • docs/increments/active/2026-07-31-spring-modulith-package-refactor/assetregistry-authorization-challenge-verdict.md is excluded by !docs/**
  • docs/increments/active/2026-07-31-spring-modulith-package-refactor/design.md is excluded by !docs/**
  • docs/increments/active/2026-07-31-spring-modulith-package-refactor/plan.md is excluded by !docs/**
  • docs/specs/domains/asset-registry.md is excluded by !docs/**
  • docs/tests/domains/asset-registry.md is excluded by !docs/**
📒 Files selected for processing (41)
  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java
  • apps/worker/src/main/java/com/orgmemory/worker/authorization/AssetAuthorizationConvergenceScheduler.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetAuthorizationBatch.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetCatalogReadModelRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDraftRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/SkillDistributionService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationProjectionCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTargetQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentity.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentityQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetPortfolioCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRegistrationCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceReport.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/package-info.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/Asset.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationBatch.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationCoordinator.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutbox.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationProjectionQueue.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationStatus.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetKernelService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignment.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignmentRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/package-info.java
  • core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/AssetRegistryServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/AssetValidationTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/SkillDistributionServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetKernelServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetValidationTests.java
💤 Files with no reviewable changes (2)
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetAuthorizationBatch.java
  • core/src/test/java/com/orgmemory/core/assetregistry/AssetValidationTests.java
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Treat the repository and runtime evidence as the engineering system of record; do not treat chat or Northstar as authoritative.
Before changing a domain, read its specification, test-coverage document, and applicable decision filenames.
Material decisions about domain boundaries, authorization, persistence, publication, concurrency, cache isolation, parity scope, or deployment require an independent architecture challenge and documented alternatives before implementation.
Do not use completed increment documents as the source for current behavior; use them only for history or archaeology.
Before using unfamiliar Spring Boot, Spring Modulith, Spring AI, Gradle, React, Vite, Tailwind, TypeScript, Next.js, or Fumadocs APIs, consult current official documentation, Context7, and the relevant verification skill.
Read docs/guidelines/agent-safety.md before retrieval, AI, MCP, permission, upload, graph, or export work; never commit secrets or customer data.
Keep ddl-auto=validate and pair every persisted-model change with a Flyway migration.
Use the testing harness; a terminating clean test is the JVM context gate, and bootRun is not verification.

Files:

  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationProjectionCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceReport.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetPortfolioCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentity.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentityQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTargetQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/Asset.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDraftRepository.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetValidationTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryService.java
  • apps/worker/src/main/java/com/orgmemory/worker/authorization/AssetAuthorizationConvergenceScheduler.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationBatch.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRegistrationCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignment.java
  • core/src/main/java/com/orgmemory/core/assetregistry/SkillDistributionService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/package-info.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationCoordinator.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetCatalogReadModelRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationProjectionQueue.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxRepository.java
  • core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/SkillDistributionServiceTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/package-info.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutbox.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRepository.java
  • core/src/test/java/com/orgmemory/core/assetregistry/AssetRegistryServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignmentRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationStatus.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetKernelServiceTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetKernelService.java
**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

Apply IDE inspection only to edited backend Java files.

Files:

  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationProjectionCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceReport.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetPortfolioCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTarget.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentity.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentityQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTargetQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/Asset.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDraftRepository.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetValidationTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryService.java
  • apps/worker/src/main/java/com/orgmemory/worker/authorization/AssetAuthorizationConvergenceScheduler.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationBatch.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRegistrationCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignment.java
  • core/src/main/java/com/orgmemory/core/assetregistry/SkillDistributionService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/package-info.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationCoordinator.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetCatalogReadModelRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleCommand.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationProjectionQueue.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxRepository.java
  • core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/SkillDistributionServiceTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/package-info.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutbox.java
  • core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleQuery.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRepository.java
  • core/src/test/java/com/orgmemory/core/assetregistry/AssetRegistryServiceTests.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignmentRepository.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationStatus.java
  • core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetKernelServiceTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetKernelService.java
🔇 Additional comments (42)
core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceReport.java (1)

1-1: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationConvergenceService.java (2)

1-9: LGTM!


13-38: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionService.java (3)

1-27: LGTM!


29-36: LGTM!


38-61: 🩺 Stability & Availability

Avoid package-private declaration order before the Spring proxy. The public project(UUID, UUID) declaration comes before the package-private overload, but the annotation order in the source text is not relevant: the package-private project(AssetAuthorizationBatch) will not be advised under Spring’s default transaction proxy unless the public marker overload is removed or made package-private, and tests should not just check annotation presence.

			> Likely an incorrect or invalid review comment.
core/src/main/java/com/orgmemory/core/assetregistry/authorization/package-info.java (1)

1-4: LGTM!

apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java (1)

24-24: LGTM!

apps/worker/src/main/java/com/orgmemory/worker/authorization/AssetAuthorizationConvergenceScheduler.java (1)

3-3: LGTM!

Also applies to: 10-48

core/src/test/java/com/orgmemory/core/assetregistry/authorization/AssetAuthorizationProjectionServiceTests.java (2)

27-45: LGTM!


47-70: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationProjectionQueue.java (1)

1-17: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationProjectionCommand.java (1)

1-9: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetAuthorizationTargetQuery.java (1)

1-11: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentity.java (1)

1-27: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetIdentityQuery.java (1)

1-14: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetPortfolioCommand.java (1)

1-14: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRegistrationCommand.java (1)

1-32: LGTM!

core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxTests.java (1)

1-1: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/AssetCatalogReadModelRepository.java (1)

13-13: 🗄️ Data Integrity & Integration

Record the intended JPQL access path for the closed Asset entity.

AssetCatalogReadModelRepository no longer imports com.orgmemory.core.assetregistry.kernel.Asset, but every query still references Entity name Asset and selects kernel columns such as asset.authorizationReady, asset.portfolioState, and asset.knowledgeSpaceId. JPQL entity names bypass Java import visibility, so this preserves full column-level access to the kernel entity while changing only the generic parameter to AssetDraft. If this read-model persistence bypass is intentional, document the domain-boundary exception and keep ModulithVerificationTests from treating the Asset string reference as an acceptable import dependency.

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleCommand.java (1)

1-27: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/api/AssetRoleQuery.java (1)

1-39: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/Asset.java (1)

1-1: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationBatch.java (1)

1-52: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationCoordinator.java (1)

1-1: LGTM!

Also applies to: 10-10, 20-20, 38-76, 80-131

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutbox.java (1)

1-1: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignmentRepository.java (1)

1-1: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/package-info.java (1)

1-10: LGTM!

core/src/test/java/com/orgmemory/core/assetregistry/kernel/AssetValidationTests.java (1)

1-30: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationStatus.java (1)

1-8: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetKernelService.java (1)

46-97: LGTM!

Also applies to: 130-241

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRepository.java (1)

11-28: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetRoleAssignment.java (1)

1-1: LGTM!

core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java (3)

207-207: LGTM!

Also applies to: 243-254, 284-284, 128-190, 498-551, 889-909


916-919: 🩺 Stability & Availability

Lock and tenant scope are already correct.

AssetDraftRepository.findForUpdate uses PESSIMISTIC_WRITE and filters by both assetId and organizationId, so no change is needed.


983-989: 🗄️ Data Integrity & Integration

No change needed for these mappings. The AssetRoleQuery nested records use the same component order as the AssetView nested records for both OwnershipHealth and RoleAssignment, so positional mapping is not a mismatch at these sites.

core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryService.java (1)

3-4: LGTM!

Also applies to: 46-60

core/src/main/java/com/orgmemory/core/assetregistry/SkillDistributionService.java (1)

3-4: LGTM!

Also applies to: 28-47, 64-83

core/src/test/java/com/orgmemory/core/assetregistry/AssetRegistryServiceTests.java (1)

3-4: LGTM!

Also applies to: 64-64, 116-116, 161-161

core/src/test/java/com/orgmemory/core/assetregistry/SkillDistributionServiceTests.java (1)

10-13: LGTM!

Also applies to: 82-90, 110-116, 128-128, 154-160, 219-219

core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java (1)

1185-1216: LGTM!

Also applies to: 1233-1245

core/src/main/java/com/orgmemory/core/assetregistry/kernel/AssetAuthorizationOutboxRepository.java (1)

22-56: 🗄️ Data Integrity & Integration

No duplicate types remain in the old package.

The only declarations are under com.orgmemory.core.assetregistry.kernel, so the repository change does not introduce a duplicate entity/enum short-name conflict.

Comment thread core/src/test/java/com/orgmemory/core/ModulithVerificationTests.java Outdated
@kl3inIT

kl3inIT commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Outside-diff review finding addressed in 01e26c2: AssetAuthorizationTarget now validates organizationId, assetId, knowledgeSpaceId, and type with a compact constructor, with focused null-input coverage. Full :core:test passes 456/456 and the PR remains at 46 changed paths.

@kl3inIT
kl3inIT merged commit 9b88c33 into main Aug 2, 2026
18 checks passed
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