Skip to content

fix(sync): recompute changed components after reverts - #419

Open
mosheabr wants to merge 1 commit into
mainfrom
fix/sync-recompute-changed-components
Open

fix(sync): recompute changed components after reverts#419
mosheabr wants to merge 1 commit into
mainfrom
fix/sync-recompute-changed-components

Conversation

@mosheabr

@mosheabr mosheabr commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

The problem

The rsync loop records a component as changed the moment rsync produces a diff (line 129). The drift, compliance and prune steps run after it and revert those files, but nothing ever removed the component from the list — every later write is an append, and line 844 only dedupes.

So a component whose skills were all held for signature drift still comes out labelled "updated", contradicting the held list printed directly below it in the same PR body.

This is not a one-off. Measured across four syncs:

sync PR listed as "Components updated" skill dirs actually changed
#417 ~90 1
#409 29 3
#403 29 1
#396 31 2

#417 named AIQ, CUDA-Q, DeepStream, Megatron-Core, NeMo MBridge, NeMo Relay, NeMo Retriever, TAO Toolkit and cuDF while changing exactly 8 files, all under skills/doca-telemetry-exporter. Every other component on that list appears in the held section.

It also explains the title length that #412 had to cap — the title is built from this same list, so it was long because it named components that were never updated.

The fix

One new step after Regenerate README tables, before Build sync summary, that rebuilds the list from the working tree once every mutating step has run.

Two guards worth calling out:

  • Entries that are not components (orphan pruning, plugin catalog) describe changes outside skills/, so they are re-established from their own evidence rather than carried over.
  • A dirty tree can never recompute to "no changes". A sync that only touches README tables or generated files still opens a PR, via a catalog maintenance entry.

The step also logs what it dropped, so the reverted-vs-updated distinction is visible in the run output.

Verification

Extracted the step and ran it against the real components.d set (36 components) with a working tree manipulated per case:

Case Expected Result
#417 replay: 10 listed, only DOCA dirty DOCA only 10 → 1 ✅
All reverted, clean tree empty, no PR empty ✅
README-only change PR still opens catalog maintenance
Orphan pruning ran reported orphan pruning
Two components dirty both listed CUDA-Q, DOCA
Skill dir deleted by compliance still reported CUDA-Q

The rsync loop records a component as changed the moment rsync produces
a diff. The drift, compliance and prune steps run after it and revert
those files, but nothing ever removed the component from the list, so a
component whose skills were all held was still reported as updated.

Every sync PR has been affected. #417 listed AIQ, CUDA-Q, DeepStream,
Megatron-Core, NeMo MBridge, NeMo Relay, NeMo Retriever, TAO Toolkit and
cuDF under "Components updated" while changing exactly 8 files, all in
skills/doca-telemetry-exporter. Earlier syncs are the same: #409 listed
29 with 3 directories changed, #403 listed 29 with 1, #396 listed 31
with 2. The body contradicts itself, since those components also appear
in the held list directly below.

Recompute the list from the working tree after every step that can
mutate it. Non-component entries are re-established from their own
evidence rather than carried over, and a dirty tree can never recompute
to "no changes", so a README-only or generated-file sync still opens
a PR.

This also shrinks the title that #412 had to cap: the length came from
naming components that were never updated.

Signed-off-by: Moshe Abramovitch <moshea@nvidia.com>
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.

1 participant