Skip to content

ci(sync-matrix): replace same-sublevel rows instead of stacking duplicates - #345

Closed
TheWildJames wants to merge 2 commits into
mainfrom
ci/sync-matrix-dedupe
Closed

TheWildJames wants to merge 2 commits into
mainfrom
ci/sync-matrix-dedupe

Conversation

@TheWildJames

Copy link
Copy Markdown
Member

What

The daily matrix sync (.github/workflows/sync-matrix.yml) appended a row for every new upstream month and never removed duplicates, so a sublevel could resolve to several rows. Example in the current tree: android14-6.1 carries two 145 rows (2025-08 parked as disabled and 2025-09), and android13-5.10 carries six 107 rows.

Now, when a month resolves to a sublevel already present, the sync removes the superseded row(s) and appends the new one — one row per sublevel, so a numeric os_patch_level always maps to exactly one month.

Replaced rows are called out in the PR

Every removed row is listed in the sync PR body under:

Replaced rows

One row per sublevel: the new month supersedes these older rows, which were removed.

so no matrix change lands silently.

Also included

  • .github/scripts/update_kernel_matrix.py — same add-or-replace rule for manual fixes:
    --group android14-6.1 --sublevel 180 --date 2026-10, with --dedupe for a one-off sweep, --dry-run, and --pr-note <file> to append the change summary to a PR body.

Verified

  • workflow YAML parses; the embedded sync python compiles (109 lines)
  • replacement logic exercised on a copy of android14-6.1.json: adding 145 @ 2025-10 collapses two rows to one and emits two replaces notes
  • no other behaviour changed: months with new sublevels still append, retired heads still rely on tag fallback

…cates

When a monthly release republishes a sublevel already in the matrix (e.g.
6.1.145 arriving for a new month, or an older row parked as disabled), the
sync now removes the superseded row(s) and keeps exactly one row per
sublevel, so a numeric sublevel always resolves to a single month.

Removed rows are reported under a 'Replaced rows' section in the sync PR
body, and a small helper (.github/scripts/update_kernel_matrix.py) does the
same add-or-replace by hand plus an optional --dedupe sweep.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 09:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

The replaced-rows note was only written when creating the PR; a re-sync that
supersedes rows against an already-open PR pushed the new configs with nothing in
the PR explaining them. Build the body once and edit the existing PR in place.
@TheWildJames
TheWildJames deleted the ci/sync-matrix-dedupe branch October 29, 2026 09:08
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