WIP: fix(version): preserve source identity for long release labels #829

Draft
NitnekLeBorgne wants to merge 1 commit from NitnekLeBorgne/Longshot-contributions:fix/version-source-suffix-20261115 into main
First-time contributor

Type: fix · Risk: low · Tested on: Linux, authored Python fixtures; GPU irrelevant · Needs: full required suite; Windows manual Python replay

WIP; private prepared commit c597ff8de0a6bf13d0077e3c601dd4a0679bc520, based on a00c485c71f50d3e698985d91a3f72edfb1ea020. Observed main aa95d35f3d021b27328b6d68109666a46c340aee is not the base: matching relevant source blobs/modes does not constitute a rebase or refreshed-main qualification. Private only.

Why

Long release labels can erase source identity, making different builds display the same version. The retained tracker search covered 193 open issues; no matching issue or closing claim.

How to reproduce

Seen on: Linux, authored source roots; GPU irrelevant.
Settings and switches: existing LONGSHOT_VERSION, 80-character safe label.
Steps: Replay the extended nx2/test_version.py against the pinned base and candidate.
Expected: Both roots retain complete source suffixes within 80 characters.
Actual: The base truncates away the suffix.

What changed

Reserve the complete source suffix before shortening the sanitized release prefix. Short-label output, fingerprints and release selection are unchanged.

  • nx2/version.py, describe(): two production lines budget the prefix.
  • nx2/test_version.py: authored assertion regressions for roots, boundaries, sanitization and safe C defines; not a unittest method count.

Measurements

Verdict: Retained source-only regression proof passes on the candidate, not a performance benchmark or new execution.
Hardware: Author's Linux, Python standard library; GPU/driver irrelevant; CPU/RAM not recorded.
Scene: Authored roots and long labels, no game data.
Method: Original RED/GREEN and baseline/final script receipts; no timing or median.
How to reproduce: python -I -B nx2/test_version.py, using the unchanged extended script on each source export.

Check Before: main @ a00c485c71 After: this PR @ c597ff8de0
Extended script exit 1 0
Original baseline / final script exit 0 0
Long-label source suffix Lost Complete; both descriptions 80 characters

Controlled fingerprints remain b017c984 / a05725bf. Original final output:

version: ok (unknown (source 2dfc4758))

Evidence: roles/version-provenance-author/output/ original RED, BASELINE, FINAL and witness receipts; tests were not rerun for this description.

Flags and settings

Existing input only; no new switch or default change.

Flag Before this PR After this PR Effect Helps / untested Recommendation
LONGSHOT_VERSION Existing selection; long labels truncate assembled text Same selection; long labels reserve suffix Preserve source identity Authored labels pass; game display untested Keep existing defaults

Testing

Tested: Retained author Linux RED/GREEN, baseline/final scripts, two source witnesses; independently reviewed, not replayed here. Boundaries, sanitization, LF/CRLF, content identity and C defines are covered.
Not tested: Full required suite, newer-main context, Windows, built game or visual display. No GPU/game qualification claimed or required for this Python helper.
Must be tested:

  • Linux, by hand: run python -I -B tests/run_all.py, expecting required checks to pass or failures/skips compared and named against main before merge.
  • Windows, by hand, GPU irrelevant: run python -I -B nx2/test_version.py from a UTF-8 path, expecting complete suffixes and safe defines.

Risks

