Skip to content

docs: add ADR for catalog chaining#569

Draft
yocaba wants to merge 1 commit into
mainfrom
docs/catalog-chaining
Draft

docs: add ADR for catalog chaining#569
yocaba wants to merge 1 commit into
mainfrom
docs/catalog-chaining

Conversation

@yocaba

@yocaba yocaba commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

What

Closes #418

Checklist

  • Tests added/updated n/a
  • No breaking changes (or upgrade path documented above)
  • Readable commit history (squashed and cleaned up as desired)
  • AI code review considered and comments resolved

Summary by CodeRabbit

Documentation

  • Added architectural decision record documenting the catalog chaining approach and technical considerations for cross-boundary package integration.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds ADR 013, documenting the Solar Catalog Chaining architecture decision. The document evaluates patterns for transporting OCM packages across security boundaries via ARC and proposes Option A-1 (pull packages via ARC custom workflow) paired with Option B (discover and create Components/ComponentVersions locally) as the recommended approach.

Changes

Solar Catalog Chaining ADR

Layer / File(s) Summary
ADR metadata, context, and problem statement
docs/developer-guide/adrs/013-catalog-chaining.md
Introduces the ADR metadata, defines the catalog chaining use case and guiding principles, and frames the core problem: pulling OCM packages across security boundaries and creating corresponding SolAr catalog entries.
Solution options for pulling OCM packages
docs/developer-guide/adrs/013-catalog-chaining.md
Enumerates four integration approaches (A-1: custom ARC workflow, A-2: ARC operator, B: ARC orders with discovery, C: manual pushes) with detailed trade-offs for how OCM packages are sourced and transported.
Solution options for component creation and OCI URL remapping
docs/developer-guide/adrs/013-catalog-chaining.md
Covers three approaches for creating Components and ComponentVersions after transfer, then documents URL remapping requirements across SolAr API objects, OCM component descriptors, and Helm chart values.
Proposed decision and outcome
docs/developer-guide/adrs/013-catalog-chaining.md
States the recommended approach (Option A-1 for pulling, Option B for local discovery and creation) and includes the decision outcome section.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

  • #418: Spike: Catalog Chaining Integration Patterns and URL Remapping Strategy — This ADR documents the findings and decision outcomes from the investigation described in the spike, evaluating integration patterns (Options A-1, A-2, B, C) and URL remapping strategies across SolAr and OCM artifact layers.

  • #89: Chaining SolAr to cascade releases across security boundaries — Parent epic referenced in the spike; this ADR provides the architectural decision for cascading catalog data across security boundaries using ARC.

Suggested reviewers

  • olzemal

Poem

🐰 A rabbit hops through architecture lands,
Bridging catalogs with steady hands,
OCM packages traverse secure skies,
As discovery blooms where data flies,
ARC and SolAr now walk as one!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description references linked issue #418 but lacks required sections: 'Why' section is missing, 'Testing' is absent, 'Notes for reviewers' is not provided, and the AI code review checkbox remains unchecked. Fill in the 'Why' section with motivation, add 'Testing' details (or clarify as N/A), add relevant reviewer notes, and either check or address the AI code review item.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: add ADR for catalog chaining' is concise and directly describes the main change—adding an ADR document about catalog chaining.
Linked Issues check ✅ Passed The ADR document addresses the core requirements of issue #418 by evaluating integration patterns (Option A-1 vs Option B) and documenting URL remapping strategy across SolAr API, OCM descriptors, and Helm values.
Out of Scope Changes check ✅ Passed The change is a documentation-only addition of an ADR file directly aligned with the investigation and documentation objectives of linked issue #418, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/catalog-chaining

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (2)
docs/developer-guide/adrs/013-catalog-chaining.md (2)

145-150: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Document lifecycle/conflict/security handling for the selected recommendation.

The proposed decision on Line 145 does not yet describe how the chosen approach handles updates, deletions, version conflicts, and attestation validation. Those are explicit acceptance criteria for this ADR and should be captured in the decision itself (or in Decision Outcome).

Suggested ADR patch
 ## Proposed Solution
 
 Option A-1 for "Pulling OCM packages" and Option B for "Creating Components and ComponentVersions", for separation of concerns and a single source of truth.
