Skip to content

Support nested $overrides entries with __self and dependency remapping - #144

Closed
nfroidure with Copilot wants to merge 2 commits into
mainfrom
copilot/support-nested-overrides
Closed

Support nested $overrides entries with __self and dependency remapping#144
nfroidure with Copilot wants to merge 2 commits into
mainfrom
copilot/support-nested-overrides

Conversation

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown

$overrides could not express “override service + override its dependencies” in one node because object keys must be unique. This change adds nested __self support so a service alias and its internal dependency overrides can be declared together.

  • Override resolution semantics

    • Extend Overrides shape to support nested __self.
    • Update pickOverriddenName() to:
      • resolve terminal service names from __self
      • keep traversing the matching nested override branch when a service was selected via __self, so child dependency overrides apply correctly.
  • Coverage additions

    • Add unit cases in src/overrides.test.ts for:
      • direct nested __self resolution
      • parent-path nested __self resolution
      • dependency remapping through a __self-selected service
    • Add integration case in src/index.test.ts validating runtime behavior for service alias + dependency override in the same nested node.
constant('$overrides', {
  sendApplicationMessage: {
    __self: 'sendSlackMessage',
    SLACK_CONFIG: 'SLACK_APPLICATION_CONFIG',
  },
});

Copilot AI linked an issue Jun 25, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Support nested $overrides syntax for service configuration Support nested $overrides entries with __self and dependency remapping Jun 25, 2026
Copilot AI requested a review from nfroidure June 25, 2026 09:37
@nfroidure

Copy link
Copy Markdown
Owner

Closing for #145

@nfroidure nfroidure closed this Jun 25, 2026
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.

Support nested $overrides

2 participants