fix: the visible-version split is testable, not just rendered #283

Merged
bjoern merged 1 commit from feat/header-visible-split into main 2026-10-13 12:10:59 +02:00
Member

What this changes

Port of the review fix from Orihon #202 (Jibril's finding there, verbatim): the header's ?? "unknown" fallback was a branch no in-repo test could reach — typeof(Program).Assembly is fixed at runtime and the SDK always emits AssemblyInformationalVersionAttribute, so the render can never show it. Untested logic or dead code.

The split is now its own pure function — internal static string Visible(string?) — called by the static readonly field; the render is unchanged. InternalsVisibleTo Kagura.Integration.Tests already existed, so no plumbing moved.

Pinned: The_visible_version_splits_the_commit_short — four-case theory (stamped shape, tag with no commit, already-short commit, null → unknown), identical to Orihon's.

Verification

  • Mutation probe: fallback → "sabotaged" → the theory goes red; restored.
  • Full Kagura.Integration.Tests at the branch head: 794/794 (built with -p:NuGetAudit=false -p:WarnAsError=false — the NovelAI.ImageGen submodule pins ImageSharp 3.1.12 with known advisories; pre-existing, unrelated to this change, not touched here).

Keeps the three-repo header alignment (Kagura ↔ Tsumugi ↔ Orihon) exact — same span, same @code shape, same pin.

### What this changes Port of the review fix from Orihon #202 (Jibril's finding there, verbatim): the header's `?? "unknown"` fallback was a branch no in-repo test could reach — `typeof(Program).Assembly` is fixed at runtime and the SDK always emits `AssemblyInformationalVersionAttribute`, so the render can never show it. Untested logic or dead code. The split is now its own pure function — `internal static string Visible(string?)` — called by the `static readonly` field; the render is unchanged. `InternalsVisibleTo Kagura.Integration.Tests` already existed, so no plumbing moved. Pinned: `The_visible_version_splits_the_commit_short` — four-case theory (stamped shape, tag with no commit, already-short commit, `null` → `unknown`), identical to Orihon's. ### Verification - Mutation probe: fallback → `"sabotaged"` → the theory goes red; restored. - Full `Kagura.Integration.Tests` at the branch head: **794/794** (built with `-p:NuGetAudit=false -p:WarnAsError=false` — the `NovelAI.ImageGen` submodule pins ImageSharp 3.1.12 with known advisories; pre-existing, unrelated to this change, not touched here). Keeps the three-repo header alignment (Kagura ↔ Tsumugi ↔ Orihon) exact — same span, same `@code` shape, same pin.
fix: the visible-version split is testable, not just rendered
Some checks failed
CI / build (pull_request) Failing after 18s
CI / test (pull_request) Has been skipped
dedba7683c
Ported from Orihon #202 (review finding): the '?? "unknown"' fallback
was a branch no in-repo test could reach — the assembly is fixed at
runtime and the SDK always emits the attribute — untested logic or dead
code. The split is now its own pure function, AppHeader.Visible(string?),
called by the static field; a four-case theory pins the stamped shape, a
tag with no commit, an already-short commit, and null -> unknown.
Mutation probe: fallback -> 'sabotaged' -> red.
Member

probe

probe
Member

Bridge size test for the real thread — benign diagnostic, will be followed by the actual review. Disregard.

Bridge size test for the real thread — benign diagnostic, will be followed by the actual review. Disregard.
Member

test2

test2
Member

Jibril 2/8: Verified vs Orihon main: razor code and theory identical, ADRs aside. Alignment holds.

Jibril 2/8: Verified vs Orihon main: razor code and theory identical, ADRs aside. Alignment holds.
Member

Jibril 1/8: LGTM with reasons. Faithful port of the Orihon #202 fix; every claim re-verified.

Jibril 1/8: LGTM with reasons. Faithful port of the Orihon #202 fix; every claim re-verified.
Member

Jibril 2/8: Checked vs Orihon main: header code and theory byte-identical (ADRs and ns aside).

Jibril 2/8: Checked vs Orihon main: header code and theory byte-identical (ADRs and ns aside).
Member

Jibril 3/8: Behavior-preserving: every input the old render could reach yields identical output.

Jibril 3/8: Behavior-preserving: every input the old render could reach yields identical output.
Member

Jibril 4/8: null arm mirrors the FullVersion fallback, so tooltip and visible text can't disagree.

Jibril 4/8: null arm mirrors the FullVersion fallback, so tooltip and visible text can't disagree.
Member

Jibril 5/8: Mutation probes: fallback and passthrough mutants killed; survivor is equivalent.

Jibril 5/8: Mutation probes: fallback and passthrough mutants killed; survivor is equivalent.
Member

Jibril 6/8: Red CI build reproduced locally: NU1902/NU1903 ImageSharp 3.1.12 via submodule.

Jibril 6/8: Red CI build reproduced locally: NU1902/NU1903 ImageSharp 3.1.12 via submodule.
Member

Jibril 7/8: No package inputs touched here; restore identical at base. Advisory drift, not yours.

Jibril 7/8: No package inputs touched here; restore identical at base. Advisory drift, not yours.
Member

Jibril 8/8: Still, bump ImageSharp in the submodule soon; it blocks every build. Test2=mine too.

Jibril 8/8: Still, bump ImageSharp in the submodule soon; it blocks every build. Test2=mine too.
bjoern merged commit d1ad538fe2 into main 2026-10-13 12:10:59 +02:00
bjoern deleted branch feat/header-visible-split 2026-10-13 12:10:59 +02:00
Sign in to join this conversation.
No reviewers
No labels
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
TeamAI/Kagura!283
No description provided.