feat(overlays): add archive overlay engine and config model#275
Open
Tonisal-byte wants to merge 1 commit into
Open
feat(overlays): add archive overlay engine and config model#275Tonisal-byte wants to merge 1 commit into
Tonisal-byte wants to merge 1 commit into
Conversation
Add the archive extract/apply/repack engine plus the ComponentOverlay 'archive' field, validation, and fingerprint handling. Extends internal/utils/archive with compression sniffing, ExtractAuto, and strict unsupported-entry handling. Pipeline wiring and hash tracking follow in a subsequent change.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces the configuration surface and core utilities for archive-scoped overlays, extending component overlays so certain file overlays can target paths inside a source archive (extract → modify → repack), alongside schema/doc updates and supporting archive utilities.
Changes:
- Adds
archivetoComponentOverlaywith validation and fingerprint handling for archive-scoped overlays. - Extends
internal/utils/archivewith compression sniffing, strict unsupported-entry handling, and related tests. - Adds an (currently internal) archive overlay processing implementation plus tests, and updates user/config documentation and schema snapshots.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/azldev.schema.json | Adds archive field to overlay schema and updates file description. |
| scenario/snapshots/TestSnapshotsContainer_config_generate-schema_stdout_1.snap | Updates schema snapshot output to include archive. |
| scenario/snapshots/TestSnapshots_config_generate-schema_stdout_1.snap | Updates schema snapshot output to include archive. |
| internal/utils/archive/archive.go | Adds compression sniffing, ExtractAuto, extract options, and strict unsupported-entry behavior. |
| internal/utils/archive/archive_test.go | Adds coverage for compression sniffing/mislabeled archives and strict unsupported-entry behavior. |
| internal/projectconfig/overlay.go | Adds Archive field, archive validation helpers, and fingerprint inclusion behavior. |
| internal/projectconfig/overlay_test.go | Adds validation and behavior tests for archive-scoped overlays. |
| internal/projectconfig/fingerprint_test.go | Tightens validation of allowed fingerprint struct tag forms/options. |
| internal/fingerprint/fingerprint_test.go | Adds a fingerprint regression test ensuring archive scoping changes the computed identity. |
| internal/app/azldev/core/sources/overlays.go | Updates overlay application gating to “loose-file” overlays (excludes archive-scoped). |
| internal/app/azldev/core/sources/archiveoverlays.go | Introduces archive extract/modify/repack engine with atomic repack behavior. |
| internal/app/azldev/core/sources/archiveoverlays_internal_test.go | Adds internal tests covering archive overlay processing, batching semantics, and safety behaviors. |
| docs/user/reference/config/overlays.md | Documents archive overlays and adds examples/field reference updates. |
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.
[Part 1 of 2] Adds the foundation for archive-scoped overlays.
This introduces the archive field on component overlays, allowing supported file overlays to target files inside source archives rather than loose files in the sources tree. It adds validation, fingerprint handling, schema updates, and archive utility support for safe extract/repack behavior, including compression sniffing and strict handling of unsupported tar entry types.
Example config:
Follow-up PR #276