Skip to content

Add support for proper lockless rendering, and other related commands - #430

Open
Dan Streetman (ddstreet) wants to merge 70 commits into
microsoft:mainfrom
ddstreet:lockless-rendering
Open

Dan Streetman (ddstreet) wants to merge 70 commits into
microsoft:mainfrom
ddstreet:lockless-rendering

Conversation

@ddstreet

Copy link
Copy Markdown
Contributor

This adds support for lockless rendering, in a controlled per-component transition.

During the transition, the tool will look for a file named lockless-components.txt in the same dir as the azldev.toml file (i.e., the top dir of the repo). If a component name is found inside this file, the component is considered a 'lockless' component; otherwise, the component is a legacy 'locked' component. Since our repo currently has an empty lockless-components.txt file, all our components are currently considered 'locked', and none of these updates to azldev should have any effect at all on any 'locked' component.

Until all components have been transitioned over, this adds a new command azldev comp make-lockless, which adds the specified component name(s) to the lockless-components.txt file, and runs azldev comp refresh-upstream-commit for them, to generate the component's default upstream-commit toml file. After that, the component's 'lock' file will no longer be used for anything (unless the component is removed from the lockless-components.txt file).

After transitioning all components to lockless, we should remove support for 'locked' files from azldev, and remove the azldev comp make-lockless command; and then we can remove the lockless-components.txt file from our main repo.

