Skip to content

Fix version-forward regression creating duplicate versions - #436

Merged
ptr727 merged 3 commits into
developfrom
fix-version-forward-duplicate-versions
Jun 19, 2026
Merged

Fix version-forward regression creating duplicate versions#436
ptr727 merged 3 commits into
developfrom
fix-version-forward-duplicate-versions

Conversation

@ptr727

@ptr727 ptr727 commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Problem

The daily CodeGen action started failing with exit code 134 (SIGABRT) — a failed Debug.Assert(versionSet.Count == productInfo.Versions.Count) in ImageInfo.CreateImages. Reproduced from the WisenetWAVE trace: the online Latest regressed below a version already present as Stable, and ReleaseVersionForward restored the old Latest by adding a second row for 6.1.2.42921, so two entries shared a version number and collapsed in the sorted set.

The vendor JSON was valid — our anti-regression merge created the duplicate.

Fix

  • ReleaseVersionForward: fold the restored label into the existing same-version entry instead of adding a duplicate row → 6.1.2[Stable, Latest].
  • ProductInfo.VerifyNoDuplicateVersions(): an all-build guard that throws (with product + versions) before the version file is written, covering both the fetch and forward-merge paths. The Debug.Assert stays as a backstop.
  • Defensive vendor parsing (ReleasesJsonSchema.VerifyReleases): reject releases.json that tags one version number with conflicting publication types; fold benign same-type duplicates.

Hardening / cleanup

  • Consolidated version parsing into VersionInfo.NormalizeVersion/ParseVersion, and the version/label assembly into ProductInfo.CreateVersionInfo (shared with the test mirror, removing the divergence-prone duplication).
  • Made failure paths descriptive: replaced context-free Debug.Assert/bare exceptions on the vendor-data paths with messages carrying product, build number, version, and URL; disambiguated "label not found" warnings.

Tests

  • WisenetWAVE regression (folds to one 6.1.2 entry with both labels, no duplicate numbers).
  • VerifyNoDuplicateVersions throws on duplicates.
  • Invalid vendor JSON: throws on conflicting publication types, folds same-type duplicates.

All 20 tests pass; CSharpier + dotnet format style clean.

Release chore (maintainer-prepared)

