Skip to content

refactor(fontpacks): 23505 collision mapping moves behind the repository seam (gh-#406 slice 2) - #509

Merged
genwave-radio merged 4 commits into
mainfrom
refactor/gh-406-s2-fontpack-error-contract
Aug 14, 2026
Merged

refactor(fontpacks): 23505 collision mapping moves behind the repository seam (gh-#406 slice 2)#509
genwave-radio merged 4 commits into
mainfrom
refactor/gh-406-s2-fontpack-error-contract

Conversation

@genwave-radio

@genwave-radio genwave-radio commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

gh-#406 L2 burn-down, slice 2 of 5 — was stacked on slice 1 (#508, now merged; branch carries main merged in). Merge before #510#512; merge commits, not squash.

⚖️ FontPackController was L2-exempt for catching PostgresException 23505 and feeding the raw exception to its collision-response helper. Finding: the helper never read anything off the exception (not .Detail, not .ConstraintName) — it only logged it and re-derived file/owner by re-reading the installed packs. So the seam is clean: new FontPackUpsertResult union (Upserted / FileCollision(File, OwnerSlug) — sanitized domain facts, both-null only as the documented defensive fallback), the 23505 catch and the resolve-collision re-read move into FontPackRepository, and the controller switches on the case → byte-identical 409 wording and WARN text. using Npgsql gone from Host; F15.7 posture unchanged.

🛡️ CodeQL follow-up (e90e5d9): the bot rightly flagged that the relocated WARN logged the raw slug below the controller's LogSafeText gate. Now sanitized at the seam via the shared GenWave.Core.Logging.LogSanitize.Strip (the Core barrier built for cs/log-forging) — a no-op for any regex-gated slug that can reach it today, a closed door for any future caller. Thread on the inline comment has the full reasoning.

📉 Baseline row deleted (4 debt rows → 3).

✅ Build 0 warnings; Architecture 104/104; MediaLibrary 763/763 at original stack tip + FontPack 12/12 re-run post-merge; Host 1723/1723 at stack tip + FontPack 27/27 re-run post-merge; Core 144/144.

Base automatically changed from refactor/gh-406-s1-schedule-error-contract to main August 14, 2026 01:35
Comment thread src/GenWave.MediaLibrary/Station/FontPackRepository.cs Fixed
…am (gh-#406 slice 2, CodeQL cs/log-forging)

The collision WARN moved below the controller's LogSafeText gate, and
the repository seam can't see the caller's SlugSegment validation —
CodeQL alert #33 flagged the gap. GenWave.Core.Logging.LogSanitize is
the shared barrier built for this alert class; a valid slug passes
through unchanged.
…om:GenWave-Org/genwave into refactor/gh-406-s2-fontpack-error-contract
@genwave-radio
genwave-radio merged commit e767084 into main Aug 14, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the refactor/gh-406-s2-fontpack-error-contract branch August 14, 2026 01:44
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants