Skip to content

[feature] migration: carry the env vault's portable manifest in pb export / import - #4

Merged
YJack0000 merged 1 commit into
mainfrom
claude/env-vault-migrate-bundle
Aug 13, 2026
Merged

[feature] migration: carry the env vault's portable manifest in pb export / import#4
YJack0000 merged 1 commit into
mainfrom
claude/env-vault-migrate-bundle

Conversation

@YJack0000

Copy link
Copy Markdown
Contributor

What

pb export now carries the project env vault's portable manifest; pb import restores it; pb plan tells you to rebuild values with pb env pull.

Three exclusions are load-bearing and test-enforced:

  • attachments.json never travels — machine-local by design; paths mean nothing on the next machine.
  • No keychain value travels — synced layers rebuild via pb env pull; the local layer is per-machine by definition (its local_names are cleared both at export time and again by EnvRegistry::adopt on import — belt and braces, separately tested).
  • The carried manifest stays free of absolute paths (asserted against the serialized payload and the encoded .pbx).

Details: readable Manifest gains env_projects records (id, environments with synced-var counts and synced_at, sync pin — no local-layer counts, no domain); import skips an existing project id with a note (never overwrites); pb plan emits one pb env pull --project <id> item per linked project, auto: false because the pull is only valid under the pinned infisical account (the item names it and the pb use infisical <email> fix); an unlinked project with a synced layer becomes an export-time gap. Old bundles without the section still import; BUNDLE_VERSION unchanged (an old patchbay reading a new bundle drops the section silently — everything it names is rebuildable, so a refused bundle would be the worse trade).

Also: moves the env vault CHANGELOG entries out of [0.2.0] (misfiled during a rebase — 0.2.0 shipped before the vault merged) into [Unreleased].

Verification

cargo test --workspace: 598 passing (494 core / 73 cli / 30 mcp / 1 doctest; +13 for this change), clippy -D warnings clean. New tests cover the export round trip, both exclusions against raw bundle bytes, existing-id skip, dry-run, the plan item, and a payload with the section absent.

…est; import restores it, plan says pb env pull

Also moves the env vault CHANGELOG entries from [0.2.0] (misfiled during a
rebase — 0.2.0 shipped before the vault merged) into [Unreleased].
@YJack0000
YJack0000 force-pushed the claude/env-vault-migrate-bundle branch from c0f8479 to 9f7e43f Compare August 13, 2026 17:25
@sonarqubecloud

Copy link
Copy Markdown

@YJack0000
YJack0000 merged commit 460cb0f into main Aug 13, 2026
3 checks passed
@YJack0000
YJack0000 deleted the claude/env-vault-migrate-bundle branch August 13, 2026 17:27
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