Skip to content

revert(asset-registry): restore the PR3 checkpoint - #60

Merged
kl3inIT merged 3 commits into
mainfrom
kl3inIT/revert-unauthorized-pr4-pr5
Jul 26, 2026
Merged

revert(asset-registry): restore the PR3 checkpoint#60
kl3inIT merged 3 commits into
mainfrom
kl3inIT/revert-unauthorized-pr4-pr5

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What changed

Why

The product owner explicitly stopped the sequence after PR3, but the older persistent five-PR automation continued and merged PR4/PR5. This PR restores the repository to the authorized PR3 scope without rewriting published Git history.

Impact

  • the /assets UI and PR3 Assistant history remain
  • public Asset MCP delivery and the PR5 golden fixture/evidence are removed
  • production Compose renders again without ORGMEMORY_MCP_RESOURCE_URI or ORGMEMORY_MCP_AUDIENCE

Validation

  • OpenAPI contract regenerated from the post-revert API
  • ./gradlew.bat --no-daemon clean test — 88 tasks passed
  • pnpm -C web check:api
  • pnpm -C web lint
  • pnpm -C web typecheck
  • pnpm -C web build
  • production Compose config validation
  • mechanical Java/config/migration checks
  • git diff --check

57 changed files, below the agreed 100-file limit.

Summary by CodeRabbit

  • Changes
    • MCP access is now limited to authenticated, read-only organization knowledge search.
    • Asset resources, asset tools, and released prompt functionality are no longer available through MCP.
    • Asset detail pages no longer display ownership health badges; release availability indicators remain.
  • Documentation
    • Updated architecture guidance to reflect the simplified knowledge-search integration and persisted data responsibilities.
  • Configuration
    • Removed obsolete MCP audience, resource, and rate-limit settings from configuration examples and deployments.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change removes asset-delivery APIs, MCP asset resources/tools/prompts, and related fixtures. MCP now exposes authenticated read-only knowledge search with simplified JWT security and configuration. Asset views and capability-pack flows are narrowed, while deployment and architecture documentation are updated.

Changes

Asset registry and delivery cleanup

