Skip to content
Tools/Workspace & Portfolios/migrate_cross_edges

migrate_cross_edges

Migrate inline cross-product edges from the current product's `edges[]` into the portfolio document (`.upg/portfolio.upg`) with qualified IDs. `dry_run: true` (default) previews; `dry_run: false` applies. Requires `source_product_id` to qualify source node IDs.

Workspace & Portfoliosnon-atomic. Portfolio write + product file save are separate.

Arguments

source_product_idstringrequired

Product ID that owns the current document's nodes. Used to build qualified source IDs ({product_id}/{node_id}).

target_product_idstringoptional

Product ID that owns the target nodes, when the target node is not in the current product. Edges without a resolvable target product are skipped.

dry_runbooleanoptional

When true (default), report what would be migrated without writing anything.

Returns

Shape
{ migrated, skipped, dry_run, portfolio_file? }

Warnings

Default is `dry_run: true`. Pass `dry_run: false` to commit. Idempotent on retry: a second `dry_run: false` after a successful migration finds zero inline cross-edges and reports `migrated: []`.

See Also