+
+Operational policy for this choice:
+- **Updates:** reconcile Orders from source catalog scan; destination discovery upserts ComponentVersions.
+- **Deletions:** remove obsolete Orders and define destination catalog tombstone/retention behavior.
+- **Version conflicts:** destination is authoritative for conflict resolution (idempotent upsert + deterministic naming/tag policy).
+- **Attestation validation:** verify signatures/attestations before promotion to catalog-visible state; define fail-closed behavior and alerting.
🤖 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 `@docs/developer-guide/adrs/013-catalog-chaining.md` around lines 145 - 150,
Update the "Decision Outcome" section of the ADR to explicitly document
lifecycle, conflict and security handling for the selected recommendation
(Option A-1 and Option B): describe how updates and deletions are applied (e.g.,
immutability or upsert semantics), how version conflicts are detected and
resolved (e.g., semantic versioning, last-write-wins, or merge/CR conflict
workflow) and how attestations/validation are performed and stored (e.g.,
signature checks, replay protection, provenance metadata and revocation
handling); reference the terms "Option A-1", "Option B" and the "Decision
Outcome" heading so readers can find the new text and include concrete
acceptance criteria for each item (updates, deletions, conflicts, attestation
validation).

149-150: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Complete the empty Decision Outcome section.

## Decision Outcome is present but has no content, so rationale, consequences, and follow-up actions are not recorded.

Suggested ADR patch
 ## Decision Outcome
+
+- **Chosen:** Option A-1 (package pull) + Option B (component creation).
+- **Why:** preserves source-catalog authority while keeping import logic in Solar Discovery.
+- **Consequences:** requires Solar API read access from destination ARC workflow; transfer success and catalog availability are decoupled and need monitoring.
+- **Follow-ups:** define reconciliation intervals, deletion policy, conflict policy, and attestation gates.
🤖 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 `@docs/developer-guide/adrs/013-catalog-chaining.md` around lines 149 - 150,
The `## Decision Outcome` heading is empty; fill it with a concise summary of
the chosen decision for this ADR (catalog chaining), explicitly state the final
decision outcome, list key consequences and trade-offs (e.g., performance,
complexity, compatibility), and add concrete follow-up actions and owners (e.g.,
migration tasks, monitoring, future reviews) plus a target review date; update
the section under the existing "## Decision Outcome" header in
013-catalog-chaining.md so it contains the decision summary, consequences, and
next steps with responsible parties.
🤖 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 `@docs/developer-guide/adrs/013-catalog-chaining.md`:
- Around line 139-142: Expand the OCI URL Re-Mapping section into explicit
per-layer contracts: enumerate ownership and remapping rules for
Component.Spec.Registry, ComponentVersion.Spec.Resources[*].Repository,
descriptor repositoryContext/resource access, and Helm values.yaml registry
references; for each surface specify whether remapping is hostname-only vs
full-path, how aliases and ARC-derived mappings apply, what failure modes are
allowed (e.g., path changes vs hostname replacement), and which component (OCM,
ARC, ocm-kit, Solar Discovery) is authoritative for transformation and
validation; add examples and a short decision table describing input shape,
remap rule, and fallback behavior so the ADR meets the “comprehensive remapping
strategy” acceptance target.

---

Outside diff comments:
In `@docs/developer-guide/adrs/013-catalog-chaining.md`:
- Around line 145-150: Update the "Decision Outcome" section of the ADR to
explicitly document lifecycle, conflict and security handling for the selected
recommendation (Option A-1 and Option B): describe how updates and deletions are
applied (e.g., immutability or upsert semantics), how version conflicts are
detected and resolved (e.g., semantic versioning, last-write-wins, or merge/CR
conflict workflow) and how attestations/validation are performed and stored
(e.g., signature checks, replay protection, provenance metadata and revocation
handling); reference the terms "Option A-1", "Option B" and the "Decision
Outcome" heading so readers can find the new text and include concrete
acceptance criteria for each item (updates, deletions, conflicts, attestation
validation).
- Around line 149-150: The `## Decision Outcome` heading is empty; fill it with
a concise summary of the chosen decision for this ADR (catalog chaining),
explicitly state the final decision outcome, list key consequences and
trade-offs (e.g., performance, complexity, compatibility), and add concrete
follow-up actions and owners (e.g., migration tasks, monitoring, future reviews)
plus a target review date; update the section under the existing "## Decision
Outcome" header in 013-catalog-chaining.md so it contains the decision summary,
consequences, and next steps with responsible parties.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9c2f17b3-3d8a-47a0-a559-d8364ccc9714

📥 Commits

Reviewing files that changed from the base of the PR and between 3f141ba and 7e91912.