Most operations are the same for lockless components, but notably:

  • render operations should now work correctly, and should update the release value and generate the changelog entry correctly.
  • render operations are now slightly different, instead of backwards-searching the git commits to try to find text for a changelog entry, azldev will now prompt the user to provide a changelog entry or autorelease git commit message. This may be avoided by providing the message using the new --changelog-comment parameter.
  • render operations now will git commit the rendered files, unless the --no-git-commit parameter is used.
  • render operations now require no uncommitted changes in the repo (although uncommitted changes in the specs/ dir other than the rendering component's dist-git dir are ignored). this can be forced with --allow-uncommitted
  • renders no longer use mock for anything.
  • renders for autorelease components do not pre-rpmautospec the rendered dist-git dir.
  • there is a new command azldev comp dist-git-repo which converts the committed dist-git dir for a component into an industry-standard dist-git repo (at the path specified to --output-dir).

Besides those listed above, I have probably forgot some other changes.

Note this is still undergoing copilot testing, and there may be additional changes required; but this should not impact any components that still use 'lock' files, so we can slowly migrate components to lockless one-at-a-time and address any transition issues as we find them.

Read lockless-components.txt beside the top-level azldev.toml during project
configuration loading. Listed components use lockless behavior across all
commands; unlisted components retain lock-file behavior. A missing or empty
list selects locked behavior, while --without-lockfile overrides the list
and makes every component lockless, including during rendering.

Apply the selection to configuration merging and validation, lock loading
and consistency checks, and synthetic history for render, build, and source
preparation. Compare resolved project inputs for lockless components and
stored lock fingerprints for locked components in component changed.

Expose both update and refresh-upstream-commit for mixed projects. Each
writer skips components using the other mode and preserves their state
files while retaining true orphan detection. History and query skip
lockless components, matching the existing global lockless no-op behavior.

Add mixed-mode regression tests and update user documentation, generated
CLI references, and emitted agent guidance for both workflows.

Validation: affected unit test packages, mage fix all, and mage check all
pass; mage docs succeeds. mage all fails on nine existing bumpspec tests.
Scenario updates are blocked by enforcing SELinux and an unavailable
container provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Make lockless-components.txt the sole CLI selector for locked and lockless
component workflows. Remove the global flag, its preparsing and App state,
mode-specific command options, and hidden legacy no-op commands.

Always expose both update and refresh-upstream-commit and emit the shared
mixed-workflow agent catalog. Retain internal lockless overrides used for
historical comparisons and test fixtures.

Update regression tests, scenario coverage, user documentation, emitted
agent guidance, and generated CLI references.

Validation: affected unit packages, mage fix all, mage docs, mage check all,
and CLI rejection/help/catalog smoke checks pass. mage all encounters nine
existing bumpspec failures. mage scenarioUpdate remains blocked by enforcing
SELinux and an unavailable Docker provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Prepare upstream release and changelog state from committed render history
before applying overlays and existing synthetic-history processing.

Bootstrap autorelease changelogs, compare fully resolved TOML pins, collect
upstream changes, and run rpmdev-bumpspec for every lockless upstream render.
Publish the processed output without .git and commit each component directory
separately, preserving unrelated staged changes.

Keep local and lock-file rendering unchanged, and leave --check-only read-only.
Update user and agent guidance and the generated CLI reference. Add in-memory
regressions for history, release handling, ordering, and output-only commits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Reuse the committed release base when an upstream autorelease spec has prior
output marked with an RPMAUTOSPEC autorelease header. Expand the committed
spec in mock and use the leading integer of Release as the -b parameter.

Copy the committed changelog body into the working upstream changelog file
before the existing version-change reset and remaining render processing.
Use a temporary committed snapshot so uncommitted edits cannot affect the
spec or its supporting macro files.

Install rpm-build in the render chroot for rpmspec, update user and agent
guidance, and add regressions for carryover, marker matching, version resets,
query failures, and temporary snapshot cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Prefix the rpmspec release query and select only its labelled result.
Mock can merge non-fatal RPM diagnostics into stdout, so treating the
whole output as a release prevented the emacs lockless render from
carrying over its existing autorelease base.

Cover leading and trailing diagnostics and missing query values.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Separate lockless rendering from the locked mock processing pipeline. Run
release, changelog, provenance, and sidecar queries on the host, without
requiring or initializing mock for an all-lockless selection. Mixed renders
send only locked components through mock.

Do not run rpmautospec process-distgit for lockless components. Preserve the
raw spec macros and changelog sidecar while retaining the existing release
carryover, overlays, filtering, and output commit lifecycle.

Add regressions for host tool queries, diagnostic handling, macro and
changelog preservation, and mixed-mode routing and failures. Update user
and emitted agent guidance to describe the host-only workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Preserve upstream Git history for queries without generating synthetic
commits or applying their legacy release adjustments during lockless
rendering. This prevents a second static release bump after the explicit
lockless lifecycle. Locked rendering and other workflows are unchanged.

Strip leading and trailing ## comment lines from processed autorelease
changelogs before carrying them into the changelog sidecar. Preserve
interior comments, whitespace, and original line endings.

Add regression tests and update user documentation and emitted agent
skills for both changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
When the last render has no spec.upstream-commit, use its lock file only
if that commit's top-level lockless-components.txt exists and does not
list the component. Resolve the lock directory from the historical
configuration and read only committed content from that snapshot.

Keep configured pins authoritative and require spec.upstream-commit for
the current render. Missing or invalid historical locks retain the
existing unknown-upstream fallback.

Add regression tests for fallback eligibility, historical lock directory
resolution, committed content isolation, and current-pin requirements.
Update user documentation and emitted agent guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Use the historical lock's upstream-commit when spec.upstream-commit is
missing and lockless-components.txt is absent or excludes the component.
Continue rejecting the fallback for explicitly listed lockless components.

Update regression tests and documentation to cover an absent selection
file with and without a component lock.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3497f2b2-c7fb-456e-a58f-6889b6ec67e2
Carry static release state directly from the committed dist-git spec into
working upstream specs. If the committed Release references baserelease,
copy its complete %global or %define definition and leave the upstream
Release value unchanged. Otherwise, copy the committed Release value.
Reject missing or ambiguous baserelease definitions.

Preserve committed changelogs and retain upstream release values when an
upstream change also changes Version. Run rpmdev-bumpspec only for the
final release bump and changelog update, without temporary bump probes
or context-based diff matching.

Cover macro and literal releases, version resets, missing or ambiguous
definitions, and single-bump behavior. Update the user guide and emitted
agent guidance to describe the direct carryover rules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Clone the configured upstream dist-git branch with --single-branch while
retaining its full history for pinned commits and snapshot resolution.

Resolve the previous and current branches from committed project config,
including per-component distro overrides and historical lock fallback.
When differing upstream pins come from different branches, fetch the old
branch into the working clone before collecting upstream changes. Keep
the current checkout unchanged and propagate historical fetch failures.

Add regression coverage for clone arguments, historical branch resolution,
branch transitions, and failed fetches. Update user and emitted agent
documentation to explain branch-limited cloning and historical fetches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Build once before running unit tests, default quality checks, and scenario
tests concurrently through Mage's shared dependency graph. Generate docs
only after all validation targets pass, preserving the existing failure
gate and prerequisite ordering.

Resolve tool paths with Go's -C option instead of changing the Mage
process working directory, preventing concurrent targets from running in
a tool module by accident. Document the pipeline and concurrency controls.

Build, unit tests, and mage check all passed. Parallel execution was
verified from the Mage output. Scenario tests remain blocked by the
unavailable Docker provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Retain every prepared dist-git file except .git for lockless renders,
including unreferenced sidecars, hidden files, and subdirectories. Remove
the host spectool query and bypass file filtering regardless of the
skip-file-filter setting. Leave locked rendering unchanged.

Update regression coverage, emitted agent guidance, user documentation,
and generated CLI documentation and configuration schema.

Validation: unit tests, mage check all, and mage docs passed.
mage all remains blocked by the unavailable Docker scenario provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Resolve needed Fedora provenance immediately after fetching the pinned
upstream checkout, before release/changelog carryover or bumping changes
the spec. Reuse the captured macros during overlay processing instead of
querying the modified checkout.

Skip autorelease resolution when an explicit release macro overrides the
result. Do not query provenance when overlays or provenance are disabled,
and do not retry failed resolution when writing the macros file.

Add in-memory regressions for pristine inputs, conditional resolution,
and reuse. Update user documentation, emitted guidance, and CLI help.

Validation: build and unit tests passed through mage all. mage check all
and mage docs passed. Docker scenarios remain environment-blocked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Remove any existing encoded-name alias path before creating the relative
symlink, including regular files and nonempty directories. Do not follow
existing symlinks or remove their targets.

Cover replacement of files, populated directories, and stale symlinks,
and document the destructive replacement behavior.

Validation: mage fix all and mage unit passed. Build and default checks
passed through mage all; Docker scenarios remain environment-blocked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Recreate each component's rendered output directory, then rename every
prepared file and subdirectory into it except .git. Completely replace
old output instead of copying the prepared tree.

Preserve overwrite permission checks and check-only behavior. Dry runs
leave both source and destination unchanged. Document that filesystem
renames require the work directory and output to share a filesystem.

Add in-memory tests covering new output, complete replacement, hidden and
nested files, empty directories, excluded Git metadata, and safeguards.

Validation: mage fix all passed. Build, unit tests, and default checks
passed through mage all; Docker scenarios remain environment-blocked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Split lockless rendering around source preparation. Read committed render
state and collect upstream changes first, then write macros, apply
overlays, and update sources before release/changelog carryover and the
final rpmdev-bumpspec invocation.

Keep provenance capture on the pristine pinned checkout. Carryover and
version-reset rules now operate on the overlaid working spec. Local and
locked components retain their existing lifecycle.

Add an in-memory pipeline regression proving macros, overlays, and source
manifest updates precede carryover and bumping, and preserve macro-load
directives when rewriting the spec. Update user and emitted guidance.

Validation: mage fix all, mage unit, mage check all, and mage docs passed.
Build passed through mage all; Docker scenarios remain environment-blocked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Keep the working checkout's .git entry through render comparison instead of
removing it. Skip that root entry during directory traversal, so object
databases are neither scanned nor compared.

Continue excluding .git when moving prepared output. Add regression tests
for normal and check-only rendering, unreadable ignored metadata, and
payload paths that must still be compared.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Compare the overlaid, carried-forward tree before invoking the final
rpmdev-bumpspec. Let check-only return at that comparison without requiring
or running the final bump.

Keep normal rendering's unconditional bump and include any spec changes
from it in the reported result. Pass the worker context to the relocated
command, and update ordering regressions, user documentation, and emitted
agent guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Reject unchanged lockless upstream renders unless --no-change-rebuild is
set. Ignore .no-change-rebuild only in existing output when comparing,
and record exact date -Is output in the working checkout before bumping
an explicitly requested no-change rebuild.

Preserve prior output on no-change refusals and return those errors even
without --fail-on-error. Keep this policy scoped to lockless upstream
renders; check-only remains read-only. Cover flag parsing, comparisons,
forced rebuilds, and timestamp failures, and refresh CLI documentation
and emitted agent guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Find the last component render with a path-scoped native git log
instead of go-git's project-wide tree diffs. Pin the query to the
already-resolved HEAD and treat the directory path literally.

Keep committed spec and configuration loading unchanged. Cover the
command arguments, empty results, subprocess errors and missing objects
with in-memory tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Carry the committed -b option into an unprocessed autorelease spec and
replace the working changelog with its committed contents. Use base 1
when the option is omitted, without running host release queries.

Retain legacy-marker migration and version-change reset behavior. Add
in-memory regressions and update the user guide and emitted agent skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Keep an omitted committed autorelease -b option absent in the working
spec instead of adding -b 1. Remove any working numeric base while
preserving the macro's other options and committed changelog carryover.

Cover bare and braced macro forms and update user and agent guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Detect version changes immediately after reading the working and
committed specs. Calculate or carry release state only for a changed
version or missing output, without restoring the original release.

Move autorelease changelog generation and carryover into the later
changelog phase so they still run when the version is unchanged. Keep
upstream change descriptions independent of release preparation.

Update regression tests, user documentation and emitted agent guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Always calculate initial autorelease bases and carry legacy autorelease
bases, regardless of version changes. For modern output, carry the
committed base or its omission only when versions match. Otherwise,
calculate the upstream numeric base.

Omit -b when a calculated base is 1, including legacy expansion, and
preserve other macro options. Retain explicit modern bases during
unchanged-version carryover.

Carry static Release values or baserelease definitions only when committed
dist-git output exists and its version matches. Keep working upstream
values for new outputs and version changes.

Keep changelog handling independent of version changes. Recalculating a
modern autorelease base still carries the committed changelog rather than
regenerating it.

Ignore root .no-change-rebuild markers on both sides when comparing
prepared and existing output. Continue comparing nested files with that name.

Never replace failed lockless renders with RENDER_FAILED. Leave existing
output unchanged until replacement starts. On later failures, clear the
component output, reset its staged paths, and check out committed output
if the directory previously existed. Otherwise, leave the output absent.
Use no recovery backups or index snapshots, and defer lockless aliases
until rendering and any automatic commit succeed.

Update regression coverage, user documentation, and emitted agent guidance.

Validation: mage fix all, mage check all, and mage docs passed. Unit tests
passed under mage all; scenarios remain blocked by Docker provider setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Add --changelog-comment for lockless upstream renders. Pass its exact
value to rpmdev-bumpspec -c and use it as the automatic Git commit subject.
Default to update <component-name> when the flag is omitted, and retain
upstream changes only in the Git commit body.

Add --no-git-commit to leave rendered output uncommitted without staging
it. Keep the final release bump, publication, failure recovery, and alias
handling active. Locked and local component behavior is unchanged.

Cover default, custom, explicitly empty, and no-commit cases through the
preparation, bump, publication, and automatic commit pipeline. Update user
guidance, emitted skills, and generated CLI documentation.

Validation: mage fix all, mage check all, mage docs, and mage unit passed.
CLI and emitted-skill smoke checks passed. mage all and mage scenarioUpdate
remain blocked by unavailable Docker providers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Add azldev comp make-lockless with the standard component selectors.
Resolve the selection without lock validation, append missing exact
names to the top-level lockless-components.txt, and run the existing
refresh-upstream-commit pipeline for that selection.

Preserve existing list contents and lock files. Refresh already-listed
components without duplicating entries, and update the in-memory mode
selection before refreshing. Non-upstream components use the existing
generated-pin cleanup behavior.

Keep the selection and successful pin updates if refreshing fails so the
command can be retried. Dry runs leave both selection and pins untouched.
Cover selection, idempotency, missing newlines, refresh failures, local
components, and dry runs. Update guides, emitted skills, and CLI docs.

Validation: mage fix all, mage check all, mage docs, and mage unit passed.
CLI and emitted-skill install/show smoke checks passed. mage all and
mage scenarioUpdate remain blocked by unavailable Docker providers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Retain the original Release tag prefix and its spaces or tabs in both
spec editors rather than replacing the separator with a single space.
Keep existing formatting behavior for other tags unchanged.

This preserves lockless Release alignment through overlays, static and
baserelease carryover, autorelease base edits, and final publication.
Cover differently aligned conditional tags, tabs, zero spacing,
autorelease edits, and the overlay-to-bump render pipeline.

Update the lockless workflow guide and emitted agent skills. Verify the
installed rpmdev-bumpspec retains alignment during its numeric bump.

Validation: mage fix all, mage unit, mage check all, and mage docs passed.
Unit tests also passed under mage all; Docker-dependent scenarios remain
blocked. Emitted-skill install/show smoke checks passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Emit only the component spec table in generated upstream pin TOML files.
Preserve TOML key quoting and compatibility with existing parent tables.

Cover compact output, quoted component names, and legacy-file loading.
Document the generated format in the lockless workflow guide.

Validation: mage fix all, mage unit, and mage check all passed. mage all
built successfully, but scenarios remain blocked by SELinux and Docker.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51
Prepare changelog state before release carryover in the fetched checkout.
Run both before writing macros, applying overlays, and updating sources.

Base version-dependent carryover on the upstream spec before overlays.
Allow overlays to override the prepared release and changelog without
reapplying carryover afterwards.

Update regression tests, CLI help, user documentation, and emitted skills.

Validated with mage unit, mage check all, mage docs, and agent smoke tests.
A current-code render of rust-git2_0.19 also succeeded. Full scenarios and
snapshot updates remain blocked by the host Docker/SELinux setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3dc8e9aa-35cd-42a2-9377-a73317ee4a51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unpublished findings identify a critical regression in cross-branch commit pinning and failures on ignored unreadable directories, warranting human assessment.

No open issues 🎉

Review effort: Balanced

Add UpdateExistingTagFunc, which computes each matching tag's new value
from its current value, and GetTags, which returns every matching tag
value in spec order. Both are implemented for the legacy and structural
editors and exposed on the Spec facade.

UpdateExistingTag is now a wrapper that returns the same value for every
tag, so its output and errors are unchanged for existing callers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16503351-1bf3-4693-96f1-26283e4fc641
Lockless rendering read only the last Release tag and wrote its updated
value to every Release tag. Specs with conditional Release tags, such as
yara's '%if %{with release}' / '%else' pair, had every branch replaced
by the last one, changing the default build's NEVR.

Compute the autorelease base once and apply it to each Release tag,
keeping each tag's own options. Static carryover now copies committed
Release values by position and fails when the upstream and committed
tag counts differ. Specs that mix '%autorelease' and static Release
tags, and committed specs with differing '%autorelease' tags converted
to a static release, now fail with a specific error.

Locked components do not use this code path. Lockless specs with a
single Release tag render exactly as before.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16503351-1bf3-4693-96f1-26283e4fc641
Copilot AI balanced review requested due to automatic review settings November 8, 2026 06:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to evaluate unpublished findings concerning cross-branch pinned-commit checkout failures and lost error diagnostics when the mock probe fails.

No open issues 🎉

Review effort: Balanced

Historical project snapshots are written against older config schemas.
Strictly decoding them fails once azldev drops a field, for example the
removed [test-suites] table in older images.toml files. That broke the
lockless render upstream history lookup for every component last
rendered before the removal, so render commits fell back to a generic
"Update <name> to version <ver>" message instead of the upstream log.

Always ignore unknown fields when loading historical configuration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8b620ba1-9249-46b7-bfb4-78616d6f1ec1
Lockless render validation queried existing and new source NEVRs with plain
rpmspec, which expands an unprocessed `%autorelease -b N` to N. Builds
instead filter the rendered directory's history and let rpmautospec count
commits, so valid base bumps were rejected (e.g. SymCrypt, telegraf) and
the check did not reflect the release actually built.

For unprocessed %autorelease specs, reconstruct the filtered rendered
history and run `rpmautospec process-distgit` before querying. The existing
spec uses committed history; the new spec adds the prepared output as the
next commit unless its tree is unchanged. Merge-free histories are replayed
into a temporary repository that reads project objects via alternates and
never writes to the project; histories with merges fall back to cloning and
running `git filter-repo --subdirectory-filter`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8b620ba1-9249-46b7-bfb4-78616d6f1ec1
Copilot AI balanced review requested due to automatic review settings November 8, 2026 06:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because unpublished findings identify pinned-commit checkout failures and ignored macro undefines that can disrupt source preparation and builds.

No open issues 🎉

Review effort: Balanced

rpmdev-bumpspec bumps every line starting with 'Release:', including
text inside %changelog, such as a quoted spec snippet in a previous
entry. Lockless renders then rewrote that historical changelog text.

Before running rpmdev-bumpspec for a lockless component, temporarily
mask %changelog lines that start with 'Release:' and restore them
afterward, also restoring the original spec if the bump fails. Specs
without such lines are bumped exactly as before, and locked components
are unaffected because they use a separate bumpspec path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16503351-1bf3-4693-96f1-26283e4fc641
Copilot AI balanced review requested due to automatic review settings November 8, 2026 16:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because lockless builds forward raw options that can reinstate macros excluded by build.undefines, causing build settings to diverge from the rendered spec.

No open issues 🎉

Review effort: Balanced

@ddstreet

Copy link
Copy Markdown
Contributor Author

Copilot can you check all your previous reviews and comments, and give a summary of anything you still see as needing action?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The lockless build ignores Build.Undefines, silently re-enabling disabled macros in both SRPM and binary builds.

4 open issues

Review effort: Balanced

Comment thread internal/rpm/mock/mock.go Resolved
Use the source manager to retrieve configured payloads before downloading
remaining dist-git manifest entries from lookaside. Preserve download-origin
fallback, custom generation, hash validation, and disable-origins policy
without replaying overlays or replacing the committed rendered spec.

Cover origin downloads with and without a manifest, disabled origins, and
custom-provider dispatch. Update build guidance for both skill catalogs.

Validation: mage fix all, mage unit, and mage all build/quality checks
passed. Container scenarios were blocked by Docker socket permissions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Compare each component's committed rendered tree before filtering unchanged
inputs. Include spec, sidecar, manifest, and no-change-rebuild marker changes
so render-only commits enter all-component rebuild selection. Continue to
report sources-change only for manifest content changes.

Cover output-only changes, added/removed renders, unchanged component trees,
and unrelated changes using in-memory Git repositories. Document the
additional change-detection input.

Validation: mage fix all, mage unit, and mage all build/quality checks
passed. Container scenarios were blocked by Docker socket permissions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Include captured stderr when the plugin prerequisite probe fails. Keep the
original error wrapped so callers can still inspect its exit status.

Add a regression test for a nonzero probe exit that reports diagnostics and
prevents the SRPM build from starting.

Validation: mage fix all, mage unit, and mage all build/quality checks
passed. Container scenarios were blocked by Docker socket permissions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Do not limit clones to one branch when the component has an effective
upstream commit. Explicit pins and locked commits may exist only on other
branches and cannot be checked out from a single-branch clone. Keep the
single-branch optimization for floating sources.

Test generated clone arguments and checkout targets for floating, explicit,
and locked pins without invoking external commands. Document pin behavior.

Validation: mage fix all, mage unit, and mage all build/quality checks
passed. Container scenarios were blocked by Docker socket permissions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Stop forwarding live build defines and with/without flags to Mock when
building committed dist-git. The rendered spec already loads the resolved
macro file, including TOML undefine semantics. Remove the redundant builder
option path for both SRPM and binary builds while retaining local repos,
rpmautospec, and no-check behavior.

Test that conflicting live macro settings do not reach Mock or overwrite
the committed macro file. Document the committed-spec source of macros.

Validation: mage fix all, mage check all, and the full unit suite passed.
The build and default quality checks passed; Docker-enabled container
scenarios are still running separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Emit resolved build and provenance macros as sorted, lazy %define entries
before user overlays. Do not write an .azl.macros file or inject its load
directive and Source9999 tag for lockless components.

Keep file-based macro loading unchanged for locked components. Cover empty
values, deferred expansion, with/without flags, and skipped overlays. Update
CLI documentation and emitted agent skills for both workflows.

Unit, quality, and changed-line mutation checks pass. Scenario failures for
stale global-flag and schema snapshots also reproduce before this change.
Network-dependent scenarios were not completed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Regenerate local and container help, MCP, and schema snapshots to match
removal of the global --without-lockfile flag and the updated lockless
file-filter description.

Verify with mage scenarioUpdate and mage scenario, both using
TESTING_DISABLE_NETWORK_TESTS=1. The full network-dependent suite remains
unverified after its earlier stall during Mock chroot cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83cf8df4-30c0-474c-8dca-e3b3a2e54873
Copilot AI balanced review requested due to automatic review settings November 11, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The build accepts fetched source files without validating them against the committed manifest’s hashes, allowing an SRPM to contain source bytes that differ from its committed dist-git inputs.

1 open issue
4 resolved since last review

Review effort: Balanced

Comment on lines +118 to +126
if !exists {
if err := downloadsources.DownloadSources(env, &downloadsources.DownloadSourcesOptions{
Directory: dir, ComponentName: component.GetName(),
}); err != nil {
return fmt.Errorf("downloading dist-git sources:\n%w", err)
}

break
}
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.

2 participants