refactor(fontpacks): 23505 collision mapping moves behind the repository seam (gh-#406 slice 2) - #509
Merged
Conversation
…ory seam (gh-#406 slice 2)
Base automatically changed from
refactor/gh-406-s1-schedule-error-contract
to
main
August 14, 2026 01:35
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
⚖️
FontPackControllerwas L2-exempt for catchingPostgresException23505 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: newFontPackUpsertResultunion (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 intoFontPackRepository, and the controller switches on the case → byte-identical 409 wording and WARN text.using Npgsqlgone 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
LogSafeTextgate. Now sanitized at the seam via the sharedGenWave.Core.Logging.LogSanitize.Strip(the Core barrier built forcs/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.