fix(export): AM 2.0 export under management token — detect via plan-check, skip assets + loud warn (DX-9314) - #308
fix(export): AM 2.0 export under management token — detect via plan-check, skip assets + loud warn (DX-9314)#308naman-contentstack wants to merge 6 commits into
Conversation
…nt token (DX-9314) Exporting an AM 2.0 (spaces-based) stack with a management token silently produced the legacy asset layout, and the subsequent import reported success while entry-to-asset references were broken. Management tokens are rejected by the CS Assets APIs, and the linked-workspaces lookup returns [] on any failure, so AM 2.0 went undetected under --alias and the export emitted the wrong layout with no signal. Detect AM 2.0 up front via the feature-status plan-check (which accepts a management token) into config.planStatus. When the org is AM 2.0 and auth is a management token, skip the AM 2.0 asset export with a loud warning instead of emitting the legacy layout; the skip is surfaced in the final summary and logged to error.log. Export-only; import-side fix and a first-class skipped summary status are tracked separately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
What
Export-side fix for DX-9314. Exporting an AM 2.0 (spaces-based) stack with a management token previously fell back to the legacy asset layout silently, and a later import reported success while entry→asset references were broken (silent data loss).
Why
Management tokens are rejected by the CS Assets APIs, and
get-linked-workspacesreturns[]on any failure, so AM 2.0 went undetected under--aliasand the export emitted the legacy layout with no signal.How
contextintosetupExportConfig.feature-statusplan-check (isFeatureEnabled('amAssets')) — which accepts a management token — intoconfig.planStatus.✗ ASSETS+ reason) and logged toerror.log.Testing
spaces/and no legacyassets/files/;✗ ASSETS+ reason in the summary;⚠️ completed with failures; reason inerror.log.🤖 Generated with Claude Code