Layer / File(s) Summary
Asset registry contract cleanup
core/src/main/java/com/orgmemory/core/assetregistry/*, core/src/main/java/com/orgmemory/core/knowledge/*, web/src/features/assets/components/asset-detail-page.tsx
Asset delivery methods, ownership-health fields, and the visible asset badges are removed. Capability-pack resolution now produces PackJourney.Item values with persisted progress applied.
API and fixture cleanup
apps/api/src/test/java/com/orgmemory/api/assetregistry/*, apps/api/src/test/resources/db/test-foundation.sql
Integration coverage and fixtures no longer include asset-delivery, golden-fixture, or removed-user setup dependencies; authorization retry timing and pack journey assertions are retained.
MCP security and contract surface
apps/mcp/src/main/java/com/orgmemory/mcp/*, apps/mcp/src/main/resources/*, apps/mcp/src/test/java/com/orgmemory/mcp/*
MCP configuration retains only API URL and timeout, security uses default JWT handling, resources and prompts are disabled, and tests assert one authenticated read-only search_knowledge tool.
Deployment and architecture alignment
.env.example, ARCHITECTURE.md, infrastructure/deployment/*
Retired MCP environment variables and proxy networking are removed, and documentation describes the read-only knowledge-search integration.

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

Possibly related PRs

  • kl3inIT/OrgMemory#47: Both changes modify MCP security filter-chain matcher behavior and actuator health access.
🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes a revert that restores the Asset Registry to the PR3 checkpoint.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kl3inIT/revert-unauthorized-pr4-pr5

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.

@kl3inIT
kl3inIT merged commit ddd62c7 into main Jul 26, 2026
10 of 11 checks passed

@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.

Caution

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

⚠️ Outside diff range comments (1)
ARCHITECTURE.md (1)

9-20: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Diagram edge contradicts the documented MCP call path.

MCP --> CORE implies apps/mcp calls into core directly, but the text (lines 56-60) and McpGatewayProperties/compose wiring (ORGMEMORY_API_BASE_URL: http://api:8080) show MCP forwards the bearer token to the apps/api search contract instead. The edge should point to API, not CORE.

📝 Suggested fix
-    MCP[apps/mcp] --> CORE[core]
+    MCP[apps/mcp] --> API

As per coding guidelines, "Record current behavior in architecture/specification documentation only after it exists in code," so the diagram should reflect the actual MCP → API call path described in the text.

🤖 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 `@ARCHITECTURE.md` around lines 9 - 20, Update the Mermaid architecture
diagram’s MCP dependency edge to point from MCP to API instead of CORE. Keep the
existing CORE relationships unchanged so the diagram reflects the documented
apps/mcp forwarding path through the apps/api search contract.

Source: Coding guidelines

🤖 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.

Outside diff comments:
In `@ARCHITECTURE.md`:
- Around line 9-20: Update the Mermaid architecture diagram’s MCP dependency
edge to point from MCP to API instead of CORE. Keep the existing CORE
relationships unchanged so the diagram reflects the documented apps/mcp
forwarding path through the apps/api search contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ad35c98d-8ccb-4963-86ed-507b695b5d58

📥 Commits

Reviewing files that changed from the base of the PR and between 5bb8334 and 35c4dc3.

⛔ Files ignored due to path filters (13)
  • contracts/openapi.json is excluded by !contracts/openapi.json
  • docs/increments/active/2026-07-25-unified-asset-registry-definition/design.md is excluded by !docs/**
  • docs/increments/active/2026-07-25-unified-asset-registry-definition/gate-decisions.md is excluded by !docs/**
  • docs/increments/active/2026-07-25-unified-asset-registry-definition/plan.md is excluded by !docs/**
  • docs/increments/active/2026-07-25-unified-asset-registry-definition/ui-reference-audit.md is excluded by !docs/**
  • docs/increments/active/README.md is excluded by !docs/**
  • docs/increments/completed/2026-07-25-unified-asset-registry-definition/verification.md is excluded by !docs/**
  • docs/increments/completed/README.md is excluded by !docs/**
  • docs/roadmap.md is excluded by !docs/**
  • docs/runbooks/mcp-asset-delivery.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/**
  • docs/vision.md is excluded by !docs/**
📒 Files selected for processing (44)
  • .env.example
  • ARCHITECTURE.md
  • apps/api/src/main/java/com/orgmemory/api/assetregistry/AssetDeliveryController.java
  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetDeliveryControllerSecurityTests.java
  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java
  • apps/api/src/test/resources/db/test-foundation.sql
  • apps/mcp/src/main/java/com/orgmemory/mcp/AssetDeliveryApiClient.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/AssetDeliveryResources.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/AssetDeliveryTools.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpBearer.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpGatewayProperties.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpRateLimitFilter.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpSecurityConfiguration.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/ReleasedPromptAdapter.java
  • apps/mcp/src/main/resources/application-prod.yml
  • apps/mcp/src/main/resources/application.yml
  • apps/mcp/src/test/java/com/orgmemory/mcp/AssetDeliveryApiClientTests.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/AssetDeliveryToolsTests.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/KnowledgeSearchApiClientTests.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/McpRateLimitFilterTests.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/McpTokenValidationTests.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/OrgMemoryMcpContextTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDeliveryRelease.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDeliveryService.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/AssetRelationResolution.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetView.java
  • core/src/main/java/com/orgmemory/core/assetregistry/CapabilityPackDefinition.java
  • core/src/main/java/com/orgmemory/core/assetregistry/CapabilityPackService.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeCatalogService.java
  • core/src/test/java/com/orgmemory/core/assetregistry/CapabilityPackServiceTests.java
  • demo/fixtures/asset-registry/README.md
  • demo/fixtures/asset-registry/capability-pack-template.json
  • demo/fixtures/asset-registry/mock-tickets.json
  • demo/fixtures/asset-registry/prompt-template.json
  • demo/fixtures/asset-registry/quality-checklist.json
  • demo/fixtures/asset-registry/success-metrics.json
  • demo/fixtures/asset-registry/support-sla-and-escalation.md
  • demo/fixtures/asset-registry/work-instruction.json
  • infrastructure/deployment/compose.production.yaml
  • infrastructure/deployment/production.env.example
  • web/src/features/assets/components/asset-detail-page.tsx
  • web/test/e2e/asset-registry-golden-poc.spec.ts
💤 Files with no reviewable changes (36)
  • demo/fixtures/asset-registry/success-metrics.json
  • demo/fixtures/asset-registry/support-sla-and-escalation.md
  • core/src/main/java/com/orgmemory/core/assetregistry/CapabilityPackDefinition.java
  • demo/fixtures/asset-registry/prompt-template.json
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRelationResolution.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/AssetDeliveryToolsTests.java
  • demo/fixtures/asset-registry/work-instruction.json
  • apps/mcp/src/test/java/com/orgmemory/mcp/AssetDeliveryApiClientTests.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpRateLimitFilter.java
  • demo/fixtures/asset-registry/capability-pack-template.json
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpBearer.java
  • core/src/test/java/com/orgmemory/core/assetregistry/CapabilityPackServiceTests.java
  • demo/fixtures/asset-registry/quality-checklist.json
  • demo/fixtures/asset-registry/mock-tickets.json
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDeliveryRelease.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/AssetDeliveryTools.java
  • demo/fixtures/asset-registry/README.md
  • web/src/features/assets/components/asset-detail-page.tsx
  • apps/mcp/src/main/java/com/orgmemory/mcp/AssetDeliveryApiClient.java
  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetDeliveryControllerSecurityTests.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/McpTokenValidationTests.java
  • web/test/e2e/asset-registry-golden-poc.spec.ts
  • apps/mcp/src/test/java/com/orgmemory/mcp/McpRateLimitFilterTests.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetDeliveryService.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/ReleasedPromptAdapter.java
  • core/src/main/java/com/orgmemory/core/knowledge/KnowledgeCatalogService.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/AssetDeliveryResources.java
  • apps/api/src/test/resources/db/test-foundation.sql
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetView.java
  • apps/mcp/src/main/resources/application-prod.yml
  • core/src/main/java/com/orgmemory/core/assetregistry/CapabilityPackService.java
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryService.java
  • .env.example
  • apps/api/src/main/java/com/orgmemory/api/assetregistry/AssetDeliveryController.java
  • infrastructure/deployment/production.env.example
  • core/src/main/java/com/orgmemory/core/assetregistry/AssetRegistryCoordinator.java
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Record current behavior in architecture/specification documentation only after it exists in code; keep intended behavior in vision, roadmap, or an active increment, and do not duplicate state.
Before using unfamiliar Spring Boot 4, Spring Modulith 2, Spring AI 2, Gradle, React, Vite, Tailwind, or TypeScript APIs, consult current official documentation via Context7 and the project orgmemory-* verification skills.
Before retrieval, AI, MCP, permission, upload, graph, or export work, read docs/guidelines/agent-safety.md.
Never commit .env files, provider keys, tokens, or customer data.
Run the relevant verification gates from docs/guidelines/testing-harness.md; use a terminating clean test as the context gate, and do not treat bootRun as verification.

Files:

  • apps/mcp/src/test/java/com/orgmemory/mcp/KnowledgeSearchApiClientTests.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpGatewayProperties.java
  • apps/mcp/src/main/resources/application.yml
  • ARCHITECTURE.md
  • infrastructure/deployment/compose.production.yaml
  • apps/mcp/src/test/java/com/orgmemory/mcp/OrgMemoryMcpContextTests.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpSecurityConfiguration.java
  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java
**/*.{java,kt}

