feat(pgpm): unified routing profile with workspace portability attach point - #1528
Merged
Conversation
…ity attach point, per-key merge
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates pgpm's portability config from three vocabularies to two: module self-description (
extensions.jsonprovides/consumes+.controlrequires, unchanged) and one routing profile shape attachable at two scopes — workspace and per-import.New shared type in
@pgpmjs/types(pgpm/types/src/routing.ts), no transform deps:The apply-spec types are now aliases of the shared shape (no duplicated definitions):
Workspace attach point:
PgpmWorkspaceConfig.portability?: PgpmRoutingProfileinpgpm.json, read via the existing@pgpmjs/envloadConfigSyncFromDir(no new config mechanism). Wired into the one deploy-path seam:Precedence is lexical: a proxy that only overrides
rolesstill inherits the workspaceextensionsmapping; an overriding key replaces its whole value.Fully additive/backward compatible: existing
pgpm.apply.jsonfiles behave identically; no workspace profile ⇒ no behavior change. A proxy must still declare at least one routing key of its own (spec validation unchanged).migrate/clean.tsuntouched.Docs: new
.agents/skills/pgpm/references/routing-profile.mddocumenting the two-surface model with examples; pointers added in thepgpmskill index,extensions.md, and thepgpm-migration-bundleskill.Tests
pgpm/types: 6 newmergeRoutingProfilesunit tests (neither/workspace-only/proxy-only/both/whole-key replace/multi-scope) — 6/6 pass.pgpm/core: new__tests__/apply/apply-workspace-profile.test.ts—resolveEffectiveApplySpecprecedence,loadWorkspaceRoutingProfile, and a PG-backed e2e (__fixtures__/apply/workspace-profile) where the workspace profile routes extensions/roles and one proxy overrides onlyroles.pgpm/core71 suites / 446 tests pass;pgpm/types1 suite / 6 tests;pgpm/env2 suites / 26 tests.npx tsc --noEmitclean inpgpm/types,pgpm/env,pgpm/core.Link to Devin session: https://app.devin.ai/sessions/49ac030311c642e3b1d13c7e29c8f112
Requested by: @pyramation