fix: preserve custom source script paths across merged configs - #319
Open
Antonio Salinas (Tonisal-byte) wants to merge 2 commits into
Open
fix: preserve custom source script paths across merged configs#319Antonio Salinas (Tonisal-byte) wants to merge 2 commits into
Antonio Salinas (Tonisal-byte) wants to merge 2 commits into
Conversation
Copilot started reviewing on behalf of
Antonio Salinas (Tonisal-byte)
August 21, 2026 22:16
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes custom source script paths across merged TOML configurations while keeping names portable for execution, fingerprints, history, and serialized output.
Changes:
- Resolve scripts relative to their declaring configuration file.
- Normalize paths for runtime and serialized consumers.
- Add regression coverage and update documentation.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Summary | Findings |
|---|---|---|
internal/providers/sourceproviders/customsourceprovider.go |
Resolves and stages custom scripts. | None |
internal/providers/sourceproviders/customsourceprovider_internal_test.go |
Tests normalized script errors. | None |
internal/projectconfig/origin_json.go |
Serializes portable script names. | None |
internal/projectconfig/loader_test.go |
Tests merged configuration paths. | None |
internal/projectconfig/component.go |
Resolves and normalizes script paths. | Moderate (4 votes): split-file component declarations can resolve scripts against the wrong directory. Nit (3 votes): update metadata and regenerate schema/snapshots. |
internal/projectconfig/component_test.go |
Tests path normalization. | None |
internal/fingerprint/fingerprint.go |
Makes fingerprints checkout-independent. | None |
internal/fingerprint/fingerprint_test.go |
Tests fingerprint stability. | None |
internal/app/azldev/cmds/config/dump.go |
Produces portable configuration output. | None |
internal/app/azldev/cmds/config/dump_test.go |
Tests portable dumps. | None |
internal/app/azldev/cmds/component/history_internal_test.go |
Tests portable history values. | None |
internal/app/azldev/cmds/component/history_customizations.go |
Uses portable script names. | None |
docs/user/reference/config/components.md |
Documents script path semantics. | Nit (2 votes): update the generated schema description and regenerate the schema. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Antonio Salinas (Tonisal-byte)
August 21, 2026 23:22
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
Suppressed comments (1)
internal/projectconfig/component.go:475
- This rebasing loses the declaration directory when a component changes from local to upstream in a later merged config. The earlier
WithAbsolutePathscall has already turned the script into (for example)/repo/specs/generate.sh; onceSpec.SourceTypebecomes upstream this function stops rebasing, so the upstream provider still uses the local spec directory instead of the TOML file that declared the entry. Preserve per-entry provenance (or explicitly rebase on a local-to-upstream transition) so field-level component overrides do not break script lookup.
origin.Script = filepath.Join(scriptDir, origin.EffectiveScriptName())
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.
Resolve custom source scripts relative to the TOML file that declares them before component definitions are merged. Keep script names portable in chroot execution, fingerprints, history, and serialized config output, with regression coverage for components defined across multiple configuration files. Fixes #306