Skip to content

feat: add dx-sap-spartacus-import skill (DX-32793) - #35

Open
timbenniks-contentstack wants to merge 1 commit into
nextfrom
feat/dx-sap-spartacus-import
Open

timbenniks-contentstack wants to merge 1 commit into
nextfrom
feat/dx-sap-spartacus-import

Conversation

@timbenniks-contentstack

Copy link
Copy Markdown
Contributor

What

A new action skill, dx-sap-spartacus-import. It imports the CMS content of a running SAP Commerce Cloud (Spartacus) storefront into a Contentstack stack, in the model @contentstack/contentstack-spartacus-connector reads. This is the "ng add the connector, then import with a skill" step of the SAP demo. Jira: DX-32793.

The pipeline:

  1. Extract the site over OCC.
  2. Resolve navigation.
  3. Map it onto the connector's starter-pack content types.
  4. Gate 1: unknown component types need a mapping decision.
  5. Gate 2: a summary of everything that will be written, plus a check against the starter pack.
  6. Seed (idempotent, keyed by sap_uid, url and title).
  7. Publish.
  8. Verify: a round trip against OCC and a Delivery API read.
  9. Optional per-locale localization.

The scripts are Python 3.9+ standard library only.

Origin

Based on Vaishnavi Kedar's spartacus-content-modelling-agent (private repo). Only the pipeline that targets the connector's starter pack is kept: no earlier free-form model, no 1.2 MB fixtures, no vendored starter pack.

Changes for a public bundle:

  • TLS: OCC certificates are verified by default. OCC_INSECURE_TLS=1 is an explicit opt-in for self-signed dev backends. The original disabled verification everywhere.
  • No hardcoded backend: the demo OCC IP is gone. OCC_BASE_URL or --base is required.
  • Starter pack location: read from the project's installed connector package (node_modules/@contentstack/contentstack-spartacus-connector/...), or from CONNECTOR_STARTER_PACK.
  • Content pages (ContentPage1Template) map to landing_page, matching connector PR feat: add dx-sap-spartacus-import skill (DX-32793) #35, and HomepageNavLink is mapped.
  • New check at gate 2: the run stops if the plan writes a content type or field the installed pack lacks.
  • Model step: drops page slots the target page type doesn't have, leaving them to OCC.

Files

  • skills/dx-sap-spartacus-import/: SKILL.md, references/pipeline.md, references/mapping-profile.md, scripts/
  • docs/skills/dx-sap-spartacus-import.md, plus a row in docs/skills/index.md
  • A row in README.md
  • evals/routing-dx-sap-spartacus-import-{1,2}: each loads the skill and checks that migration-companion is skipped

Testing

Not run yet:

  • Seed, publish and verify against a real stack (needs a dedicated stack and a management token).
  • Routing evals.
  • snyk-agent-scan (CI runs it).

🤖 Generated with Claude Code

Imports an SAP Commerce Cloud (Spartacus) storefront's CMS content over OCC
into Contentstack, in the model @contentstack/contentstack-spartacus-connector
reads. Dry run first, two approval gates, idempotent seed and publish,
round-trip verify, optional locales.

Based on Vaishnavi Kedar's spartacus-content-modelling-agent, trimmed to the
connector-profile pipeline and hardened for a public bundle:
- OCC TLS verified by default; OCC_INSECURE_TLS=1 opt-in for dev backends
- no hardcoded OCC host; OCC_BASE_URL or --base required
- starter pack read from the project's installed connector package
- content pages map to landing_page (connector PR #35)
- gate 2 stops when the plan needs types or fields the pack lacks
- page slots the target type lacks are left to OCC

Co-Authored-By: Vaishnavi Kedar <vaishnavi.kedar@contentstack.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyk-io

snyk-io Bot commented Nov 6, 2026

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security 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