📄 CodeRabbit inference engine (CLAUDE.md)

JetBrains IDE inspection is a verification gate for the Java backend.

Files:

  • apps/mcp/src/test/java/com/orgmemory/mcp/KnowledgeSearchApiClientTests.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpGatewayProperties.java
  • apps/mcp/src/test/java/com/orgmemory/mcp/OrgMemoryMcpContextTests.java
  • apps/mcp/src/main/java/com/orgmemory/mcp/McpSecurityConfiguration.java
  • apps/api/src/test/java/com/orgmemory/api/assetregistry/AssetRegistryIntegrationTests.java
**/application*.{yml,yaml,properties}

📄 CodeRabbit inference engine (CLAUDE.md)

Keep JPA ddl-auto=validate; pair JPA schema or entity changes with a Flyway migration.

Files:

  • apps/mcp/src/main/resources/application.yml
🔇 Additional comments (9)
apps/mcp/src/main/java/com/orgmemory/mcp/McpGatewayProperties.java (1)

8-27: LGTM!

apps/mcp/src/main/java/com/orgmemory/mcp/McpSecurityConfiguration.java (1)

14-32: LGTM!

apps/mcp/src/main/resources/application.yml (1)

20-29: LGTM!

Also applies to: 40-43

apps/mcp/src/test/java/com/orgmemory/mcp/KnowledgeSearchApiClientTests.java (1)

96-102: LGTM!

apps/mcp/src/test/java/com/orgmemory/mcp/OrgMemoryMcpContextTests.java (1)

21-65: LGTM!

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

476-495: LGTM! The now() - interval '1 second' scheduling closes the race between the outbox UPDATE and the next_attempt_at <= now() check in reconcile, making this deterministic.


68-154: LGTM!

Also applies to: 229-285, 326-329, 706-715, 924-941

ARCHITECTURE.md (1)

40-43: LGTM!

Also applies to: 56-107

infrastructure/deployment/compose.production.yaml (1)

366-402: LGTM!

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