What could break: Very long labels show a shorter prefix; sanitization and the 80-character bound remain.
Turning it off: Revert the commit.
Compatibility: No save/options/cache/vk ABI changes. Only long-label text changes; no layout edit. Handwritten GPL-3.0-or-later code, no external or game-derived material.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
**Type:** fix · **Risk:** low · **Tested on:** Linux, authored Python fixtures; GPU irrelevant · **Needs:** full required suite; Windows manual Python replay WIP; private prepared commit `c597ff8de0a6bf13d0077e3c601dd4a0679bc520`, based on `a00c485c71f50d3e698985d91a3f72edfb1ea020`. Observed main `aa95d35f3d021b27328b6d68109666a46c340aee` is not the base: matching relevant source blobs/modes does not constitute a rebase or refreshed-main qualification. Private only. ## Why Long release labels can erase source identity, making different builds display the same version. The retained tracker search covered 193 open issues; no matching issue or closing claim. ## How to reproduce **Seen on:** Linux, authored source roots; GPU irrelevant. **Settings and switches:** existing `LONGSHOT_VERSION`, 80-character safe label. **Steps:** Replay the extended `nx2/test_version.py` against the pinned base and candidate. **Expected:** Both roots retain complete source suffixes within 80 characters. **Actual:** The base truncates away the suffix. ## What changed Reserve the complete source suffix before shortening the sanitized release prefix. Short-label output, fingerprints and release selection are unchanged. - `nx2/version.py`, `describe()`: two production lines budget the prefix. - `nx2/test_version.py`: authored assertion regressions for roots, boundaries, sanitization and safe C defines; not a unittest method count. ## Measurements **Verdict:** Retained source-only regression proof passes on the candidate, not a performance benchmark or new execution. Hardware: Author's Linux, Python standard library; GPU/driver irrelevant; CPU/RAM not recorded. Scene: Authored roots and long labels, no game data. Method: Original RED/GREEN and baseline/final script receipts; no timing or median. How to reproduce: `python -I -B nx2/test_version.py`, using the unchanged extended script on each source export. | Check | Before: main @ a00c485c71f50d3e698985d91a3f72edfb1ea020 | After: this PR @ c597ff8de0a6bf13d0077e3c601dd4a0679bc520 | |---|---|---| | Extended script exit | 1 | 0 | | Original baseline / final script exit | 0 | 0 | | Long-label source suffix | Lost | Complete; both descriptions 80 characters | Controlled fingerprints remain `b017c984` / `a05725bf`. Original final output: ``` version: ok (unknown (source 2dfc4758)) ``` Evidence: `roles/version-provenance-author/output/` original RED, BASELINE, FINAL and witness receipts; tests were not rerun for this description. ### Flags and settings Existing input only; no new switch or default change. | Flag | Before this PR | After this PR | Effect | Helps / untested | Recommendation | |---|---|---|---|---|---| | `LONGSHOT_VERSION` | Existing selection; long labels truncate assembled text | Same selection; long labels reserve suffix | Preserve source identity | Authored labels pass; game display untested | Keep existing defaults | ## Testing **Tested:** Retained author Linux RED/GREEN, baseline/final scripts, two source witnesses; independently reviewed, not replayed here. Boundaries, sanitization, LF/CRLF, content identity and C defines are covered. **Not tested:** Full required suite, newer-main context, Windows, built game or visual display. No GPU/game qualification claimed or required for this Python helper. **Must be tested:** - Linux, by hand: run `python -I -B tests/run_all.py`, expecting required checks to pass or failures/skips compared and named against main before merge. - Windows, by hand, GPU irrelevant: run `python -I -B nx2/test_version.py` from a UTF-8 path, expecting complete suffixes and safe defines. ## Risks **What could break:** Very long labels show a shorter prefix; sanitization and the 80-character bound remain. **Turning it off:** Revert the commit. **Compatibility:** No save/options/cache/vk ABI changes. Only long-label text changes; no layout edit. Handwritten GPL-3.0-or-later code, no external or game-derived material. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [ ] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here.
fix(version): preserve source identity for long release labels
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
c597ff8de0
Keep the complete source fingerprint suffix within the existing 80-character bound.
Truncate only the sanitized release prefix and retain short-label behavior.
Add authored long-label, boundary and sanitization regressions.

Assisted-by: Hermes Agent (OpenAI GPT-6.1-sol)
Co-Authored-By: Claudia (OpenAI GPT-6.1-sol)
HumanBean force-pushed fix/version-source-suffix-20261115 from c597ff8de0
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to ce4ec10146
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 4s
Third-party parts / As their notes say (pull_request) Successful in 8s
2026-11-15 18:43:00 +00:00
Compare
Owner

Rebased onto main @ bbe6fdf: no conflicts. No tests were run here; the test boxes stay yours.

Rebased onto `main` @ bbe6fdf: no conflicts. No tests were run here; the test boxes stay yours.
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 4s
Third-party parts / As their notes say (pull_request) Successful in 8s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/version-source-suffix-20261115:NitnekLeBorgne-fix/version-source-suffix-20261115'
git switch 'NitnekLeBorgne-fix/version-source-suffix-20261115'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!829
No description provided.