⛔ Files ignored due to path filters (2)
  • docs/developer-guide/adrs/img/013-catalog-chaining.svg is excluded by !**/*.svg
  • docs/developer-guide/adrs/img/013-proposed-solution.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • docs/developer-guide/adrs/013-catalog-chaining.md

Comment on lines +139 to +142
### OCI URL Re-Mapping

When OCM packages are transferred across security boundaries via ARC, OCI URLs change. URLs within the OCM component descriptor are handled by OCM itself, as it is designed as a transfer format; configuring OCM to use relative paths is an alternative worth considering. Because the Component and ComponentVersion are created on the destination side, no re-mapping is needed for them. Registry references in Helm charts are covered by the Helm value templating support implemented in Solar Discovery and rendered by leveraging ocm-kit. No additional features are needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Expand OCI URL remapping into explicit per-layer contracts.

Line 141 currently compresses remapping into a single paragraph and skips explicit ownership/rules for the required surfaces (e.g., Component.Spec.Registry, ComponentVersion.Spec.Resources[*].Repository, descriptor repositoryContext/resource access, Helm values.yaml references), plus edge/failure cases (path changes vs hostname-only replacement, alias interaction, static vs ARC-derived mapping).

This leaves the ADR short of the “comprehensive remapping strategy” acceptance target.

Suggested ADR patch
 ### OCI URL Re-Mapping
 
-When OCM packages are transferred across security boundaries via ARC, OCI URLs change. URLs within the OCM component descriptor are handled by OCM itself, as it is designed as a transfer format; configuring OCM to use relative paths is an alternative worth considering. Because the Component and ComponentVersion are created on the destination side, no re-mapping is needed for them. Registry references in Helm charts are covered by the Helm value templating support implemented in Solar Discovery and rendered by leveraging ocm-kit. No additional features are needed.
+When OCM packages are transferred across security boundaries via ARC, OCI URLs change. Remapping responsibilities are:
+
+- **OCM descriptor (`repositoryContext`, resource access):** rewritten by OCM transfer behavior; validate whether rewrite is host-only or host+path for each registry topology.
+- **Solar API objects (`Component.Spec.Registry`, `ComponentVersion.Spec.Resources[*].Repository`):** derived from destination-side discovery output; no source URL should be persisted in destination resources.
+- **Helm chart image references (`values.yaml`):** handled via Helm values templating in Solar Discovery (rendered with ocm-kit input).
+- **Registry aliases (`Registry.Spec.Aliases`):** define precedence and conflict behavior when alias mapping differs from ARC route mapping.
+
+Failure modes and handling:
+- non-rewritable hardcoded image refs in charts,
+- descriptor entries that cannot be rewritten cleanly across path-changing registries,
+- alias/mapping conflicts,
+- partial transfer states where package moved but discovery/import is delayed.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### OCI URL Re-Mapping
When OCM packages are transferred across security boundaries via ARC, OCI URLs change. URLs within the OCM component descriptor are handled by OCM itself, as it is designed as a transfer format; configuring OCM to use relative paths is an alternative worth considering. Because the Component and ComponentVersion are created on the destination side, no re-mapping is needed for them. Registry references in Helm charts are covered by the Helm value templating support implemented in Solar Discovery and rendered by leveraging ocm-kit. No additional features are needed.
### OCI URL Re-Mapping
When OCM packages are transferred across security boundaries via ARC, OCI URLs change. Remapping responsibilities are:
- **OCM descriptor (`repositoryContext`, resource access):** rewritten by OCM transfer behavior; validate whether rewrite is host-only or host+path for each registry topology.
- **Solar API objects (`Component.Spec.Registry`, `ComponentVersion.Spec.Resources[*].Repository`):** derived from destination-side discovery output; no source URL should be persisted in destination resources.
- **Helm chart image references (`values.yaml`):** handled via Helm values templating in Solar Discovery (rendered with ocm-kit input).
- **Registry aliases (`Registry.Spec.Aliases`):** define precedence and conflict behavior when alias mapping differs from ARC route mapping.
Failure modes and handling:
- non-rewritable hardcoded image refs in charts,
- descriptor entries that cannot be rewritten cleanly across path-changing registries,
- alias/mapping conflicts,
- partial transfer states where package moved but discovery/import is delayed.
🤖 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 `@docs/developer-guide/adrs/013-catalog-chaining.md` around lines 139 - 142,
Expand the OCI URL Re-Mapping section into explicit per-layer contracts:
enumerate ownership and remapping rules for Component.Spec.Registry,
ComponentVersion.Spec.Resources[*].Repository, descriptor
repositoryContext/resource access, and Helm values.yaml registry references; for
each surface specify whether remapping is hostname-only vs full-path, how
aliases and ARC-derived mappings apply, what failure modes are allowed (e.g.,
path changes vs hostname replacement), and which component (OCM, ARC, ocm-kit,
Solar Discovery) is authoritative for transformation and validation; add
examples and a short decision table describing input shape, remap rule, and
fallback behavior so the ADR meets the “comprehensive remapping strategy”
acceptance target.

@yocaba yocaba marked this pull request as draft June 2, 2026 12:01
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.

Spike: Catalog Chaining Integration Patterns and URL Remapping Strategy

2 participants