Regenerated Docker/* and Make/{Version,Matrix}.json, release notes in README.md / HISTORY.md (Version 2.13), and version.json floor bump to 2.14 (keeps develop a minor ahead).

ptr727 and others added 2 commits June 19, 2026 10:05
ReleaseVersionForward restored a regressed label by adding the old version
as a new row; when that version number already existed under another label
(e.g. restoring Latest onto a version already tagged Stable) the result had
two entries sharing a version number, which collapsed in ImageInfo's sorted
set and tripped the Debug.Assert (SIGABRT, exit 134) that broke codegen.

- Fold the restored label into the existing same-version entry instead of
  adding a duplicate row.
- Add ProductInfo.VerifyNoDuplicateVersions() as an all-build guard run
  before the version file is written; keep the assert as a backstop.
- Defensive vendor parsing: reject releases.json that tags one version with
  conflicting publication types, fold benign same-type duplicates.
- Consolidate version parsing (VersionInfo.NormalizeVersion/ParseVersion)
  and the version/label assembly (ProductInfo.CreateVersionInfo) shared with
  the test mirror.
- Make failure paths descriptive (replace context-free Debug.Assert/bare
  exceptions on the vendor-data paths) and disambiguate warnings.
- Add tests: WisenetWAVE regression, duplicate-version guard, invalid vendor
  JSON (fail on conflict, fold on duplicate).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Regenerate Docker/* and Make/{Version,Matrix}.json against current release
  data; the version-forward fix produces the de-duplicated WisenetWAVE set
  (6.1.1 Latest + 6.1.2 Stable).
- Document the regression fix in README.md and HISTORY.md (Version 2.13).
- Bump NBGV floor in version.json to 2.14 to keep develop a minor ahead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 19, 2026 17:05

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.

Pull request overview

Fixes a CodeGen regression where ReleaseVersionForward could introduce duplicate version rows when a vendor “Latest” regressed below an already-present “Stable”, causing ImageInfo.CreateImages() set-collisions and assertion failures. The PR also hardens vendor parsing/error paths and updates generated artifacts + release documentation/version floors.

Changes:

  • Update ReleaseVersionForward to fold restored labels onto an existing same-version entry (instead of adding a duplicate) and add a guard to detect duplicate version numbers before writing the version file.
  • Centralize version normalization/parsing and improve error messages/exception types across vendor-data ingestion paths.
  • Regenerate version/matrix JSON + product Dockerfiles and update release notes (2.13) plus the NBGV floor bump (2.14).

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
version.json Bumps NBGV version floor to 2.14.
README.md Updates release notes section to 2.13 and refreshes the table of contents formatting.
Make/Version.json Regenerated version inputs (notably WisenetWAVE stable/latest entries).
Make/Matrix.json Regenerated build matrix tags/args for updated versions (incl. WisenetWAVE tag assignments).
HISTORY.md Adds release history entry for 2.13.
Docker/NxWitness.Dockerfile Regenerated to updated NxWitness version/URLs.
Docker/NxWitness-LSIO.Dockerfile Regenerated to updated NxWitness-LSIO version/URLs.
Docker/NxMeta.Dockerfile Regenerated to updated NxMeta version/URLs.
Docker/NxMeta-LSIO.Dockerfile Regenerated to updated NxMeta-LSIO version/URLs.
Docker/NxGo.Dockerfile Regenerated to updated NxGo version/URLs.
Docker/NxGo-LSIO.Dockerfile Regenerated to updated NxGo-LSIO version/URLs.
Docker/DWSpectrum.Dockerfile Regenerated to updated DW Spectrum version/URLs.
Docker/DWSpectrum-LSIO.Dockerfile Regenerated to updated DW Spectrum-LSIO version/URLs.
CreateMatrixTests/VersionForwardTests.cs Adds regression coverage ensuring label folding prevents duplicate versions and validates duplicate detection behavior.
CreateMatrixTests/ReleasesTests.cs Adds tests for conflicting publication types and benign duplicate folding; switches test helper to share production logic.
CreateMatrix/VersionJsonSchema.cs Improves schema-version failure behavior with a descriptive NotSupportedException.
CreateMatrix/VersionInfo.cs Centralizes normalization/parsing and uses it for build-number extraction and comparisons.
CreateMatrix/ReleaseVersionForward.cs Implements label folding onto existing same-version entry; improves log messaging.
CreateMatrix/ReleasesJsonSchema.cs Hardens vendor parsing: clearer unknown-publication-type error + verifies/folds vendor release entries.
CreateMatrix/Program.cs Adds a post-forward-merge duplicate-version guard before writing the updated version file.
CreateMatrix/ProductInfo.cs Refactors version+label assembly into CreateVersionInfo, improves error messaging, and adds VerifyNoDuplicateVersions().
CreateMatrix/PackagesJsonSchema.cs Replaces zero-count guard with a more descriptive exception.
CreateMatrix/ImageInfo.cs Aligns image naming with ProductInfo.GetDocker(...) convention.
CreateMatrix/Dockerfile.cs Improves error messages when expected products/labels are missing.

Comment thread CreateMatrix/ReleasesJsonSchema.cs
Group-by parsed Version threw a context-free FormatException when a vendor
release had an empty/unparseable version. Validate up front and throw a
descriptive error (product, version, publication type) instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit 561fc06 into develop Jun 19, 2026
12 checks passed
@ptr727
ptr727 deleted the fix-version-forward-duplicate-versions branch June 19, 2026 17:23
ptr727 added a commit that referenced this pull request Jun 19, 2026
The 2.13 release chore (merged in #436) bumped `version.json` to 2.14,
but this release ships as **2.13** (see README/HISTORY). The next-cycle
bump to 2.14 is a separate post-release step per AGENTS.md versioning,
so restore the floor to 2.13.

Only `version.json` changes; no image files, so no smoke build.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ptr727 added a commit that referenced this pull request Jun 19, 2026
Promotes `develop` to `main` for the **2.13** release.

## Headline fix

CodeGen was failing with SIGABRT (exit 134) — `ReleaseVersionForward`
created duplicate version rows when an online *Latest* regressed below a
version already present as *Stable*. Now folds the restored label into
the existing entry, with an all-build `VerifyNoDuplicateVersions()`
guard before the version file is written, defensive vendor-JSON parsing
(reject conflicting publication types, fold benign duplicates),
descriptive failure messages, and regression tests (#436, #437).

## Also included (already on develop)

- Dependency bumps (#431, #432, #435) and codegen refreshes (#427,
#428).
- Versioning policy doc (#424) — note: the auto-bump rule is considered
flawed and will be reconciled separately in #418.

## Versioning

`version.json` is **2.13** (matches README/HISTORY release notes). The
flawed per-release auto-bump rule is intentionally not applied.

## Notes

Merging to `main` does not publish; the next scheduled publish picks it
up.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: ptr727-codegen[bot] <275599072+ptr727-codegen[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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.

2 participants